Heres my set of data x180 165 125 100 0 100 125 150 165 180
Here\'s my set of data:
x=[-180 -165 -125 -100 0 100 125 150 165 180]
y=[-40 -20 10 40 75 40 10 -20 -40]
So for this set of data, I need to fit a curve to it by hand using least square method, and then find the roots byhand as well, using bisection or newton raphson method. If anyone could help I\'d much appreciate it!
Solution
We use the least squares method to find the line of best fit.
Here you have given 10 x values and 9 y values
Hence last x value 180 is ignored
---------------------------------------------------------------------------------------------------------------------------
To find the regression line y = mx + b, you must compute the following quantities from the paired x and y data:
x, y, ?(x2), ?(xy), ?(y2)
Step 2
The slope of the regression line, m, is given by the formula
m = [?(xy) - n(x)(y)]/[?(x2) - n(x)2],
where n is the number of data points. Once you calculate m, the forumula for b is
b = y - mx
Step 3
You can compute the correlation coefficient which indicates how closely the line fits. The correlation coefficient ranges from -1 to 1, with -1 meaning perfect negative correlation (negative slope) and 1 meaning perfect positive correlation. When the coefficient is close to zero, data does not exhibit a linear relation. The correlation coeffeicient equation is
[?(xy) - n(x)(y)]/sqrt[(?(x2) - n(x)2)(?(y2) - n(y)2)]
Step 4
You can obtain the equations for exponential, power, and logarithmic regression curves by linearizing the functions. For example, the equation y = acx can be linearized by taking the natural logarithm of both sides. Doing this yields Ln(y) = Ln(a) + Ln(c)x. This is now linear in the varialbes Ln(y) and x. You can solve for Ln(c) and Ln(a) by using the formulas for straight line regression, just replace the y data with Ln(y).
Similarly, the equation y = axc can be linearlized to Ln(y) = Ln(a) + cLn(x). This is now linear in the variables Ln(y) and Ln(x).
The equation y = a + cLn(x) is already linear in the variables y and Ln(x).
The regression calculator above will compute all four types of simple regression along with the correlation coefficients of each curve so that you can see which line or curve fits best.
Hence by using the above we get
Linear: Y = AX + B:
Y = 0.0067X + 6.1336
correlation = 0.024
Exponential: Y = C(D^X):
Y = 6.1244(1.0003^X)
correlation = 0.0261
Power: Y = E(X^F):
Y = 8.2414(X^-0.1372)
correlation = -0.1929
Logarithmic: Y = G + H(Ln(X)):
Y = 13.9232 + -3.5963Ln(X)
correlation = -0.2329
OF these we can select the last one as correlation coefficient absolute value is the highest.\\
Y = 13.9232 + -3.5963Ln(X) is the curve of best fit.
![Here\'s my set of data: x=[-180 -165 -125 -100 0 100 125 150 165 180] y=[-40 -20 10 40 75 40 10 -20 -40] So for this set of data, I need to fit a curve to it by Here\'s my set of data: x=[-180 -165 -125 -100 0 100 125 150 165 180] y=[-40 -20 10 40 75 40 10 -20 -40] So for this set of data, I need to fit a curve to it by](/WebImages/27/heres-my-set-of-data-x180-165-125-100-0-100-125-150-165-180-1071122-1761561083-0.webp)
![Here\'s my set of data: x=[-180 -165 -125 -100 0 100 125 150 165 180] y=[-40 -20 10 40 75 40 10 -20 -40] So for this set of data, I need to fit a curve to it by Here\'s my set of data: x=[-180 -165 -125 -100 0 100 125 150 165 180] y=[-40 -20 10 40 75 40 10 -20 -40] So for this set of data, I need to fit a curve to it by](/WebImages/27/heres-my-set-of-data-x180-165-125-100-0-100-125-150-165-180-1071122-1761561083-1.webp)