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.
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 1
01 / A fictional regional population census uses millions of residents, with time measured in years since 1904.
Years since 1904
Population ( millions )
0
2.1525
4
2.2429
8
2.5115
12
2.6208
16
3.0033
20
3.1578
24
3.5318
28
3.6901
32
4.1491
36
4.5619
40
4.7914
44
5.4229
48
5.6507
52
6.3273
56
6.6027
60
7.5663
64
7.9555
68
8.8979
72
9.2966
76
10.4531
80
11.493
84
12.0712
88
13.6622
Use every observation. Draw a raw scatter plot, use least squares on log output versus input to fit y=Cbx=Cekx, derive the relation between the two bases, and overlay the fitted curve on the raw data. Predict the population in 2004 and interpolate the population in 1946. 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 / Raw observations. Open circles: observations or key values.
03 / Positive outputs are required. y=Cekx⇒lny=lnC+kx. Logs use numerical values in the specified units.
04 /
Years since 1904
Input
Log output
0
0
0.76663
4
4
0.80777
8
8
0.92088
12
12
0.96348
16
16
1.099712
20
20
1.149876
24
24
1.261808
28
28
1.305654
32
32
1.422891
36
36
1.517739
40
40
1.566823
44
44
1.690631
48
48
1.731779
52
52
1.844874
56
56
1.887479
60
60
2.023704
64
64
2.073864
68
68
2.185815
72
72
2.229649
76
76
2.346899
80
80
2.441738
84
84
2.490822
88
88
2.614633
05 / Fit an ordinary least-squares line Y=A+BZ to the transformed data, where Y=lny and Z=x. This minimizes ∑i(Yi−A−BZi)2, not squared errors in the original output scale.
07 / C=eA≈2.098586, and k=B≈0.021044,b=ek≈1.021267. The recovered exponential curve is y≈2.098586e0.021044x. Coefficients are rounded for display, not for later calculations.
08 / The transformed squared-error sum is 0.00884201. The original-output squared-error sum of this same fitted curve is 0.410227. These are different objectives and have different scales; an original-scale nonlinear fit can have different coefficients.
09 / bx=exlnb⇒k=lnb. The fitted input unit is fixed, so b is the factor per one input unit.
10 / y(100)≈17.212,y(42)≈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.122591x is the original-scale linear least-squares fit, with SSE 16.012937. The log-space exponential fit has original-scale SSE 0.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) to the 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≥0 years since 1904. The observed interval is 0≤x≤88. 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 / 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 )
0
6.0282
7
5.6671
14
4.9298
21
4.7539
28
4.1702
35
3.9153
42
3.4106
Use every observation. Draw a raw scatter plot, use least squares on log output versus input to fit y=Cbx=Cekx, 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.
Raw observations. Open circles: observations or key values. Positive outputs are required. y=Cekx⇒lny=lnC+kx. Logs use numerical values in the specified units.
Time ( hours )
Input
Log output
0
0
1.796448
7
7
1.734678
14
14
1.595298
21
21
1.558965
28
28
1.427964
35
35
1.364892
42
42
1.226888
Fit an ordinary least-squares line Y=A+BZ to the transformed data, where Y=lny and Z=x. This minimizes ∑i(Yi−A−BZi)2, not squared errors in the original output scale. B=∑i(Zi−Zˉ)2∑i(Zi−Zˉ)(Yi−Yˉ),A=Yˉ−BZˉ. Numerically A≈1.809546,B≈−0.013345. C=eA≈6.107675, and k=B≈−0.013345,b=ek≈0.986744. The recovered exponential curve is y≈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=exlnb⇒k=lnb. The fitted input unit is fixed, so b is the factor per one input unit. y(50)≈3.134,y(17)≈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=2C⇒h=−kln2≈51.9413 hours, or 24h≈2.1642 days. The fitted exponent rate is negative; the positive decay magnitude is −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≥0 hours since the initial weighing. The observed interval is 0≤x≤42. 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. Raw data and exponential fit. Open circles: observations or key values. Solid: log-space exponential fit. Written-work review:
Use all 7 supplied rows. Draw the raw scatter plot and give the transformed table with every input and natural-log output, using the stated units rather than silently rescaling the data.
Derive the semilog linearization and state that the fitted line minimizes squared log-output residuals. Compute its intercept and slope using least squares, exponentiate the intercept, and derive the relation between the base-e rate and the alternative exponential base.
Report coefficients to six decimals and the predictions at inputs 50 and 17 to three decimals with the stated output units. Label the former extrapolation and the latter interpolation relative to the observed interval; use unrounded coefficients for calculations.
Give both the log-response and original-response squared-error sums of this fitted curve. Distinguish evaluation in the original scale from minimizing that scale's objective; the two fitting methods need not agree.
Overlay the fitted curve on the actual raw observations with labeled, consistently scaled axes. Do not force the curve through every noisy point.
Derive half-life from the negative fitted exponent rate; report positive half-life in both hours and days, converting by 24. Distinguish signed exponent rate from positive decay magnitude.
State nonnegative hours from the initial weighing and gram units, noting the observed time interval and that the later mass forecast extrapolates a noisy constant-rate fit, not an established isotope law.
Numerical grading: accept mathematically equivalent fitted forms. For linearized coefficients, transformed tables and final results, allow two units in the last decimal displayed in the worked solution; for a scientific-notation value apply that tolerance to its mantissa. Nonlinear original-response coefficients may differ by 0.00001 if the recomputed original-response SSE agrees within 0.000001 and forecasts within 0.002 output units. Keep extra intermediate digits and evaluate every supplied row; a selected summary without the fitting work, requested displays and interpretation is not a complete response.
Textbook reference: Stewart, Redlin & Watson, Precalculus: Mathematics for Calculus, 7th ed. (Cengage, 2016). The explanations and practice here are original, organized by textbook section.