Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

30
Chapter 11 Simple Linear Regression Analysis ( 线线线线线线 ) Business Statistics in Practic

description

Business Statistics in Practice. Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 ). Two quantitative variables Correlation. A relationship between two variables. Explanatory (Independent)Variable. Response (Dependent)Variable. y. x. Hours of Training. Number of Accidents. - PowerPoint PPT Presentation

Transcript of Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Page 1: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Chapter 11

Simple Linear Regression Analysis (线性回归分析 )

Business Statistics in Practice

Page 2: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Two quantitative variablesCorrelation

What type of relationship exists between the two variables and is the correlation significant?

x y

Cigarettes smoked per dayScore on SATHeight

Hours of Training

Explanatory(Independent)Variable

Response(Dependent)Variable

A relationship between two variables.

Number of AccidentsShoe Size Height

Lung CapacityGrade Point Average IQ

Page 3: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Correlation(相关 ) vs. Regression(回归 )

A scatter diagram (散点图 ) can be used to show the relationship between two variables

Correlation (相关 ) analysis is used to measure strength of the association (linear relationship) between two variables Correlation is only concerned with strength of the

relationship No causal effect (因果效应 ) is implied with correlation

Page 4: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

969291888685848382797869

PriceIndex(000s)

8.07.57.57.37.27.27.17.17.06.26.25.1

Relationship between Market Index and Stock Price

50

60

70

80

90

100

5 6 7 8 9 10

Index

Pric

e

Example The twelve days of stock prices and the overall market index on each day are given as follows:

Page 5: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

The Coefficient of CorrelationCoefficient of Correlation (r).It is a measure of the strength of the relationship (linear) between two variables

It can range from -1.00 to 1.00.

2

1

( )n

xx ii

ss x x

2

1

( )n

yy ii

ss y y

xy

xx yy

ssr

ss ss

1

( )( )n

xy i ii

ss x x y y

Page 6: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Negative values indicate an inverse relationship and positive values indicate a direct relationship.

Values of -1.00 or 1.00 indicate perfect and strong correlation.

Values close to 0.0 indicate weak correlation.

The Coefficient of CorrelationCoefficient of Correlation (r).

Page 7: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Different Values of the CorrelationCoefficient

Page 8: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Introduction to Regression Analysis

Regression analysis is used to: Predict the value of a dependent variable based on the

value of at least one independent variable Explain the impact of changes in an independent

variable on the dependent variable

Dependent variable: the variable we wish to predict or explain

Independent variable: the variable used to explain the dependent variable

Page 9: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Simple Linear Regression Model

Only one independent variable, X Relationship between X and Y is

described by a linear function Changes in Y are assumed to be caused

by changes in X

Page 10: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Types of Relationships

Y

X

Y

X

Y

Y

X

X

Linear relationships Curvilinear relationships

Page 11: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Types of Relationships

Y

X

Y

X

Y

Y

X

X

Strong relationships Weak relationships

(continued)

Page 12: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Types of Relationships

Y

X

Y

X

No relationship(continued)

Page 13: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

ii10i εXββY Linear component

Simple Linear Regression Model

Population Y intercept

Population SlopeCoefficient

Random Error term

Dependent Variable

Independent Variable

Random Error component

Page 14: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

(continued)

Random Error for this Xi value

Y

X

Observed Value of Y for Xi

Predicted Value of Y for Xi

ii10i εXββY

Xi

Slope = β1

Intercept = β0

εi

Simple Linear Regression Model

Page 15: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

i10i XbbY

The simple linear regression equation provides an estimate of the population regression line

Simple Linear Regression Equation (Prediction Line)

Estimate of the regression

intercept

Estimate of the regression slope

Estimated (or predicted) Y value for observation i

Value of X for observation i

The individual random error terms ei have a mean of zero

Page 16: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Least Squares Method (最小二乘方法 )

b0 and b1 are obtained by finding the values of b0

and b1 that minimize the sum of the squared

differences between Y and :

2i10i

