Grade by GradeEssential student suppliesSign in
C. Content · Foundations of Mathematics 12 Content

Regression Analysis: Polynomial, Exponential, Logarithmic and Sinusoidal Models

BC FOM 12: regression analysisAbout 75 minutes
Learning goals
  • I can use technology to find polynomial, exponential, logarithmic and sinusoidal regression equations for data.
  • I can choose an appropriate regression model by looking at the data, the context and the fit.
  • I can use a regression model to interpolate and extrapolate, and explain its limitations.

Words to know

regression
Finding the equation of the curve of best fit for a set of data.
coefficient of determination (R²)
A number from 0 to 1 that describes how close the data points are to the curve; closer to 1 means a closer fit.
residual
The actual data value minus the value predicted by the model.
interpolation
Estimating a value inside the range of the data.
extrapolation
Predicting a value outside the range of the data; less reliable.

From data to a function

Regression finds the function of a chosen type that fits the data best. You choose the type; technology finds the numbers. The steps:

  1. Make a scatter plot and look at the shape.
  2. Think about the context. Does the quantity grow by a percentage? Level off? Repeat in cycles? Rise and fall once?
  3. Run the regression (on a graphing calculator, in Desmos, or in a spreadsheet trendline). Common types: linear, quadratic, cubic, exponential (y = a × b^x), logarithmic (y = a + b ln x) and sinusoidal (y = a sin(bx + c) + d).
  4. Check the fit: look at the curve on the scatter plot, the R² value where it is given, and the residuals.
  5. Use the model, with care. Interpolation is usually safer than extrapolation.

Data sets in this lesson are made up for practice unless a source is given.

Shape of the dataContext cluesModel to try
Rises and falls once (or falls and rises)projectile height, profit as price changesquadratic (polynomial)
Changes direction twicesome costs or volumescubic (polynomial)
Grows or shrinks faster and faster, or by a constant percentagepopulations, investments, cooling, half-lifeexponential
Rises quickly, then levels off slowly with no limitlearning a skill, sound level, earthquake scalelogarithmic
Repeats in cyclestides, daylight, temperature over a yearsinusoidal
Matching data patterns to regression models.
Worked example

Example 1: Exponential regression

A B.C. town recorded the number of public EV charging ports each year: x = 0 to 6 gives y = 12, 15, 19, 24, 29, 37, 46. Find an exponential model and use it to predict the number in year 8.

  1. The scatter plot curves upward, and the ratios are about the same (15/12 = 1.25, 19/15 ≈ 1.27, 46/37 ≈ 1.24), so try exponential.
  2. Exponential regression gives y ≈ 12.06(1.251)^x with r² ≈ 0.999. (A linear model gives R² ≈ 0.966 and misses the curve.)
  3. Interpret: about 12 ports at the start, growing about 25% a year.
  4. Year 8 (extrapolation): y ≈ 12.06(1.251)^8 ≈ 72.

y ≈ 12.06(1.251)^x; about 72 ports in year 8, if the growth continues at the same rate.

012345678020406080prediction for x = 8: about 72years after the first count (x)charging ports (y)
The charging-port data with the exponential regression curve. The prediction for year 8 is an extrapolation beyond the data.
Worked example

Example 2: Quadratic regression

A ball is kicked and its height h (m) is measured at times t (s): (0, 1.5), (0.5, 8.3), (1, 12.6), (1.5, 14.5), (2, 14.0), (2.5, 11.2), (3, 5.9). Find a quadratic model, the maximum height and when the ball lands.

  1. The data rise and then fall: quadratic.
  2. Quadratic regression: h ≈ -4.8t² + 15.86t + 1.53, with R² ≈ 1.000 (very close fit).
  3. Maximum (vertex, using technology): about (1.65, 14.6).
  4. Lands when h = 0: the positive zero is t ≈ 3.40 s (an extrapolation just past the last data point).

Maximum height about 14.6 m at about 1.65 s; lands at about 3.4 s. The coefficient -4.8 is close to -4.9, half the acceleration due to gravity.

Worked example

