chapter 10 chi-square tests and the f- distribution 1

112
Chapter 10 Chi-Square Tests and the F- Distribution 1

Upload: donald-greene

Post on 01-Jan-2016

241 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chapter 10

Chi-Square Tests and the F-Distribution

1

Page 2: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chapter Outline

• 10.1 Goodness of Fit

• 10.2 Independence

• 10.3 Comparing Two Variances

• 10.4 Analysis of Variance

2

Page 3: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.1

Goodness of Fit

3

Page 4: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.1 Objectives

• Use the chi-square distribution to test whether a frequency distribution fits a claimed distribution

4

Page 5: Chapter 10 Chi-Square Tests and the F- Distribution 1

Multinomial Experiments

Multinomial experiment

• A probability experiment consisting of a fixed number of trials in which there are more than two possible outcomes for each independent trial.

• A binomial experiment had only two possible outcomes.

• The probability for each outcome is fixed and each outcome is classified into categories.

5

Page 6: Chapter 10 Chi-Square Tests and the F- Distribution 1

Multinomial Experiments

Example:• A radio station claims that the distribution of music

preferences for listeners in the broadcast region is as shown below.

Distribution of music PreferencesClassical 4% Oldies 2%Country 36% Pop 18%Gospel 11% Rock 29%

Each outcome is classified into categories.

The probability for each possible outcome is fixed.

6

Page 7: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

Chi-Square Goodness-of-Fit Test

• Used to test whether a frequency distribution fits an expected distribution.

• The null hypothesis states that the frequency distribution fits the specified distribution.

• The alternative hypothesis states that the frequency distribution does not fit the specified distribution.

7

Page 8: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

Example:

• To test the radio station’s claim, the executive can perform a chi-square goodness-of-fit test using the following hypotheses.

H0: The distribution of music preferences in the broadcast region is 4% classical, 36% country, 11% gospel, 2% oldies, 18% pop, and 29% rock. (claim)

Ha: The distribution of music preferences differs from the claimed or expected distribution.

8

Page 9: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

• To calculate the test statistic for the chi-square goodness-of-fit test, the observed frequencies and the expected frequencies are used.

• The observed frequency O of a category is the frequency for the category observed in the sample data.

9

Page 10: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

• The expected frequency E of a category is the calculated frequency for the category. Expected frequencies are obtained assuming the

specified (or hypothesized) distribution. The expected frequency for the ith category is

Ei = npi

where n is the number of trials (the sample size) and pi is the assumed probability of the ith category.

10

Page 11: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Finding Observed and Expected Frequencies

A marketing executive randomly selects 500 radio music listeners from the broadcast region and asks each whether he or she prefers classical, country, gospel, oldies, pop, or rock music. The results are shown at the right. Find the observed frequencies and the expected frequencies for each type of music.

Survey results

(n = 500)Classical 8Country 210Gospel 72Oldies 10Pop 75Rock 125

11

Page 12: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Finding Observed and Expected Frequencies

Observed frequency: The number of radio music listeners naming a particular type of music

Survey results(n = 500)

Classical 8Country 210Gospel 72Oldies 10Pop 75Rock 125

observed frequency

12

Page 13: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Finding Observed and Expected Frequencies

Expected Frequency: Ei = npi

Type of music

% of listeners

Observed frequency

Expected frequency

Classical 4% 8Country 36% 210Gospel 11% 72Oldies 2% 10Pop 18% 75Rock 29% 125

n = 500

500(0.04) = 20500(0.36) = 180500(0.11) = 55500(0.02) = 10500(0.18) = 90500(0.29) = 145

13

Distribution of music PreferencesClassical 4% Oldies 2%Country 36% Pop 18%Gospel 11% Rock 29%

Page 14: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

For the chi-square goodness-of-fit test to be used, the following must be true.

1.The observed frequencies must be obtained by using a random sample.

2.Each expected frequency must be greater than or equal to 5.

14

Page 15: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

• If these conditions are satisfied, then the sampling distribution for the goodness-of-fit test is approximated by a chi-square distribution with k – 1 degrees of freedom, where k is the number of categories.

• The test statistic for the chi-square goodness-of-fit test is

where O represents the observed frequency of each category and E represents the expected frequency of each category.

22 ( )O E

E The test is always

a right-tailed test.

15

Page 16: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

1. Identify the claim. State the null and alternative hypotheses.

2. Specify the level of significance.

3. Identify the degrees of freedom.

4. Determine the critical value.

State H0 and Ha.

Identify .

Use Table 6 in Appendix B.

d.f. = k – 1

In Words In Symbols

16