2ii ))Xb(b(Ymin)Y(Ymin

Y

Page 17: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

b0 is the estimated average value of Y when the value of X is zero

b1 is the estimated change in the average value of Y as a result of a one-unit change in X

Interpretation of the Slope(斜率 ) and the Intercept(截

距 )

Page 18: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Estimation/prediction equation

Least squares point estimate of the slope 1

xbby 10 ˆ

ny

ySSnx

xxxSS

nyx

yxyyxxSSSSSS

b

iiyy

iiixx

iiiiiixy

xx

xy

22

222

1

)(

)()(

The Least Square Point Estimates

Least squares point estimate of the y-intercept 0

nx

xny

yxbyb ii 10

Page 19: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Example 11.1Example 11.1 The House Price Case

A real estate agent wishes to examine the relationship between the selling price of a home and its size (measured in square feet)

A random sample of 10 houses is selected Dependent variable (Y) = house price in $1000s Independent variable (X) = square feet

Page 20: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

050

100150200250300350400450

0 500 1000 1500 2000 2500 3000

Square Feet

Hou

se P

rice

($10

00s)

Graphical Presentation

House price model: scatter plot

Page 21: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

050

100150200250300350400450

0 500 1000 1500 2000 2500 3000

Square Feet

Hou

se P

rice

($10

00s)

Graphical Presentation

House price model: scatter plot and regression line

feet) (square 0.10977 98.24833 price house

Slope = 0.10977

Intercept = 98.248

Page 22: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Interpretation of the Intercept, b0

b0 is the estimated average value of Y when the value of X is zero (if X = 0 is in the range of observed X values) Here, no houses had 0 square feet, so b0 = 98.24833

just indicates that, for houses within the range of sizes observed, $98,248.33 is the portion of the house price not explained by square feet

feet) (square 0.10977 98.24833 price house

Page 23: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Interpretation of the Slope Coefficient, b1

b1 measures the estimated change in the average value of Y as a result of a one-unit change in X Here, b1 = .10977 tells us that the average value of a

house increases by .10977($1000) = $109.77, on average, for each additional one square foot of size

feet) (square 0.10977 98.24833 price house

Page 24: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

317.85

0)0.1098(200 98.25

(sq.ft.) 0.1098 98.25 price house

Predict the price for a house with 2000 square feet:

The predicted price for a house with 2000 square feet is 317.85($1,000s) = $317,850

Predictions using Regression Analysis

Page 25: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Model Assumptions1. Mean of Zero

At any given value of x, the population of potential error term values has a mean equal to zero

2. Constant Variance AssumptionAt any given value of x, the population of potential error term values has a variance that does not depend on the value of x

3. Normality AssumptionAt any given value of x, the population of potential error term values has a normal distribution

4. Independence AssumptionAny one value of the error term is statistically independent of any other value of

Page 26: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Example 11.2: Fuel Consumption Case

Week

Average Hourly Temperature x (deg F)

Weekly Fuel Consumption y (MMcf)

1 28.0 12.42 28.0 11.73 32.5 12.44 39.0 10.85 45.9 9.46 57.8 9.57 58.1 8.08 62.5 7.5

Page 27: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Example 11.2: Excel Output of Regression on Fuel Consumption Data

Page 28: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

What Does r2 Mean?

The coefficient of determination, r2, is the proportion of the total variation in the n observed values of the dependent variable that is explained by the simple linear regression model

899489.0548750.25980816.22

variationTotal variation2

Explainedr

Page 29: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Mechanics of the F Test

T test: To test H0: β1= 0 versus Ha: β1 0 at the level of significance

Test statistics based on F

Reject H0 if F(model) > F or p-value < F is based on 1 numerator and n-2 denominator

degrees of freedom

2)-)/(n variationed(Unexplain variationExplained

F

Page 30: Chapter 11 Simple Linear Regression Analysis ( 线性回归分析 )

Chapter Summary Discussed correlation -- measuring the strength of

the association Introduced types of regression models Reviewed assumptions of regression and correlation Discussed determining the simple linear regression

equation Addressed prediction of individual values Model diagnostic