Title: ISP 120
1ISP 120
- Linear Models
- and Trendlines
2Linear Relationships
- What makes a graph or function or table of values
linear? - For a fixed change in x, there is a fixed change
in y, or - The change in y per unit change in x is constant,
or - There is a constant rate of change
3Linear Relationships
- Look at a set of values. Is it a linear
relationship? Apply (B3-B2)/(A3-A2)
A B
2 4 25 3 5 50 4 6 75 5 7
100 6 8 125 7 9 150
(B3-B2)/(A3-A2) (50-25)/(5-4)
25 (B4-B3)/(A4-A3) (75-50)/(6-5)
25 (B5-B4)/(A5-A4) (100-75)/(7-6)
25 (B6-B5)/(A6-A5) (125-100)/(8-7)
25 (B7-B6)/(A7-A6) (150-125)/(9-8) 25
All the results are the same (25), so this is a
linear set of values.
4Linear Relationships
- If it is linear, what is the function?
- Recall y mx b
- m is the slope, or the (change in y) / (change in
x) - b is the y intercept
- So calculate the slope
- Then plug in slope and first x and y values into
ymxb and solve for b
5Linear Relationships
A B
2 4 25 3 5 50 4 6 75 5 7
100 6 8 125 7 9 150
(B3-B2)/(A3-A2) (50-25)/(5-4)
25 (B4-B3)/(A4-A3) (75-50)/(6-5)
25 (B5-B4)/(A5-A4) (100-75)/(7-6)
25 (B6-B5)/(A6-A5) (125-100)/(8-7)
25 (B7-B6)/(A7-A6) (150-125)/(9-8) 25
y mx b m change in y / change in x 25/1
25 25 25 4 b b -75 (this is the
y-intercept) y 25x 75 This is the
equation of the line
6Examples
x y 5 -4 10 -1 15 2 20 5
x y 0 1 2 4 4 16 6 36
x y 3 5 4 9 6 11 9 17
mchange y / change x 3/50.6 y mxb
-40.65b b-7 y 0.6x - 7
x y Rate of Change 3 5 6 9 (B3-B2)/(A3-A2) 9 13 1
2 17
7Linear Relationships
- Linear growth occurs when a quantity grows by
the same absolute amount - Exponential growth occurs when a quantity grows
by the same relative amount that is by the same
percentage in each unit of time - There is also linear decay and exponential decay
8Examples
- The number of students at Wilson High School has
increased by 50 in each of the past four years. - The price of milk has been rising with inflation
at 3 per year. - Tax law allows you to depreciate the value of
your equipment by 200 per year. - The memory capacity of computer hard drives is
doubling approximately every two years. - The price of DVD records has been falling by
about 25 per year.
9Trendlines
- Real data is seldom perfectly linear
- Suppose the data is reasonably linear how does
one make a linear model of the data? - The standard approach is to use a best-fit line
10(No Transcript)
11(No Transcript)
12(No Transcript)
13(No Transcript)
14Trendlines
- How was this line created?
- Least squares regression
- Create a line f(x)mx b, such that the sum of
the squares of (vertical) errors is as small as
possible.
15Trendlines
- If R2 1, then 100 of the variance in y is
explained by the line, so we have a perfect fit. - If R2 0, then we have a terrible fit.
16Trendlines
- Do we have to do this calculation?
- No, Excel can do it for you.
- Consider the dataset MileRecords.xls
- Graph the data using an XY Scatter. After the
graph is done, right click on line, select Add
Trendline, Options - Can you make a prediction? Be careful! Ones
confidence in predictions made far from the data
must be tempered.