C. Content · Foundations of Mathematics 12 ContentRegression Analysis: Polynomial, Exponential, Logarithmic and Sinusoidal ModelsBC FOM 12: regression analysisAbout 75 minutesLearning goalsI 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 knowregressionFinding 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.residualThe actual data value minus the value predicted by the model.interpolationEstimating a value inside the range of the data.extrapolationPredicting a value outside the range of the data; less reliable.From data to a functionRegression finds the function of a chosen type that fits the data best. You choose the type; technology finds the numbers. The steps:Make a scatter plot and look at the shape.Think about the context. Does the quantity grow by a percentage? Level off? Repeat in cycles? Rise and fall once?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).Check the fit: look at the curve on the scatter plot, the R² value where it is given, and the residuals.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 tryRises 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-lifeexponentialRises quickly, then levels off slowly with no limitlearning a skill, sound level, earthquake scalelogarithmicRepeats in cyclestides, daylight, temperature over a yearsinusoidalMatching data patterns to regression models.Worked exampleExample 1: Exponential regressionA 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.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.Exponential regression gives y ≈ 12.06(1.251)^x with r² ≈ 0.999. (A linear model gives R² ≈ 0.966 and misses the curve.)Interpret: about 12 ports at the start, growing about 25% a year.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 exampleExample 2: Quadratic regressionA 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.The data rise and then fall: quadratic.Quadratic regression: h ≈ -4.8t² + 15.86t + 1.53, with R² ≈ 1.000 (very close fit).Maximum (vertex, using technology): about (1.65, 14.6).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 exampleExample 3: Logarithmic regression and its limitsA 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.The speed rises quickly and then levels off slowly: try logarithmic, y = a + b ln x.Logarithmic regression: y ≈ 20.00 + 11.70 ln x, with r² ≈ 0.999.Week 12: y ≈ 20.00 + 11.70 ln 12 ≈ 49 words per minute.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 wellFor 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 fullyWrite 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 activityCollect and modelCollect 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 funThe 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 turn1Which model would you try for the height of the tide every hour over two days?Show answerSinusoidal: the data repeat in cycles.2Which model for the value of a car that loses about 15% each year?Show answerExponential (decay).3Using y ≈ 12.06(1.251)^x from Example 1, estimate the number of ports in year 3. Is this interpolation or extrapolation?Show answer12.06 × 1.251³ ≈ 24, which is interpolation (the data had 24).4A regression gives R² = 0.42. What does that suggest?Show answerThe model does not fit the data closely; try another type or look for other factors.5Using h ≈ -4.8t² + 15.86t + 1.53, find the height at t = 1.65 s.Show answer≈ -13.07 + 26.17 + 1.53 ≈ 14.6 m6Why is predicting week 52 from 8 weeks of typing data risky?Show answerIt is far outside the data; the pattern may change, so extrapolation is unreliable.More practice1A data set's points are y = 3, 6, 12, 24, 48 for x = 0 to 4. Without technology, give an exact model.Show answerEach value doubles: y = 3(2)^x.2A residual is -2.5. Is the actual value above or below the model?Show answerBelow: actual - predicted = -2.5, so the actual value is 2.5 less than predicted.3Why might a quartic regression with R² = 0.999 still be a poor choice for population data?Show answerIt may bend sharply beyond the data (for example predicting a sudden drop or negative population), which the context does not support.4Using y ≈ 20.00 + 11.70 ln x, estimate typing speed at week 5.Show answer≈ 20.00 + 11.70 × 1.609 ≈ 38.8 wpm (the data had 39).5Sinusoidal regression on monthly temperature data gives a period of 7 months. What should you do?Show answerQuestion the model: yearly temperature data should have a period of about 12 months. Check the data and settings.Check your understandingQuiz1. Data rise quickly and then level off slowly, with no maximum. Which regression model fits best?SinusoidalQuadraticLinearLogarithmic2. What is extrapolation?Predicting outside the range of the dataPredicting inside the range of the dataFinding R²Removing outliers3. A model is y = 500(0.9)^x. What does 0.9 tell you?The value grows 90% each stepThe starting value is 0.9The value keeps 90% each step, a 10% decreaseThe value drops by 0.9 each step4. Which R² value shows the closest fit?0.650.980.800.09Mark lesson completeFor parents and teachersHow 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.PreviousGraphical Representations: Sinusoidal FunctionsNextCombinatorics: The Fundamental Counting Principle and Permutations