MathLab with Mr. Ahmed

MathLab with Mr. Ahmed is a math learning website by Ahmed Amasha, a mathematics teacher teaching the American curriculum. Explore Algebra 2, Precalculus, Calculus, and SAT and PSAT Math Prep through lessons, focused practice and printable resources.

MathLabwith Mr. Ahmed
Free preview

4.M Focus on Modeling (Chapter Supplement)

Fit exponential and power models, interpret logarithmic scales, and test predictions against data.

Before you solve

Ideas in this lesson

Explore the lesson brief and the worked example for Idea 11. Create a free account to continue with the remaining ideas and practice.

Lesson brief and rules

4.M Focus on Modeling (Chapter Supplement)

Identify the variables and units, select a justified model, use transformed data appropriately, and compare predictions with the observed and practical domains.

Remember
Distinguish interpolation from extrapolation and retain the physical constraints of the situation.
Worked example 11
01 / A fictional regional population census uses millions of residents, with time measured in years since 19041904.
Years since 19041904Population (( millions ))
002.15252.1525
442.24292.2429
882.51152.5115
12122.62082.6208
16163.00333.0033
20203.15783.1578
24243.53183.5318
28283.69013.6901
32324.14914.1491
36364.56194.5619
40404.79144.7914
44445.42295.4229
48485.65075.6507
52526.32736.3273
56566.60276.6027
60607.56637.5663
64647.95557.9555
68688.89798.8979
72729.29669.2966
767610.453110.4531
808011.49311.493
848412.071212.0712
888813.662213.6622
Use every observation. Draw a raw scatter plot, use least squares on log⁡\log output versus input to fit y=Cbx=Cekxy=C b^{x}=C e^{kx}, derive the relation between the two bases, and overlay the fitted curve on the raw data. Predict the population in 20042004 and interpolate the population in 19461946. Compare a linear fit with the exponential fit using original-scale squared errors, and discuss which description the upward curvature supports. State the domain, units and limitations; give coefficients to six decimals and predictions to three decimals. Show written work; selecting a summary alone is not a complete response. Complete the written work or drawing first. The selected answer checks the result only; your reasoning or drawing needs teacher/self-review.
02 /
00223.7447.416611.118814.81Years since 1904Population (millions)
Raw observations. Open circles: observations or key values.
03 / Positive outputs are required. y=Cekx⇒ln⁡y=ln⁡C+kxy=C e^{k x}\Rightarrow\ln y=\ln C+kx. Logs use numerical values in the specified units.
04 /
Years since 19041904InputLog output
00000.766630.76663
44440.807770.80777
88880.920880.92088
121212120.963480.96348
161616161.0997121.099712
202020201.1498761.149876
242424241.2618081.261808
282828281.3056541.305654
323232321.4228911.422891
363636361.5177391.517739
404040401.5668231.566823
444444441.6906311.690631
484848481.7317791.731779
525252521.8448741.844874
565656561.8874791.887479
606060602.0237042.023704
646464642.0738642.073864
686868682.1858152.185815
727272722.2296492.229649
767676762.3468992.346899
808080802.4417382.441738
848484842.4908222.490822
888888882.6146332.614633
05 / Fit an ordinary least-squares line Y=A+BZY=A+B Z to the transformed data, where Y=ln⁡yY=\ln y and Z=xZ=x. This minimizes ∑i(Yi−A−BZi)2\sum_i(Y_i-A-BZ_i)^{2}, not squared errors in the original output scale.
06 / B=∑i(Zi−Zˉ)(Yi−Yˉ)∑i(Zi−Zˉ)2,A=Yˉ−BZˉB=\dfrac{\sum_i(Z_i-\bar Z)(Y_i-\bar Y)}{\sum_i(Z_i-\bar Z)^{2}},\qquad A=\bar Y-B\bar Z. Numerically A≈0.741264, B≈0.021044A\approx 0.741264,\ B\approx 0.021044.
07 / C=eA≈2.098586C=e^{A}\approx 2.098586, and k=B≈0.021044, b=ek≈1.021267k=B\approx 0.021044,\ b=e^{k}\approx 1.021267. The recovered exponential curve is y≈2.098586e0.021044xy\approx 2.098586e^{0.021044x}. Coefficients are rounded for display, not for later calculations.
08 / The transformed squared-error sum is 0.008842010.00884201. The original-output squared-error sum of this same fitted curve is 0.4102270.410227. These are different objectives and have different scales; an original-scale nonlinear fit can have different coefficients.
09 / bx=exln⁡b⇒k=ln⁡bb^{x}=e^{x\ln b}\Rightarrow k=\ln b. The fitted input unit is fixed, so bb is the factor per one input unit.
10 / y^(100)≈17.212,y^(42)≈5.079\widehat y(100)\approx 17.212,\qquad\widehat y(42)\approx 5.079, in population (( millions )). The first prediction is outside the observed input interval and is extrapolation; the second lies inside and is interpolation.
11 / L(x)≈0.771745+0.122591xL(x)\approx 0.771745+0.122591x is the original-scale linear least-squares fit, with SSE 16.01293716.012937. The log-space exponential fit has original-scale SSE 0.4102270.410227. Its lower original-scale error and upward bend support an exponential description for these invented data, not a permanent growth law.
12 / Population is in millions throughout, including logarithms, coefficients, graph and forecasts. Converting to persons multiplies the coefficient and predictions by one million, adds ln⁡(106)\ln(10^{6}) to the log⁡\log intercept, and leaves the fitted rate unchanged.
13 / The fitted curve need not pass through every observation. These rounded noisy measurements describe an approximate relationship; use the model only where its context and domain remain plausible. For this study, choose the contextual time domain x≥0x\ge0 years since 19041904. The observed interval is 0≤x≤880\le x\le88. The exponential expression itself is defined for every real input, but that algebraic domain does not establish physical validity. The requested later forecast is an extrapolation beyond the observed interval, not a validated extension of the model.
14 /
00223.7447.416611.118814.82Years since 1904Population (millions)
Raw data and exponential fit. Open circles: observations or key values. Solid: log-space exponential fit.
Worked example 2 · Fit and interpret exponential regressions