Page 17: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Goodness-of-Fit Test

If χ2 is in the rejection region, reject H0. Otherwise, fail to reject H0.

5. Determine the rejection region.

6. Calculate the test statistic.

7. Make a decision to reject or fail to reject the null hypothesis.

8. Interpret the decision in the context of the original claim.

22 ( )O E

E

In Words In Symbols

17

Page 18: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a Goodness of Fit Test

Use the music preference data to perform a chi-square goodness-of-fit test to test whether the distributions are different. Use α = 0.01.

Survey results (n = 500)

Classical 8Country 210Gospel 72Oldies 10Pop 75Rock 125

Distribution of music preferences

Classical 4%Country 36%Gospel 11%Oldies 2%Pop 18%Rock 29%

18

Page 19: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

• H0:

• Ha:

• α =

• d.f. =

• Rejection Region

• Test Statistic:

• Decision:

• Conclusion:

0.01

6 – 1 = 5

0.01

χ2

0 15.086

music preference is 4% classical, 36% country, 11% gospel, 2% oldies, 18% pop, and 29% rock

music preference differs from the claimed or expected distribution

19

Page 20: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

22 ( )O E

E

Type of music

Observed frequency

Expected frequency

Classical 8 20Country 210 180Gospel 72 55Oldies 10 10Pop 75 90Rock 125 145

2 2 2 2 2 2(8 20) (210 180) (72 55) (10 10) (75 90) (125 145)

20 180 55 10 90 14522.713

20

Page 21: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

• H0:

• Ha:

• α =

• d.f. =

• Rejection Region

• Test Statistic:

• Decision:

0.01

6 – 1 = 5

0.01

χ2

0 15.086

music preference is 4% classical, 36% country, 11% gospel, 2% oldies, 18% pop, and 29% rock

music preference differs from the claimed or expected distribution

χ2 = 22.713

22.713

There is enough evidence to conclude that the distribution of music preferences differs from the claimed distribution.

Reject H0

21

Page 22: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a Goodness of Fit Test

The manufacturer of M&M’s candies claims that the number of different-colored candies in bags of dark chocolate M&M’s is uniformly distributed. To test this claim, you randomly select a bag that contains 500 dark chocolate M&M’s. The results are shown in the table on the next slide. Using α = 0.10, perform a chi-square goodness-of-fit test to test the claimed or expected distribution. What can you conclude? (Adapted from Mars Incorporated)

22

Page 23: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a Goodness of Fit Test

Color FrequencyBrown 80Yellow 95Red 88Blue 83Orange 76Green 78

Solution:•The claim is that the distribution is uniform, so the expected frequencies of the colors are equal. •To find each expected frequency, divide the sample size by the number of colors.• E = 500/6 ≈ 83.3

23

n = 500

Page 24: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

• H0:

• Ha:

• α =

• d.f. =

• Rejection Region

• Test Statistic:

• Decision:

• Conclusion:

0.10

6 – 1 = 5

0.10

χ2

0 9.236

Distribution of different-colored candies in bags of dark chocolate M&Ms is uniform

Distribution of different-colored candies in bags of dark chocolate M&Ms is not uniform

24

Page 25: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

2 2 2 2 2 2(80 83.3) (95 83.3) (88 83.3) (83 83.3) (76 83.3) (78 83.3)

83.3 83.3 83.3 83.3 83.3 83.33.016

ColorObserve

d frequen

cy

Expected

frequency

Brown 80 83.3Yellow 95 83.3Red 88 83.3Blue 83 83.3Orange 76 83.3Green 78 83.3

22 ( )O E

E

25

Page 26: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

• H0:

• Ha:

• α =

• d.f. =

• Rejection Region

• Test Statistic:

• Decision:

0.01

6 – 1 = 5

0.10

χ2

0 9.236

χ2 = 3.016

3.016

There is not enough evidence to dispute the claim that the distribution is uniform.

Distribution of different-colored candies in bags of dark chocolate M&Ms is uniform

Distribution of different-colored candies in bags of dark chocolate M&Ms is not uniform

Fail to Reject H0

26

Page 27: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.1 Summary

• Used the chi-square distribution to test whether a frequency distribution fits a claimed distribution

27

Page 28: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.2

Independence

28

Page 29: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.2 Objectives

• Use a contingency table to find expected frequencies

• Use a chi-square distribution to test whether two variables are independent

29

Page 30: Chapter 10 Chi-Square Tests and the F- Distribution 1

Contingency Tables

r c contingency table

• Shows the observed frequencies for two variables.

• The observed frequencies are arranged in r rows and c columns.

