Curved relationships

Section of Linear regression, part of Statistical inference

Curved relationships

Type Section
Taught in Linear regression
Part Statistical inference

Not every relationship is a straight line. Two remedies keep the least-squares machinery.

The first fits a polynomial, y=b_0+b_1x+\cdots+b_kx^k. The sum of squares is still quadratic in the coefficients, so setting its k+1 partial derivatives to zero gives k+1 linear equations. The model is still linear in its parameters, even though the curve is not a line.

The second transforms the variables. If theory says y=ae^{bx}, then \log y=\log a+bx is linear in x, and a line is fitted to the points (x_i,\log y_i). The same idea linearises y=ax^b, on the log–log scale, and a logistic curve, on the logit scale. The fitted slope is then a slope on the transformed scale, and so are the errors.

Example 1 (Melanoma and latitude) The melanoma rate per 100 000 white males in nine US locations is

Latitude 32.8 33.9 34.1 37.9 40.0 40.8 41.7 42.2 45.0
Rate 9.0 5.9 6.6 5.8 5.5 3.0 3.4 3.1 3.8

Question. Compare a straight line, a quadratic and a line for the log rate.

Solution. The straight line is y=20.6-0.399\,x, but the points bend: the southernmost location is far above it. A quadratic fits the bend, y=66.4-2.81\,x+0.0314\,x^2, at the cost of a coefficient with no simple meaning. The log rate is close to linear, \log y=4.51-0.0761\,x, which says the rate falls by a factor e^{-0.0761}=0.93, about 7%, for each degree further north. A constant percentage change per degree is often the more natural reading for a rate.

Used in

See also

Least-squares line · Least-squares estimators are unbiased · Simple linear regression · Sampling distribution of the regression estimators · Slope t pivot · Coefficient of determination · Prediction interval · Regression effect

Glossary and index