Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of...

34
Chapter 12b •Testing for significance—the t- test •Developing confidence intervals for estimates of β 1 . •Testing for significance—the f- test •Using Excel’s regression tool.
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    234
  • download

    1

Transcript of Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of...

Page 1: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Chapter 12b

•Testing for significance—the t-test

•Developing confidence intervals for estimates of β1.

•Testing for significance—the f-test

•Using Excel’s regression tool.

Page 2: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Testing for Significance To test for a significant regression relationship, weTo test for a significant regression relationship, we must conduct a hypothesis test to determine whethermust conduct a hypothesis test to determine whether the value of the value of 11 is zero. is zero.

To test for a significant regression relationship, weTo test for a significant regression relationship, we must conduct a hypothesis test to determine whethermust conduct a hypothesis test to determine whether the value of the value of 11 is zero. is zero.

Two tests are commonly used:Two tests are commonly used: Two tests are commonly used:Two tests are commonly used:

tt Test Test andand FF Test Test

Both the Both the tt test and test and FF test require an estimate of test require an estimate of 22,, the variance of the variance of in the regression model. in the regression model. Both the Both the tt test and test and FF test require an estimate of test require an estimate of 22,, the variance of the variance of in the regression model. in the regression model.

Page 3: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

• An Estimate of

Testing for Significance

210