• The intersection of a row and a column is called a cell.

30

Page 31: Chapter 10 Chi-Square Tests and the F- Distribution 1

Contingency Tables

Example:• The contingency table shows the results of a random

sample of 550 company CEOs classified by age and size of company.(Adapted from Grant Thornton LLP, The Segal Company)

Age

Company size

39 and under

40 - 49 50 - 59 60 - 6970 and over

Small / Midsize

42 69 108 60 21

Large 5 18 85 120 22

31

Page 32: Chapter 10 Chi-Square Tests and the F- Distribution 1

Finding the Expected Frequency• Assuming the two variables are independent, you can

use the contingency table to find the expected frequency for each cell.

• The expected frequency for a cell Er,c in a contingency table is

,(Sum of row ) (Sum of column )Expected frequency

Sample sizer cr cE

32

Age

Company size39 and under

40 - 49 50 - 59 60 - 6970 and over

Small / Midsize

42 69 108 60 21

Large 5 18 85 120 22

,

r and c are independent, then:

frequency of E (r AND c)*sample size = p(r)*p(c)*sample size

of row r of column c=( )(

size size

r c

If

Expected p

Total Total

Sample Sample

)* Sample size( of row r)(Total of column c)

= size

Total

Sample

Page 33: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Finding Expected Frequencies

Find the expected frequency for each cell in the contingency table. Assume that the variables, age and company size, are independent.

Age

Company size

39 and under

40 - 49 50 - 59 60 - 6970 and over

Total

Small / Midsize

42 69 108 60 21 300

Large 5 18 85 120 22 250

Total 47 87 193 180 43 550

marginal totals33

Page 34: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Finding Expected Frequencies

Age

Company size

39 and under

40 - 49 50 - 59 60 - 6970 and over

Total

Small / Midsize

42 69 108 60 21 300

Large 5 18 85 120 22 250

Total 47 87 193 180 43 550

,(Sum of row ) (Sum of column )

Sample sizer cr cE

1,1

300 4725.64

550E

34

Page 35: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Finding Expected Frequencies

Age

Company size39 and under

40 - 49 50 - 59 60 - 6970 and over

Total

Small / Midsize

42 69 108 60 21 300

Large 5 18 85 120 22 250

Total 47 87 193 180 43 550

1,2

300 8747.45

550E

1,3

300 193105.27

550E

1,4

300 18098.18

550E

1,5

300 4323.45

550E

1,2

300 8747.45

550E

1,3

300 193105.27

550E

1,4

300 18098.18

550E

35

Page 36: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Finding Expected Frequencies

Age

Company size39 and under

40 - 49 50 - 59 60 - 6970 and over

Total

Small / Midsize

42 69 108 60 21 300

Large 5 18 85 120 22 250

Total 47 87 193 180 43 550

2,2

250 8739.55

550E

2,4

250 18081.82

550E

2,5

250 4319.55

550E

2,1

250 4721.36

550E

2,3

250 19387.73

550E

36

Page 37: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Independence Test

Chi-square independence test

• Used to test the independence of two variables.

• Can determine whether the occurrence of one variable affects the probability of the occurrence of the other variable.

37

Page 38: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Independence Test

For the chi-square independence test to be used, the following must be true.

1.The observed frequencies must be obtained by using a random sample.

2.Each expected frequency must be greater than or equal to 5.

38

Page 39: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Independence Test

• If these conditions are satisfied, then the sampling distribution for the chi-square independence test is approximated by a chi-square distribution with (r – 1)(c – 1) degrees of freedom, where r and c are the number of rows and columns, respectively, of a contingency table.

• The test statistic for the chi-square independence test is

where O represents the observed frequencies and E represents the expected frequencies.

22 ( )O E

E The test is always a

right-tailed test.

39

Page 40: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Independence Test

1. Identify the claim. State the null and alternative hypotheses.

2. Specify the level of significance.

3. Identify the degrees of freedom.

4. Determine the critical value.

State H0 and Ha.

Identify .

Use Table 6 in Appendix B.

d.f. = (r – 1)(c – 1)

In Words In Symbols

40

Page 41: Chapter 10 Chi-Square Tests and the F- Distribution 1

Chi-Square Independence Test

If χ2 is in the rejection region, reject H0. Otherwise, fail to reject H0.

5. Determine the rejection region.

6. Calculate the test statistic.

7. Make a decision to reject or fail to reject the null hypothesis.

8. Interpret the decision in the context of the original claim.

22 ( )O E

E

In Words In Symbols

41

Page 42: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a χ2 Independence Test

