Using the data below, what is the equation for the line of best fit? Remember, put your answer in y = ax + b form and round any decimals to three places. Patient Calories Wt. loss/week lbs. 1 1500 2 2 1200 3 3 1800 1 4 2100 .5 5 2400 .75 6 1800 1 7 1200 5 8 2100 1 9 2400 .5 10 1500 2
You can use many methods in curve fitting, a good one for linear fitting is the Linear least squares
how do you do that???
As you need a linear fitting, you must solve a 2x2 linear system: Ax=B Where\[A = \left[\begin{matrix}n & \sum_{i=1}^{n}x_i \\ \sum_{i=1}^{n}x_i & \sum_{i=i}^{n}{x_i}^{2}\end{matrix}\right]\] \[x = \left(\begin{matrix}a \\ b\end{matrix}\right)\] \[B=\left(\begin{matrix}\sum_{i=1}^{n}y_i \\ \sum_{i=1}^{n}x_iy_i\end{matrix}\right)\] Whre n is the number of data in your table
solving this system you will find the values for a and b so that the data your tables best fits in a linear curve y = ax+b
y = -266.574x + 2246.512 ; this is what I keep getting, but it doesn't look right
there are 2 possibilities, patient x Calories or patient x Wt. loss/week lbs.
which one you need?
I think patient x calories
sorry i wrote wrong, after you solve the linear system, you will find a and b such that y= a+bx best fits you data
i found y = 1559.603 + 43.709x
use x = [1,2,3,4,5,6,7,8,9,10] and y = [1500,1200,1800,2100,2400,1800,1200,2100,2400,1500]
Join our real-time social learning platform and learn together with your friends!