Example 3: Logarithmic regression and its limits

A student tracks typing speed (words per minute) for 8 weeks: weeks 1 to 8 give 20, 28, 33, 36, 39, 41, 43, 44. Find a logarithmic model, predict week 12, and comment on predicting week 52.

  1. The speed rises quickly and then levels off slowly: try logarithmic, y = a + b ln x.
  2. Logarithmic regression: y ≈ 20.00 + 11.70 ln x, with r² ≈ 0.999.
  3. Week 12: y ≈ 20.00 + 11.70 ln 12 ≈ 49 words per minute.
  4. Week 52: y ≈ 66. That is far outside the data. The model assumes the improvement continues in the same way, but real skill may level off, and the student may stop practising.

y ≈ 20.00 + 11.70 ln x; about 49 wpm at week 12. A week 52 prediction (about 66 wpm) is much less reliable.

Sinusoidal regression and choosing well

For cyclic data, such as average monthly temperatures or daylight hours, use sinusoidal regression. Many calculators do not give R² for it, so judge the fit by the graph and residuals. Check that the period the technology finds makes sense (about 12 months or 365 days for yearly data). You can compare it with a model you build yourself from the maximum, minimum and period, as in the previous lesson.

What affects reliability?

  • too few data points, or data from a short time;
  • measurement errors and outliers;
  • choosing a model only because its R² is highest, when the context points to another type (a high-degree polynomial can pass near every point but behave wildly between and beyond them);
  • extrapolating far beyond the data;
  • the conditions changing (a new policy, a supply shortage, a change in habits).

Correlation is not cause: a good fit shows a pattern, not the reason for it.

Report a model fully

Write the equation with rounded coefficients, say which regression you used and why, give R² if available, and state the domain where the model makes sense. For predictions, say whether you are interpolating or extrapolating.

Hands-on activity

Collect and model

Collect your own data and fit a model. Ideas: the temperature of a cup of hot water every 2 minutes for 30 minutes (exponential toward room temperature); the height of a bouncing ball on each bounce (exponential decay); sunrise times for your community every two weeks for a year from a website (sinusoidal). Try two different regression types and explain which you would choose and why.

Just for fun

The word regression comes from Francis Galton in the 1880s. He noticed that very tall parents tended to have children who were tall but closer to average: their heights "regressed" toward the mean. The name stuck for all curve fitting.

Your turn

1

Which model would you try for the height of the tide every hour over two days?

2

Which model for the value of a car that loses about 15% each year?

3

Using y ≈ 12.06(1.251)^x from Example 1, estimate the number of ports in year 3. Is this interpolation or extrapolation?

4

A regression gives R² = 0.42. What does that suggest?

5

Using h ≈ -4.8t² + 15.86t + 1.53, find the height at t = 1.65 s.

6

Why is predicting week 52 from 8 weeks of typing data risky?

More practice

1

A data set's points are y = 3, 6, 12, 24, 48 for x = 0 to 4. Without technology, give an exact model.

2

A residual is -2.5. Is the actual value above or below the model?

3

Why might a quartic regression with R² = 0.999 still be a poor choice for population data?

4

Using y ≈ 20.00 + 11.70 ln x, estimate typing speed at week 5.

5

Sinusoidal regression on monthly temperature data gives a period of 7 months. What should you do?

Check your understanding

Quiz

1.

Data rise quickly and then level off slowly, with no maximum. Which regression model fits best?

2.

What is extrapolation?

3.

A model is y = 500(0.9)^x. What does 0.9 tell you?

4.

Which R² value shows the closest fit?

For parents and teachers

How to help: Help your teen find a real data set (weather, sunrise times, sports results) and ask them to predict the shape of the scatter plot before plotting. Ask, "Would you trust this model 10 years from now? Why or why not?"

Common mistakes:

  • Choosing the model with the highest R² without thinking about the context.
  • Extrapolating far beyond the data without a warning.
  • Copying long decimals instead of rounding sensibly and saying the result is approximate.
  • Forgetting to check the calculator's degree or radian mode for sinusoidal regression.