Using the age/company size contingency table, can you conclude that the CEOs ages are related to company size? Use α = 0.01. Expected frequencies are shown in parentheses.

Age

Company size39 and under

40 - 49 50 - 59 60 - 6970 and over

Total

Small / Midsize

42(25.64)

69(47.45)

108(105.27

)

60(98.18)

21(23.45)

300

Large5

(21.36)18

(39.55)85

(87.73)120

(81.82)22

(19.55)250

Total 47 87 193 180 43 55042

Page 43: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

• H0:

• Ha:

• α =

• d.f. =

• Rejection Region

• Test Statistic:

• Decision:

0.01

(2 – 1)(5 – 1) = 4

0.01

χ2

0 13.277

CEOs’ ages are independent of company size

CEOs’ ages are dependent on company size

43

Page 44: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

2 2 2 2 2

2 2 2 2 2

(42 25.64) (69 47.45) (108 105.27) (60 98.18) (21 23.45)

25.64 47.45 105.27 98.18 23.45

(5 21.36) (18 39.55) (85 87.73) (120 81.82) (22 19.55)

21.36 39.55 87.73 81.82 19.5577.9

22 ( )O E

E

44

Page 45: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Goodness of Fit Test

• H0:

• Ha:

• α =

• d.f. =

• Rejection Region

• Test Statistic:

• Decision:

0.01

(2 – 1)(5 – 1) = 4

0.01

χ2

0 13.277

CEOs’ ages are independent of company size

CEOs’ ages are dependent on company size

χ2 = 77.9

There is enough evidence to conclude CEOs’ ages are dependent on company size.

77.9

Reject H0

45

Page 46: Chapter 10 Chi-Square Tests and the F- Distribution 1

Age

Company size39 and under

40 - 49 50 - 59 60 - 6970 and over

Small / Midsize

42 69 108 60 21

Large 5 18 85 120 22

Page 47: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.2 Summary

• Used a contingency table to find expected frequencies

• Used a chi-square distribution to test whether two variables are independent

47

Page 48: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.3

Comparing Two Variances

48

Page 49: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.3 Objectives

• Interpret the F-distribution and use an F-table to find critical values

• Perform a two-sample F-test to compare two variances

49

Page 50: Chapter 10 Chi-Square Tests and the F- Distribution 1

F-Distribution

• Let represent the sample variances of two different populations.

• If both populations are normal and the population variances are equal, then the sampling distribution of

is called an F-distribution.

2 21 2 and s s

2 21 2 and σ σ

2122

sF

s

50

Page 51: Chapter 10 Chi-Square Tests and the F- Distribution 1

Properties of the F-Distribution

1. The F-distribution is a family of curves each of which is determined by two types of degrees of freedom: The degrees of freedom corresponding to the

variance in the numerator, denoted d.f.N

The degrees of freedom corresponding to the variance in the denominator, denoted d.f.D

2. F-distributions are positively skewed.

3. The total area under each curve of an F-distribution is equal to 1.

51

Page 52: Chapter 10 Chi-Square Tests and the F- Distribution 1

Properties of the F-Distribution

4. F-values are always greater than or equal to 0.5. For all F-distributions, the mean value of F is

approximately equal to 1.

d.f.N = 1 and d.f.D = 8

d.f.N = 8 and d.f.D = 26

d.f.N = 16 and d.f.D = 7

d.f.N = 3 and d.f.D = 11

F1 2 3 4

52

Page 53: Chapter 10 Chi-Square Tests and the F- Distribution 1

Critical Values for the F-Distribution

1. Specify the level of significance .

2. Determine the degrees of freedom for the numerator, d.f.N.

3. Determine the degrees of freedom for the denominator, d.f.D.

4. Use Table 7 in Appendix B to find the critical value. If the hypothesis test is

a. one-tailed, use the F-table.

b. two-tailed, use the ½ F-table.

53

Page 54: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Finding Critical F-Values

Find the critical F-value for a right-tailed test when α = 0.05, d.f.N = 6 and d.f.D = 29.

The critical value is F0 = 2.43.

54

Solution:

Page 55: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Finding Critical F-Values

Find the critical F-value for a two-tailed test when α = 0.05, d.f.N = 4 and d.f.D = 8.

Solution:•When performing a two-tailed hypothesis test using the F-distribution, you need only to find the right-tailed critical value. •You must remember to use the ½α table.

1(0.05) 0.025

2

1

2

55

Page 56: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Finding Critical F-Values

½α = 0.025, d.f.N = 4 and d.f.D = 8

The critical value is F0 = 5.05.

56

Page 57: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Sample F-Test for Variances

To use the two-sample F-test for comparing two population variances, the following must be true.

