+ All Categories
Home > Documents > Kxu Stat Anderson Ch12 Student

Kxu Stat Anderson Ch12 Student

Date post: 07-Apr-2018
Category:
Upload: malvikamarwah
View: 220 times
Download: 0 times
Share this document with a friend

of 47

Transcript
  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    1/47

    1

    Chapter 12Simple Linear Regression

    Simple Linear Regression Model

    Least Squares Method

    Coefficient of Determination

    Model Assumptions

    Testing for SignificanceUsing the Estimated Regression Equation

    for Estimation and Prediction

    Computer Solution

    Residual Analysis: Validating Model Assumptions

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    2/47

    2

    The equation that describes how y is related to x and

    an error term is called the regression model.

    The simple linear regression model is:

    y =b0 +b1x +e

    b0 andb1 are called parameters of the model.

    e is a random variable called the error term.

    Simple Linear Regression Model

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    3/47

    3

    n The simple linear regression equation is:

    E(y) =b0 +b1x

    Graph of the regression equation is a straight line.

    b0 is the y intercept of the regression line.

    b1 is the slope of the regression line.

    E(y) is the expected value of y for a given x value.

    Simple Linear Regression Equation

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    4/47

    4

    Simple Linear Regression Equation

    n Positive Linear Relationship

    E(y)

    x

    Slopeb1is positive

    Regression line

    Interceptb0

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    5/47

    5

    Simple Linear Regression Equation

    n Negative Linear Relationship

    E(y)

    x

    Slopeb1is negative

    Regression lineIntercept

    b0

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    6/47

    6

    Simple Linear Regression Equation

    n No Relationship

    E(y)

    x

    Slopeb1is 0

    Regression line

    Interceptb0

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    7/47

    7

    n The estimated simple linear regression equation is:

    The graph is called the estimated regression line.

    b0 is the y intercept of the line.

    b1 is the slope of the line.

    is the estimated value of y for a given x value.

    Estimated Simple Linear Regression Equation

    0 1y b b x

    y

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    8/47

    8

    Estimation Process

    Regression Modely =b0 +b1x +e

    Regression EquationE(y) =b0 +b1x

    Unknown Parametersb0,b1

    Sample Data:

    x yx1 y1. .

    . .xn yn

    EstimatedRegression Equation

    Sample Statisticsb0, b1

    b0

    and b1

    provide estimates ofb0 andb1

    0 1y b b x

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    9/47

    9

    Least Squares Criterion

    where:

    yi = observed value of the dependent variable

    for the ith observation

    yi = estimated value of the dependent variable

    for the ith observation

    Least Squares Method

    min (y yi i )2

    ^

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    10/47

    10

    Slope for the Estimated Regression Equation

    bx y x y n

    x x n

    i i i i

    i i1 2 2

    ( ) /

    ( ) /

    The Least Squares Method

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    11/47

    11

    n y-Intercept for the Estimated Regression Equation

    where:

    xi = value of independent variable for ith observationyi = value of dependent variable for ith observation

    x = mean value for independent variable

    y = mean value for dependent variable

    n = total number of observations

    _

    _

    The Least Squares Method

    0 1b y b x

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    12/47

    12

    Example: Reed Auto Sales

    Simple Linear Regression

    Reed Auto periodically has a special week-longsale. As part of the advertising campaign Reed runsone or more television commercials during theweekend preceding the sale. Data from a sample of 5

    previous sales are shown on the next slide.

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    13/47

    13

    Example: Reed Auto Sales

    n Simple Linear Regression

    Number of TV Ads Number of Cars Sold1 143 24

    2 181 173 27

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    14/47

    14

    Slope for the Estimated Regression Equation

    b1 = 220 - (10)(100)/5 = _____

    24 - (10)2/5

    y-Intercept for the Estimated Regression Equationb0 = 20 - 5(2) = _____

    Estimated Regression Equation

    y = 10 + 5x^

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    15/47

    15

    Example: Reed Auto Sales

    Scatter Diagram

    y = 10 + 5x

    0

    5

    10

    15

    20

    25

    30

    0 1 2 3 4

    TV Ads

    CarsSold

    ^

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    16/47

    16

    Relationship Among SST, SSR, SSE

    SST = SSR + SSE

    where:

    SST = total sum of squares

    SSR = sum of squares due to regressionSSE = sum of squares due to error

    The Coefficient of Determination

    ( ) ( ) ( )y y y y y yi i i i 2 2 2^^

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    17/47

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    18/47

    18

    Coefficient of Determination

    r2 = SSR/SST = 100/114 =

    The regression relationship is very strong because

    88% of the variation in number of cars sold can beexplained by the linear relationship between thenumber of TV ads and the number of cars sold.

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    19/47

    19

    The Correlation Coefficient

    Sample Correlation Coefficient

    where:

    b1 = the slope of the estimated regression

    equation

    2

    1 )of(sign rbrxy

    ionDeterminatoftCoefficien)of(sign 1brxy

    xbby 10

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    20/47

    20

    Sample Correlation Coefficient

    The sign of b1 in the equation is +.

    rxy = +.9366

    Example: Reed Auto Sales

    2

    1 )of(sign rbrxy

    10 5y x

    =+ .8772xyr

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    21/47

    21

    Model Assumptions

    Assumptions About the Error Term e1. The error e is a random variable with mean of

    zero.

    2. The variance of e, denoted by 2, is the same for

    all values of the independent variable.3. The values of e are independent.

    4. The error e is a normally distributed randomvariable.

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    22/47

    22

    Testing for Significance

    To test for a significant regression relationship, wemust conduct a hypothesis test to determine whetherthe value ofb1 is zero.

    Two tests are commonly used

    t Test F Test

    Both tests require an estimate of 2, the variance of ein the regression model.

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    23/47

    23

    An Estimate of 2

    The mean square error (MSE) provides the estimate

    of 2, and the notation s2 is also used.

    s2

    = MSE = SSE/(n-2)

    where:

    Testing for Significance

    2

    10

    2 )()(SSE iiii xbbyyy

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    24/47

    24

    Testing for Significance

    An Estimate of To estimate we take the square root of 2.

    The resulting s is called the standard error of theestimate.

    2SSEMSE

    ns

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    25/47

    25

    Hypotheses

    H0:b1 = 0

    Ha:b1 = 0

    Test Statistic

    where

    Testing for Significance: t Test

    tb

    sb 1

    1

    2)(

    1

    xx

    ss

    i

    b

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    26/47

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    27/47

    27

    t Test

    Hypotheses

    H0:b1 = 0

    Ha:b1 = 0

    Rejection RuleFor = .05 and d.f. = 3, t.025 = _____

    Reject H0 if t > t.025 = _____

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    28/47

    28

    n t Test

    Test Statistics

    t = _____/_____ = 4.63

    Conclusions

    t = 4.63 > 3.182, so reject H0

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    29/47

    29

    Confidence Interval forb1

    We can use a 95% confidence interval forb1 to test

    the hypotheses just used in the t test.H0 is rejected if the hypothesized value of b1 is notincluded in the confidence interval for b1.

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    30/47

    30

    The form of a confidence interval forb1 is:

    where b1 is the point estimate

    is the margin of erroris the t value providing an area

    of /2 in the upper tail of a

    t distribution with n - 2 degrees

    of freedom

    Confidence Interval forb1

    12/1 bstb

    12/ bst

    2/t

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    31/47

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    32/47

    32

    n Hypotheses

    H0:b1 = 0

    Ha:b1 = 0

    n Test Statistic

    F= MSR/MSE

    Testing for Significance: F Test

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    33/47

    33

    n Rejection Rule

    Reject H0 if F> F

    where: F is based on an Fdistribution

    with 1 d.f. in the numerator and

    n - 2 d.f. in the denominator

    Testing for Significance: F Test

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    34/47

    34

    n F Test

    Hypotheses

    H0:b1 = 0

    Ha:b1 = 0

    Rejection RuleFor = .05 and d.f. = 1, 3: F.05 = ______

    Reject H0 if F > F.05 = ______.

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    35/47

    35

    n F Test

    Test Statistic

    F= MSR/MSE = ____ / ______ = 21.43

    Conclusion

    F= 21.43 > 10.13, so we reject H0.

    Example: Reed Auto Sales

    Some Cautions about the

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    36/47

    36

    Some Cautions about theInterpretation of Significance Tests

    Rejecting H0:b1 = 0 and concluding that therelationship between x and y is significant does notenable us to conclude that a cause-and-effectrelationship is present between x and y.

    Just because we are able to reject H0:b

    1 = 0 anddemonstrate statistical significance does not enable usto conclude that there is a linear relationship betweenx and y.

    Using the Estimated Regression Equation

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    37/47

    37

    n Confidence Interval Estimate of E(yp)

    n Prediction Interval Estimate of yp

    yp+ t/2 sind

    where: confidence coefficient is 1 - and

    t/2

    is based on a t distribution

    with n - 2 degrees of freedom

    Using the Estimated Regression Equationfor Estimation and Prediction

    / y t sp yp 2

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    38/47

    38

    Point Estimation

    If 3 TV ads are run prior to a sale, we expect themean number of cars sold to be:

    y = 10 + 5(3) = ______ cars^

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    39/47

    39

    n Confidence Interval for E(yp)

    95% confidence interval estimate of the meannumber of cars sold when 3 TV ads are run is:

    25 + 4.61 = ______ to _______ cars

    Example: Reed Auto Sales

    l d l

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    40/47

    40

    n Prediction Interval for yp

    95% prediction interval estimate of the number ofcars sold in one particular week when 3 TV ads arerun is:

    25 + 8.28 = _____ to ______ cars

    Example: Reed Auto Sales

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    41/47

    41

    Residual for Observation i

    yiyi

    Standardized Residual for Observation i

    where:

    and

    Residual Analysis

    ^

    y ys

    i i

    y yi i

    ^

    ^

    s s hy y ii i 1^

    2

    2

    )(

    )(1

    xx

    xx

    nh

    i

    i

    i

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    42/47

    42

    Example: Reed Auto Sales

    Residuals

    Observation Predicted Cars Sold Residuals

    1 15 -1

    2 25 -1

    3 20 -2

    4 15 2

    5 25 2

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    43/47

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    44/47

    44

    Residual Analysis

    Residual Plot

    x

    y y

    0

    Good Pattern

    Residual

    R id l A l i

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    45/47

    45

    Residual Analysis

    n Residual Plot

    x

    y y

    0

    Nonconstant Variance

    Residual

    R id l A l i

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    46/47

    46

    Residual Analysis

    n Residual Plot

    x

    y y

    0

    Model Form Not Adequate

    Residual

  • 8/3/2019 Kxu Stat Anderson Ch12 Student

    47/47

    47

    End of Chapter 12


Recommended