Linear Modeling - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Linear Modeling

Description:

A linear equation describing how an dependant variable, y, ... Hyundai Tiburon 2705 22 -0.89483. Mazda Miata 2365 25 -0.25640. Mercury Cougar 3140 20 0.12658 ... – PowerPoint PPT presentation

Number of Views:133
Avg rating:3.0/5.0
Slides: 30
Provided by: Mart458
Category:

less

Transcript and Presenter's Notes

Title: Linear Modeling


1
Unit 8
  • Linear Modeling

2
Linear Models
  • The correlation coefficient measures the strength
    of the linear relationship between two
    quantitative variables x and y.
  • A linear equation describing how an dependant
    variable, y, is associated with an explanatory
    variable, x, looks like
  • y a bx

3
Example
  • A college charges a basic fee of 100 a
    semester for a meal plan plus 2 a meal. The
    linear equation describing the association
    between the cost of the meal plan, y, and the
    number of meals purchased, x, is
  • y 100 2x

4
Linear Equations
  • A linear equation takes the form
  • y a bx
  • b slope
  • a y-intercept
  • The slope measures the rate of change of y
    with respect to x
  • The y-intercept measures the initial value of y
    (value of y when x 0)

5
Linear Modeling
  • Rarely does an exact linear relationship exist
    between two studied variables.
  • The correlation coefficient and the scatter plot
    help us decide if there is a reasonably strong
    linear relationship between two studied variables.

6
Data
  • The table gives the age and systolic blood
    pressure of 30 subjects

7
Approximate Positive Linear Relationship
8
Equation of Fitted Line SBP 98.7
0.97(AGE)y 98.7 0.97 x
9
Interpretation of Slope
  • The slope of the SBP vs Age fitted equation is
    0.97
  • 0.97 rate of change of SBP with respect to age
  • Every year a subjects blood pressure rises
    approximately 0.97 units.

10
Least Squares Method for Line of Best Fit
  • Interactive Unit D2, Basics, Basics 1
  • Interactive Unit D2, Basics, Practice 1

11
Residuals
  • One method for assessing how well a linear
    equation models the data is assessing the extent
    to which points differ from the line.
  • A residual is the difference between an observed
    y value and the corresponding value of y on the
    fitted line (predicted y)
  • Residual Observed y - Predicted y

12
Sum of Squares of the Residuals
  • The line of best fit is the one with the smallest
    sum of squares of the residuals
  • It is called the least squares line or sometimes
    the least squares regression line
  • The challenge is to find the slope and
    y-intercept of this least squares line

13
More Practice with Find the Least Square Line
  • Interactive D2, Basics, Basics2

14
The Formulas
  • The methods of calculus can be used to find
    equations for the slope and y-intercept of the
    least squares line. Here are the results.

15
The Good News
  • Many computer programs including Excel and
    MINITAB as well as graphing calculators provide
    the slope and y-intercept of the least squares
    line

16
Example
  • Find the slope and y-intercept for the least
    squares line describing the association between
    age and blood pressure suggested by this data

17
The Line of Best Fit
  • The line that best fits the data is taken to be
    the one with the smallest residuals.
  • Since residuals can be both positive and negative
    they are squared to insure all are positive
  • The squared residuals are then added to find a
    measure of the total amount the fitted values
    deviate from the observed values

18
Least Squares Line
  • Y SBP X Age
  • Y 98.7 0.97X

19
Predictions
  • The prediction equation y 98.7 0.97x
  • can be used to predict a persons SBP based on
    their age
  • For a randomly selected person who is 40 years
    old, the least squares equation predicts a SBP of
  • 98.7 0.97(40) 137.5

20
Making Predictions
  • Use the sample least squares line
  • y 98.7 0.97x
  • to complete the table

21
Back to Residuals
  • SSRes
  • is a measure of the total amount of deviation
    from the fitted line.
  • It is a measure of the variability in the
    data that is not explained the the linear
    relationship with the variable x
  • It measures the variability due to factors
    other than the explanatory variable x

22
Back to Age vs SBP
  • SSRes
    8393.44
  • SSTotal 14787.47
  • 56.76 of the variability in the SBP data is
    explained by factors other than age
  • 1 - 56.76 43.24 of the variability in SBP can
    be explained by the linear relationship with age

23
The value of r2
  • The correlation coefficient, r, for the SBP
    vs Age data is 0.65757
  • r2 (0.65757)2 0.4324
  • When r2 is converted to a percent, 43.24 it
    corresponds to the percent variability in SBP
    that is explained by age

24
Interpretation of r2
  • When r2 is converted to a percent it can be
    interpreted as the percent of the variability in
    the response variable, y, that can be explained
    by the linear relationship with the explanatory
    variable, x.

25
  • Find the least squares line, the values of r
    and r2 Interpret r2 Interpret the
    slope

26
Scatter Graphr -0.816
27
Residuals
  • Model Weight City MPG Residual
  • BMW 318Ti 2790 23 0.69556
  • BMW Z3 2960 19 -2.12366
  • Chevrolet Camaro 3545 17 -0.06038
  • Chevrolet Corvette 3295 17 -1.79682
  • Ford Mustang 3270 17 -1.97047
  • Honda prelude 3040 22 1.43200
  • Hyundai Tiburon 2705 22 -0.89483
  • Mazda Miata 2365 25 -0.25640
  • Mercury Cougar 3140 20 0.12658
  • Mercedes Benz SLK 3020 22 1.29309
  • Mitsubishi Eclipse 3235 23 3.78643
  • Pontiac Firebird 3545 18 0.93962
  • Porsche Boxster 2905 19 -2.50568
  • Saturn SC 2420 27 2.12562
  • Toyota Celica 2720 22 -0.79065

28
Vehicles with the Largest Positive and Negative
Residuals
  • Mitsubishi Eclipse got 3.876 city MPG more than
    expected
  • Porsche Boxster got 2.506 city MPG less than
    expected

29
Analysis
  • City MPG 41.7 - 0.00695 Weight
  • Each additional pound translates into a loss of
    approximately .00695 city MPG
  • Each additional 1000 pounds translates into a
    loss of approximately 6.95 city MPG
  • r2 66.6
  • 66.6 of the variability in city MPG can be
    explained by the linear association with the
    weight of the vehicle. 33.4 of the variability
    in city MPG is due to factors other than the
    weight of the vehicle.
Write a Comment
User Comments (0)
About PowerShow.com