1.The samples must be randomly selected.

2.The samples must be independent.

3.Each population must have a normal distribution.

57

Page 58: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Sample F-Test for Variances

• Test Statistic2122

sF

s

where represent the sample variances with

• The degrees of freedom for the numerator is d.f.N = n1 – 1 where n1 is the size of the sample having variance

• The degrees of freedom for the denominator is d.f.D = n2 – 1, and n2 is the size of the sample having variance

2 21 2 and s s

2 21 2.s s

21 .s

22.s

58

Page 59: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Sample F-Test for Variances

1. Identify the claim. State the null and alternative hypotheses.

2. Specify the level of significance.

3. Identify the degrees of freedom.

4. Determine the critical value.

State H0 and Ha.

Identify .

Use Table 7 in Appendix B.

d.f.N = n1 – 1 d.f.D = n2 – 1

In Words In Symbols

59

Page 60: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Sample F-Test for Variances

If F is in the rejection region, reject H0. Otherwise, fail to reject H0.

5. Determine the rejection region.

6. Calculate the test statistic.

7. Make a decision to reject or fail to reject the null hypothesis.

8. Interpret the decision in the context of the original claim.

2122

sF

s

In Words In Symbols

60

Page 61: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a Two-Sample F-Test

A restaurant manager is designing a system that is intended to decrease the variance of the time customers wait before their meals are served. Under the old system, a random sample of 10 customers had a variance of 400. Under the new system, a random sample of 21 customers had a variance of 256. At α = 0.10, is there enough evidence to convince the manager to switch to the new system? Assume both populations are normally distributed.

61

Page 62: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Two-Sample F-Test

• H0:

• Ha:

• α =

• d.f.N= d.f.D=

• Rejection Region:

• Test Statistic:

• Decision:

σ12 ≤ σ2

2

σ12 > σ2

2

0.10

9 20

0 F1.96

0.10

Because 400 > 256, 2 21 2400 and 256s s

21

22

4001.56

256

sF

s

There is not enough evidence to convince the manager to switch to the new system.

1.961.56

Fail to Reject H0

62

Page 63: Chapter 10 Chi-Square Tests and the F- Distribution 1
Page 64: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a Two-Sample F-Test

You want to purchase stock in a company and are deciding between two different stocks. Because a stock’s risk can be associated with the standard deviation of its daily closing prices, you randomly select samples of the daily closing prices for each stock to obtain the results. At α = 0.05, can you conclude that one of the two stocks is a riskier investment? Assume the stock closing prices are normally distributed.

Stock A Stock Bn2 = 30 n1 = 31

s2 = 3.5 s1 = 5.7

64

Page 65: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a Two-Sample F-Test

• H0:

• Ha:

• ½α =

• d.f.N= d.f.D=

• Rejection Region:

• Test Statistic:

• Decision:

σ12 = σ2

2

σ12 ≠ σ2

2

0. 025

30 29

0 F2.09

0.025

Because 5.72 > 3.52, 2 2 2 21 25.7 and 3.5s s

2 21

2 22

5.72.65

3.5

sF

s

There is enough evidence to support the claim that one of the two stocks is a riskier investment.

2.092.65

Reject H0

65

Page 66: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.3 Summary

• Interpreted the F-distribution and used an F-table to find critical values

• Performed a two-sample F-test to compare two variances

66

Page 67: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.4

Analysis of Variance

67

Page 68: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.4 Objectives

• Use one-way analysis of variance to test claims involving three or more means

• Introduce two-way analysis of variance

68

Page 69: Chapter 10 Chi-Square Tests and the F- Distribution 1

One-Way ANOVA

One-way analysis of variance

• A hypothesis-testing technique that is used to compare means from three or more populations.

• Analysis of variance is usually abbreviated ANOVA.

• Hypotheses: H0: μ1 = μ2 = μ3 =…= μk (all population means are

equal) Ha: At least one of the means is different from the

others.

69

Page 70: Chapter 10 Chi-Square Tests and the F- Distribution 1

One-Way ANOVA

In a one-way ANOVA test, the following must be true.

1. Each sample must be randomly selected from a normal, or approximately normal, population.

2. The samples must be independent of each other.

3. Each population must have the same variance.

70

Page 71: Chapter 10 Chi-Square Tests and the F- Distribution 1

One-Way ANOVA

1. The variance between samples MSB measures the differences related to the treatment given to each sample and is sometimes called the mean square between.

2. The variance within samples MSW measures the differences related to entries within the same sample. This variance, sometimes called the mean square within, is usually due to sampling error.

Variance between samplesVariance