A hypothetical decaying sample is weighed at seven times. The isotope parameters are exercise assumptions.

Time (( hours ))Mass (( grams ))
006.02826.0282
775.66715.6671
14144.92984.9298
21214.75394.7539
28284.17024.1702
35353.91533.9153
42423.41063.4106
Use every observation. Draw a raw scatter plot, use least squares on log output versus input to fit y=Cbx=Cekxy=C b^{x}=C e^{kx}, derive the relation between the two bases, and overlay the fitted curve on the raw data. Infer the half-life in hours and days from your fitted rate, then predict the mass at 50 hours and interpolate at 17 hours. State the domain, units and limitations; give coefficients to six decimals and predictions to three decimals. Show written work; selecting a summary alone is not a complete response. Complete the written work or drawing first. The selected answer checks the result only; your reasoning or drawing needs teacher/self-review.

0010.51.57213.1431.54.72426.29Time (hours)Mass (grams)
Raw observations. Open circles: observations or key values.

Positive outputs are required. y=Cekx⇒ln⁡y=ln⁡C+kxy=C e^{k x}\Rightarrow\ln y=\ln C+kx. Logs use numerical values in the specified units.
Time (( hours ))InputLog output
00001.7964481.796448
77771.7346781.734678
141414141.5952981.595298
212121211.5589651.558965
282828281.4279641.427964
353535351.3648921.364892
424242421.2268881.226888

Fit an ordinary least-squares line Y=A+BZY=A+B Z to the transformed data, where Y=ln⁡yY=\ln y and Z=xZ=x. This minimizes ∑i(Yi−A−BZi)2\sum_i(Y_i-A-BZ_i)^{2}, not squared errors in the original output scale.
B=∑i(Zi−Zˉ)(Yi−Yˉ)∑i(Zi−Zˉ)2,A=Yˉ−BZˉB=\dfrac{\sum_i(Z_i-\bar Z)(Y_i-\bar Y)}{\sum_i(Z_i-\bar Z)^{2}},\qquad A=\bar Y-B\bar Z. Numerically A≈1.809546, B≈−0.013345A\approx 1.809546,\ B\approx -0.013345.
C=eA≈6.107675C=e^{A}\approx 6.107675, and k=B≈−0.013345, b=ek≈0.986744k=B\approx -0.013345,\ b=e^{k}\approx 0.986744. The recovered exponential curve is y≈6.107675e−0.013345xy\approx 6.107675e^{-0.013345x}. Coefficients are rounded for display, not for later calculations.
The transformed squared-error sum is 0.00320408. The original-output squared-error sum of this same fitted curve is 0.069724. These are different objectives and have different scales; an original-scale nonlinear fit can have different coefficients.
bx=exln⁡b⇒k=ln⁡bb^{x}=e^{x\ln b}\Rightarrow k=\ln b. The fitted input unit is fixed, so bb is the factor per one input unit.
y^(50)≈3.134,y^(17)≈4.868\widehat y(50)\approx 3.134,\qquad\widehat y(17)\approx 4.868, in mass (grams). The first prediction is outside the observed input interval and is extrapolation; the second lies inside and is interpolation.
Cekh=C2⇒h=−ln⁡2k≈51.9413C e^{k h}=\dfrac{C}{2}\Rightarrow h=-\dfrac{\ln2}{k}\approx 51.9413 hours, or h24≈2.1642\dfrac{h}{24}\approx 2.1642 days. The fitted exponent rate is negative; the positive decay magnitude is −k-k.
The fitted curve need not pass through every observation. These rounded noisy measurements describe an approximate relationship; use the model only where its context and domain remain plausible. For this study, choose the contextual time domain x≥0x\ge0 hours since the initial weighing. The observed interval is 0≤x≤420\le x\le42. The exponential expression itself is defined for every real input, but that algebraic domain does not establish physical validity. The requested later forecast is an extrapolation beyond the observed interval, not a validated extension of the model.
0010.51.59213.1931.54.78426.38Time (hours)Mass (grams)
Raw data and exponential fit. Open circles: observations or key values. Solid: log-space exponential fit.

Written-work review:

15 questions with a worked answer for each.Start practice ↗
Textbook reference: Stewart, Redlin & Watson, Precalculus: Mathematics for Calculus, 7th ed. (Cengage, 2016). The explanations and practice here are original, organized by textbook section.