Mathwords logoMathwords

Sinusoidal Regression — Definition, Formula & Examples

Sinusoidal regression is a method for finding the sine curve that best matches data that rises and falls in a repeating cycle, such as monthly temperatures or tide heights.

Given data points (xi,yi)(x_i, y_i), sinusoidal regression chooses the parameters aa, bb, cc, and dd in the model y^=asin⁡(b(x−c))+d\hat{y} = a\sin(b(x - c)) + d that minimize the sum of squared residuals ∑(yi−y^i)2\sum (y_i - \hat{y}_i)^2. The model is nonlinear in bb and cc, so software finds the parameters with an iterative numerical method rather than a closed-form formula.

Key Formula

y^=asin⁡(b(x−c))+d,period=2πb\hat{y} = a\sin\big(b(x - c)\big) + d, \qquad \text{period} = \frac{2\pi}{b}
Where:
  • y^\hat{y} = predicted value of the response variable
  • aa = amplitude: the distance from the midline to a peak (use |a| if a is negative)
  • bb = angular frequency in radians per unit of x; it sets the period
  • cc = horizontal (phase) shift
  • dd = midline: the average level the curve oscillates around

Worked Example

Problem: Sinusoidal regression on a city's average monthly temperatures (x = month number, January = 1) gives the model y^=20sin⁡(π6(x−4))+60\hat{y} = 20\sin\left(\frac{\pi}{6}(x - 4)\right) + 60, in °F. Interpret the model, predict the July temperature (x = 7), and find the residual if July's actual average was 78°F.
Step 1: Read the parameters. The midline is d = 60, and the amplitude is a = 20. So the curve swings between 60 − 20 = 40°F and 60 + 20 = 80°F. The period comes from b.
period=2ππ/6=12 months\text{period} = \frac{2\pi}{\pi/6} = 12 \text{ months}
Step 2: Substitute x = 7 into the model to predict July.
y^=20sin⁡(π6(7−4))+60=20sin⁡(π2)+60=20(1)+60=80\hat{y} = 20\sin\left(\frac{\pi}{6}(7 - 4)\right) + 60 = 20\sin\left(\frac{\pi}{2}\right) + 60 = 20(1) + 60 = 80
Step 3: Compute the residual as actual minus predicted.
residual=78−80=−2\text{residual} = 78 - 80 = -2
Answer: The model cycles every 12 months between 40°F and 80°F. It predicts 80°F for July. The residual is −2°F, so the model overestimated July by 2 degrees.

Why It Matters

A straight line cannot capture data that repeats, such as hours of daylight, ocean tides, seasonal retail sales, or circadian body-temperature rhythms. Sinusoidal regression appears in AP Precalculus and in statistics projects that use calculator models, and climate scientists and engineers use it to model periodic signals. The correlation coefficient r measures only linear association, so judge a sinusoidal fit by its residuals instead.

Common Mistakes

Mistake: Running sinusoidal regression with the calculator in degree mode, or reading the TI-84 output as if it used the same form as the formula above.
Correction: Use radian mode so that the period equals 2π/b. Also note that the TI-84 SinReg command reports the form y = a sin(bx + c) + d. In that form, c is not the horizontal shift. The shift is −c/b.

Related Terms