T

est statiwithin sa

stics

mple

71

Page 72: Chapter 10 Chi-Square Tests and the F- Distribution 1

One-Way Analysis of Variance Test

• If the conditions for a one-way analysis of variance are satisfied, then the sampling distribution for the test is approximated by the F-distribution.

• The test statistic is B

W

MSF

MS

• The degrees of freedom for the F-test are

d.f.N = k – 1 and d.f.D = N – k

where k is the number of samples and N is the sum of the sample sizes.

72

Page 73: Chapter 10 Chi-Square Tests and the F- Distribution 1

Test Statistic for a One-Way ANOVA

1. Find the mean and variance of each sample.

2. Find the mean of all entries in all samples (the grand mean).

3. Find the sum of squares between the samples.

4. Find the sum of squares within the samples.

22 ( )

1x x xx s

n n

xxN

2( ) B i iSS n x x

2( 1) W i iSS n s

In Words In Symbols

73

Page 74: Chapter 10 Chi-Square Tests and the F- Distribution 1

Test Statistic for a One-Way ANOVA

5. Find the variance between the samples.

6. Find the variance within the samples

7. Find the test statistic. B

W

MSF

MS

N1 d.f.B B

BSS SS

MSk

Dd.f.W W

WSS SS

MSN k

In Words In Symbols

74

Page 75: Chapter 10 Chi-Square Tests and the F- Distribution 1

Performing a One-Way ANOVA Test

1. Identify the claim. State the null and alternative hypotheses.

2. Specify the level of significance.

3. Identify the degrees of freedom.

4. Determine the critical value.

State H0 and Ha.

Identify .

Use Table 7 in Appendix B.

d.f.N = k – 1 d.f.D = N – k

In Words In Symbols

75

Page 76: Chapter 10 Chi-Square Tests and the F- Distribution 1

Performing a One-Way ANOVA Test

If F is in the rejection region, reject H0. Otherwise, fail to reject H0.

5. Determine the rejection region.

6. Calculate the test statistic.

7. Make a decision to reject or fail to reject the null hypothesis.

8. Interpret the decision in the context of the original claim.

B

W

MSF

MS

In Words In Symbols

76

Page 77: Chapter 10 Chi-Square Tests and the F- Distribution 1

ANOVA Summary Table

• A table is a convenient way to summarize the results in a one-way ANOVA test.

d.f.DSSWWithin

d.f.NSSBBetween

FMean squares

Degrees of freedom

Sum of squares

Variation

. .B

BN

SSMS

d f

. .W

WD

SSMS

d f

B

W

MSMS

77

Page 78: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a One-Way ANOVA

A medical researcher wants to determine whether there is a difference in the mean length of time it takes three types of pain relievers to provide relief from headache pain. Several headache sufferers are randomly selected and given one of the three medications. Each headache sufferer records the time (in minutes) it takes the medication to begin working. The results are shown on the next slide. At α = 0.01, can you conclude that the mean times are different? Assume that each population of relief times is normally distributed and that the population variances are equal.

78

Page 79: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Performing a One-Way ANOVA

Medication 1 Medication 2 Medication 3

12 16 14

15 14 17

17 21 20

12 15 15

19

1

5614

4x 2

8517

5x 3

6616.5

4x

21 6s 2

2 8.5s 23 7s

Solution: k = 3 (3 samples)N = n1 + n2 + n3 = 4 + 5 + 4 = 13 (sum of sample sizes)

79

Page 80: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a One-Way ANOVA

• H0:

• Ha:

• α =

• d.f.N=

• d.f.D=

• Rejection Region:

• Test Statistic:

• Decision:

μ1 = μ2 = μ3

At least one mean is different

0. 01

3 – 1 = 2

13 – 3 = 10

0 F7.56

0.01

80

Page 81: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a One-Way ANOVA

To find the test statistic, the following must be calculated.

xxN 56 85 66 15.92

13

2

N

( ) d.f. 1

i iBB

n x xSSMS

k

2 2 24(14 15.92) 5(17 15.92) 4(16.5 15.92)

3 121.92 10.962

81

Page 82: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a One-Way ANOVA

To find the test statistic, the following must be calculated.

2

D

( 1) d.f.

W i iW

SS n sMS

N k

(4 1)(6) (5 1)(8.5) (4 1)(7)13 3

73 7.310

B

W

MSF

MS 10.96

1.507.3

82

Page 83: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Performing a One-Way ANOVA

• H0:

• Ha:

• α =

• d.f.N=

• d.f.D=

• Rejection Region:

• Test Statistic:

• Decision:

