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
Preparation for Calculus

P.4 Fitting Models to Data

Focus on linear data models, exponential data models, residuals and fit.

Free preview Explore the lesson before creating an account.

Play games for this section

Before you solve

Ideas in this lesson

Idea 1 of 3

Linear data models

Choose a linear model when changes per unit input are approximately constant. Interpret its parameters in context.

Worked example 1

A quantity begins at 11 and increases by 22 per unit. Find its value after 44 units.
  1. Q(t)=2t+1Q(t) = 2t + 1
  2. Q(4)=2(4)+1=9Q(4) = 2(4) + 1 = 9

Answer: 99

Worked example 2

A quantity begins at 22 and increases by 33 per unit. Its value is 1414. How many units have elapsed?
  1. Q(t)=3t+2Q(t) = 3t + 2
  2. t=14−23=4t = \dfrac{14 - 2}{3} = 4

Answer: 44

Idea 2 of 3

Exponential data models

Choose exponential growth when equal input changes produce approximately equal multiplicative changes.

Worked example 1

A population starts at 22 and doubles each hour. Find P(1)P(1).
  1. P(t)=2⋅2tP(t) = 2 \cdot 2^{t}
  2. P(1)=2⋅2=4P(1) = 2 \cdot 2 = 4

Answer: 44

Worked example 2

A population starts at 33 and doubles each hour. At what time does the population reach 1212?
  1. P(t)=3⋅2tP(t) = 3 \cdot 2^{t}
  2. 2t=4  ⟹  t=22^{t} = 4 \implies t = 2

Answer: 22

Idea 3 of 3

Residuals and fit

A residual is observed minus predicted. Squaring residuals prevents positive and negative errors from canceling.

Worked example 1

Fit y=2x+2y = 2x + 2 to the data below. Find the residual at x=2x = 2.
xx001122
yy224477
  1. ŷ =2,4,6= 2, 4, 6
  2. Residuals y−y - ŷ =0,0,1= 0, 0, 1
  3. Residual at x=2=7−6=1x = 2 = 7 - 6 = 1

Answer: 11

Worked example 2

Fit y=2x+3y = 2x + 3 to the data below. Find the sum of squared residuals.
xx001122
yy335588
  1. ŷ =3,5,7= 3, 5, 7
  2. Residuals y−y - ŷ =0,0,1= 0, 0, 1
  3. SSE=02+02+12=1SSE = 0^{2} + 0^{2} + 1^{2} = 1

Answer: 11

Resource alignment: Larson & Edwards, Calculus of a Single Variable, Tenth Edition, §P.4,pP.4, p. 3131. Explanations, diagrams and numerical practice variants are original MathLab content aligned to this section.