2 )()ˆ(SSE iiii xbbyyy 210

2 )()ˆ(SSE iiii xbbyyy

where:where:

ss 22 = MSE = SSE/( = MSE = SSE/(n n 2) 2)

The mean square error (MSE) provides the estimateThe mean square error (MSE) provides the estimate

of of 22, and the notation , and the notation ss22 is also used. is also used.

Page 4: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Testing for Significance

• An Estimate of

2

SSEMSE

n

s2

SSEMSE

n

s

• To estimate To estimate we take the square root of we take the square root of 22..

• The resulting The resulting ss is called the is called the standard error ofstandard error of the estimatethe estimate..

Page 5: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

• Hypotheses

• Test Statistic

Testing for Significance: t Test

0 1: 0H 0 1: 0H

1: 0aH 1: 0aH

1

1

b

bt

s

1

1

b

bt

s

Page 6: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Rejection RuleRejection Rule

Testing for Significance: Testing for Significance: tt Test Test

where: where:

tt is based on a is based on a tt distribution distribution

with with nn - 2 degrees of freedom - 2 degrees of freedom

Reject Reject HH00 if if tt < - < -ttor or tt > > tt

Page 7: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

1. Determine the hypotheses.1. Determine the hypotheses.

2. Specify the level of significance.2. Specify the level of significance.

3. Select the test statistic.3. Select the test statistic.

= .05= .05

4. State the rejection rule.4. State the rejection rule.Reject Reject HH00 if | if |t|t| > 3.182 > 3.182

Using the Test StatisticUsing the Test Statistic

Testing for Significance: Testing for Significance: tt Test Test

0 1: 0H 0 1: 0H

1: 0aH 1: 0aH

1

1

b

bt

s

1

1

b

bt

s

(3 degrees of freedom)(3 degrees of freedom)

Page 8: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Testing for Significance: Testing for Significance: tt Test Test

5. Compute the value of the test statistic.5. Compute the value of the test statistic.

6. Determine whether to reject 6. Determine whether to reject HH00..

At the .05 level of significance, the At the .05 level of significance, the samplesampleevidence indicates that there is a evidence indicates that there is a significant significant relationship between the number of TV relationship between the number of TV adsadsaired and the number of cars sold. aired and the number of cars sold.

Because Because tt = 4.63 > 3.182, we reject = 4.63 > 3.182, we reject HH00..

Using the Test StatisticUsing the Test Statistic

1

1 54.63

1.08b

bt

s

1

1 54.63

1.08b

bt

s

Page 9: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Confidence Interval for 1

HH00 is rejected if the hypothesized value of is rejected if the hypothesized value of 11 is not is not included in the confidence interval for included in the confidence interval for 11..

We can use a 95% confidence interval for We can use a 95% confidence interval for 11 to test to test the hypotheses just used in the the hypotheses just used in the tt test. test.

Page 10: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

• The form of a confidence interval for 1 is:

Confidence Interval for 1

11 / 2 bb t s11 / 2 bb t s

wherewhere is the is the tt value providing an area value providing an area

of of /2 in the upper tail of a /2 in the upper tail of a tt distribution distribution

with with n n - 2 degrees of freedom- 2 degrees of freedom

2/t 2/t

bb11 is the is thepointpoint

estimatestimatoror

is theis themarginmarginof errorof error

1/ 2 bt s 1/ 2 bt s

Page 11: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

• Rejection Rule

• 95% Confidence Interval for 1

• Conclusion

Confidence Interval for 1

Reject Reject HH00 if 0 is not included in if 0 is not included in

the confidence interval for the confidence interval for 11..

0 is not included in the confidence interval. 0 is not included in the confidence interval.

Reject Reject HH00

= 5 +/- 3.182(1.08) = 5 +/- 3.44= 5 +/- 3.182(1.08) = 5 +/- 3.4412/1 bstb 12/1 bstb

or 1.56 to 8.44or 1.56 to 8.44

Page 12: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

HypothesesHypotheses

Test StatisticTest Statistic

Testing for Significance: Testing for Significance: FF Test Test

FF = MSR/MSE = MSR/MSE

0 1: 0H 0 1: 0H

1: 0aH 1: 0aH

Page 13: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Rejection RuleRejection Rule

Testing for Significance: Testing for Significance: FF Test Test

where:where:

FF is based on an is based on an FF distribution with distribution with

1 degree of freedom in the numerator and1 degree of freedom in the numerator and

nn - 2 degrees of freedom in the denominator - 2 degrees of freedom in the denominator

Reject Reject HH00 if if FF > > FF

Page 14: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

1. Determine the hypotheses.1. Determine the hypotheses.

2. Specify the level of significance.2. Specify the level of significance.

3. Select the test statistic.3. Select the test statistic.

= .05= .05

4. State the rejection rule.4. State the rejection rule.Reject Reject HH00 if F > 10.13 if F > 10.13

Using the Test StatisticUsing the Test Statistic

Testing for Significance: Testing for Significance: FF Test Test

0 1: 0H 0 1: 0H

1: 0aH 1: 0aH

FF = MSR/MSE = MSR/MSE

(1 d.f. in numerator,(1 d.f. in numerator, 3 d.f. in denominator)3 d.f. in denominator)

Page 15: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Testing for Significance: Testing for Significance: FF Test Test

5. Compute the value of the test statistic.5. Compute the value of the test statistic.

6. Determine whether to reject 6. Determine whether to reject HH00..

Because Because FF = 21.43 > 10.13, we reject = 21.43 > 10.13, we reject HH00..

Using the Test StatisticUsing the Test Statistic

FF = MSR/MSE = 100/4.667 = 21.43 = MSR/MSE = 100/4.667 = 21.43

At the .05 level of significance, the At the .05 level of significance, the statisticalstatisticalevidence is sufficient to conclude that we have evidence is sufficient to conclude that we have aasignificant relationship between the number of significant relationship between the number of TVTVads aired and the number of cars sold. ads aired and the number of cars sold.

Page 16: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Some Cautions about theInterpretation of Significance Tests

Just because we are able to reject Just because we are able to reject HH00: : 11 = 0 and = 0 and demonstrate statistical significance does not enabledemonstrate statistical significance does not enable

us to conclude that there is a us to conclude that there is a linear relationshiplinear relationshipbetween between xx and and yy..

Rejecting Rejecting HH00: : 11 = 0 and concluding that the = 0 and concluding that therelationship between relationship between xx and and yy is significant does not is significant does notenable us to conclude that a enable us to conclude that a cause-and-effectcause-and-effectrelationshiprelationship is present between is present between xx and and yy..

Page 17: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

The Regression tool can be used to perform aThe Regression tool can be used to perform a complete regression analysiscomplete regression analysis..

Excel also has a Excel also has a comprehensive toolcomprehensive tool in its Data in its Data Analysis package called Analysis package called RegressionRegression..

Up to this point, you have seen how Excel can beUp to this point, you have seen how Excel can be used for various parts of a regression analysis.used for various parts of a regression analysis.

Page 18: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Formula Worksheet (showing data)Formula Worksheet (showing data)

A B C D1 Week TV Ads Cars Sold 2 1 1 14 3 2 3 24 4 3 2 18 5 4 1 17 6 5 3 27 7

Page 19: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Performing the Regression AnalysisPerforming the Regression Analysis

Step 3Step 3 Choose Choose RegressionRegression from the list of from the list of

Analysis ToolsAnalysis Tools

Step 2Step 2 Choose the Choose the Data AnalysisData Analysis option optionStep 1Step 1 Select the Select the ToolsTools pull-down menu pull-down menu

Page 20: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Performing the Regression AnalysisPerforming the Regression Analysis

Step 4Step 4 When the Regression dialog box appears: When the Regression dialog box appears:

Enter C1:C6 in the Enter C1:C6 in the Input Y RangeInput Y Range box box

Enter B1:B6 in the Enter B1:B6 in the Input X RangeInput X Range box box

Select Select LabelsLabels

Select Select Confidence LevelConfidence Level

Enter 95 in the Confidence Level boxEnter 95 in the Confidence Level box

Select Select Output RangeOutput Range

Enter A9 (any cell) in the Enter A9 (any cell) in the Ouput RangeOuput Range box box

Click Click OKOK to begin the regression analysis to begin the regression analysis

Page 21: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Regression Dialog BoxRegression Dialog Box

Page 22: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Value WorksheetValue WorksheetA B C D E F G H I

1 Week TV Ads Cars Sold2 1 1 143 2 3 244 3 2 185 4 1 176 5 3 2778 SUMMARY OUTPUT9

10 Regression Statistics11 Multiple R 0.93658581212 R Square 0.87719298213 Adjusted R Square 0.8362573114 Standard Error 2.16024689915 Observations 51617 ANOVA18 df SS MS F Significance F19 Regression 1 100 100 21.42857 0.01898623120 Residual 3 14 4.66666721 Total 4 1142223 Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%24 Intercept 10 2.366431913 4.225771 0.024236 2.468950436 17.53104956 2.468950436 17.5310495625 TV Ads 5 1.08012345 4.6291 0.018986 1.562561893 8.437438107 1.562561893 8.43743810726

ANOVA OutputANOVA Output

Regression Statistics OutputRegression Statistics Output

DataData

Estimated Regression Estimated Regression Equation OutputEquation Output

Page 23: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Note: Columns F-I are not shown.Note: Columns F-I are not shown.

A B C D E2223 Coeffic. Std. Err. t Stat P-value24 Intercept 10 2.36643 4.2258 0.0242425 TV Ads 5 1.08012 4.6291 0.0189926

Estimated Regression Equation Output (left Estimated Regression Equation Output (left portion)portion)

Page 24: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Note: Columns C-E are hidden.Note: Columns C-E are hidden.

A B F G H I2223 Coeffic. Low. 95% Up. 95% Low. 95.0% Up. 95.0%24 Intercept 10 2.46895 17.53105 2.46895044 17.531049625 TV Ads 5 1.562562 8.437438 1.56256189 8.4374381126

Estimated Regression Equation Output (right Estimated Regression Equation Output (right portion)portion)

Page 25: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

ANOVA OutputANOVA Output

A B C D E F1617 ANOVA18 df SS MS F Significance F19 Regression 1 100 100 21.4286 0.01898623120 Residual 3 14 4.6666721 Total 4 11422

Page 26: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel’s Regression ToolUsing Excel’s Regression Tool

Regression Statistics OutputRegression Statistics Output

A B C9

10 Regression Statistics11 Multiple R 0.93658581212 R Square 0.87719298213 Adjusted R Square 0.8362573114 Standard Error 2.16024689915 Observations 516

Page 27: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Confidence Interval Estimate of Confidence Interval Estimate of EE((yypp))

Prediction Interval Estimate of Prediction Interval Estimate of yypp

Using the Estimated Regression EquationUsing the Estimated Regression Equationfor Estimation and Predictionfor Estimation and Prediction

/ y t sp yp 2 / y t sp yp 2

where:where:

confidence coefficient is 1 - confidence coefficient is 1 - andand

tt/2 /2 is based on ais based on a t t distributiondistribution

with with nn - 2 degrees of freedom - 2 degrees of freedom

/ 2 indpy t s / 2 indpy t s

Page 28: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

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

Point Estimation

^̂yy = 10 + 5(3) = 25 cars = 10 + 5(3) = 25 cars

Page 29: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel to Develop ConfidenceUsing Excel to Develop Confidenceand Prediction Interval Estimatesand Prediction Interval Estimates

Formula Worksheet (confidence interval Formula Worksheet (confidence interval portion)portion) D E F G

1 CONFIDENCE INTERVAL2 x p 33 xbar =AVERAGE(B2:B6)4 x p -xbar =F2-F3

5 (x p -xbar)2 =F4^2

6 (x p -xbar)2 =DEVSQ(B2:B6)7 Variance of yhat =D20*(1/B15+F5/F6)8 Std. Dev of yhat =SQRT(F7)9 t Value =TINV(0.05,3)

10 Margin of Error =F9*F811 Point Estimate =B24+B25*F212 Lower Limit =F11-F1013 Upper Limit =F11+F10

Page 30: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel to Develop ConfidenceUsing Excel to Develop Confidenceand Prediction Interval Estimatesand Prediction Interval Estimates

Value Worksheet (confidence interval portion)Value Worksheet (confidence interval portion) D E F G1 CONFIDENCE INTERVAL2 x p 33 xbar 2.04 x p -xbar 1.0

5 (x p -xbar)2 1.0

6 (x p -xbar)2 4.07 Variance of yhat 2.10008 Std. Dev of yhat 1.44919 t Value 3.1824

10 Margin of Error 4.611811 Point Estimate 25.012 Lower Limit 20.3913 Upper Limit 29.61

Page 31: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

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

Confidence Interval for Confidence Interval for EE((yypp))

25 25 ++ 4.61 = 20.39 to 29.61 cars 4.61 = 20.39 to 29.61 cars

Page 32: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel to Develop ConfidenceUsing Excel to Develop Confidenceand Prediction Interval Estimatesand Prediction Interval Estimates

Formula Worksheet (prediction interval Formula Worksheet (prediction interval portion)portion)

H I1 PREDICTION INTERVAL2 Variance of y ind =D20+F73 Std. Dev. of y ind =SQRT(I2)4 Margin of Error =F9*I3

5 Lower Limit =F11-I4

6 Upper Limit =F11+I47

Page 33: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

Using Excel to Develop ConfidenceUsing Excel to Develop Confidenceand Prediction Interval Estimatesand Prediction Interval Estimates

Value Worksheet (prediction interval portion)Value Worksheet (prediction interval portion)

H I1 PREDICTION INTERVAL2 Variance of y ind 6.766673 Std. Dev. of y ind 2.601284 Margin of Error 8.27845

5 Lower Limit 16.72

6 Upper Limit 33.287

Page 34: Chapter 12b Testing for significance—the t-test Developing confidence intervals for estimates of β 1. Testing for significance—the f-test Using Excel’s.

The 95% prediction interval estimate of The 95% prediction interval estimate of the number of cars sold in one particular week the number of cars sold in one particular week when 3 TV ads are run is:when 3 TV ads are run is:

Prediction Interval for Prediction Interval for yypp

25 25 ++ 8.28 = 16.72 to 33.28 cars 8.28 = 16.72 to 33.28 cars