μ1 = μ2 = μ3

At least one mean is different

0. 01

3 – 1 = 2

13 – 3 = 10

0 F7.56

0.01

1.50B

W

MSF

MS

There is not enough evidence at the 1% level of significance to conclude that there is a difference in the mean length of time it takes the three pain relievers to provide relief from headache pain.

1.50

Fail to Reject H0

83

Page 84: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Using the TI-83/84 to Perform a One-Way ANOVA

Three airline companies offer flights between Corydon and Lincolnville. Several randomly selected flight times (in minutes) between the towns for each airline are shown on the next slide. Assume that the populations of flight times are normally distributed, the samples are independent, and the population variances are equal. At α = 0.01, can you conclude that there is a difference in the means of the flight times? Use a TI-83/84.

84

Page 85: Chapter 10 Chi-Square Tests and the F- Distribution 1

Example: Using the TI-83/84 to Perform a One-Way ANOVA

Airline 1 Airline 2 Airline 3

122 119 120

135 133 158

126 143 155

131 149 126

125 114 147

116 124 164

120 126 134

108 131 151

142 140 131

113 136 141

85

Page 86: Chapter 10 Chi-Square Tests and the F- Distribution 1

Solution: Using the TI-83/84 to Perform a One-Way ANOVA

• H0:

• Ha:

• Store data into lists L1, L2, and L3

μ1 = μ2 = μ3

At least one mean is different

• Decision:There is enough evidence to support the claim. You can conclude that there is a difference in the means of the flight times.

P-value < α Reject H0

86

Page 87: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Way ANOVA

Two-way analysis of variance

• A hypothesis-testing technique that is used to test the effect of two independent variables, or factors, on one dependent variable.

87

Page 88: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Way ANOVA

Example:

• Suppose a medical researcher wants to test the effect of gender and type of medication on the mean length of time it takes pain relievers to provide relief.

Males taking type I Females taking type I

Males taking type II Females taking type II

Males taking type III Females taking type III

GenderMale Female

I

II

III

88

Page 89: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Way ANOVA Hypotheses

Main effect

• The effect of one independent variable on the dependent variable.

Interaction effect

• The effect of both independent variables on the dependent variable.

89

Page 90: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Way ANOVA Hypotheses

Hypotheses for main effects:

• H0: Gender has no effect on the mean length of time it takes a pain reliever to provide relief.

• Ha: Gender has an effect on the mean length of time it takes a pain reliever to provide relief.

• H0: Type of medication has no effect on the mean length oftime it takes a pain reliever to provide relief.

• Ha: Type of medication has an effect on the mean length of time it takes a pain reliever to provide relief.

90

Page 91: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Way ANOVA Hypotheses

Hypotheses for interaction effects:

• H0: There is no interaction effect between gender and typeof medication on the mean length of time it takes a pain reliever to provide relief.

• Ha: There is an interaction effect between gender and typeof medication on the mean length of time it takes a pain reliever to provide relief.

91

Page 92: Chapter 10 Chi-Square Tests and the F- Distribution 1

Two-Way ANOVA

• A two-way ANOVA test calculates an F-test statistic for each hypothesis.

• It is possible to reject none, one, two, or all of the null hypotheses.

• Can use a technology tool such as MINITAB to perform a two-way ANOVA test.

92

Page 93: Chapter 10 Chi-Square Tests and the F- Distribution 1

Section 10.4 Summary

• Used one-way analysis of variance to test claims involving three or more means

• Introduced two-way analysis of variance

93

Page 94: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 4- 94© 2012 Pearson Education, Inc.

Elementary Statistics:

Picturing the World

Fifth Edition

by Larson and Farber

Chapter 10: Chi-Square Tests and the F-Distribution

Page 95: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 95© 2012 Pearson Education, Inc.

The distribution of favorite ice cream flavor is shown in the graph. The results from a random sample of college students is shown below. Find the expected frequency for the Vanilla category.

A. 33.75

B. 22.5

C. 8.1

D. 111.11

Chocolate Vanilla Strawberry Other

62 30 21 12

Page 96: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 96© 2012 Pearson Education, Inc.

The distribution of favorite ice cream flavor is shown in the graph. The results from a random sample of college students is shown below. Find the expected frequency for the Vanilla category.

A. 33.75

B. 22.5

C. 8.1

D. 111.11

Chocolate Vanilla Strawberry Other

62 30 21 12

Page 97: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 97© 2012 Pearson Education, Inc.

The distribution of favorite ice cream flavor is shown in the graph. The results from a random sample of college students is shown below. Find the critical value for α = 0.05.

A. 9.488

