Quadratic Regression calculation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 7K views
pyfgcr
Messages
22
Reaction score
0
Hi, I'm learning statistic. Do you guys know how to calculate quadratic regression by hand, which is: give a data set (x,y), find a parabola f(x)=ax^2+bx+c that minimize the total square errors .
I have known how to calculate linear regression.
Thanks in advanced.
 
Physics news on Phys.org
A system of simultaneous linear equation: ax^2 + bx + c , derivative: 2ax + b ?
I don't really understand
 
pyfgcr said:
A system of simultaneous linear equation: ax^2 + bx + c , derivative: 2ax + b ?
I don't really understand

Perhaps you haven't studied how the formulas for linear least squares regression are derived.

In linear regression there are [itex]n[/itex] data points [itex]{(x_1,y_2), (x_2,y_2),...(x_n,y_n) }.[/itex] The function to be minimized is [itex]G(A,B) = \sum_{i=1}^n (A x_i + B - y_i)^2[/itex] and deriving the formulas involves taking the partial derivatives of [itex]G(A,B)[/itex] with respect to each of [itex]A[/itex] and [itex]B[/itex] and setting them equal to zero to obtain two simultaneous linear equations. Look up how that is done.

The method for the quadratic is similar. It involves minimzing a function of 3 variables [itex]G(A,B,C)[/itex].