B. 7.815

C. 2.353

D. 1.645

Chocolate Vanilla Strawberry Other

62 30 21 12

Page 98: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 98

The distribution of favorite ice cream flavor is shown in the graph. The results from a random sample of college students is shown below. Find the critical value for α = 0.05.

A. 9.488

B. 7.815

C. 2.353

D. 1.645

Chocolate Vanilla Strawberry Other

62 30 21 12: categories

df = k-1

k number of

Page 99: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 99© 2012 Pearson Education, Inc.

The distribution of favorite ice cream flavor is shown in the graph. The results from a random sample of college students is shown below. Find the value of the test statistic.

A. 0.949

B. 0.919

C. 37.125

D. 0.010

Chocolate Vanilla Strawberry Other

62 30 21 12

Page 100: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 100

The distribution of favorite ice cream flavor is shown in the graph. The results from a random sample of college students is shown below. Find the value of the test statistic.Chocolate Vanilla Strawberry Other

62 30 21 12

Page 101: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 101© 2012 Pearson Education, Inc.

Calculate the expected frequency for the highlighted cell E2,3.

A. 20.62

B. 18.33

C. 16.92

D. 15.38

Favorite Pastime

Gender Reading Television Music

Male 12 32 19

Female 10 20 17

Page 102: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 102© 2012 Pearson Education, Inc.

Calculate the expected frequency for the highlighted cell E2,3.

A. 20.62

B. 18.33

C. 16.92

D. 15.38

Favorite Pastime

Gender Reading Television Music

Male 12 32 19

Female 10 20 17

( )( )rowTotal columnTotal

TotalAllCells

OR

Page 103: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 103© 2012 Pearson Education, Inc.

Find the critical value for α = 0.05.

A. 5.991

B. 12.592

C. 2.920

D. 1.645

Favorite Pastime

Gender Reading Television Music

Male 12 32 19

Female 10 20 17

Page 104: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 104© 2012 Pearson Education, Inc.

Find the critical value for α = 0.05.

A. 5.991

B. 12.592

C. 2.920

D. 1.645

Favorite Pastime

Gender Reading Television Music

Male 12 32 19

Female 10 20 17

( 1)( 1) (1)(2) 2df r c

Page 105: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 105© 2012 Pearson Education, Inc.

Find the value of the test statistic.

A. 16.437

B. 15.798

C. 0.751

D. 0.018

Favorite Pastime

Gender Reading Television Music

Male 12 32 19

Female 10 20 17

Page 106: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 106© 2012 Pearson Education, Inc.

Find the value of the test statistic.

A. 16.437

B. 15.798

C. 0.751

D. 0.018

Favorite Pastime

Gender Reading Television Music

Male 12 32 19

Female 10 20 17

Page 107: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 107© 2012 Pearson Education, Inc.

Find the critical F-value for the following situation:

Claim: α = 0.10

n1 = 9; n2 = 8

A. 2.75

B. 3.73

C. 3.39

D. 3.50

2 21 2

. ,s21 25 32 . ,s2

2 19 78

Page 108: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 108

Find the critical F-value for the following situation:

Claim: α = 0.10

n1 = 9; n2 = 8

A.A. 2.752.75

B. 3.73

C. 3.39

D. 3.50

2 21 2

. ,s21 25 32 . ,s2

2 19 78

d.f.N = n1 – 1 d.f.D = n2 – 1 d.f.N = 9 – 1=8 d.f.D = 8 – 1=7

Page 109: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 109© 2012 Pearson Education, Inc.

Find the value of the test statistic.

Claim: α = 0.10

n1 = 9; n2 = 8

A. 1.64

B. 1.13

C. 0.78

D. 1.28

2 21 2

. ,s21 25 32 . ,s2

2 19 78

Page 110: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 110

Find the value of the test statistic.

Claim: α = 0.10

n1 = 9; n2 = 8

A. 1.64

B. 1.13

C. 0.78

D. 1.28

2 21 2

. ,s21 25 32 . ,s2

2 19 78

Page 111: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 111© 2012 Pearson Education, Inc.

A professor wants to test if the mean score on an exam is the same in all three of his elementary statistics classes.

True or False. The appropriate hypotheses would be

H0:Ha:

A. True

B. False

1 2 3

1 2 3

Page 112: Chapter 10 Chi-Square Tests and the F- Distribution 1

Slide 10- 112© 2012 Pearson Education, Inc.

A professor wants to test if the mean score on an exam is the same in all three of his elementary statistics classes.

True or False. The appropriate hypotheses would be

H0:Ha:

A. True

B. False

1 2 3

1 2 3