Statistics Assignment

profilezheabb
zipped_week_6_material2.zip

Zipped Material - Hypothesis & Estimation Test for Population Variances.zip

Hypothesis & Estimation Test for Population Variances - Sample Problems.pdf

1

Sample Problems 

1) A random sample of 20 values was selected from a population, and the sample standard 

deviation was computed to be 360. Based on this sample result, compute a 95% confidence interval 

estimate for the true population standard deviation. 

No statistical method exists for developing a confidence interval estimate for a population standard deviation 

directly.  Instead we must first convert to variances.  This, we get a sample variance equal to  

22360129,600s    

Now we compute the interval estimate using: 

2

2 2

2

2 )1()1(

LU

snsn

 

 

 

         

where 

s = sample variance 

 n = sample size 

2 L  = Lower Critical Value 

2 U  = Upper Critical Value 

The denominators come from the chi-square distribution with n -1 degrees of freedom. In an application in which the sample size is n = 20 and the desired confidence level is 95%, from the chi-square table in Appendix G we get the critical value

8523.322 025.0 2  U  

Likewise, we get: 

9065.82 975.0 2   L  

Now given that the sample variance computed from the sample of n = 20 values is  360 9,600s

 

Then, we construct the 95% confidence interval as follows: 

( 0 ) 9,600( 0 ) 9,600 3 .85 38.90  

7 ,953.7 76, 7 .   

Thus, at the 95% confidence level, we conclude that the population variance will fall in the range 74,953.7 to 276,472.2. By taking the square root, we can convert to an interval estimate of the population standard deviation as the interval 273.78 to 525.81. 2) Given the following null and alternative hypotheses 

H0: ¬ 2  = 100 

HA: ¬ 2  100 

2

a) Test when n=27, s=9, and =0.10; state the decision rule.  b) Test when n=17, s=6, and =0.05; state the decision rule. 

a)

H0:  2 = 100, HA: 

2  100 This is a two‐tailed test. 

The random sample consists of n = 27 observations.  The sample variance is s 2  = 9

2  = 81.  The test statistic is  

2 2

2

( 1) (27 1)81

100

n s 

  

   = 21.06 

Because  2 2

0.05 21.06 38.8851    and because  2 2

0.95 21.06 15.3792    do not reject the null hypothesis 

based on these sample data. 

Based on the sample data and the hypothesis test conducted we do not reject the null hypothesis at the α = 

0.10 level of significance and we conclude the population variance is not different from 100.   

b)

H0:  2 = 100, HA: 

2  100 This is a two‐tailed test. 

The random sample consists of n = 17 observations.  The sample variance is s 2  = 6

2  = 36.  The test statistic is  

2 2

2

( 1) (17 1)36

100

n s 

  

   = 5.76. 

Because 9077.676.5 2 975.0

2   we reject the null hypothesis. 

Based on the sample data and the hypothesis test conducted we do reject the null hypothesis at the α = 0.05 

level of significance and conclude the population variance is different from 100.   

3) A manager is interested in determining if the population standard deviation has dropped below 

130. Based on a sample of n=20 items selected randomly from the population, conduct the 

appropriate hypothesis test at a 0.05 significance level. The sample for the standard deviation is 

105. 

2 0 : 16, 900H    

2: 16, 900AH    

If  2 10.1170  , reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

The random sample of n = 20 items provided a sample standard deviation equal to 105.  Thus,  2 11, 025s  .  The 

test statistic is: 

2 2

2

( 1) (20 1)11, 025 12.39

16, 900

n s 

  

    

Since  2 12.39 10.1170   , do not reject the null hypothesis. 

3

Based on the test results, the data do not present sufficient evidence to justify concluding that the population standard deviation has dropped below 130. 4) The following sample data have been collected for the purpose of testing whether a population 

standard deviation is equal to 40. Conduct the appropriate hypothesis test using =0.05. 

318  255  323  325  334 

354  266  308  321  297 

316  272  346  266  309 

 

2 0 : 1, 600H    

2 0 : 1, 600H    

The decision rule is: 

If the test statistic,  2   26.1189, reject the null hypothesis 

If the test statistic,  2   5.6287, reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

We first compute the sample variance as follows: 

52.916 1

)( 2

2   

 n

xx s  

The test statistic is a chi‐square value computed as follows: 

02.8 600.1

52.916)115()1( 2

2 2 

 

 

 

sn  

Because  2  = 8.02 > 5.6287 and because  2  = 8.02 < 26.1189  we do not reject the null hypothesis 

Based on these sample data, we do not have any reason to conclude that the population variance is not 1,600.  

Therefore, we also do not have sufficient evidence to conclude that the population standard deviation is not 

40. 

5) Given the following null and alternative hypotheses 

H0: ¬ 2  = 50 

HA: ¬ 2  50 

 

a) Test when n=12, s=9, and =0.10; state the decision rule.  b) Test when n=19, s=6, and =0.05; state the decision rule. 

a)  

 The random sample consists of n = 12 observations.  The sample variance is s 2  = 9

2  = 81.  The test statistic is  

2 2

2

( 1) (12 1)81

50

n s 

  

   = 17.82 

4

Because  2 2 0.05

17.82 19.6752    and because  2 2 0.95

17.82 4.5748    do not reject the null hypothesis based on 

these sample data. 

Based on the sample data and the hypothesis test conducted we do not reject the null hypothesis at the α = 

0.10 level of significance and we conclude the population variance is not different from 50.   

b)  

The decision rule is: 

If the test statistic,  2 2 0.25   = 31.5264, reject the null hypothesis 

If the test statistic,  2 2 0.975   = 8.2307, reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

The random sample consists of n = 19 observations.  The sample variance is s 2  = 6

2  = 36.  The test statistic is 

2 2

2

( 1) (19 1)36

50

n s 

  

   = 12.96 

Because  2 2 0.025

12.96 31.5264    and because  2 2 0.975

12.96 8.2307     we do not reject the null hypothesis. 

Based on the sample data and the hypothesis test conducted we do not reject the null hypothesis at the α = 0.05 level of significance and conclude the population variance is not different from 50.  

6) Suppose a random sample of 22 items produces a sample standard deviation of 16. 

a) Use the sample results to develop a 90% confidence interval estimate for the population variance. 

b) Use the sample results to develop a 95% confidence interval estimate for the population variance. 

a)  

The confidence interval estimate for the population variance, σ 2  is computed using Equation 11‐2 shown 

below: 

2

2 2

2

2 )1()1(

LU

snsn

 

 

         

For a 90% confidence interval we find the following values for  2 U and 

2 L  with n‐1 = 22‐1 = 21 degrees of 

freedom: 

2 95.0  = 11.5913     and    

2

05.0  = 32.6706 

The confidence interval is calculated using Equation 11‐2: 

2 2 2(22 1)16 (22 1)16

32.6706 11.5913 

    = 

2164.55 463.80   

b)  

5

The confidence interval estimate for the population variance, σ 2  is computed using Equation 11‐2.  For a 95% 

confidence interval we find the following values for  2 U and 

2

L   with n‐1 = 22‐1 = 21 degrees of freedom:

2

975.0   = 10.2829     and     2

025.0  = 35.4789 

The confidence interval is calculated using Equation 11‐2: 

2 2 2(22 1)16 (22 1)16

35.4789 10.2829 

    = 

2151.53 522.81   

 

7) Historical data indicate that the standard deviation of a process is 6.3. A recent sample of size 

a) 28 produced a variance of 66.2. Test to determine if the variance has increased using a 

significance level of 0.05. 

b) 8 produced a variance of 9.02. Test to determine if the variance has decreased using a 

significance level of 0.025. Use the test statistic approach. 

c) 18 produced a variance of 62.9. Test to determine if the variance has changed using a significance 

level of 0.10. 

a)     

HO:  2   39.69  

HA:   2  > 39.69 

03.45 )3.6(

2.66)128()1( 22

2 2 

 

 

 

sn ,  

p‐value =  P( 2   45.03). Therefore,  0.01 < p‐value < 0.025.   

   Since p‐value < α,  reject HO. 

b) 

Step 1:  The parameter of interest is the population variance, 2,  

Step 2:   HO:  2   39.69 HA:  

2  < 39.69,   

Step 3:  α = 0.025,  

Step 4:  591.1 )3.6(

02.9)18()1( 22

2 2 

 

 

 

sn ,  

Step 5:  The critical value is obtained from a  2 distribution with n – 1 = 7 degrees of freedom, i.e., 1.6899,  

Step 6:  Since the test statistic  = 1.591 < the  2  critical value = 1.6899, reject the null hypothesis,  

Step 7:  Conclude that the variance has decreased. 

6

 c)    

Step 1: The parameter of interest is the population variance, 2  

Step 2:  HO:  2  = 39.69 HA:  

2  ≠ 39.69.  

Step 3:  α = 0.10  

Step 4:  Since  94.26 )3.6(

9.62)118()1( 22

2 2 

 

 

 

sn ,  

p‐value =  P(s  2  62.9) =  P( 2    26.94).  

Step 5: α = 0.10 < p‐value = 0.94  

From Minitab: 

Cumulative Distribution Function  

Chi‐Square with 17 DF 

 x  P( X <= x ) 

26.94     0.941046 

Step 6:  Fail to reject HO,  

Step 7:  Conclude that there is not enough evidence to conclude that the variance has changed.   

8) Examine the sample obtained from a normally distributed population:  

5.2  10.4  5.1  2.1  4.8  15.5  10.2 

8.7  2.8  4.9  4.7  13.4  15.6  14.5 

 

a) Calculate the variance. 

b) Calculate the probability that a randomly chosen sample would produce a sample variance at 

least as large as that produced in part (a) if the population variance was equal to 20. 

c) What is the statistical term used to describe the probability calculated in part (b)? 

d) Conduct a hypothesis test to determine if the population variance is larger than 15.3. Use a 

significance level equal to 0.05. 

a)  s 2  =  

114

86.302

1

)( 2

 

 n

xx  =   23.297.  

b) Since  14.15 20

297.23)114()1( 2

2 2 

 

 

 

sn , P(s 2   23.297) = P( 2   15.14)  0.30. Therefore, p‐value  0.30. 

c)  This is the observed probability of rejecting the null hypothesis when the null hypothesis is true: the p‐

value. 

d) Using the seven step procedure outlined in the chapter: 

7

Step 1: The parameter of interest is the population variance, 2  

Step 2: HO:  2    15.3 HA:  

2  > 15.3.  

Step 3: α = 0.05  

Step 4: Since  79.19 3.15

297.23)114()1( 2

2 2 

 

 

 

sn , P( 2   19.79)  0.10. Therefore,  p‐value  0.10.  

Step 5: α = 0.05 < p‐value  0.10.,  

Step 6: Fail to reject HO,  

Step 7: Conclude that there is not enough evidence to conclude that the variance is larger than 15.3.   

9) Given the following null and alternative hypotheses 

H0: ¬1 2 ≤ ¬2

2  

HA: ¬1 2  > ¬2

 

and the following sample information 

 

Sample 1  Sample 2 

N1=13  N2=21 

S1 2 =1450  S2

2 =1320 

 

a) If  = 0.05, state the decision rule for the hypothesis. 

b) Test the hypothesis and indicate whether the null hypothesis should be rejected. 

a) Using the F Distribution Table:  If the calculated F > 2.278, reject H0, otherwise do not reject H0    b) F = 1450/1320 = 1.0985    Since 1.0985 < 2.278 do not reject H0. 

10) Given the following null and alternative hypotheses 

H0: ¬1 2 ≤ ¬2

2  

HA: ¬1 2  > ¬2

 

and the following sample information 

 

Sample 1  Sample 2 

N1=21  N2=12 

S1 2 =345.7  S2

2 =745.2 

 

8

a) If  = 0.01, state the decision rule for the hypothesis (you need to pay attention to the alternative  hypothesis to construct this decision rule.) 

b) Test the hypothesis and indicate whether the null hypothesis should be rejected. 

a) Using the F Distribution Table: If the calculated F >3.858, reject H0, otherwise do not reject H0    b) F = 345.7/745.2 = 0.46390    Since 0.46390 < 3.858 do not reject H0 

11) Find the appropriate critical F‐ value, from the F Distribution Table, for each of the following: 

a) D1=16, D2=14,=0.01 

b) D1=5, D2=12,=0.05 

c) D1=16, D2=20,=0.01 

a) Using the F Distribution Table: F = 3.619 b) Using the F Distribution Table: F = 3.106 c) Using the F Distribution Table: F = 3.051 12) Given the following null and alternative hypotheses 

H0: ¬1 2 = ¬2

2  

HA: ¬1 2  ¬2

 

and the following sample information 

 

 

 

a) If 

 = 0.02, state the decision rule for the hypothesis.  

b) Test the hypothesis and indicate whether the null hypothesis should be rejected. 

a) If the calculated F > 4.405, reject H0, otherwise do not reject H0 

b) F = 33 2 /15

2  = 4.84, Since 4.84 > 4.405 reject H0 

 

13) Consider the following two independently chosen samples: 

Sample 1  Sample 2 

12.1  10.5 

13.4  9.5 

11.7  8.2 

10.7  7.8 

14.0  11.1 

Use a significance level of 0.05 for testing the hypothesis that  ¬1 2 ≤ ¬2

Sample 1  Sample 2 

N1=11  N2=21 

S1=15  S2=33 

9

Using the seven step procedure:

Step 1:

2 ,

Step 2: HO: 2 2

2 1   , HA:

2 2

2 1   ,

Step 3: α = 0.05, Step 4: The critical value is obtained from the F-distribution. F = 6.388. Reject HO if F > 6.388.

Step 5: s1 2 =

4

028.7 = 1.757 s2 2 =

1

)( 2

 n

xx = 4

108.8 = 2.027. The test statistic is F = 757.1

027.2 2 1

2 2 

s

s = 1.154,

Step 6: Since F = 1.154 < 6.388 = F0.05, fail to reject HO. Step 7: Based on these sample data, there is not sufficient evidence to conclude that population one’s variance is larger than population two’s variance.  

14) You are given two random samples with the following information: 

 

Item  Sample 1  Sample 2 

1  19.6  21.3 

2  22.1  17.4 

3  19.5  19.0 

4  20.0  21.2 

5  21.5  20.1 

6  20.2  23.5 

7  17.9  18.9 

8  23.0  22.4 

9  12.5  14.3 

10  19.0  17.8 

 

Based on these samples, test at  =0.10, whether the true difference in population variances is equal  to zero. 

s1 = 2.8975     s2 = 2.7033 

H0:  σ1 2  = σ2

2  

HA:  σ1 2  ≠ σ2

2   

Using the F Distribution Table with D1 = 9 and D2 = 9:  If the calculated F > 3.179, reject H0, otherwise do not 

reject H0. 

F = 2.8975 2 /2.7033

2  = 1.1488 

Since 1.1488 < 3.179 do not reject H0 

     

Hypothesis & Estimation Test for Population Variances Lecture Power Point Slides.pdf

HypothesisHypothesisHypothesis Hypothesis Tests &Tests &Tests & Tests & EstimationEstimationEstimation Estimation Tests forTests forTests for Tests for Population Population pp VariancesVariances

©2006 Thomson/South-Western 1

Estimation & Hypothesis TestsEstimation & Hypothesis TestsEstimation & Hypothesis Tests Estimation & Hypothesis Tests for a Single Population Variancefor a Single Population Variance •• A process is in control if it is A process is in control if it is

consistent consistent and contains only random and contains only random variationvariationvariationvariation

•• A derived distribution is one that isA derived distribution is one that is•• A derived distribution is one that isA derived distribution is one that is used to describe the behavior of aused to describe the behavior of a

ti l t ti titi l t ti tiparticular statistic particular statistic

•• Examples of derived distributions areExamples of derived distributions are the t distribution and the chithe t distribution and the chi--squaresquarethe t distribution and the chithe t distribution and the chi squaresquare distribution distribution

ChiChi--Square DistributionSquare Distribution

Area = aArea = a

22 a, dfa, df

22

E lE lExampleExample U i hiU i hi di t ib ti ith 12 dfdi t ib ti ith 12 df•• Using a chiUsing a chi--square distribution with 12 df, square distribution with 12 df, determine determine P (22 > 18.5494) and P (22< 6.30380)

P (22 > 18.5494) = .1

22.1, 12.1, 12 = 18.5494

Area = .1Area = .1

22 18.549318.5493

E lE lExampleExample

P (22 > 18.5494) = .1

22.1, 12.1, 12 = 18.5494

For 22 = 6.30380, the area to the right is .900. As the= 6.30380, the area to the right is .900. As the total area is 1, the area to the left of 6.30380 is 1 total area is 1, the area to the left of 6.30380 is 1 –– .900 = .1, so .900 = .1, so P (22 < 6.303806.30380) = 1 - .1 -.1 = .8

80% of the time a 22 value with 12 df will be between80% of the time a 22 value with 12 df will be between 6.30380 and 6.30380 and 18.5494

E lE lExampleExample Using the previous example determine a and b that satisfy P (a < 22 < b) = .95. Choose a and b so that an

l i h t ilequal area occurs in each tail.

a=a= 22 value whose left tailed area is 025value whose left tailed area is 025a= a=  value whose left tailed area is .025value whose left tailed area is .025 = = 22 value whose area to the right is .975value whose area to the right is .975 = 4.40= 4.40

b = b = 22 value whose right tailed area is .025value whose right tailed area is .025 23 323 3= 23.3= 23.3

C fid I t l fC fid I t l f 22Confidence Interval for Confidence Interval for  22

22 = [(n – 1) s 2 ] /  2

A sample of size n = 13 results in 12df. From the previous example, it follows that p p ,

P (4.40 < 22 < 23.3) = .95

P (4.40 < 12 s 2 /  2 < 23.3) = .95

P (12 s 2 / 23.3 <  2 < 12 s 2 / 4.40)

12 s 2 / 23.3 to 12 s 2 / 4.40

E lE lExampleExample A random sample of the weights (in pounds) of 15A random sample of the weights (in pounds) of 15A random sample of the weights (in pounds) of 15A random sample of the weights (in pounds) of 15 bags was obtained: 51.2, 47.5, 50.8, 51.5, 49.5, 51.1,bags was obtained: 51.2, 47.5, 50.8, 51.5, 49.5, 51.1, 51.3, 50.7, 46.7, 49.2, 52.1, 48.3, 51.6, 49.2, 51.551.3, 50.7, 46.7, 49.2, 52.1, 48.3, 51.6, 49.2, 51.551.3, 50.7, 46.7, 49.2, 52.1, 48.3, 51.6, 49.2, 51.551.3, 50.7, 46.7, 49.2, 52.1, 48.3, 51.6, 49.2, 51.5

Mean = 50.15, and s = 1.651. Determine a 90% CI forMean = 50.15, and s = 1.651. Determine a 90% CI for 2 2 and then and then .

(15 1)(1 651) 22 / 22 05 14 to (15 1)(1 651) 22 / 22 95 14(15 -1)(1.651) 22 / 22 .05,14 to (15 -1)(1.651) 22 / 22 .95,14

(14) (1.651) 22 / 23.7 to (14) (1.651) 22 / 6.57 to(14) (1.651) / 23.7 to (14) (1.651) / 6.57 to

1.61 to 5.81

The 90% CI for  would be √1.61 to √5.81 = 1.27 to 2 412.41

Hypothesis Testing for VarianceHypothesis Testing for VarianceHypothesis Testing for Variance Hypothesis Testing for Variance & Standard Deviation& Standard Deviation

E lE lExampleExample Continuing from the previous exampleContinuing from the previous exampleContinuing from the previous example, Continuing from the previous example,

The hypotheses are HThe hypotheses are H00::  ≤ .5, and Ha > .5The hypotheses are HThe hypotheses are H00: :  ≤ .5, and Ha .5

The test statistic 22 = (15-1)s 2 2 /(.5) 22 = 14s 2 2 /.25

The rejection region is: reject HH00 if 22 > 2.11

The computed value is: 22 = (15 -1)(1.651) 22 / (.5) 22 = 152.6 152.6

As 152.6 > 21.1 we reject HH0.0.

Estimation & Hypothesis TestsEstimation & Hypothesis TestsEstimation & Hypothesis Tests Estimation & Hypothesis Tests for Two Population Variancesfor Two Population Variances

AssumptionsAssumptions  Both populations are normalBoth populations are normal  The samples are independentThe samples are independent The samples are independentThe samples are independent

Population 1Population 1pp

11 Population 2Population 2

22

µµ11 µµ22µµ11 µµ22

F Distrib tionF Distrib tionF DistributionF Distribution Look at the ratio of sample variancesLook at the ratio of sample variances

FF == ss1122

22ss2222

FF == ss1122

FF == ss2222

F Distrib tionF Distrib tionF DistributionF Distribution

FF == ss11 ss22

22

22

Hypothesis Testing forHypothesis Testing for  == Hypothesis Testing for Hypothesis Testing for 11 = = 22

Population 1Population 1

Population 1Population 1Population 2Population 2

Population 2Population 2Population 1Population 1 Population 2Population 2

11 < < 2211 > > 22 11 2211 22

Hypothesis Test for Hypothesis Test for 11 and and 22 TwoTwo--Tail TestTail Test

HH ::  == HHoo: : 11 = = 22 HHaa: : 11 ≠ ≠ 22

FF == ss1122

FF == ss2222

RejectReject HHoo if if FF > > FF/2,/2,vv ,,vv ((right tailright tail)) or ifor if FF < < FF11-- /2,/2,vv ,,vv ((left tailleft tail))

2211

221111 /2,/2,v v ,,vv2211

wherewhere vv11 = = nn11 −− 1 and 1 and vv22 = = nn22 −− 11

Hypothesis Test for Hypothesis Test for 11 and and 22 OneOne--Tail TestTail Test

HHoo: : 11 ≤ ≤ 22 HHoo: : 11 ≥ ≥ 22 HHaa: : 11 > > 22

ss1122 HHaa: : 11 < < 22

ss1122 FF ==

ss11 ss2222

FF == ss11 ss2222

RejectReject HHoo if if FF > > FF,,vv ,,vv wherewhere vv11 == nn11 −− 11

2211 RejectReject HHoo if if FF < < FF11-- ,,vv ,,vv

wherewhere vv11 == nn11 −− 11 2211

wherewhere vv11 nn11 11 andand vv22 = = nn22 −− 11

wherewhere vv11 nn11 11 andand vv22 = = nn22 −− 11

Finding Right Tail F ValuesFinding Right Tail F Values

A 10A 10Area = .10Area = .10

2.672.67 FF

Using The FUsing The F--Statistic TableStatistic Table

V1 1 2 6 7 8 9

1 39.86 49.50 58.20 58.91 59.44 59.86

V1 V2

2 8.53 9.00 9.33 9.35 9.37 9.38

6 3.78 3.46 3.05 3.01 2.98 2.96 7 3.59 3.26 2.83 2.78 2.75 2.727 3.59 3.26 2.83 2.78 2.75 2.72 8 3.46 3.11 2.67 2.62 2.59 2.56 9 3 29 3 01 2 55 2 51 2 47 2 449 3.29 3.01 2.55 2.51 2.47 2.44

Finding Left Tail F ValuesFinding Left Tail F Values

Area = .10Area = .10

.336.336 FF

ExampleExample

•• Ho:Ho: 11≤≤ 22Ho:Ho: 11≤ ≤ 22 Ha:Ha:11> > 22 The test statistic is F =The test statistic is F = ss 22/s/s 22•• The test statistic is F = The test statistic is F = ss1122/s/s2222

•• The df are v1 = 25 The df are v1 = 25 –– 1 = 24, v2 = 20 1 = 24, v2 = 20 --1 =19. We find1 =19. We find FF.05, 24,19 .05, 24,19 = 2.11. = 2.11. The test of HThe test of H00: H: Haa will be reject Ho if F > 2.11will be reject Ho if F > 2.11

•• The computed F value F* = (1.21)The computed F value F* = (1.21)22/(.72)/(.72)22 = 2.82= 2.82 •• As 2.82 > 2.11, we reject As 2.82 > 2.11, we reject HoHo

22 22Confidence Interval for Confidence Interval for 1122//2222

11 The FThe F--values arevalues are

FFRR = = FF.025,.025,vv ,,vv andand FFLL ==11 22 11

FF.025,.025,vv ,,vv11 22 The confidence interval isThe confidence interval is

11 22

ss1122//ss2222

FFRR

ss1122//ss2222

FFLL toto

FFRR FFLL

Area = 025Area = 025 Area = .025Area = .025

Area = .025Area = .025

o FF

FFLL FFRR

ExampleExample •• Determine a 95% CI for Determine a 95% CI for 1122//2222

•• nn11 = 25,s= 25,s11= 1.21, n= 1.21, n22 = 20, s= 20, s22 = .72= .72 •• FFRR = F= F 025 24 19025 24 19 = 2 45= 2 45•• FFRR = F= F.025,24,19.025,24,19 = 2.45= 2.45 •• FFLL = 1 / F= 1 / F.025,19,24.025,19,24 = 1/2.33 = .43= 1/2.33 = .43 •• The 95% CI for The 95% CI for 1122//2222

= [(1.21)= [(1.21) 22 / (.72)/ (.72) 22] / 2.45 to [(1.21)] / 2.45 to [(1.21) 22 / (.72)/ (.72) 22] /.43 ] /.43 = 1.15 to 6.57 = 1.15 to 6.57

•• Determine a 95% CI forDetermine a 95% CI for 11//22Determine a 95% CI for Determine a 95% CI for 11//22 •• √1.15 to √6.57 = 1.07 to 2.56√1.15 to √6.57 = 1.07 to 2.56

Hypothesis & Estimation Test for Population Variances - Notes.pdf

 

Hypothesis Tests & Estimation for Population Variances 

When we are considering the mean of particular random variable or population we are in effect 

trying to estimate what is occurring on the average. For example, a worker involved with a 

production process that manufactures 2 inch nails has been told that in fact these bolts are 2 inches 

long, on the average. Now, suppose half of the nails produced are 1 inch long and the other half are 

3 inches; the report was no doubt accurate, on the average, the nails are 2 inches long; however, 

what was missing in the report was the amount of variation in the production process. If the 

variation were 0, then every nail would be exactly 2 inches long. In practice, there is some degree of 

variation present in any production process. Here we are concerned not only with mean length µ of 

the population of nails, but also the variance ¬ 2  or standard deviation ¬ of the lengths of the nails. If 

the variance is too large, the process is not operating correctly and needs to be adjusted. This is a 

key element in statistical quality improvement – a process is in control if it is consistent and contains 

only random variation. In the inference procedures for a population variance and standard deviation 

that we discuss below, we will assume that the population of interest is normally distributed. The 

hypothesis testing procedures and the confidence intervals for the variance are sensitive to 

departures from the normal population; i.e. the tests of hypotheses are not that robust. 

Confidence Interval for the Variance & Standard Deviation 

The point estimate of a population variance is the sample variance; i.e. we s 2  of a sample to estimate 

the variance ¬ 2  of a population. When we construct a confidence interval for µ using a small sample, 

we use the t distribution. This is a derived distribution as we use it to describe the behavior of a 

particular test statistic. We do not use this type of a distribution to describe a population; the t 

random variable just offers us a method of testing and constructing confidence intervals for the 

mean of a normal population when the standard deviation is unknown and is replaced by its 

estimate. The chi‐square 2  is another derived distribution which allows us to determine confidence 

intervals and perform hypothesis tests on the variance and the standard deviation of a normal 

population. The shape of the distribution is as given below. 

 

Similar to all continuous distributions, for a chi‐square distribution, a probability corresponds to an 

area under a curve. Also the shape of the chi‐square curve (like that of the t distribution) depends on 

the sample size n; this will be specified by the corresponding degrees of freedom (df). When using 

the chi‐square distribution to construct a confidence interval or perform a hypothesis test on a 

 

population variance or standard deviation, the degrees of freedom will be given by df = (n ‐1). Let  2 a, df 

be the  2 value whose area to the right is a, using the proper df. 

Let’s consider an example. Use a chi‐square curve with 12 df to determine the P ( 2  > 18.5494) and 

P ( 2 < 6.30380).  

 

The values of the chi‐square distribution are given in the appendix in the text. From the table, P ( 2  

> 18.5494) = .1.  This can be written as  2 .1, 12 

= 18.5494. For  2 = 6.30380, the chi‐square table 

tells us that the area to the right of 6.30380 is .900. The total area is 1, the area to the left of 6.30380 

is 1 ‐ .900 = .1, so the P ( 2 < 6.30380) = .1. We can say that the P (6.30380 ≤  2  ≤ 18.5494) = 1 ‐ .1 

‐ .1 = .8. So, 80% of the time a  2 value with 12 df will be between 6.30380 and 18.5494. 

Using the above example, we need to determine a and b so as to satisfy the P (a <   2  < b) = .95 

with df = 12. . Choose a and b so that an equal area occurs in each tail.  

 

The figure above shows the areas for a and b. Using the chi‐square table, 

a =  2 value whose left‐tailed area is .025 =  2  value whose area to the right is .975 = 4.40, and  

b =  2 value whose right‐tailed area is .025 = 23.3. 

To derive a confidence interval for ¬ 2  we need to examine the sampling distribution of s

2 . If we 

repeatedly obtain a random sample from a normal population with a mean of µ and variance ¬ 2 , 

calculated the sample variance s 2 , and drew a histogram of these s

2  values, we will see that the 

shape of the histogram will depend on the sample size n and the value of ¬ 2  but not on the value of 

 

the population mean µ. The values of n and ¬ 2 , along with the random variable s

2 , can be combined 

to define a chi‐square random variable, given by 

2  = [(n – 1) s2] / ¬2 

This is a chi‐square distribution with (n – 1) df. So, the sampling distribution for s 2  can be defined 

using the chi‐square distribution as given in the equation above. 

Suppose a sample size of n = 12 results in 12 df. From the example we saw earlier, it then follows 

that 

P (4.40 <  2   < 23.3) = .95 

P (4.40 < 12s 2 /¬

2  < 23.3) = .95 

P (12s 2 /23.3 < ¬

2  < 12s

2 /4.40) = .95 

The parameter ¬ 2  is bounded between two limits defined by a random variable s

2 . This means that a 

95% confidence interval for ¬ 2  is 12s

2 /23.3 to 12s

2 /4.40.  

In general, to construct a confidence interval for ¬ 2  or ¬A( 1 ‐ ).100%, 

(n – 1) s 2  / 

2 /2, n‐1 to (n – 1) s 2  / 

2 1‐/2, n‐1        

The corresponding confidence interval for ¬ is 

√(n – 1) s 2  / 

2 /2, n‐1 to √(n – 1) s 2  / 

2 1‐/2, n‐1        

Let us consider an example. A certain brand of potash fertilizer comes in 10, 25, and 50 pound bags. 

The fertilizer firm’s supervisor is concerned about the variation in the weight of the 50 pound bags 

because they have recently bought a new mechanical packaging device. A random sample of the 

weights of 15 bags (in pounds) was obtained as given below.  

51.2, 47.5, 50.8, 51.5, 49.5, 51.1, 51.3, 50.7, 46.7, 49.2, 52.1, 48.3, 51.6, 49.2, 51.5 

For these data, the mean = 50.15, and the standard deviation = 1.651. We need to determine a 90% 

CI for  2 and . The weight of the bags come from a normal population.  

The corresponding 90% CI interval for  2 is 

(15 ‐1)(1.651)  2  / 2 .05,14 to (15 ‐1)(1.651) 2 / 2 .95,14  

(14) (1.651)  2   / 23.7  to  (14) (1.651)

 2   / 6.57  to  

1.61 to 5.81 

The 90% CI for  would be √1.61 to √5.81 = 1.27 to 

2.41 

 

Hypothesis Testing for the Variance and Standard Deviation 

 

Continuing from the previous example, based on earlier production tests, the management is 

convinced that the average weight of all the bags being produced is in fact 50 pounds. However, the 

production supervisor has been informed that at least 95% of the bags produced must be within 1 

pound of the specified weight (50 pounds). Using a significance level of alpha = .1, what can we 

conclude? Assume a normal distribution for the bag weights.  

We know that for a normal population, 95% of the observations will lie within two standard 

deviations of the mean. So, if two standard deviations are equivalent to 1 pound, then the 

supervisor is being told that sigma must be no more than .5 pound. Is there any evidence to 

conclude that this is not the case, i.e. sigma is larger than .5 pound? 

The hypotheses to be tester are H0:  ≤ .5, and Ha > .5  

The test statistic is 2 = (15‐1) s 2 /(.5) 2 = 14s 2 /.25 which has chi‐square distribution of 14 degrees of  freedom. 

The rejection region is: reject H0 if 2 > 2.11 

The computed value using the sample data is: 2 = (15 ‐1)(1.651) 2 / (.5) 2  = 152.6  

As 152.6 > 21.1 we reject H0. 

We conclude that sigma is larger than .5 pound. The bagging procedure has far too much variation in 

the weight of the bags produced. 

 

 

Comparing the Variances of two normal populations using independent samples 

Here, we focus our attention on the variations of populations, When estimating and testing sigma 1 

and sigma 2, we are not concerned about mew 1 and mew 2; they might be equal, or they might not, 

they are relevant to this test procedure. 

 

When testing for population means using small, independent samples, we must consider the 

population standard deviations (variances). Based on our belief that sigma 1 does or does not equal 

sigma 2 we select our corresponding test statistic for testing the means mew 1 and mew 2. An 

appropriate approach would be test sigma 1 and sigma 2 using one set of samples and then obtain 

another set of samples independently of the first to test the means. When looking at the variances, 

we the ratio of the sample variances s1 2  and s2

2 , to derive a test of hypothesis and construct 

confidence intervals. We do this because s1 2 / s2

2  has a recognizable distribution when in fact sigma 1 

squared and sigma 2 squared are equal. So, we define F = s1 2 / s2

2 . If we were to obtain sets of two 

samples repeatedly, calculate F for each set, and make a histogram of these ratios, the shape of this 

histogram would resemble the F distribution. 

 

The shape does not resemble a normal curve. There are many F curves depending upon the sample 

sizes n1 and n2. The shape of the F curve becomes more symmetric as the sample sizes n1 and n2 

increases. A point to note here is that the F statistic is highly sensitive to the assumption of normal 

 

populations. For large datasets we need to examine the shape of the sample data when using the F 

statistic. 

There are two samples here, one from each population, and we need to specify both the sample 

sizes. The degrees of freedom are: v1 = df for numerator = (n1 ‐1), and v2 = df for denominator = (n2 ‐

1). The F statistic follows an F distribution with v1 and v2 degrees of freedom provided sigma 1 

squared = sigma 2 squared (sigma 1 = sigma 2).  Now, what happens when sigma 1 is not equal to 

sigma 2? Suppose that sigma 1 > sigma 2; then we would expect s1 (the estimate for sigma 1) to be 

larger than s2 (the estimate for sigma 2). We see that s1 2  > s2

2  or F = s1

2  / s2

2   > 1. Similarly, if sigma 1 

< sigma 2, then the F value will be < 1.  

Hypothesis Testing for sigma 1 = sigma 2  

 

The two tailed and one tailed hypothesis tests are:  

 

 

 

Finding the Right Tail F Values 

The hypotheses can be written in terms of the standard deviations (sigma 1 and sigma 2) or the 

variances (sigma 1 squared and sigma 2 squared); if sigma 1 > sigma 2, then sigma 1 squared > sigma 

2 squared. Suppose we want to know which F value has a right tail area of .10 using 6 and 8 degrees 

of freedom. Let the F value whose right tail area is ‘a’ were the degrees of freedom are v1 and v2 be  

F a, v1, v2. Using the F table, F.10, 6, 8 = 2.67. 

 

Finding the Left Tail F Values 

To determine the left tail F values, F value (df = v1, v2) having a left tail area of ‘a’  

= 1 / F value (df = v1, v2) having a right tail area of 1. 

  

We know that the F value having a right tail area of .10 is 2.67 where the df are 6 and 8. For this 

curve, what F value has a left tail area equal to .10? Switch the df to 8 and 6. Using the F table, find 

the F value having a right tail area of .10 where the df are now v1 = 8 and v2= 6. This value is 2.98. So, 

for the F curve with 6 and 8 df, the value having a left tail area of .10 is 1/ 2.98 = .336. Since the area 

to the left of .336 is .10, the area to the right of this value is .90; so .336 = F 1 ‐ .10, 6, 8 = F .9, 6, 8.  

Let us consider an example. In this example, a firm is considering the purchase of some new 

equipment that would be used to fill one quart containers with a radiator additive. The firm has 

narrowed its choices to two brands, brand 1 and brand 2. Brand 1 is less expensive than brand 2 but 

the firm suspects that the contents delivered by the brand 1 equipment has more variation that of 

the brand 2 equipment. The firm realizes that they need to use a container slightly larger than one 

quart so as to allow for heat expansion and overfill of their product. The firms’ production 

department obtained data on the performance of both brands for a sample of 25 containers using 

brand 1 and 20 containers using brand 2. Using an alpha of .05, test the firm’s suspicions. The mean 

and the standard deviation measurements are in fluid ounces. 

 

Brand 1: n1 = 25, x1bar = 31.8, s1 = 1.21; Brand 2: n2 = 20, x2bar = 32.1, s2 = .72.  

We want to determine if one standard deviation (or variance) is larger than the other, so this is a one 

tailed test. The firm’s suspicion is that sigma 1 is larger than sigma 2 so this statement is the 

alternate hypothesis.  

The hypotheses are: Ho: 1≤ 2, Ha:1> 2  

The test statistic is F = s1 2 /s2

2   

The df are v1 = 25 – 1 = 24, v2 = 20 ‐1 =19. We findF.05, 24,19 = 2.11.  

The test of H0: Ha will be reject Ho if F > 2.11 

The computed F value F* = (1.21) 2 /(.72)

2  = 2.82 

As 2.82 > 2.11, we reject Ho 

So, the firm is correct in its belief that the variation in the containers filled by brand 1 exceeds that of 

the containers filled by brand 2. 

CI for sigma 1 squared / sigma 2 squared 

Consider an F curve with v1 and v2 df. To construct a 95 % CI for sigma 1 squared / sigma 2 squared, 

we find both the left tailed and the right tailed values. Let FL and FR denote the left and the right 

tailed F values respectively.  

 

FR = F.025, 24, 19 = 2.45 

FL = 1 / F.025, 19, 24 = 1/2.33 = .43 

The 95% CI for 1 2 /2

2  

= [(1.21)  2  / (.72)

 2 ] / 2.45 to [(1.21)

 2  / (.72)

 2 ] /.43  

= 1.15 to 6.57 fluid ounces 

Determine a 95% CI for 1/2 

√1.15 to √6.57 = 1.07 to 2.56 fluid ounces    

Zipped Chapter 11 Material.zip

Chapter 15 and Chapter 11 Lecture Power Point Slides.pdf

Chapter 15Chapter 15Chapter 15 Chapter 15 ChiChi--Square TestsSquare TestsChiChi Square TestsSquare Tests Chapter 11Chapter 11Chapter 11Chapter 11 ANOVAANOVA

©2006 Thomson/South-Western 1

ChiChi Sq are as a Test ofSq are as a Test ofChiChi--Square as a Test of Square as a Test of IndependenceIndependenceIndependenceIndependence Sample Differences among ProportionsSample Differences among Proportions –– significantsignificantSample Differences among Proportions Sample Differences among Proportions –– significantsignificant or not?or not?

Contingency TablesContingency Tables

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of IndependenceIndependence

•• Observed & Expected FrequenciesObserved & Expected Frequencies

Pn Pn –– proportion in the northproportion in the north--east who prefer east who prefer present planpresent planpresent planpresent plan Ps Ps -- proportion in the southproportion in the south--east who prefer east who prefer present planpresent plan Pc Pc -- proportion in the central region who prefer proportion in the central region who prefer present planpresent plan PwPw proportion in the west coast who preferproportion in the west coast who preferPw Pw -- proportion in the west coast who prefer proportion in the west coast who prefer present plan present plan

•• The null and alternate hypotheses are:The null and alternate hypotheses are:

0

Ho: Pn = Ps = Pc = PwHo: Pn = Ps = Pc = Pw Ha: Pn, Ps, Pc, Pw are not all equalHa: Pn, Ps, Pc, Pw are not all equal

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of IndependenceIndependence

Combined proportion who prefer present method = Combined proportion who prefer present method = (68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) = .6643.(68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) = .6643.(68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) .6643.(68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) .6643.

Th ChiTh Chi S St ti tiS St ti tiThe ChiThe Chi--Square StatisticSquare Statistic

Calculating the ChiCalculating the Chi--Square statisticSquare statistic

Th ChiTh Chi S Di t ib tiS Di t ib tiThe ChiThe Chi--Square DistributionSquare Distribution The ChiThe Chi--Square distributionSquare distribution

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Test the hypotheses: Test the hypotheses: Ho: Pn = Ps = Pc = PwHo: Pn = Ps = Pc = Pw H P P P P t ll lH P P P P t ll lHa: Pn, Ps, Pc, Pw are not all equalHa: Pn, Ps, Pc, Pw are not all equal  = .10= .10

The sample chiThe sample chi--square value of 2.764 that wesquare value of 2.764 that we calculated earlier falls within the acceptance region.calculated earlier falls within the acceptance region.p gp g Hence, we accept the null hypothesis.Hence, we accept the null hypothesis.

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

T t th h thT t th h thTest the hypotheses: Test the hypotheses: Ho: length of stay and type of insurance are Ho: length of stay and type of insurance are

independentindependentindependentindependent Ha: length of stay depends on the type of insuranceHa: length of stay depends on the type of insurance  = .01= .01

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

L t A th t th t t d tL t A th t th t t d tLet A = the event that a stay corresponds to Let A = the event that a stay corresponds to someone whose insurance covers less than 25% someone whose insurance covers less than 25% of the costsof the costsof the costsof the costs

Let B = the event a stay lasts less than 5 daysLet B = the event a stay lasts less than 5 days

P (first cell = P (a and B) = (180/660)(110/660) = 1/22P (first cell = P (a and B) = (180/660)(110/660) = 1/22

A 1/22 i th t d ti i th fi t llA 1/22 i th t d ti i th fi t llAs 1/22 is the expected proportion in the first cell,As 1/22 is the expected proportion in the first cell, the expected frequency in that cell is (1/22)(660) = 30the expected frequency in that cell is (1/22)(660) = 30 observationsobservationsobservationsobservations

In general, fc = [(RT)(CT)]/nIn general, fc = [(RT)(CT)]/nIn general, fc [(RT)(CT)]/nIn general, fc [(RT)(CT)]/n

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

A th l hiA th l hi l f 24 315 i tl f 24 315 i tAs the sample chiAs the sample chi--square value of 24.315 is notsquare value of 24.315 is not within the acceptance region, we reject the nullwithin the acceptance region, we reject the null hypothesishypothesishypothesis.hypothesis.

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Precautions in using the ChiPrecautions in using the Chi--Square TestSquare Test

U l l iU l l i-- Use large sample sizesUse large sample sizes

-- Use carefully collected dataUse carefully collected data-- Use carefully collected dataUse carefully collected data

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of Goodness of FitGoodness of Fit

Function of a goodness of fit testFunction of a goodness of fit test

Calculating observed and expected frequenciesCalculating observed and expected frequencies

Stating the hypothesesStating the hypotheses

Ho: A binomial distribution with p = 40 is a goodHo: A binomial distribution with p = 40 is a goodHo: A binomial distribution with p = .40 is a good Ho: A binomial distribution with p = .40 is a good description of the interview processdescription of the interview process

H1: A binomial distribution with p = .40 is not a goodH1: A binomial distribution with p = .40 is not a goodH1: A binomial distribution with p .40 is not a good H1: A binomial distribution with p .40 is not a good description of the interview processdescription of the interview process

 = .20= .20

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of Goodness of FitGoodness of Fit

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of Goodness of FitGoodness of Fit

Using the ChiUsing the Chi--Square Goodness of Fit TestSquare Goodness of Fit Test

With 3 degrees of freedom, the region to the right ofWith 3 degrees of freedom, the region to the right of a chia chi--square value of 4.642 contains .20 of the areasquare value of 4.642 contains .20 of the area under the curveunder the curve

The sample chiThe sample chi square value of 5 0406 falls outsidesquare value of 5 0406 falls outsideThe sample chiThe sample chi--square value of 5.0406 falls outsidesquare value of 5.0406 falls outside this acceptance region. Hence, we reject the nullthis acceptance region. Hence, we reject the null hypothesishypothesishypothesishypothesis

ANOVAANOVA

©2006 Thomson/South-Western 16

ANOVAANOVAANOVAANOVA Function of AnovaFunction of Anova

Uses of AnovaUses of Anova

Grand mean using all the data = (15 + 18 +…+ 15) / 16Grand mean using all the data = (15 + 18 +…+ 15) / 16 = 304/16 = 19= 304/16 = 19 304/16 19 304/16 19

Grand mean as a weighted average of the sampleGrand mean as a weighted average of the sample means, using the relative sample sizes as themeans, using the relative sample sizes as the weights = (5/16)(17) + (5/16)(21) + (6/16)(19) = 304/16weights = (5/16)(17) + (5/16)(21) + (6/16)(19) = 304/16 = 19= 19= 19= 19

ANOVAANOVAANOVAANOVA We can state the hypotheses as follows:We can state the hypotheses as follows:

Ho: µHo: µ11 = µ= µ22 = µ= µ33 H1: µH1: µ11, µ, µ22, µ, µ33 are not all equalare not all equal

Assumptions made in AnovaAssumptions made in Anova

Steps in AnovaSteps in Anova

1)1) Determine one estimate of the population variance from the Determine one estimate of the population variance from the variance among the sample meansvariance among the sample means

2)2) Determine a second estimate of the population varianceDetermine a second estimate of the population variance2)2) Determine a second estimate of the population variance Determine a second estimate of the population variance from the variance within the samplesfrom the variance within the samples

3)3) Compare the two estimates; if they are approximately equal Compare the two estimates; if they are approximately equal i l t th ll h th ii l t th ll h th iin value, accept the null hypothesis in value, accept the null hypothesis

ANOVAANOVAANOVAANOVA Calculating the variance among the sample means:Calculating the variance among the sample means:

Finding the first estimate of the population varianceFinding the first estimate of the population variance

Finding the variance among the sample meansFinding the variance among the sample meansFinding the variance among the sample meansFinding the variance among the sample means

Finding the population variance using the varianceFinding the population variance using the variance among the sample meansamong the sample means

ANOVAANOVAANOVAANOVA Calculating the variance among the sample means:Calculating the variance among the sample means:

Estimating the between column varianceEstimating the between column variance

ANOVAANOVAANOVAANOVA Calculating the variance within the samples:Calculating the variance within the samples:

Finding the second estimate of the populationFinding the second estimate of the population variancevariance

Sample varianceSample variance

Estimate of within column varianceEstimate of within column variance

ANOVAANOVAANOVAANOVA Calculating the variance within the samples:Calculating the variance within the samples:

ANOVAANOVAANOVAANOVA The F test:The F test: F = (first estimate of the population variance basedF = (first estimate of the population variance basedF (first estimate of the population variance based F (first estimate of the population variance based

on the variance among the sample means)/ on the variance among the sample means)/ (second estimate of the population variance (second estimate of the population variance based on the variances within the samples)based on the variances within the samples)

F = between column variance / within columnF = between column variance / within columnF = between column variance / within column F = between column variance / within column variance variance

= 20/14.769 = 1.354 (this is the F ratio)= 20/14.769 = 1.354 (this is the F ratio) 20/14.769 1.354 (this is the F ratio) 20/14.769 1.354 (this is the F ratio)

Interpreting the F ratioInterpreting the F ratio

ANOVAANOVAANOVAANOVA The F distributionThe F distribution

ANOVAANOVAANOVAANOVA Using the F distributionUsing the F distribution

Number of degrees of freedom in the numerator ofNumber of degrees of freedom in the numerator of the F ratio = (number of samples the F ratio = (number of samples –– 1)1)

Number of degrees of freedom in the denominator ofNumber of degrees of freedom in the denominator of the F ratio =the F ratio =  (n(njj 1) = n1) = n kkthe F ratio = the F ratio =  (n(njj –– 1) = n1) = nTT –– kk

Using the F tableUsing the F tableUsing the F tableUsing the F table

Testing the hypothesesTesting the hypotheses

F = between column variance / within column F = between column variance / within column variancevariancevariance variance

= 20/14.769 = 1.354 (this is the F ratio)= 20/14.769 = 1.354 (this is the F ratio)

ANOVAANOVAANOVAANOVA Using the F distributionUsing the F distribution

Number of degrees of freedom in the numerator ofNumber of degrees of freedom in the numerator of the F ratio = (3 the F ratio = (3 –– 1) = 21) = 2 Number of degrees of freedom in the denominator ofNumber of degrees of freedom in the denominator of the F ratio = (5 the F ratio = (5 –– 1) + (5 1) + (5 –– 1) + (6 1) + (6 –– 1) = 131) = 13

Suppose we want the test at the .05 level, theSuppose we want the test at the .05 level, the hypothesis that there is no difference among thehypothesis that there is no difference among thehypothesis that there is no difference among thehypothesis that there is no difference among the three training methods. three training methods.

ANOVAANOVAANOVAANOVA Using the F distributionUsing the F distribution

From the F table, the value we get is 3.81. This valueFrom the F table, the value we get is 3.81. This value of 3.81 sets the upper limit of the acceptance region.of 3.81 sets the upper limit of the acceptance region. As the calculated sample value for F of 1.354 liesAs the calculated sample value for F of 1.354 lies within the acceptance region, we would accept thewithin the acceptance region, we would accept the null hypothesisnull hypothesisnull hypothesis.null hypothesis.

ANOVAANOVAANOVAANOVA Precautions in using the F TestPrecautions in using the F Test

-- Use large sample sizesUse large sample sizes

-- Control all factors except the one being studiesControl all factors except the one being studies

A test for one factorA test for one factor-- A test for one factorA test for one factor

ANOVAANOVA E lE lANOVA ANOVA -- ExampleExample The manufacturer of a tape recorder decides toThe manufacturer of a tape recorder decides to include four alkaline batteries along with theirinclude four alkaline batteries along with theirinclude four alkaline batteries along with theirinclude four alkaline batteries along with their product. Two battery suppliers are considered, brandproduct. Two battery suppliers are considered, brand 1 and brand 2. The supervisor wants to know if the1 and brand 2. The supervisor wants to know if the average lifetimes of the two brands are the same.average lifetimes of the two brands are the same. Each of ten batteries is connected to a test deviceEach of ten batteries is connected to a test device that places a small drain on the battery power andthat places a small drain on the battery power andthat places a small drain on the battery power andthat places a small drain on the battery power and records the battery lifetime. The following data (inrecords the battery lifetime. The following data (in hours) was collected.hours) was collected.hours) was collected.hours) was collected.

Brand 1: 43, 48, 38, 41, 51Brand 1: 43, 48, 38, 41, 51 Brand 2: 30, 26, 37, 31, 34Brand 2: 30, 26, 37, 31, 34

ANOVAANOVA E lE lANOVA ANOVA -- ExampleExample Within Sample Variation Within Sample Variation

xx11bar = 44.2 (sbar = 44.2 (s11 = 5.26)= 5.26)

xx22bar = 31.6 (sbar = 31.6 (s22 = 4.16)= 4.16)

Between Sample VariationBetween Sample VariationBetween Sample VariationBetween Sample Variation

xx11bar is larger than xbar is larger than x22barbarxx11bar is larger than xbar is larger than x22barbar

Measuring VariationMeasuring Variation

SS (total) = SS (between) + SS (within) SS (total) = SS (between) + SS (within) = SS (factor) + SS (error)= SS (factor) + SS (error)= SS (factor) + SS (error)= SS (factor) + SS (error)

Deriving the Sum of SquaresDeriving the Sum of Squares

TT 22 TT 22 TT 22 TT22 SS(factor) = + + ... + SS(factor) = + + ... + --

TT1122

nn11

TT2222

nn22

TTkk22

nnkk

TT22

nn

SS(total) = ∑SS(total) = ∑xx22 -- TT22

SS(total) ∑SS(total) ∑xx nn

TT 22 TT 22 TT 22 SS(error) = ∑SS(error) = ∑xx22 -- + + ... ++ + ... +

TT1122

nn11

TT2222

nn22

TTkk22

nnkk

= SS(total) = SS(total) -- SS(factor)SS(factor)

ANOVAANOVA E l (E l ( tdtd))ANOVA ANOVA –– Example (Example (contdcontd))

The ANOVA TableThe ANOVA Table SourceSource dfdf SSSS MSMS FF FactorFactor kk -- 11 SS(factor)SS(factor) MS(factor)MS(factor) MS(factor) MS(factor) ErrorError nn -- 22 SS(error)SS(error) MS(error)MS(error) MS(error)MS(error)ErrorError nn -- 22 SS(error)SS(error) MS(error)MS(error) MS(error)MS(error) TotalTotal nn -- 11 SS(total)SS(total)

SS(factor)SS(factor) MS(f t )MS(f t )

SS(error)SS(error) MS( )MS( )kk -- 11MS(factor) =MS(factor) = nn -- kkMS(error) =MS(error) =

MS(factor)MS(factor) MS(error)MS(error)FF == ( )( )

ExampleExample

ExampleExample Since alpha = .5, Since alpha = .5,

F F .05, 3, 20.05, 3, 20 = 3.10.= 3.10.

As F* = 10.75 > 3.10, As F* = 10.75 > 3.10,

we reject Ho.we reject Ho.

T k ’ M lti l C iT k ’ M lti l C iTukey’s Multiple Comparison Tukey’s Multiple Comparison TestTestTestTest

QQ == maximum (maximum (XXii) ) –– minimum (minimum (XXii))

MS(error) / MS(error) / nnrr

wherewhere

1.1. Maximum Maximum XXii and minimum and minimum XXii are the largest and smallest meansare the largest and smallest means

2.2. MS(error) is the pooled sample varianceMS(error) is the pooled sample variance2.2. MS(error) is the pooled sample varianceMS(error) is the pooled sample variance

3.3. nnrr is the number of replicates in each sampleis the number of replicates in each sample

ExampleExample There is no evidence ofThere is no evidence of

a difference betweena difference between

brand 1 and the brand 2brand 1 and the brand 2

populations or betweenpopulations or between

the brand 3 and thethe brand 3 and the

brand 4 populationsbrand 4 populations

Sample Problems - Chapter 11.pdf

 

Sample Problems 

1)    A start‐up cell phone applications company is interested in determining whether household incomes  are different for subscribers to 3 different service providers. A random sample of 25 subscribers to  each of the 3 service providers was taken, and the annual household income for each subscriber was  recorded. The partially completed ANOVA table for the analysis is shown here:   

ANOVA 

Source of Variation  SS  df  MS  F 

Between Groups  2,949,085,157       

Within Groups         

Total  9,271,678,090       

  a. Complete the ANOVA table by filling in the missing sums of squares, the degrees of freedom for  each source, the mean square, and the calculated F‐test statistic.  b. Based on the ample results, can the start‐up firm conclude that there is a difference in household  incomes for subscribers to the 3 service providers? You may assume normal distributions and equal  variances. Conduct your test at the α=0.10 level of significance. Be sure to state a critical F‐statistic, a  decision rule, and a conclusion.    a. The calculations for the completed ANOVA table below are: 

Between groups df = k‐1 where k is the number of magazines = 3‐1 = 2 

Within groups df = nt –k, where nt = 25 subscribers * 3 magazines = 75; 

75 – 3 = 72 

SSW = SST‐SSB = 9,271,678,090 – 2,949,085,157 = 6,322,592,933 

MSB = 2,949,085,157/2 = 1,474,542,579 

MSW = 6,322,592,933/72 = 87,813,791 

F = 1,474,542,579/87,813,791 = 16.79 

ANOVA

Source of Variation SS df MS F

Between Groups 2,949,085,157 2 1,474,542,579 16.79

Within Groups 6,322,592,933 72 87,813,791

Total 9,271,678,090 74

b. 

Ho:  µ1 = µ2 = µ3 

HA:  Not all populations have the same mean 

 

F = MSB/MSW = 1,474,542,579/87,813,791 = 16.79 

Because the F test statistic = 16.79 > Fα = 2.3778, we do reject the null hypothesis based on these sample data. 

2)     An analyst is interested in testing whether 4 populations have equal means. The following sample  data have been collected from populations that are assumed to be normally distributed with equal  variances:   

Sample 1  Sample 2  Sample 3  Sample 4 

9  12  8  17 

6  16  8  15 

11  16  12  17 

14  12  7  16 

14  9  10  13 

  Conduct the appropriate test using a significance level equal to 0.05.   

0 1 2 3 4:H        

:AH  not all  j  are equal 

The following sample data were obtained: 

     

The means for each sample are: 

1 10.8x    2 13x    3 9x      4 15.6x     

The grand mean is    12.1x   

The F critical value from the F‐ distribution for  = 0.05 and  with  1 3D   and  2 16D   degrees of freedom is  3.239.  Thus, the decision rule is: 

If the test statistic F > 3.239, reject the null hypothesis, otherwise do not reject 

The samples are independent and the data level is ratio.  Because the sample sizes are equal, the ANOVA test 

is robust to the normality and equal variance assumptions.  The Hartley’s F max test can be used to check the 

equal variance assumption.  The samples are too small to check the normality assumption. 

2 2 2 2 0 1 2 3 4:H        

:AH not all population variances are equal 

 

The sample variances are:  

2 1 11.7s   

2 2 9s     

2 3 4s     

2 4 2.8s   

The test statistic for the F max test is: 

2 max 2 min

11.7 4.18

2.8

s F

s     

The critical value from the F max table with c = 4 and v = 4 degrees of freedom for  = 0.05 is 20.6. 

Because F = 4.18 < 20.6, do not reject the null hypothesis 

Thus, there is no evidence to suggest that population variances are not equal. 

The required calculations can be computed manually or by using Excel or Minitab.  We get the following: 

 

Since the test statistic = F = 5.905 > 3.239, reject the null hypothesis.   

Also, using the p‐value approach, because p‐value = 0.0065 < 0.05, we reject the null hypothesis. 

3)  

A manager is interested in testing whether three populations of interest have equal population  means. Simple random samples of size 10 were selected from each population. The following  ANOVA table and related statistics were computed:   

ANOVA: Single Factor 

Summary 

Groups  Count  Sum  Average  Variance 

Sample 1  10  507.18  50.72  35.06 

Sample 2  10  405.79  40.58  30.08 

Sample 3  0  487.64  48.76  23.13 

         

         

 

ANOVA 

Source   SS  df  MS  F  p‐value  F‐crit 

Between Groups  578.78  2  289.39  9.84  0.0006  3.354 

Within Groups  794.36  27  29.42       

Total  1373.14  29         

  a. Sate the appropriate null and alternative hypotheses.  b. Conduct the appropriate test of the null hypothesis assuming that the populations have equal  variances and the populations are normally distributed. Use a 0.05 level of significance.  c. If warranted, use the Tukey‐Kramer procedure for the multiple comparisons to determine which  populations have different means. (Assume α=0.05.)    a. The appropriate null and alternative hypotheses are: 

0 1 2 3:H      

:AH  not all  j  are equal 

b. The one‐way ANOVA test is appropriate for testing the null and alternative hypotheses.  All the information 

needed is supplied in the table.   

Using the F test approach, because F = 9.84 > critical F = 3.35, we reject the null hypothesis and conclude that the population means are not all equal. Using the p-value approach, because p-value = 0.0006 <  = 0.05, we reject the null hypothesis and conclude that the population means are not all equal.  

c. Because the null hypothesis has been rejected and we conclude that not all population means are equal, we 

can now apply the Tukey‐Kramer method to determine which means are different.  We start by calculating the 

Tukey‐Kramer critical range value using: 



  



  

  ji nn

MSW qngeCriticalRa

11

2 1   

The value for q0.95 with k = 3 and  Tn k  = 30‐3=27 degrees of freedom is found in Appendix J as  approximately 3.50.  Because the sample sizes are equal in this situation, we need only compute one critical 

range value shown as follows: 

0.6 10

1

10

1

2

42.29 5.3 

  

  

ngeCriticalRa  

We now compare all the possible contrasts of differences between sample means to the Tukey-Kramer critical range value.     Contrast         Significant ? 

    14.1058.4072.5021  xx  > 6.0               Yes 

 

    96.176.4872.5031  xx  < 6.0                 No 

    18.876.4858.4032  xx  > 6.0                Yes 

Thus, we conclude  1 2   and  23   .  Thus, the mean for population 2 is less than the means for the  other two populations.  However, the sample data do not provide sufficient evidence to conclude that the 

means for populations one and three are different. 

4)  

Respond to each of the following questions using this partially completed one‐way ANOVA table:   

Source of Variation  SS  df  MS  F‐ratio 

Between Samples  1745       

Within Samples    240     

Total  6504  246     

  a. How many different populations are being considered in this analysis?  b. Fill in the ANOVA table with the missing values.  c. State the appropriate null and alternative hypotheses.  d. Based in the analysis of variance F‐test, what conclusion should be reached regarding the null  hypothesis? Test using a significance level of 0.01.    a. dfB + dfW = dfT   dfB = dfT ‐ dfW = 246 – 240 = 6 = k – 1  k = 7 = number of populations.  b.    

Source SS df MS F

Between Samples

1,745 6 290.833 14.667

Within Samples 4,759 240 19.829

Total 6,504 246

  

c.  H0:  μ1 = μ2 = μ3 = μ4 = μ5 = μ6= μ7 

HA:  At least two population means are different 

d. F critical = 2.8778 (Minitab); from text table use F6,200 = 2.893  Since 14.667 > 2.8778 reject Ho and conclude that at least two populations means are different. 

5)  

Respond to each of the following questions using this partially completed one‐way ANOVA table: 

 

 

Source of Variation  SS  df  MS  F‐ratio 

Between Samples    3     

Within Samples  405       

Total  888  31     

 

a. How many different populations are being considered in this analysis?  b. Fill in the ANOVA table with the missing values.  c. State the appropriate null and alternative hypotheses.  d. Based in the analysis of variance F‐test, what conclusion should be reached regarding the null  hypothesis? Test using α=0.05.    a. dfB = 3 = k – 1  k = 4 = number of populations. 

b. Source SS df MS F

Between Samples 483 3 161 11.1309

Within Samples 405 28 14.464

Total 888 31

c. H0:  μ1 = μ2 = μ3 = μ4  

HA:  At least two population means are different 

d. F critical = 2.9467 (Minitab); from text table use F3, 24 = 3.009  Since 11.1309 > 2.9467 reject Ho and conclude that at least two populations means are different. 

6) 

Given the following sample data: 

Item  Group1  Group 2  Group 3  Group 4 

1  20.9  28.2  17.8  21.2 

2  27.2  26.2  15.9  23.9 

3  26.6  2.6  18.4  19.5 

4  22.1  29.7  20.2  17.4 

5  25.3  30.3  14.1   

6  30.1  25.9     

7  23.8       

 

a. Based on the computation for the within and between sample variation, develop the ANOVA table  and test the appropriate null hypothesis using α=0.05. Use the p‐value approach.  b. If warranted, us the Tukey‐Kramer procedure to determine which populations have different  means. Use α =0.05. 

Anova: Single Factor

SUMMARY

Groups Count Sum Average Variance

Group 1 7 176 25.14286 10.00286

Group 2 6 161.9 26.98333 10.12567

Group 3 5 86.4 17.28 5.517

Group 4 4 82 20.5 7.553333

ANOVA

Source of Variation SS df MS F P-value F crit

Between Groups 315.9324 3 105.3108 12.20025 0.000136 3.159911

Within Groups 155.3735 18 8.63186

Total 471.3059 21

a.   

H0:  μ1 = μ2 = μ3 = μ4 

HA:  At least two population means are different 

Since p‐value = 0.000136 < 0.05 reject H0 and conclude that at least two population means are different. 

b. Tukey‐Kramer Critical Range =   ) 11

( 2

632.8 00.4

ji nn   

Pair Critical Range Difference in Means Significant?

1 vs 2 4.72 1.84 No

1 vs 3 5.137 7.863 Yes

1 vs 4 5.475 4.643 No

 

2 vs 3 4.968 9.703 Yes

2 vs 4 5.318 6.483 Yes

3 vs 4 5.691 3.22 No

 

7) 

Examine the 3 samples obtained independently from 3 populations: 

Item  Group1  Group 2  Group 3 

1  14  17  17 

2  13  16  14 

3  12  16  15 

4  15  18  16 

5  16    14 

6      16 

 

a. Conduct a one‐way analysis of variance on the data. Use alpha=0.05.  b. If warranted, use the Tukey‐Kramer procedure to determine which populations have different  means. Use an experiment‐wide error rate of 0.05.    a.

HO: 321   HA: At least two population means are different. Because k – 1 = 2 and nT – k = 12, F0.05 = 3.885. The decision rule is if the calculated F > F0.05 = 3.885, reject HO, or if the p-value <  = 0.05, reject HO; otherwise, do not reject HO. If we assume that the populations are normally distributed, Harley’s Fmax test can be used to test whether the

three populations have equal variances. The sample variances are s1 2 =

2( )

1

x x

n

 

= 15

10

 = 2.50, s2

2 =

0.916, and s3 2 = 1.467 test statistic is Fmax =

916.0

50.2 2 min

2 max 

s

s = 2.729. From Appendix I, the critical value for

alpha = 0.05, k = 3, and n - 1 = 4 is 15.5. Because 2.729 < 15.5, we conclude that the population variances could be equal.

 

  Since F = 5.03 > 3.885, we reject HO. 

We conclude there is sufficient evidence to indicate that at least two of the population means differ. 

b.   Use the Tukey‐Kramer test to determine which populations have different means. 

To construct the critical ranges: 

    

   

 

ji nn

MSW q

11

2 1   

For n1 = 5 and n2 = 4, critical range =  1.67 1 1

3.77 2 5 4

      

= 2.311; 

for n1 = 5 and n3 = 6, critical range =  1.67 1 1

3.77 2 5 6

      

= 2.086; 

and for n2 = 4 and n3 = 6, critical range =  1.67 1 1

3.77 2 4 6

      

= 2.224 

The contrast are  |75.1614||| 21  xx =  2.75 > 2.311, 

        |33.1514||| 31  xx =  1.33 < 2.086, and 

         |33.1575.16||| 32  xx =  1.42 < 2.224 

Therefore, we can infer that population 1 and population 2 have different means. However, no other 

differences are supported by these sample data. 

8)  

A study was conducted to determine if differences in new textbook prices exist between on‐campus 

bookstores, off‐campus bookstores, and Internet bookstores. To control for differences in textbook 

prices that might exist across disciplines, the study randomly selected 12 textbooks and recorded the 

price of each of the 12 books at each of the 3 retailers. You may assume normality and equal‐

variance assumptions have been met. The partially completed ANOVA able based on the study’s 

findings is shown here: 

10 

 

ANOVA 

Source of Variation  SS  df  MS  F 

Textbooks  16624       

Retailer  2.4       

Error         

Total  17477.6       

 

a. Complete the ANOVA table by filling in the missing sum of squares, the degrees of freedom for  each source, the mean square, and the calculated F‐test statistic for each possible hypothesis test.  b. Based on the study’s findings, was it correct to block for differences in textbooks? Conduct the  appropriate test at the α=0.10 level of significance.  c. Based on the study’s findings, can it be concluded that there is a difference in the average price of  textbooks across the 3 retail outlets? Conduct the appropriate hypothesis test at the α=0.10 level of  significance.    a. The calculations for the completed ANOVA table below are: 

Textbooks (blocks) df = b‐1 = 12‐1 = 11 

Retailer df = k‐1 = 3‐1 = 2 

Error df = (k‐1)(b‐1) = 11(2) = 22 

Total df = nt ‐1, where nt = (12 textbooks) * ( 3 retailers) = 36 

= 36 – 1 = 35   

SSW (error) = SST‐SSBL‐SSB = 17,477.6 – 16,624 – 2.4 = 851.2 

MSBL (Textbooks) = 16,624/11 = 1,511.3 

MSB (Retailer) = 2.4/2 = 1.2 

MSW (error) = 851.2/22 = 38.7 

F (textbooks) = 1,511.3/38.7 = 39.05 

F (Retailer) = 1.2/38.7 = 0.031 

ANOVA

Source of Variation SS df MS F

Textbooks 16,624 11 1511.3 39.05

11 

 

Retailer 2.4 2 1.2 0.031

Error 851.2 22 38.7

Total 17477.6 35

 

b. 

Ho:  µOn = µOff = µI 

HA:  Not all populations have the same mean 

Test to determine whether blocking is effective.  Twelve textbooks were used to evaluate the prices at the 

three types of retail outlets.  These constitute the blocks.  The null and alternative hypotheses are: 

Ho:  µ1 = µ2 = µ3 = … = µ12 

HA:  Not all block means are equal. 

As shown in the ANOVA table from part (a), the F test statistic for this hypothesis test is the F for blocks 

(textbooks) = 39.05. 

Using Excel’s FINV function with α = 0.10 and 11 and 22 degrees of freedom, Fα=0.10 = 1.88.  Since  F = 39.05 > 

Fα=0.10 = 1.88, reject the null hypothesis.  This means that based on these sample data we can conclude that 

blocking is effective. 

c. We have three types of retail outlets (on‐campus, off‐campus, and Internet).  The appropriate null and 

alternative hypotheses are: 

Ho:  µOn = µOff = µI 

HA:  Not all populations have the same mean 

As shown in the ANOVA table from part (a), the F test statistic for this null hypothesis is 0.031. 

Using Excel’s FINV function with α = 0.10 and 2 and 22 degrees of freedom, Fα=0.10 = 2.56.  Since  F = 0.031 < 

Fα=0.10 = 2.56, do not reject the null hypothesis.  Thus, based on these sample data we cannot conclude that 

there is a difference in textbook prices at the three different types of retail outlets. 

9)  

The following data were collected for a randomized block analysis of variance design with 4 

populations and 8 blocks. 

  Group 1  Group 2  Group 3  Group 4 

Block 1  56  44  57  84 

Block 2  34  30  38  50 

12 

 

Block 3  50  41  48  52 

Block 4  19  17  21  30 

Block 5  33  30  35  38 

Block 6  74  72  78  79 

Block 7  33  24  27  33 

Block 8  56  44  56  71 

 

a. State the appropriate null and alternative hypotheses for the treatments and determine whether  blocking is necessary.  b. Construct the appropriate ANOVA table.  c. Using a significance level equal to 0.05, can you conclude that blocking was necessary in this case?  Use  a test‐statistic approach.  d. Based on the data and a significance level equal to 0.05, is there a difference in population means  for the 4 groups? Use a p‐value approach.  e. If you found that a difference exists in part d, use the LSD approach to determine which  populations have different means.    a. H0:  μ1 = μ2 = μ3 = μ4  

HA: At least two population means are different H0:  μb1 = μb2 = μb3 = μb4 = μb5 = μb6 = μb7 = μb8  

HA:  Not all block means are equal 

b. ANOVA

Source of Variation SS df MS F P-value F crit

Blocks 9123.375 7 1303.339 46.87669 2.08E-11 2.487582

Groups 1158.625 3 386.2083 13.8906 3.26E-05 3.072472

Error 583.875 21 27.80357

Total 10865.88 31

  c. Since 46.87669 > 2.487582 reject H0 and conclude that there is an indication that blocking was necessary.  d. Since p‐value 0.0000326 < 0.05 reject H0 and conclude that at least two means are different.   

 

 

13 

 

e. 

Least Significant Difference (LSD) 5.48280844

Mean

Difference Absolute Mean

Difference Significant

G1 v. G2 6.625 6.625 YES

G1 v. G3 -0.625 0.625 NO

G1 v. G4 -10.25 10.25 YES

G2 v. G3 -7.25 7.25 YES

G2 v. G4 -16.875 16.875 YES

G3 v. G4 -9.625 9.625 YES

 

10)  

The following ANOVA table and accompanying information are the result of a randomized block 

ANOVA test. 

Summary  Count  Sum  Average  Variance 

1  4  443  110.8  468.9 

2  4  275  68.8  72.9 

3  4  1030  257.5  1891.7 

4  4  300  75.0  433.3 

5  4  603  150.8  468.9 

6  4  435  108.8  72.9 

7  4  1190  297.5  1891.7 

8  4  460  115.0  433.3 

Sample 1  8  1120  140.0  7142.9 

Sample 2  8  1236  154.5  8866.6 

Sample 3  8  400  175.0  9000.0 

Sample 4  8  980  122.5  4307.1 

14 

 

 

ANOVA 

Source of Variation  SS  df  MS  F  p‐value  F‐crit 

Rows  199899  7  28557.0  112.8  0.0000  2.488 

Columns  11884  3  3961.3  15.7  0.0000  3.073 

Error  5317  21  253.2       

Total  217100  31         

 

a. How many blocks were used in this study?  b. How many populations are involved in this test?  c. Test to determine if blocking is effective using an alpha level equal to 0.05.  d. Test the main hypothesis of interest using α=0.05.  e. If warranted, conduct an LSD test with α =0.05 to determine which population means are  different.  a. There were 8 blocks used. 

b. There were 4 populations involved in the study. 

c. The hypothesis to be tested is: 

0 1 2 3 4 5 6 7 8:H                 (blocking is not effective) 

:A jH not all are equal   (blocking is effective) 

The hypothesis is tested by computing the test statistic F ratio as follows: 

    28, 557

112.79 253.19

MSBL F

MSW     

The critical F value from the F‐distribution for  = 0.05 and degrees of freedom  1 27 21D and D   is  approximately 2.5.  Therefore the decision rule is: 

If test statistic F > critical F = 2.5, reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

Because F = 112.79 > critical F = 2.5, we reject the null hypothesis and conclude that blocking is effective. 

d.   0 1 2 3 4:H        

:A jH not all are equal  

This hypothesis is tested using an F test with the test statistic computed as follows: 

15 

 

      65.15 19.253

33.961,3 

MSW

MSB F  

The critical F value from the F‐distribution for alpha = 0.05 and degrees of freedom  1 23 21D and D   is  approximately 3.0.  Therefore the decision rule is: 

If test statistic F > critical F = 3.0, reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

Because F = 15.65 > critical F = 3.0, we reject the null hypothesis and conclude that the four populations do not 

have the same mean. 

e. Because the primary null hypothesis was rejected in part d., we can now use the Least Significant Difference 

test to determine which populations have different means. 

We can use the following steps to do this: 

Step 1:  Compute the LSD statistic. 

The LSD statistic is computed as: 

  55.16 8

2 19.2530796.2

2 2/ 

b MSWtLSD   

Note, the t value is for  0.025 2

   and (k‐1)(b‐1) = (3)(7) = 21 degrees of freedom from the t‐distribution 

table is 2.0796 

Step 2: Compute the sample means from each population. 

The sample means are provided in the table as: 

1 140x    2 154.5x       3 175x    4 122.5x   

Step 3:  Form all possible contrasts by finding the absolute differences between all pairs of sample means.  

Compare these to the LSD statistic. 

Absolute Difference      Comparison      Conclusion 

1 2 140 154.5 14.5x x                   14.5 < 16.55 

1 3 140 175 35x x        35 > 16.55      1 3   

1 4 140 122.5 17.5x x        17.5 > 16.55      1 4   

2 3 154.5 175 20.5x x        20.5 > 16.55      2 3   

2 4 154.5 122.5 32x x        32 > 16.55      2 4   

16 

 

3 4 175 122.5 52.5x x        52.5 > 16.55      3 4   

11) 

The following sample data were recently collected in the course of conducting a randomized block 

analysis of variance. Based on these sample data, what conclusions should be reached about 

blocking effectiveness and about the means of the 3 populations involved? Test using a significance 

level equal to 0.05. 

Block  Sample 1  Sample 2  Sample 3 

1  30  40  40 

2  50  70  50 

3  60  40  70 

4  40  40  30 

5  80  70  90 

6  20  10  10 

 

0 1 2 3:H      

:A jH not all are equal  

The sample data are: 

       

The following sums of squares values are computed: 

SST = 9,000   SSB = 33.33    SSBL = 7,866.67    SSW = 1,100 

The completed ANOVA table is: 

 

 

17 

 

The hypothesis to be tested is: 

0 1 2 3 4 5 6:H             (blocking is not effective) 

:A jH not all are equal   (blocking is effective) 

The hypothesis is tested by computing the test statistic F ratio as follows: 

  1, 573.33

14.3 110

MSBL F

MSW     

The critical F value from the F‐distribution for alpha = 0.05 and degrees of freedom  1 25 10D and D   is  3.326.  Therefore the decision rule is: 

If test statistic F > critical F = 3.326, reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

Because F = 14.3 > critical F = 3.326, we reject the null hypothesis and conclude that blocking is effective. 

Recall that the main hypothesis is: 

0 1 2 3:H      

:A jH not all are equal  

This hypothesis is tested using an F test with the test statistic computed as follows: 

  16.67

0.1515 110

MSB F

MSW       

The critical F value from the F‐distribution for alpha = 0.05 and degrees of freedom  1 22 10D and D   is  4.103.  Therefore the decision rule is: 

If test statistic F > critical F = 4.103, reject the null hypothesis 

Otherwise, do not reject the null hypothesis 

Because F = 0.1515 < critical F = 4.103, we do not reject the null hypothesis and conclude that the three 

populations may have the same mean value. 

12)  

A randomized complete block design is carried out, resulting in the following statistics: 

Source  x̅1  x̅2  x̅3  x̅4 

Primary Factor  237.15  315.15  414.01  612.52 

Block  363.57  382.22  438.33   

18 

 

SST = 364428 

 

a. Determine if blocking was effective for this design.  b. Using a significance level of 0.05, produce the relevant ANOVA and determine if the average  responses of the factor levels are equal to each other.  c. If you discovered that there were differences among the average responses of the factor levels,  use the LSD approach to determine which populations have different means.    a.

Step 1: HO: 321   , HA: at least two blocks have different means SST = 364,428

T

ii

n

xn x

 = 394.71,

SSB =   2xxn ii  = 236905.90, SSBl =  2xxk j  = 12113.60, SSW = SST – (SSB + SSBl) = 364428 – (236905.90 + 12113.60) = 115518.50. MSB = SSB/((k – 1) = 236905.90/(4 – 1) = 78968.63 MSBl = SSBl/(b – 1) = 12113.60/2 = 6056.8 MSW = SSW/(k -1)(b – 1) = 115518.50/3(2) = 19253.08

SS df MS F-ratio Between Blocks 12113.60 2 6056.8 0.3146 Between Samples 236905.90 3 78968.63 4.1016 Within samples 115518.50 6 19253.08 Total 364428 11

F = MSBl/MSW = 12113.60/19253.08 = 0.3146 F0.05 = 5.143. Since F = 0.3146 < F0.05 = 5.143, fail to reject HO. Conclude that blocking was not effective for this design b. Conduct the main hypothesis test to determine whether the treatments have equal means.

HO: 4321   , HA: at least two factor levels have different means F = MSB/MSW = 78968.63/19253.08 = 4.1016 F0.05 = 4.757. Since F = 4.1016 < F0.05 = 4.757, do not reject HO. Conclude that the average response associated with the factor’s levels may be equal to each other. c. Since we did not reject the null hypothesis in part b this part is not necessary. 13)  

Consider the following data from a two‐factor experiment: 

                   Factor A 

Factor B  Level 1  Level 2  Level 3 

Level 1  43  25  37 

49  26  45 

1x 2x 3x 4x

Primary Factor 237.15 315.15 414.01 612.52 Block 363.57 382.22 438.33

19 

 

Level 2  50  27  46 

53  31  48 

 

a. Determine if there is interaction between factor A and factor B. Use the p‐value approach and a  significance level of 0.05.  b. Does the average response vary among the levels of factor A? Use the test‐ statistic approach and  a significance level of 0.05.  c. Determine if there are differences in the average response between the levels of factor B. Use the  p‐value approach and a significance level of 0.05.   

 

a. HO: 21 ABAB   ,   

HA: the interaction terms have different response averages.  

P‐value = 0.854 > α = 0.05. Therefore, fail to reject HO.  Conclude that there is not sufficient evidence to determine that there is interaction between Factor A and Factor B.

b. HO: 321 AAA   ,      HA: at least two levels have different mean response  

F = MSA/MSW = 47.10 F0.05 = 5.143. Since F = 47.10 > F0.05 = 5.143, reject HO. Conclude that there is sufficient evidence to indicate that at least two of the Factor A response variable averages differ.

c. HO: 21 BB   ,    HA: the two levels of Factor B have different response averages.  

P‐value = 0.039 < α = 0.05. Therefore, reject HO.  Conclude that there is sufficient evidence to determine that the two mean responses of Factor B differ

14) 

Examine the following two‐factor analysis of variance table: 

20 

 

Source  SS  df  MS  F‐Ratio 

Factor A  162.79  4     

Factor B      28.12   

AB Interaction  262.31  12     

Error         

Total  1298.74  84     

 

a. Complete the analysis of variance table.  b. Determine if interaction exists between factor A and factor B. Use α=0.05.  c. Determine if the levels of Factor A have equal means. Use a significance level of 0.05.  d. Does the ANOVA table indicate that the levels of factor B have equal means? Use a significance  level of 0.05.    a. MSA = SSA/(a – 1) =162.79/4 = 40.698. Since (a – 1)(b – 1) = 12 and (a – 1) = 4  (b – 1) = 3. MSB = SSB/(b – 1)  SSB = MSB(b – 1) = 28.12(3) = 84.35. MSAB = SSAB/(a – 1)(b – 1) = 262.31/12 = 21.859. SSE = SST – SSA – SSB – SSAB = 1298.74 – 162.79 – 84.35 – 262.31 = 789.29. Also, d.f. for Error = d.f.T – d.f.A – d.f.B – d.f.AB = 84 – 4 – 3 – 12 = 65. MSE = 789.29/65 = 12.143. Then F-ratio for Factor A = MSA/MSE = 40.698/12.143 = 3.35. Then F-ratio for Factor B = MSB/MSE = 28./12.143 = 2.316. Then F-ratio for the AB interaction = MSAB/MSE = 21.859/12.143 = 1.800. b. b. HO: Interaction between Factor A and Factor B does not exist,  

HA: Interaction between Factor A and Factor B does exist,  

 F = MSAB/MSE = 1.800.

Note that F = 1.800 < (F12,100, 0.05 = 1.850 < F12,65, 0.05 < F12,50, 0.05 = 1.952). Therefore, fail to reject HO. Conclude that there is not sufficient evidence to indicate interaction exists between Factor A and Factor B.

c. HO: 4321 AAAA   ,  

HA: at least two levels of Factor A have different mean responses,  

F = MSA/MSE = 3.35. Note that F4,100, 0.05 = 2.463 < F4,65, 0.05 < F4,50, 0.05 = 2.557 < F = 3.35. Therefore, reject HO. Conclude that there is sufficient evidence to indicate that at least two levels of Factor A have different 

mean responses. 

d.  HO: 321 BBB   ,  

HA: at least two levels of Factor B have different mean responses,  

F = MSB/MSW = 2.316.

Note that F = 2.316 < (F3,100, 0.05 = 2.696 < F3,65, 0.05 < F3,50, 0.05 = 2.790). Therefore, fail to reject HO. Conclude that there is not sufficient evidence to indicate that at least two levels of Factor B have different mean 

responses.

21 

 

15) 

                                                            Factor A 

Factor B 

  Level 1  Level 2  Level 3 

Level 1  33  30  21 

31  42  30 

35  36  30 

 

Level 2  23  30  21 

32  27  33 

27  25  18 

 

a. Based on the sample data, do factors A and B have significant interaction? State the appropriate  null and alternative hypotheses and test using a significance level of 0.05.  b. Based on these sample data, can you conclude that the levels of factor A have equal means? Test  using a significance level of 0.05.  c. Do the data indicate that the levels of factor B have different means? Test using a significance  level equal to 0.05.    a. H0: Factors A and B do not interact HA: Factors A and B do interact

ANOVA

Source of Variation SS df MS F P-value F crit

Factor B 150.2222 1 150.2222 5.753191 0.033605 4.747221

Factor A 124.1111 2 62.05556 2.376596 0.135052 3.88529

Interaction 24.11111 2 12.05556 0.461702 0.640953 3.88529

Within 313.3333 12 26.11111

Total 611.7778 17

Since 0.4617 < 3.8853 do not reject H0 and conclude that Factors A and B do not interact. b.  H0:  μα1 = μα2 = μα3  

HA: Not all means are equal Since 2.3766 < 3.8853 do not reject H0 and conclude that all means are equal

22 

 

c.  H0:  μβ1 = μβ2  

HA: Not all means are equal Since 5.7532 > 4.7472 reject H0 and conclude that not all means are equal. 16) 

Consider the following partially completed two‐factor analysis of variance table, which is an 

outgrowth of a study in which factor A has 4 levels and factor B has 3 levels. The number of 

replications was 11 in each cell. 

Source of Variation  SS  df  MS  F‐Ratio 

Factor A  345.1  4     

Factor B      28.12   

AB Interaction  1123.2  12     

Error  256.7       

Total  1987.3  84     

 

a. Complete the analysis of variance table.  b. Based on the sample data, can you conclude that the 2 factors have significant? Test using a  significance level equal to 0.05?  c. Based on the sample data, should you conclude that the means for factor A differ across the 4  levels or the means for factor B differ across the 3 levels? Discuss.  d. Considering the outcome of part b, determine what can be said concerning the differences of the  levels of factors A and B. Use a significance level of 0.10 for any hypothesis tests required. Provide a  rationale for your response to this question.    a.

ANOVA

Source of Variation  SS df MS F‐ratio 

Factor A  345.1 3 115.0333 53.77483

Factor B  262.3 2 131.15 61.30892

AB Interaction  1123.2 6 187.2 87.51071

Error  256.7 120 2.139167

 

Total  1987.3 131

b. H0: Factors A and B do not interact HA: Factors A and B do interact

23 

 

Using Excel’s FINV function the critical F for .05 significance and 6 and 120 degrees of freedom is equal to 2.1750. If F > 2.1750 reject H0, otherwise do not reject H0 87.5107 > 2.1750 so reject H0 and conclude that Factors A and B do interact.

c.  Since interaction is present Factor B must be tested with a One‐Way ANOVA at a given level of Factor A.  Or 

Factor A should be tested at a given level of Factor B.  Note, students should state that the lack of the raw data 

makes determining the data for Factor B at a given level of Factor A impossible.  Also that the lack of the raw 

data makes determining the data for Factor B at a given level of Factor A impossible. 

d.   One other possible approach is to ignore Factor B and the interaction of Factor A with Factor B. This of course 

will make it harder to detect any differences in the mean factor levels of Factor A if there are actual differences 

in the average levels of Factor A and the interaction terms. 

SSEone-way = SST – SSA = 1987.3 – 345.1 = 1642.2. Analysis of Variance  

Source DF SS MS F Factor A     3      345.1      115.03     8.966     

Error      128     1642.2     12.83 

Total 131 1987.3 H0:  μ1 = μ2 = μ3 = μ4 

HA: Not all means are equal Using Excel’s FINV function the critical F for .1 significance and 3 and 128 degrees of freedom is equal to 2.1271 If F > 2.2.1271 reject H0, otherwise do not reject H0 8.966 > 2.1271 so reject H0 and conclude that levels of Factors A do not have equal means. 

We could also ignore Factor A and the interaction of Factor A with Factor B. This of course will make it harder 

to detect any differences in the mean factor levels of Factor B if there are actual differences in the average 

levels of Factor A and the interaction terms. 

SSEone-way = SST – SSB = 1987.3 – 262.3 = 1725. Analysis of Variance  

Source DF SS MS F Factor B     2      262.3      131.15    9.809     

Error      129     1725         13.37 

Total 131 1987.3 H0:  μ1 = μ2  =  μ3 

HA: Not all means are equal Using Excel’s FINV function the critical F for .1 significance and 2 and 129 degrees of freedom is equal to 2.3442 If F > 2.3442 reject H0, otherwise do not reject H0 9.809 > 23442 so reject H0 and conclude that levels of Factors B do not have equal means. 

17) 

A two‐factor experiment yielded the following data: 

24 

 

                           Factor A 

Factor B  Level 1  Level 2  Level 3 

Level 1  375  402  395 

390  396  390 

Level 2  335  336  320 

342  338  331 

Level 3  302  485  351 

324  455  346 

 

a. Determine if there is interaction between factor A and factor B. Use the p‐value and a significance  level of 0.05.  b. Given your findings in part a, determine any significant differences among the response means of  the levels of factor A for level 1 of factor B.  c. Repeat part b at levels 2 and 3 of factor B, respectively.    a.     

   

HO: AB interaction does not exist,   

HA: AB interaction does exist 

F = MSAB/MSW = 39.63 F0.05 = 3.633.

Since F = 39.63 > F0.05 = 3.633, reject HO. Conclude that there is sufficient evidence to indicate that interaction exists between Factors A and B.

b. Since interaction exists, it is futile to conduct inference on the response means associated with the levels of Factor A and Factor B. Therefore, a one-way analysis of variance using only those values for Factor A associated with level one of Factor B.

25 

 

HO: 321 AAA    @ Level 1 of Factor B,   

HA: at least two levels of Factor A have different mean responses @ Level 1 of Factor B  

F = MSAB1/MSW = 2.90 F0.05 = 9.552.

Since F = 2.90 < F0.05 = 9.552, fail to reject HO. Conclude that there is not sufficient evidence to indicate that at 

least two levels of Factor A have different mean responses @ Level 1 of Factor B. 

c. Factor B at level 2:

HO: 321 AAA    @ Level 2 of Factor B,   

HA: at least two levels of Factor A have different mean responses @ Level 2 of Factor B  

F = MSAB2/MSW = 3.49 F0.05 = 9.552.

Since F = 3.49 < F0.05 = 9.552, fail to reject HO. Conclude that there is not sufficient evidence to indicate that at 

least two levels of Factor A have different mean responses @ Level 2 of Factor B. 

26 

 

Factor B at level 3: 

 

HO: 321 AAA    @ Level 3 of Factor B,   

HA: at least two levels of Factor A have different mean responses @ Level 3 of Factor B  

F = MSAB3/MSW = 57.73 F0.05 = 9.552.

Since F = 57.73 > F0.05 = 9.552, reject HO. Conclude that there is sufficient evidence to indicate that at least two 

levels of Factor A have different mean responses @ Level 2 of Factor B. 

Chapter 11 Power Point Slides.pdf

ff C

ha Analysis of VarianceAnalysis of Variance

pter

Chapter ContentsChapter Contents

11

11.1 Overview of ANOVA11.1 Overview of ANOVAO e e o OO e e o O 11.2 One11.2 One--Factor ANOVA (Completely Randomized Model)Factor ANOVA (Completely Randomized Model) 11.3 Multiple Comparisons11.3 Multiple Comparisonsp pp p 11.4 Tests for Homogeneity of Variances11.4 Tests for Homogeneity of Variances 11.5 Two11.5 Two--Factor ANOVA without Replication (Randomized Block Model)Factor ANOVA without Replication (Randomized Block Model) 11.6 Two11.6 Two--Factor ANOVA with Replication (Full Factorial Model)Factor ANOVA with Replication (Full Factorial Model) 11.7 Higher Order ANOVA Models (Optional)11.7 Higher Order ANOVA Models (Optional)

11-1

C ha

ff pter 1

Analysis of VarianceAnalysis of Variance

Chapter Learning Objectives (LO’s)Chapter Learning Objectives (LO’s)

11

p g j ( )p g j ( )

LO11LO11--1:1: Use basic ANOVA terminology correctlyUse basic ANOVA terminology correctlyLO11LO11--1:1: Use basic ANOVA terminology correctly.Use basic ANOVA terminology correctly. LO11LO11--2:2: Recognize from data format when oneRecognize from data format when one--factor ANOVA is factor ANOVA is

appropriateappropriateappropriate.appropriate.

LO11LO11--3:3: Interpret sums of squares and calculations in an ANOVA table.Interpret sums of squares and calculations in an ANOVA table. LO11LO11--4:4: Use Excel or other software for ANOVA calculations.Use Excel or other software for ANOVA calculations. LO11LO11--5:5: Use a table or Excel to find critical values for the Use a table or Excel to find critical values for the F distribution.F distribution. LO11LO11--6:6: Explain the assumptions of ANOVA and why they are important.Explain the assumptions of ANOVA and why they are important.

11-2

C ha

ff pter

Analysis of VarianceAnalysis of Variance

Chapter Learning Objectives (LO’s)Chapter Learning Objectives (LO’s)

11

LO11LO11--7:7: Understand and perform Tukey's test for paired means.Understand and perform Tukey's test for paired means. LO11LO11--8:8: Use Hartley's test for equal variances in Use Hartley's test for equal variances in c c treatment treatment

groupsgroups..

LO11LO11--9:9: Recognize from data format when twoRecognize from data format when two--factor ANOVA is factor ANOVA is needed.needed.

LO11LO11--10:10: Interpret main effects and interaction effects in twoInterpret main effects and interaction effects in two--factor factor ANOVA.ANOVA.

LO11LO11--11:11: Recognize the need for experimental design and GLM Recognize the need for experimental design and GLM (optional).(optional).

11-3

O f OO f O C

ha 11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--11

pter

LO11LO11--1: 1: Use basic ANOVA terminology correctly.Use basic ANOVA terminology correctly.

11

•• Analysis of variance (ANOVA) is a comparison of means.Analysis of variance (ANOVA) is a comparison of means. •• ANOVA allows one to compare more than two meansANOVA allows one to compare more than two meansANOVA allows one to compare more than two means ANOVA allows one to compare more than two means

simultaneously.simultaneously. •• Proper experimental design efficiently uses limited data to Proper experimental design efficiently uses limited data to p p g yp p g y

draw the strongest possible inferences.draw the strongest possible inferences.

11-4

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--11

The Goal: Explaining VariationThe Goal: Explaining Variation

11

• ANOVA seeks to identify sources of variation in a numerical dependent variable Y (the response variable). V i ti i Y b t it i l i d b• Variation in Y about its mean is explained by one or more categorical independent variables (the factors) or is unexplained (random error).( )

11-5

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--11

The Goal: Explaining VariationThe Goal: Explaining Variation

11

• Each possible value of a factor or combination of factors is a treatment.

• We test to see if each factor has a significant effect on Y using (for example) the hypotheses:

H0: 1 = 2 = 3 = 4 (e g mean defect rates are the same forH0: 1 = 2 = 3 = 4 (e.g. mean defect rates are the same for all four plants) H1: Not all the means are equal1 q

• The test uses the F distribution. • If we cannot reject H0, we conclude that observations within each 0

treatment have a common mean .

11-6

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--11

OneOne--Factor ANOVA ExampleFactor ANOVA Example

11

11-7

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--11

The Goal: Explaining VariationThe Goal: Explaining Variation

11

•• For example, a oneFor example, a one--factor ANOVA would test the hypothesis that factor ANOVA would test the hypothesis that the length of hospital stay (LOS) is affected by Type of Fracture:the length of hospital stay (LOS) is affected by Type of Fracture: Length of stay =Length of stay = ff(type of fracture) See Figure 11 3 (slide # 10)(type of fracture) See Figure 11 3 (slide # 10)Length of stay = Length of stay = ff(type of fracture). See Figure 11.3 (slide # 10).(type of fracture). See Figure 11.3 (slide # 10).

•• A twoA two--factor ANOVA would test the hypothesis that the length of factor ANOVA would test the hypothesis that the length of hospital stay (LOS) is affected by Type of Fracture and Age hospital stay (LOS) is affected by Type of Fracture and Age p y ( ) y yp gp y ( ) y yp g Group:Group: Length of stay = Length of stay = ff(type of fracture, age group)(type of fracture, age group)

•• We can also test for interaction between factors.We can also test for interaction between factors. • Another Example: Paint quality is a major concern of car makers.

A key characteristic of paint is its viscosity a continuousA key characteristic of paint is its viscosity, a continuous numerical variable. Viscosity is to be tested for dependence on application temperature (low, medium, high), as illustrated in

11-8

Figure 11.3 (slide# 10).

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--11

The Goal: Explaining VariationThe Goal: Explaining Variation

11

Figure 11 3

11-9

Figure 11.3

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVALO11LO11--66 11

LO11LO11--6: 6: Explain the assumptions of ANOVA and why they areExplain the assumptions of ANOVA and why they are importantimportant

ANOVA AssumptionsANOVA Assumptions

important.important.

•• Analysis of Variance assumes that theAnalysis of Variance assumes that the -- observations onobservations on YY are independentare independent-- observations on observations on YY are independent,are independent, -- populations being sampled are normal,populations being sampled are normal, -- populations being sampled have equalpopulations being sampled have equalpopulations being sampled have equal populations being sampled have equal

variances.variances. •• ANOVA is somewhat robust to departures from normality and ANOVA is somewhat robust to departures from normality and

equal variance assumptions.equal variance assumptions.

11-10

C ha

O f OO f O pter

11.1 Overview of ANOVA11.1 Overview of ANOVA

ANOVA CalculationsANOVA Calculations

11

• Software (e.g., Excel, MegaStat, MINITAB, SPSS) can be used to analyze data.

• Large samples increase the power of the test• Large samples increase the power of the test, but power also depends on the degree of variation in Y.

• Lowest power would be in a small sample with high variation in Y.Lowest power would be in a small sample with high variation in Y.

11-11

11 2 One11 2 One FactorFactor ANOVAANOVA C

ha 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

pter LO11LO11--22

D t F tD t F t

11LO11LO11--2: 2: Recognize from data format when oneRecognize from data format when one--factor ANOVA is factor ANOVA is appropriateappropriate..

•• A oneA one--factor ANOVA only compares the means of factor ANOVA only compares the means of cc groups groups ((t t tt t t f t l lf t l l ))

Data FormatData Format

((treatments treatments oror factor levelsfactor levels).). •• Consider the format for a oneConsider the format for a one--factor ANOVA with factor ANOVA with cc treatments, treatments,

denoteddenoted AA11 AA22 AAdenoted denoted AA11, A, A22, …, A, …, Ac.c.

Table 11.1 11-12

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--22

•• Sample sizes within each treatment doSample sizes within each treatment do notnot need to be equal (i eneed to be equal (i e Data FormatData Format

11

•• Sample sizes within each treatment do Sample sizes within each treatment do notnot need to be equal (i.e., need to be equal (i.e., balanced).balanced).

•• The total number of observations is equal toThe total number of observations is equal to nn == nn11 + n+ n22 + … + n+ … + nccThe total number of observations is equal to The total number of observations is equal to nn nn11 n n2 2 … n … ncc

Hypothesis to Be TestedHypothesis to Be TestedHypothesis to Be TestedHypothesis to Be Tested

• ANOVA tests all means simultaneously and so does not inflate the type I error.yp

11-13

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--22

A i l t t thA i l t t th f t d l i t th tf t d l i t th t

OneOne--Factor ANOVA as a Linear ModelFactor ANOVA as a Linear Model

11

•• An equivalent way to express the oneAn equivalent way to express the one--factor model is to say that factor model is to say that treatment treatment jj came from a population with a common mean (came from a population with a common mean () plus ) plus a treatment effect (a treatment effect (AAjj) plus random error () plus random error (ijij):):a treatment effect (a treatment effect (AAjj) plus random error () plus random error (ijij):):

•• yyijij = =  + + AAjj + + ijij jj = 1, 2, …, = 1, 2, …, cc and and ii = 1, 2, …, = 1, 2, …, nn

•• Random error is assumed to be normally distributed with zero Random error is assumed to be normally distributed with zero mean and the same variance for all treatments.mean and the same variance for all treatments.

11-14

C ha

11 2 One11 2 One Factor ANOVAFactor ANOVA pter 11.2 One11.2 One--Factor ANOVAFactor ANOVA (Completely Randomized Model)(Completely Randomized Model)

LO11LO11--22

A fi d ff t d l l l k t h t h t th

OneOne--Factor ANOVA as a Linear ModelFactor ANOVA as a Linear Model

11

• A fixed effects model only looks at what happens to the response for particular levels of the factor.

H0: A1 = A2 = … = Ac = 0H0: A1 A2 … Ac 0 H1: Not all Aj are zero

• If the H0 is true, then the ANOVA model collapses to yij =  + ijj j

11-15

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--22

Group MeansGroup Means

11

•• The mean of each group is calculated as:The mean of each group is calculated as:

•• The overall sample mean (grand mean) can be calculated as:The overall sample mean (grand mean) can be calculated as:

11-16

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--22

Partitioned Sum of SquaresPartitioned Sum of Squares

11

•• For a given observation For a given observation yyijij, the following relationship must hold, the following relationship must hold

11-17

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--22

•• This relationship is true for sums of squared deviations yieldingThis relationship is true for sums of squared deviations yielding

Partitioned Sum of SquaresPartitioned Sum of Squares

11

•• This relationship is true for sums of squared deviations, yielding This relationship is true for sums of squared deviations, yielding partitioned sum of squarespartitioned sum of squares::

•• Simply put, Simply put, SSTSST = = SSA SSA ++ SSESSE

11-18

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--22

• SSA and SSE are used to test the hypothesis of equal treatment

Partitioned Sum of SquaresPartitioned Sum of Squares

11

• SSA and SSE are used to test the hypothesis of equal treatment means by dividing each sum of squares by it degrees of freedom to adjust for group size. j g p

• These ratios are called Mean Squares (MSA and MSE). • The resulting test statistic is F = MSA/MSE.

11-19

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--33 11

LO11LO11--3: 3: Interpret sums of squares and calculations in an ANOVA table.Interpret sums of squares and calculations in an ANOVA table.

Partitioned Sum of SquaresPartitioned Sum of Squares

11-20

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--33

Partitioned Sum of SquaresPartitioned Sum of Squares

11

• The ANOVA calculations are mathematically simple but involve tedious sums.

•• One can use Excel’s oneOne can use Excel’s one--factor ANOVA menu using Datafactor ANOVA menu using DataOne can use Excel s oneOne can use Excel s one factor ANOVA menu using Data factor ANOVA menu using Data Analysis to analyze data.Analysis to analyze data.

11-21

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--33

Test StatisticTest Statistic

11

• The F distribution describes the ratio of two variances. • The F statistic is the ratio of the variance due to treatments (MSA)

to the variance due to error (MSE)to the variance due to error (MSE).

11-22

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--33

Test StatisticTest Statistic

11

• When F is near zero, then there is little difference among treatments and we would not expect to reject the hypothesis of equal treatment meansequal treatment means.

Decision RuleDecision Rule

• F cannot be negative has no upper limit.ca o be ega e as o uppe • For ANOVA, the F test is a right-tailed test. • Use Appendix F or Excel (or other approptriate software) to obtain pp ( pp p )

the critical value of F for a given 

11-23

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--55 11

LO11LO11--5: 5: Use a table or Excel to find critical values for the Use a table or Excel to find critical values for the F distributionF distribution.

Decision Rule for an FDecision Rule for an F--testtest

11-24

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

11

Example: Carton PackingExample: Carton Packing.. Is the variation among stations within the range attributable toIs the variation among stations within the range attributable to chance, or do these samples indicate actual differences in the means?

11-25

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

11

Example: Carton PackingExample: Carton Packing.. As a preliminary step we plot the data to check for any timeAs a preliminary step, we plot the data to check for any time pattern and just to visualize the data. We see some potential differences in means, but no obvious time pattern (otherwise we would have to consider observation order as a second factor).

11-26

Figure 11.6

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

11

Example: Carton PackingExample: Carton Packing..

11-27

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--55 11

LO11LO11--5: 5: Use a table or Excel to find critical values for the Use a table or Excel to find critical values for the F distribution.F distribution.

Example: Carton PackingExample: Carton Packing..

11-28

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

LO11LO11--44 11

LO11LO11--4: 4: Use Excel or other software for ANOVA calculations.Use Excel or other software for ANOVA calculations.

Example: Carton PackingExample: Carton Packing..

11-29

C ha

11 2 One11 2 One FactorFactor ANOVAANOVA pter 11.2 One11.2 One--Factor Factor ANOVAANOVA (Completely Randomized (Completely Randomized Model)Model)

11

Example: Carton PackingExample: Carton Packing..

11-30

11 3 M lti l11 3 M lti l C i T tC i T t C

ha 11.3 Multiple 11.3 Multiple Comparison TestsComparison Tests

pter LO11LO11--77

11

LO11LO11--7: 7: Understand and perform Tukey's test for paired means.Understand and perform Tukey's test for paired means.

Tukey’s TestTukey’s Test

•• After rejecting the hypothesis of equal mean, we naturally want to After rejecting the hypothesis of equal mean, we naturally want to know: Which means differ significantly?know: Which means differ significantly?

•• In order to maintain the desired overall probability of type I error aIn order to maintain the desired overall probability of type I error a•• In order to maintain the desired overall probability of type I error, a In order to maintain the desired overall probability of type I error, a simultaneous confidence intervalsimultaneous confidence interval for the difference of means must for the difference of means must be obtained. be obtained.

•• For For cc groups, there are groups, there are cc((cc –– 1)/2 distinct pairs of means to be 1)/2 distinct pairs of means to be compared.compared.

•• These types of comparisons are calledThese types of comparisons are called Multiple ComparisonMultiple Comparison•• These types of comparisons are called These types of comparisons are called Multiple Comparison Multiple Comparison TestsTests..

11-31

C ha

11 3 M lti l11 3 M lti l C i T tC i T t pter

11.3 Multiple 11.3 Multiple Comparison TestsComparison TestsLO11LO11--77

Tukey’s TestTukey’s Test

11

•• Tukey’s studentized range testTukey’s studentized range test (or (or HSDHSD for “honestly for “honestly significant difference” test) is a multiple comparison test that significant difference” test) is a multiple comparison test that has good power and is widely usedhas good power and is widely usedhas good power and is widely used.has good power and is widely used.

•• Named for statistician John Wilder Tukey (1915 Named for statistician John Wilder Tukey (1915 –– 2000)2000) •• This test is not available in Excel’s Tools > Data Analysis butThis test is not available in Excel’s Tools > Data Analysis but•• This test is not available in Excel s Tools > Data Analysis but This test is not available in Excel s Tools > Data Analysis but

is available in is available in MegaStat MegaStat andand MinitabMinitab..

11-32

C ha

11 3 M lti l11 3 M lti l C i T tC i T t pter

11.3 Multiple 11.3 Multiple Comparison TestsComparison TestsLO11LO11--77

Tukey’s TestTukey’s Test

11

• Tukey’s is a two-tailed test for equality of paired means from c groups compared simultaneously. The hypotheses are:• The hypotheses are:

Decision RuleDecision Rule

Where Tc,n−c is a critical value of the Tukey testvalue of the Tukey test statistic Tcalc for the desired level of significancesignificance.

11-33

C ha

11 3 M lti l11 3 M lti l C i T tC i T t pter

11.3 Multiple 11.3 Multiple Comparison TestsComparison TestsLO11LO11--77

F l h i th 5% f t d ti dF l h i th 5% f t d ti d

Tukey’s TestTukey’s Test

11

•• For example, here is the upper 5% of studentized range:For example, here is the upper 5% of studentized range:

11-34

C ha

11.4 Tests 11.4 Tests for Homogeneity of Variancesfor Homogeneity of Variances pter

LO11LO11--88 11

LO11LO11--8: 8: Use Hartley's test for equal variances in Use Hartley's test for equal variances in c c treatment groups.treatment groups.

ANOVA th t b ti th i bl

ANOVA AssumptionsANOVA Assumptions

• ANOVA assumes that observations on the response variable are from normally distributed populations that have the same variance.

• The one-factor ANOVA test is only slightly affected by inequality of variance when group sizes are equal.

• One can test this assumption of homogeneous variancesby using Hartley’s Fmax Test.

11-35

C hapter

11.4 Tests 11.4 Tests for Homogeneity of Variancesfor Homogeneity of VariancesLO11LO11--88

Th h th

Hartley’s TestHartley’s Test

11

• The hypotheses are

• The test statistic is the ratio of the largest sample variance to the smallest sample variancesmallest sample variance

11-36

C hapter

11.4 Tests 11.4 Tests for Homogeneity of Variancesfor Homogeneity of VariancesLO11LO11--88

Hartley’s TestHartley’s Test

11

• The decision rule is:

11-37

C hapter

11.4 Tests 11.4 Tests for Homogeneity of Variancesfor Homogeneity of VariancesLO11LO11--88

Hartley’s TestHartley’s Test

11

• Assuming equal group sizes,group sizes, critical values of Fmax are found

i dusing degrees of freedom

11-38

C hapter

11.4 Tests 11.4 Tests for Homogeneity of Variancesfor Homogeneity of VariancesLO11LO11--66 11

LO11LO11--6: 6: Explain the assumptions of ANOVA and why they are important.Explain the assumptions of ANOVA and why they are important.

Levene’s TestLevene’s Test

•• Levene’s test is a more robust alternative to Hartley’s Levene’s test is a more robust alternative to Hartley’s FF test.test. •• Levene’s test does not assume a normal distribution.Levene’s test does not assume a normal distribution. •• It is based on the distances of the observations from their sample It is based on the distances of the observations from their sample

mediansmedians rather than their sample rather than their sample means.means. A ( MINITAB) i d d f hiA ( MINITAB) i d d f hi•• A computer program (e.g., MINITAB) is needed to perform this A computer program (e.g., MINITAB) is needed to perform this test.test.

11-39

C hapter

11.4 Tests 11.4 Tests for Homogeneity of Variancesfor Homogeneity of VariancesLO11LO11--66

Levene’s TestLevene’s Test

11

11-40

C hapter

Please refer to your text for information on Sections 11.5, 11.6 and 11.7 11on Sections 11.5, 11.6 and 11.7

11-41

Zipped Chapter 15 Material.zip

Chapter 15 Notes.pdf

1   

Chi‐ Square Tests 

The Binomial Situation 

In the binomial situation, the following four conditions must be satisfied: 

1. The experiment consists of n repetitions, called trials. 

2. The trials are independent. 

3. Each trial has two (and only two) possible outcomes, referred to as success and failure. 

4. The probability of a success for each trial is p, where p remains the same for each trial. For a large 

finite population, p is the proportion of successes in this population. 

Consequently, the binomial distribution applies to applications where there are only two possible 

outcomes. 

Inferences for the Binomial Situation 

To estimate the binomial parameter, p, we obtained a random sample of size n and observed the 

number of successes, x. The estimator of p, the proportion of successes in the population, was 

p̂=x/n= the proportion of successes in the sample. We also discussed earlier the hypothesis testing 

for p. As an example, we considered a binomial situation in which a calculator was either defective 

(with probability p) or not a defective. The hypothetical value of p was .04, and we determined 

whether the results of the sample (13 defectives out of 150) indicated a departure from this 

percentage. Here p̂ =13/150 = .0867. So, 8.67% of the sampled calculators were defective. Is this 

percentage large enough for us to conclude that p is different from .04, or is this large value of p̂ just 

due to the fact that we tested a sample and not the entire population‐ that is, is this sampling error? 

The resulting test statistic was 

 

By comparing Z* =2.92 with the value 1.96 in the normal table, we rejected H0 using =.05; that is  the proportion of defective calculators was not 4%. The corresponding p‐value was .0036. 

Another Test for H0 : p = p0 versus Ha : p  p0 

There is another test for a two‐tailed test on p. This new test extends easily to a situation in which 

there are more than two possible outcomes for each trial: the multinomial situation. 

To demonstrate this new testing procedure, the chi‐square goodness‐of‐fit test, let’s look at the lot 

sampling example. Note that the population consists of two categories‐ defective (category 1) and 

non‐defective (category 2). Let p1 = the proportion defectives in the population and p2 = the 

proportion of non‐defectives in the population. In the previous solution, p1 =p and p2 = 1‐p. 

We observed 13 sample values in category 1 (defective) and 136 in category 2. So we define 

2   

O1 =13 

O2 =137 

How many units do we expect to see in each category if H0 is true? The hypotheses here can be 

written 

H0 : p1 = .04, p2 = .96 

Ha : p1  .04, p2  .96 

This means that if H0 is true, then, on average, 4% of the sample values should be defective 

(category 1) and 96% should be non‐defective (category 2). Define 

E1 = expected number of sample values in category 1 if H0 is true= (150)(.04) = 6.0 

E2 = expected number of sample values in category 2 if H0 is true= (150)(.96) = 144.0 

We next define a test statistic that has an approximate chi‐square distribution: 

 

where the summation is over all categories (two here). In previous uses of this distribution, its shape 

depended on the sample size, specified by the degrees of freedom (df). Now the shape depends on 

the number of categories, and 

df= number of categories – 1 

For the binomial situation, 

df = 2 ‐ 1 =1 

Therefore, for any binomial application, the test statistic in the above equation has a chi‐square 

distribution with 1 df. 

Let us consider an example: 

Analyze the lot sampling data using the chi‐square test statistic and a significance level of =.05. 

Step 1. The hypotheses are 

H0 : p1 = .04, p2 = .96 

Ha : p1  .04, p2  .96 

Step 2. The test statistic is 

3   

 

Step 3. If H0 is not true (Ha is true), we expect the observed values to be different from the expected 

values, resulting in a large value for 2. So the procedure is to reject H0 if the chi‐square test statistic  lies in the right tail. Consequently, we 

Reject H0 if  2  > 2.05,1 

where 2.05,1 is the  2  value having a right tail area of .05 with 1 df. Using the chi‐square table, this 

value is 3.84. Therefore, we  

reject  H0  if  2  > 3.84 

Step 4. We have 

O1 =13    E1 = 6 

O2 = 137  E2 = 144 

(Note that O1 + O2 = E1 + E2 = 150.) The calculated value of the test statistic is 

 

This value is larger than 3.84, so we rejected H0. 

Step 5. We conclude, as before, that the proportion of defectives (p1) is not .04. 

The p‐value for the above example using the chi‐square analysis is shown in the figure below: It is 

the shaded area to the right of 8.51. 

 

Using the chi‐square table, all we can say is that this value is less than .005. The actual is .0036 

(calculated using a statistical software package). This is the same p‐value we obtained when Z* was 

used to perform this test of hypothesis. 

4   

Using the results from the lot‐sampling example, we find that: 

1. 2* =8.51 = (2.92)2 = (Z*)2. 

2. The table values for the rejection region are 1.96 for the Z test and 3.84 = (1.96) 2  for the 2 test. 

3. The p‐value test for each test was the same. 

So, again we have two testing procedures that produce identical conclusions. The chi‐square test, 

however, extends easily of the multinomial situation. The chi‐square goodness‐of‐fit test is an 

extension of the Z test used to test a binomial parameter. Furthermore, there is a definite 

relationship between the standard normal distribution (Z) and the chi‐square distribution: the 

square of Z always is a chi‐square random variable with 1 df. 

The Multinomial Situation 

The multinomial situation is identical to the binomial situation, except there are k possible outcomes 

on each trial rather than two. Here, k is an integer that is at least 2. Suppose that the management 

of a firm is concerned with how its employees feel about management, in particular, do the 

employees feel that the management is responsive to employee suggestions? A quality consultant 

has informed the management team charged with examining this situation that traditionally the 

following percentages are observed in companies of this size: 

Category  Description  Percentage of Employees in 

This Category 

1  Management is extremely responsive to  employee suggestions 

.05 

2  Management is somewhat responsive to  employee suggestions 

.30 

3  No opinion  .20 

4  Management is not usually responsive to  employee suggestions 

.40 

5  Management is rarely responsive to  employee suggestions 

.05 

The management team would like to verify these percentages among its own employees and obtains 

responses to the question, “Is management responsive to employee suggestions?” from a random 

sample of 500 employees. Possible responses to this question are the 5 categories just listed, and 

the following frequencies are observed in each category for this sample: 

 

 

5   

Category  Frequency 

1  32 

2  142 

3  87 

4  221 

5  18 

                                        Total                                                                                      500 

The assumptions necessary for a multinomial experiment are as follows: 

1. The experiment consists of n independent repetitions(trials). 

2. Each trial outcome falls into exactly one of k categories. 

3. The probabilities of the k outcomes are denoted by p1, p2 , . . . pk , where these probabilities 

(proportions ) remain the same on each trial. Also p1 + p2 + . . .  + pk = 1. 

For this situation, we can define k random variables as the k observed values, where 

O1 = observed number of sample values in category 1 

O2 = observed number of sample values in category 2 

Ok = observed number f sample values in category k 

For our example, n=500 trials, where each trial consists of obtaining an employee response to the 

question dealing with management response to employee suggestions. There are k=5 possible 

responses (categories) for this experiment. Assuming these 500 Tucker Industries employees 

constitute a random sample, then these trials are independent. Also, let 

P1 = proportion of people responding in category 1 

P2  = proportion of people responding in category 2 

P5 = proportion of people responding in category 5 

6   

The 5 random variables in our example are 

O1 = observed number of Tucker employees in the sample responding to category 1 

O5 = observed number of Tucker employees in the sample responding to category 5 

Thus, this example fits the assumptions for the multinomial situation. 

Hypothesis Testing for a Multinomial Situation 

The hypotheses for the above example are: 

H0 : p1 =.05, p2 =.30, p3 = .20, p4=.40, p5=.05 

Ha : at least one of the pi’s is incorrect 

Notice that Ha is not p1 ≠ .05, p2 ≠ .30, . . . , p5 ≠ .05. This hypothesis is too strong and is not the 

opposite of H0.  

Let p1,0 be any specified value of p1, p2,0, any specified value of p2 and so on. The hypotheses to test 

the multinomial parameters are 

H0 : p1 = p1,0, p2 = p2,0, . . . , pk= pk,0 

Ha : at least one of the pi’s is incorrect 

Using the observed values (O1, O2, . . .), the point estimates here are 

p̂1 = estimate of p1 = O1 / n 

p̂2 = estimate of p2 = O2 / n 

To test H0 versus Ha, we use the chi‐square statistic in the following equation: 

 

where 

1. The summation is across all categories (outcomes). 

7   

2. The Os are the observed frequencies in each category using the sample. 

3. The Es are the expected frequencies in each category if H0 is true, so 

E1 = np1,0 

E2 = np2,0 

E3 =np3,0 

4. The df for the chi‐square statistic are k‐1, where k is the number of categories. 

To carry out the test, 

Reject H0 if χ 2  >   χ 2 α, df 

This test is called the chi‐square goodness‐of‐fit test. To define the rejection region, notice that 

when Ha is true, we would expect the O’s and the E’s to be “far apart,” because the E’s are 

determined by assuming that H0 is true. In other words, if Ha is true, the chi‐square test statistic 

should be large. Consequently, we always reject H0 when χ 2 * lies in the right tail when using this 

particular statistic. 

Notice that the hypothetical proportions (probabilities) for each of the categories are specified in H0. 

Consequently, we will complete the analysis by concluding that at least one of the proportions is 

incorrect (we reject H0) or that there is not enough evidence to conclude that these proportions are 

incorrect (we fail to reject H0). We do not accept H0; we never conclude that these specified 

proportions are correct. We act like the juror who acquits a defendant not because he or she is 

convinced that this person is innocent but because there was not sufficient evidence for conviction. 

When we consider the ANOVA technique, this procedure allows us to determine whether many 

population means were equal using a single test. This technique was preferable to using many t tests 

to test the equality of two means, one pair at a time, because these tests would not be independent, 

and the overall significance level would be difficult to determine. We encounter the same situation 

here. It is much better to use a chi‐square goodness‐of‐fit test to test all of the proportions at once 

rather than using many Z tests to test the individual proportions. 

Let us consider an example (continuation of the example we saw earlier). What do the observed 

number of the firm’s employees’ in each category for the sample 0f 500 employees tell us about the 

mix of responses to this question for all the firm’s employees’? Do they conform to the percentages 

cited by the quality consultant? Use a significance level of .05. 

Step 1. Let p1 = proportion of all the firm’s employees that would respond in category 1 to the 

question; that is, they all feel that management is extremely responsive to employee suggestions. 

8   

Similarly, define p2, p3, p4, and p5 to be the corresponding percentages for categories 2, 3, 4, and 5. 

The hypotheses under investigation are 

H0 : p1 =.05, p2 =.30, p3 = .20, p4=.40, p5=.05 

Ha : at least one of the pi’s is incorrect 

Step 2. The test statistic is 

 

where the summation is over the five categories. 

Step 3. The test procedure here is to  

Reject H0  if  χ 2  >   χ 2 α, df 

The df is (number of categories) ‐1, so df = 5‐1 = 4. The chi‐square value from the chi square table is 

χ 2 .05, 4 = 9.49, and we 

reject  H0 if χ 2   > 9.49 

Step 4. The observed values are 

O1 =32, O2 =142, O3 =87, O4 =221, O5 =18 

The expected values when H0 is true are obtained by multiplying b = 500 by each of the proportions 

in H0. So  

E1 = (500) (.05) = 25 

E2 = (500) (.30) = 150 

E3 = (500) (.20) = 100 

E4 = (500) (.40) = 200 

E5 = (500) (.05) = 25 

In general, do not round the expected values, because they are averages. 

The computed value of the chi‐square test statistic is 

 

Because 8.242 does not exceed 9.49, we fail to reject H0. 

9   

Step 5. There is insufficient evidence to indicate that the proportion of the firm’s employees in each 

response category differs from the proportions stated by the quality consultant. In other words, the 

observed values were “close enough” to the expected values under H0 to let this hypothesis stand. 

Examining categories 4 and 5, this indicates that 45% of the firm’s employees feel that management 

is not response on some level to employee suggestions. Obviously, there is a great deal of room for 

improvement in this area of management relations. 

Pooling Categories 

When using the chi‐square procedure of comparing observed and expected values, we determine 

the difference between these two values for each category, square it, and divide by the expected 

value, E. If one value of E is very small (say, less than 5), then this computation produces an 

extremely large contribution to the final χ 2  value from this category. In other words, this small 

expected value produces an inflated chi‐square value, with the result that we reject H0 when 

perhaps we should not have. To prevent this from occurring, we should use the following rule: When 

using the equation, each expected value, E, should be at least 5. 

If we encounter an application where one or more of the expected values is less than 5, we can 

handle this situation by pooling our categories such that each of the new categories has an expected 

value that is at least 5. 

Chi‐Square Tests of Independence 

Earlier, we classified each member of a population into one of many categories. This classification 

was one‐dimensional, because each member was classified using only one criterion (brand, color, 

and so on). Here, we extend the classification to a two‐dimensional situation, in which each element 

in the population is classified according to two criteria, such as gender and income level (high, 

medium, or low). The question of interest is, are these two variables (classifications) independent? 

For example, if gender and income level are not independent, perhaps gender discrimination is 

present in salary structure of a company. If a person’s salary is not related to gender, these two 

classifications would be independent. 

Let us consider a survey concerned with the age and gender of the purchasers of a recently released 

smartphone. The results were summarized in a contingency (or cross‐lab) table. This table consisted 

of cells, where each cell contains the frequency of people in the sample who satisfy each of the 

various cross‐classifications: 

Gender  Age<30  Age 30‐45   Age>45  Total 

Male  60  20  40  120 

Female  40  30  10  80 

Total  100  50  50  200 

 

This 2 x 3 contingency table shows that there were 60 people who were both male and under 30. 

Say, we have determined various probabilities for a person selected at random from this group of 

200, such as the probability that this person is both a male and over 45 years. Now we will view 

these data as the results of a particular experiment (survey) and attempt to determine whether the 

10   

variables – age and gender‐ are independent for this application. Put another way, is the age 

structure of the male buyers the same as that for the female purchasers? The hypotheses are 

H0 : the classifications (age and gender) are independent 

Ha : the classifications are dependent 

This problem can also be viewed as a multinomial experiment containing 200 trials and (2)(3) =6 

possible categories for each trial outcome. 

Deriving a Test for Hypothesis for Independent Classifications 

We want to decide whether the data about the purchasers exhibit random variation or a pattern of 

some type due to a dependency between age and gender. If these classifications are independent 

(H0 is true), how many people would we expect in each cell? Consider the upper right cell, which 

shows males over 45 years. The expected number of sample observations in this cell is 200 ∙ P 

(sampled purchaser is a male and over 45). Assuming independence, this is 200 ∙ P (sampled 

purchaser is a male) ∙ P (sampled purchaser is over 45), using the multiplicative rule for independent 

events. 

What is P (sampled purchaser is a male)? We do not know, because we do not have enough 

information to determine what percentage of all purchasers are male. However, we can estimate 

this probability using the percentage of males in the sample 120/20=.6. 

Similarly, P (sampled purchaser is over 45) can be estimated by the fraction of people over 45 in the 

sample‐ namely, 50/200. So our estimate of the expected number of observations for this cell is: 

 

So, for this cell, the observed frequency is O= 40, and or estimate of the expected frequency (if H0 is 

true) is E hat=30. In general, 

 

where n= total sample size. A summary of the calculations can be tabulated as follows. 

Gender  Age  Observed(O)  Expected(E hat) if H0 is  True 

Male  <30  60  (120)(1o0)/200=60 

30‐45  20  (120)(50)/200=30 

>45  40  (120)(50)/200=30 

Female  <30  40  (80)(100)/200=40 

30‐45  30  (80)(50)/200=20 

>45  10  (80)(50)/200 

  200  200 

11   

The easiest way to represent these 12 values is to place the expected value in parentheses alongside 

the observed value in each cell: 

Gender  Age<30  Age 30‐45  Age>45  Total 

Male  60(60)  20(30)  40(30)  120 

Female  40(40)  30(20)  10(20)  80 

Total  100  50  50  200 

 

Pooling 

At this point, we need to check our expected values. If any one of them is less than 5, we need to 

combine, or pool, the column (or row) in which this small value occurs with another column (or row) 

to comply with our early requirement that all expected values in the chi‐square statistic are at least 

5. The observed and expected values for this new column (row) are obtained by summing the values 

for the two columns (rows). 

The Test Statistic 

The test statistic for testing H0: the classifications are independent versus Ha: the classifications are 

dependent is the usual chi‐square statistic, which in this case compares each observed frequency 

with the corresponding expected frequency estimate. 

 

where the summation is over all cells of the contingency table. 

Degrees of Freedom 

In the multinomial situation, the degrees of freedom for the chi square statistic were k‐1, where k = 

the number of categories (outcomes). In this situation, there were k values of (O‐E hat). However, 

because the sum of the observed frequencies is the same as the sum of the expected frequencies, 

the sum of the values of (O‐E hat) is always 0. It means that, of these k values, only k‐1 are free to 

vary, resulting in k‐1 df for the chi‐square statistic. 

Take a close look at the observed and expected frequencies in the contingency table for age and 

gender of purchasers. Notice that (1) for each row, sum of O’s = sum of E hat’s and (2) for each 

column, sum of O’s = sum of E hat’s. In general, if classification 1 has c categories and classification 2 

has r categories, we construct an r x c contingency table (see figure below). 

12   

 

Of the c values of (O‐E hat) in each row, only (c‐1) are free to vary. Similarly, only (r‐1) of the values 

in each column are free to assume any value. So, for this contingency table, only (r‐1)(c‐1) values are 

free to vary. Therefore, for the chi‐square test of independence, 

df = (c‐1)(r‐1) 

Testing Procedure 

When H0 is not true, the expected frequencies and observed frequencies will be very different, 

producing a large 2 value. We again reject H0 if the value of the test statistic falls in the right‐tail  rejection region, so we 

reject H0 if  2   > 2α,df 

where df = (r‐1)(c‐1) 

In summary, the chi‐square test of independence hypotheses are: 

H0 : the row and column classifications are independent (not related) 

Ha : the row and column classifications are dependent (related or associated in some way) 

The test statistic is 

 

where 

1. the summation is over all cells of the contingency table consisting of r rows and c columns 

2. O is the observed frequency in the cell. 

3. E hat is the estimated frequency for this cell 

13   

 

4. The degrees of freedom for the chi‐square statistic are df = (r1) (c‐1). The test procedure is (using 

chi‐square table): 

reject H0 if  2   > 2α,df 

We can now return to our question of whether age and gender of smartphone purchasers are 

independent. Step 1 (statement of hypotheses) and step 2 (definition of test statistic) of our five‐

step procedure have been discussed already. Assume that a significance level of α=.1 was specified. 

For step 3, the df are (2‐1)(3‐1) =2. Using the chi‐square table, 2.1,2 =4.61. So, we will reject H0 if  

2 > 4.61. For step 4, referring to the contingency table, 

 

This exceeds the table value of 4.61, so we reject H0. We thus conclude that the age and gender 

classifications are not independent (step5). 

If the results of the chi‐square statistic lead to a conclusion that the classifications are not 

independent, a closer look at the individual terms in the chi‐square statistic can often reveal what 

the relationship is between these 2 variables. 

Examining the six terms, we observe four large values, namely, 3.33(male/age 30‐45), 3.33(male/age 

over 45), 5(female/age 30‐45), and 5(female/age over 45). We obtained more men (and fewer 

women) over 45 years than we would expect if there was no dependency. Similarly, there were 

fewer men (and more women) between 30 and 445 years. 

We can find the p‐value for this situation also, given 2* = 16.66. Using a 2 curve with 2 df, the area  to the right of 16.66, using the chi‐square table is <.005. The p‐value indicates the strength of the 

dependency between two classifications. The smaller the p‐value, the more we tend to support the 

alternative hypothesis, which indicates a stronger dependency between the two variables. For the 

age and gender illustration, p<.005, so we conclude that the age and gender of these purchasers are 

strongly related. 

Now, it is possible that examining 1 category (such as gender) can fail to show any differences 

among sub‐categories (male versus female), but when the category is examined along with another 

category (such as age classification), patterns can emerge. Such a technique is often useful in 

detecting job discrimination within firms. For example, no gender discrimination may be evident in a 

sample, but when it is examined along with race or age categories, certain discriminatory practices 

can be identified. 

14   

Let us consider an example. The human resources manager at a computer firm is interested in 

determining whether an employee’s educational level has an effect on his or her job knowledge. An 

exam was given to a sample of 120 employees, and the human resources manager would like to 

know whether there is a difference in exam performances among 3 groups: (1) those with a high 

school diploma only, (2) those with a bachelor’s degree only, and (3) those with a master’s degree. 

Rather than using the actual exam scores, and performing a one‐factor analysis of variance, she 

rated each person’s exam performance as high, average, or low. The results of the study are as 

follows: 

  High  Average  Low  Total 

Master’s Degree  4  20  11  35 

Bachelor’s Degree  12  18  15  45 

High School Diploma  9  22  9  40 

Total  25  60  35  120 

 

Does job knowledge as measured by the exam appear to be related to the level of an employee’s 

education, at this particular firm? Use α=.05. 

Step 1.  This problem calls for a chi‐square test of independence, with hypotheses 

H0 : exam performance is independent of educational level 

Ha : these classifications are dependent 

Step 2 and 3. Our test statistic is the chi‐square statistic in 

  

The table of frequencies here is a 3 x 3 contingency table, which means that the degrees of freedom 

are df = (3‐1)(3‐1) =4. From the chi‐square table, we determine that 2.05,4 =9.49, so the testing  procedure is to 

reject H0 if  2  > 9.49 

Step  4.  Computing the expected frequency estimates in the usual way, we arrive at the following 

table: 

  High  Average  Low  Total 

Master’s Degree  4(7.29)  20(17.5)  11(10.21)  35 

Bachelor’s Degree  12(9.38)  18(22.5)  15(13.12)  45 

High School Diploma  9(8.33)  22(20.0)  9(11.67)  40 

Total  25  60  35  120 

 

To illustrate the calculations, the 11.67 in the lower right cell is (40x35)/120. The computed chi‐

square value is 

15   

 

This value is less than 9.49, and so we fail to reject H0. 

Step 5. We see no evidence of a relationship between job knowledge as measured by the exam and 

level of education 

We do not conclude that these data demonstrate that the two classifications are clearly 

independent, because this would amount to accepting H0. We are simply unable to demonstrate 

that a relationship exists. 

Sample Problems - Chapter 15.pdf

1   

Sample Problems 

1) 

A large retailer receives shipments of batteries for consumer electronic products in packages of 50 

batteries. The packages are held at a distribution center and are shipped to retail stores as 

requested. Because some packages may contain defective batteries, the retailer randomly samples 

400 packages from its distribution center and tests to determine whether the batteries are defective 

or not. The most recent sample of 400 packages revealed the following observed frequencies for 

defective batteries per package: 

# of Defective Batteries per Package  Frequency of Occurrence 

0  165 

1  133 

2  65 

3  28 

4 or more  9 

  The retailer’s managers would like to know if they can evaluate this sampling plan using a binomial  distribution with n=50 and π=0.02. Test at α=0.01 level of significance.   

# of Defective Batteries Per

Package Observed

(o) Binomial Probability

n=50, p = 0.02

Expected Frequency

(e) (oi-ei) 2/ei

0 165 0.36417 145.668 2.5656

1 133 0.37160 148.641 1.6458

2 65 0.18580 74.320 1.1688

3 28 0.06067 24.268 0.5740

4 or more 9 0.01776 7.103 0.5065

Total 400 6.4607

 

The calculated chi‐square test statistic is χ 2  = 6.4607.  

 

The decision rule is: 

If χ 2  > 13.2767, reject Ho; 

Otherwise, do not reject Ho. 

Because χ 2  = 6.4607 < 13.2767, do not reject the null hypothesis. 

We conclude, based on the sample information and the results of the goodness-of-fit test that the binomial distribution with n = 50 and π = 0.02 is an appropriate distribution for describing the company’s sampling plan.  

2   

2) 

The following frequency distribution shows the number of times an outcome was observed from the 

toss of a die. Based on the frequencies that were observed from 2400 tosses of the die, can it be 

concluded at the 0.05 level of significance that the die is fair? 

Outcome  Frequency 

1  352 

2  418 

3  434 

4  480 

5  341 

6  375 

 

()oee    

(35 00)( 8 00)( 3 00)( 80 00)(3 00)(375 00) 00 00 00 00 00 00

 

=5.76 + 0.81 + 2.89 + 16 + 8.7025 + 1.5625 = 35.725. 

The decision rule is: If χ 2  > 11.0705, reject Ho; Otherwise, do not reject Ho. 

Because χ 2  = 35.725 > 11.0705, reject the null hypothesis. 

We conclude, based on the sample information and the results of the goodness-of-fit test that the die is not fair. The distributions of outcomes for this die are not uniformly distributed. 3) 

Based on the sample data in the following frequency distribution, conduct a test to determine 

whether the population from which the sample data were selected id Poisson distributed with mean 

equal to 6. Test using α=0.05. 

x  Frequency  x  Frequency 

2 or less  7  9  53 

3  29  10  35 

4  26  11  28 

5  52  12  18 

6  77  13  13 

7  77  14 or more  13 

8  72  Total  500 

3   

 

Now you need to check to see if any of the expected cell frequencies are less than 5.  In this case we see that 

there are two instances where this is the case.  To deal with this, you should collapse categories so that all 

expected frequencies are at least 5.  Doing this gives the following: 

x o

Frequency Poisson

Probability

e Expected Frequency

2 or less 7 0.062 29.39

3 29 0.0892 42.28

4 26 0.1339 63.47

5 52 0.1606 76.12

6 77 0.1606 76.12

7 77 0.1377 65.27

8 72 0.1033 48.96

9 53 0.0688 32.61

10 35 0.0413 19.58

11 18 0.0225 10.67

12 or more 44 0.0201 9.53

Total 474 1 474

 

Now we can compute the chi‐square test statistic as follows: 

  

 

 

 

 62.218 53.9

)4453.9(

28.42

)28.4229(

39.29

)39.297()( 22222  e

eo     

4   

Because  0370.1862.2182  , we reject the null hypothesis.  The population distribution is not Poisson  distributed with a mean of 6.   

4)   

A chi‐square goodness‐of‐fit test is to be conducted to test whether a population is normally 

distributed. No statement has been made regarding the value of the popular mean and standard 

deviation. A frequency distribution has been formed based on a random sample of 100 values. The 

frequency distribution has k=8 classes. Assuming that the test is to be conducted with α=0.10 level, 

determine the correct decision rule to be used. 

The decision‐rule will be stated in terms of the appropriate chi‐square critical value where the chi‐square value 

is found in Appendix G with k‐3 degrees of freedom.  Note, we lose two additional degrees of freedom due to 

the fact that the mean and standard deviation are not specified in the null hypothesis and must be estimated 

from the sample data.  Thus, the chi‐square critical value for alpha = 0.10 and 8 – 3 = 5 degrees of freedom is  2 9.2363  .  Then the decision rule is: If chi‐square test statistic >  2 9.2363  , reject the null 

hypothesis; Otherwise, do not reject the null hypothesis 

5) 

An experiment is run that is claimed to have a binomial distribution with π=0.15 and n=18 and the 

number of successes is recorded. The experiment is conducted 200 times with the following results: 

Number of Successes  0  1  2  3  4  5 

Observed Frequency  80  75  39  6  0  0 

 

Using a significance level of 0.01, is there sufficient evidence to conclude that the distribution is  binomially distributed with π=0.15 and n=18.   

 

 

 

 

 

 

 

 

 

 

 

Successes       o 

Observed 

Successes 

Binomial 

Probability 

n = 18, p = 

0.15 

      e

Expected 

Frequency 

i

ii

e

eo 2)(   

0  80  0.050328 10.0657 485.894

1  75  0.205889 41.1778 27.780

2  39  0.336909 67.3819 11.955

3  6  0.275653 55.1306 43.784

4 ‐ 5  0  0.131220 26.2440 26.244

Total  200  1  200 595.657

5   

The calculated chi‐square test statistic is 2 = 595.657. 

Because the calculated value of 595.657 > 13.2767, we reject HO. 

There is sufficient evidence to reject that the binomial distribution with n = 18 and π = 0.15 is the appropriate 

distribution to describe the distribution of the number of successes. 

6) 

Data collected from a hospital emergency room reflect the number of patients per day that visited 

the emergency room due to cardiac related symptoms. It is believed that the distribution of the 

number of cardiac patient entering the emergency room per day over a 2 month period has a 

Poisson distribution with a mean of 8 patients per day. 

6  7  9  7  5  6  7  7  5  10 

9  9  7  2  8  5  7  10  6  7 

12  12  10  8  8  14  7  9  10  7 

4  9  6  4  11  9  10  7  5  10 

8  8  10  7  9  2  10  12  10  9 

8  11  7  9  11  7  16  7  9  10 

 

Use a chi‐square goodness‐ of‐ fit test to determine f the data came from a Poisson distribution with 

mean of 8. Test using a significance of 0.01. 

Step 1:   HO: Distribution of the number of cardiac patients per day is Poisson, with mean   = 8. HA: Distribution 

is not Poisson with mean = 8 

Step 2:   = 0.01 

Step 3: After collapsing, we have 8 categories. Therefore, there are 8 categories and k = 8. The degrees of freedom = k – 1 = 7. The critical chi-square value found in Appendix G is 18.4753 Step 4:   

   

Note that expected values of less than 5 required that the values less than 5 and those greater than 10, respectively, be combined. The calculated chi-square test statistic is 11.4883

Step 5: Because 2 = 11.4883 < 18.4753 = 2

01.0 , do not reject the null hypothesis. Step 6: There is not sufficient evidence to indicate that the data did not come from a Poisson distribution with mean of 8.  

6   

7) 

The billing department of a national cable service company is conduction a study of how customers 

pay their monthly cable bills. The cable company accepts payment in one of four ways: in person at a 

local office, by mail, by credit card, or by electronic funds transfer from a bank account. The cable 

company randomly sampled 400 customers to determine if there is a relationship between the 

customer’s age and the payment method used. The following sample results were obtained: 

                                        Age of Customer 

Payment method  20‐30  31‐40  41‐50  Over 50 

In Person  8  12  11  13 

By Mail  29  67  72  50 

By Credit Card  26  19  5  7 

By Funds Transfer  23  35  17  6 

 

Based on the sample data, can the cable company conclude that there is a relationship between the 

age of the customer and the payment method used? Conduct the appropriate test at the 0.01 level 

of significance. 

H0: Age of the customer is independent of the payment method used. 

HA: Age of the customer and the payment method are not independent.   

Age of Customer

Payment Method 20-30 31-40 41-50 Over 50 Total

In Person 8 12 11 13 44

By Mail 29 67 72 50 218

By Credit Card 26 19 5 7 57

By Funds Transfer 23 35 17 6 81

Total 86 133 105 76 400

The expected cell frequencies are determined by multiplying the row total by the column total and dividing by the overall sample size. For example, for the cell corresponding to In Person and 20-30 Age, we get:

Expected =  400

4486 x  = 9.46 

The expected cell values for all cells are 

Age of Customer

Payment Method 20-30 31-40 41-50 Over 50

In Person 9.46 14.63 11.55 8.36

By Mail 46.87 72.485 57.225 41.42

7   

By Credit Card 12.255 18.9525 14.9625 10.83

By Funds Transfer 17.415 26.9325 21.2625 15.39

 

The test statistic is computed as follows:. 

 

 

 r

i

c

j eij

eijoij

1 1

2

2 )(

  =  63.14

)63.1412(

46.9

)46.98( 22  

 + . . 

39.15 )39.156( 2  = 50.3155 

Because χ2 = 50.3115 > 21.666, reject the null hypothesis. Based on the sample data conclude that age and type of payment are not independent. 8)  

A contingency analysis table has been constructed form data obtained in a phone survey of 

customers in a market area in which respondents were asked to indicate whether they owned a 

domestic or foreign car and whether they were a member of a union or not. The following 

contingency table is provided:  

                                                          Union 

Car  Yes  No 

Domestic  155  470 

Foreign  40  325 

 

a. Use the chi‐square approach to test whether type of car owned (domestic or foreign) is  independent of union membership. Test using and α=0.05 level.  b. Calculate the p‐value for this hypothesis test.    a. H0:  Type of car owned is independent of union membership.    HA:  Type of car owned is not independent of union membership. 

 = 0.05 

 

Observed Frequencies   Union Membership

Car  Yes No Total

Domestic  155 470 625

Foreign  40 325 365

Total  195 795 990

 

8   

Expected Frequencies   Union Membership

Car  Yes No Total

Domestic  123.1061 501.8939 625

Foreign  71.8939 293.1061 365

Total  195 795 990

 

The calculated chi‐square test statistic is 8.2630 + 2.0268 + 14.1489 + 3.4705  

= 27.9092. The critical value of the chi-square test statistic for  = 0.05 and 1 d.f. is 3.8415. Since the calculated value of 27.9092 > 3.8415, we reject the null hypothesis and conclude that type of car owned is not independent of union membership. b. The p‐value can be found using Excel’s CHITEST function or Excel’s CHIDIST function.  The form of the  CHITEST function is =CHITEST(Actual_range, Expected_range).  The function returns the p‐value.  The p‐value  for this test is 0.000001271442.  Small p‐values provide strong evidence to reject the null hypothesis.  The  form of the CHIDIST function is =CHIDIST(Chi‐Square, Degrees of freedom) or CHIDIST(27.9092, 1) which gives  .0000000127, the same value as the CHITEST function.    9) 

Utilize the following contingency table to answer the questions listed below. 

  C1 C2  R1  51  207 

R2  146  185 

R3  240  157 

  a. State the relevant null and alternative hypotheses.  b. Calculate the expected values for each of the cells.  c. Compute the chi‐square test statistics for the hypothesis test.  d. Determine the appropriate critical value and reach a decision for the hypothesis test. Use a  significance level of 0.05.  e. Obtain the p‐value for this hypothesis test.    a. HO: The row and column variables are independent HA: The row and column variables are not independent b. The following contingency table shows the results of the sampling

     C1     C2 Total R1  51 207 258

R2  146 185 331

R3  240 157 397

Total  437 549 986

The expected cell frequencies are determined by

9   

eij = totalgrand

l)lumn tota total)(corow(

. As an example e11 = 986

)258(437

= 114.359. The expected cell values for all cells are

C1 C2 Total R1 114.35 143.65 258 R2 146.70 184.30 331 R3 175.95 221.05 397 Total 437 549 986

c. The test statistic is computed as follows:

905.104 05.221

)05.221157( ...

35.114

)35.11451()( 22 2

2  

 

 

  ij

ijij

e

eo 

d. The critical value for this test will be the chi-square value with (r-1)(c-1) = (3 -1)(2-1) = 2 degrees of freedom with α = 0.05. From the Appendix, the critical value is 5.9915. Because 2 = 104.905 > 5.9915, reject the null hypothesis. The row and column variables are not independent.

e. Since 2

005.0 = 10.5965 < 2 = 104.905, then p-value < 0.005. The exact p-value can be found using Excel’s CHIDIST or Minitab’s CALC>PROBABILITY DISTRIBUTIONS command to be essentially 0. 10) 

A manufacture of sports drinks has randomly sampled 198 men and 202 women to taste an 

unflavored version and a flavored version of a new sports drink currently in development. The 

participant’s preferences are shown below: 

  Flavored  Unflavored 

Men  101  97 

Women  68  134 

 

a. State the relevant null and alternative hypotheses.  b. Conduct the appropriate test and state a conclusion. Use a level of significance of 0.05.    a. H0: Gender is independent of drink preference HA: There is a relationship between gender and drink preference 

b. The expected cell frequencies are: c.

  Flavored Unflavored

Men  83.655 114.345

Women 85.345 116.655

 

The calculated value of the test statistic is  

Chi‐square = (101‐83.655) 2 /83.655 + (97‐114.345)

2 /114.345 + (68‐85.345)

2 /85.345 + (134‐116.655)

2 /116.655 = 

12.331. 

The critical value of the test statistic has 1 degree of freedom and is 3.8415. 

Because the calculated value of the test statistic = 12.331 is greater than the critical value of 3.8415, reject the 

null hypothesis and conclude there is a relationship between gender and drink preference. 

10   

 

11) 

A marketing research firm is conducting a study to determine if there is a relationship between an 

individual’s age and the individual’s preferred source for news. The research firm asked 1000 

individuals to list their preferred source for news: newspaper, radio and television, or Internet. The 

following results were obtained: 

                                        Age of Respondent 

Preferred News Source  20‐30  31‐40  41‐50  Over 50 

Newspaper  19  62  95  147 

Radio/TV  27  125  168  88 

Internet  104  113  37  15 

 

At the 0.01 level of significance, can the marketing research firm conclude that there is a relationship 

between the age of an individual and the individual’s preferred source for news? 

H0: Age of the individual is independent of the individual’s preferred source for news. 

HA: Age of the individual and the individual’s preferred source for news are not independent.   

Age of Respondent

Preferred News Source 20-30 31-40 41-50 Over 50 Total

Newspaper 19 62 95 147 323

Radio/TV 27 125 168 88 408

Internet 104 113 37 15 269

150 300 300 250 1000

The expected cell frequencies are determined by multiplying the row total by the column and dividing by the overall sample size. For example, for the cell corresponding to Newspaper and 20-30 Age, we get:

Expected =  1000

323150 x  = 48.45 

The expected cell values for all cells are 

 

 

Age of Respondent

Preferred News Source 20-30 31-40 41-50 Over 50

Newspaper 48.45 96.9 96.9 80.75

Radio/TV 61.2 122.4 122.4 102

Internet 40.35 80.7 80.7 67.25

11   

The test statistic is computed as follows:  

 

 

 r

i

c

j eij

eijoij

1 1

2

2 )(

  =  

4.122

)4.122125(

2.61

)2.6127(

75.80

)75.80147(

9.96

)9.9695(

9.96

)9.9662(

45.48

)45.4819( 222222  

 

 

 

 

  

25.67

)25.6715(

7.80

)7.8037(

7.80

)7.80113(

35.40

)35.40104(

102

)10288(

4.122

)4.122168( 222222  

 

 

 

 

   

=  300.531 

Because χ2 = 300.531 > 16.8119, reject the null hypothesis. Based on the sample data conclude that age of the individual and the individual’s preferred source for news are not independent.

12) 

A loan officer wished to determine if marital status of loan applicants was independent of the 

approval of loans. The following table presents the result of her survey: 

  Approved                      Rejected 

Single  213  189 

Married  374  231 

Divorced  358  252 

 

a. Conduct the appropriate hypothesis test that will provide an answer to the loan officer. Use a  significance level of 0.01.  b. Calculate the p‐value for the hypothesis test in part a.    a. HO: The approval of a loan is independent of the marital status of the customer HA: Approval of a loan and marital status are not independent.

Approved Rejected Total Single 213 189 402 Married 374 231 605 Divorced 358 252 610 Total 945 672 1617

The expected cell frequencies are determined by

eij = totalgrand

l)lumn tota total)(corow(

As an example e11 = 1617

)945(402

= 234.94. The expected cell values for all cells are

Approved Rejected Total Single 234.94 167.06 402 Married 353.57 251.43 605 Divorced 356.49 253.51 610

12   

Total 945 672 1617 The test statistic is computed as follows:

783.7 51.253

)51.253252( ...

94.234

)94.234213()( 22 2

2  

 

 

  ij

ijij

e

eo 

Because 2 = 7.783 < 9.2104, do not reject the null hypothesis. Approval of a loan and marital status are independent.

b. Since 2 = 7.783 < 9.2104 = 2

01.0 , then 0.01 < p-value. The exact p-value can be found using Excel’s CHIDIST command or Minitab’s CALC>PROBABILITY DISTRIBUTIONS command to find the exact value of 0.0204. 13) 

An instructor in a large accounting class is interested in determining whether the grades that 

students get are related to how close to the front of the room the students sit. He has categorized 

the room seating as “Front”, “Middle”, and “Back.” The following data were collected over 2 sections 

with 400 total students. Based on the sample data, can you conclude that there is a dependency 

relationship between seating location and grade using a significance level equal to 0.05? 

  A  B  C  D  F  Total 

Front  18  55  30  3  0  106 

Middle  7  42  95  11  1  156 

Back  3  15  104  14  2  138 

Total  28  112  229  28  3  400 

   

0 :H  The grade a student receives in the class is independent of the seat location in the class.    The grade received is not independent of seat location    

The contingency table with expected frequencies included is: 

     

We have some expected cell frequencies that are smaller than 5.  Before collapsing categories, we will see if 

the null hypothesis is rejected.  If not, then we need not worry about the small expected frequencies.  Then 

the test statistic is: 

 

2 2 ( ) 87.3

o e

e 

    

:AH

13   

Because 

2 2 ( ) 87.3 15.507

o e

e 

     we would reject the null hypothesis.   Because we reject, 

we need to take care of the small expected frequencies.  We will do this by combining the D and F grades with 

the revised contingency table as follows: 

A B C D&F Total

Front 18 55 30 3 106

7.42 29.68 60.685 8.22

Middle 7 42 95 12 156

10.92 43.68 89.31 12.09

Back 3 15 104 16 138

9.66 38.64 79.005 10.7

Total 28 112 229 31

   

The revised test statistic is: 

2 2 ( ) 86.9

o e

e 

     

and the revised critical value now has (3‐1)(4‐1) = 6 degrees of freedom and is 12.5916.  Therefore, 

Because 

2 2 ( ) 86.9

o e

e 

   >12.5916, we reject the null hypothesis.   

The instructor should conclude that course grade is related to seating location. 

 

 

 

Chapter 15 and Chapter 11 Lecture Power Point Slides.pdf

Chapter 15Chapter 15Chapter 15 Chapter 15 ChiChi--Square TestsSquare TestsChiChi Square TestsSquare Tests Chapter 11Chapter 11Chapter 11Chapter 11 ANOVAANOVA

©2006 Thomson/South-Western 1

ChiChi Sq are as a Test ofSq are as a Test ofChiChi--Square as a Test of Square as a Test of IndependenceIndependenceIndependenceIndependence Sample Differences among ProportionsSample Differences among Proportions –– significantsignificantSample Differences among Proportions Sample Differences among Proportions –– significantsignificant or not?or not?

Contingency TablesContingency Tables

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of IndependenceIndependence

•• Observed & Expected FrequenciesObserved & Expected Frequencies

Pn Pn –– proportion in the northproportion in the north--east who prefer east who prefer present planpresent planpresent planpresent plan Ps Ps -- proportion in the southproportion in the south--east who prefer east who prefer present planpresent plan Pc Pc -- proportion in the central region who prefer proportion in the central region who prefer present planpresent plan PwPw proportion in the west coast who preferproportion in the west coast who preferPw Pw -- proportion in the west coast who prefer proportion in the west coast who prefer present plan present plan

•• The null and alternate hypotheses are:The null and alternate hypotheses are:

0

Ho: Pn = Ps = Pc = PwHo: Pn = Ps = Pc = Pw Ha: Pn, Ps, Pc, Pw are not all equalHa: Pn, Ps, Pc, Pw are not all equal

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of IndependenceIndependence

Combined proportion who prefer present method = Combined proportion who prefer present method = (68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) = .6643.(68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) = .6643.(68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) .6643.(68 + 75 + 57 + 79)/(100 + 120 + 90 + 100) .6643.

Th ChiTh Chi S St ti tiS St ti tiThe ChiThe Chi--Square StatisticSquare Statistic

Calculating the ChiCalculating the Chi--Square statisticSquare statistic

Th ChiTh Chi S Di t ib tiS Di t ib tiThe ChiThe Chi--Square DistributionSquare Distribution The ChiThe Chi--Square distributionSquare distribution

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Test the hypotheses: Test the hypotheses: Ho: Pn = Ps = Pc = PwHo: Pn = Ps = Pc = Pw H P P P P t ll lH P P P P t ll lHa: Pn, Ps, Pc, Pw are not all equalHa: Pn, Ps, Pc, Pw are not all equal  = .10= .10

The sample chiThe sample chi--square value of 2.764 that wesquare value of 2.764 that we calculated earlier falls within the acceptance region.calculated earlier falls within the acceptance region.p gp g Hence, we accept the null hypothesis.Hence, we accept the null hypothesis.

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

T t th h thT t th h thTest the hypotheses: Test the hypotheses: Ho: length of stay and type of insurance are Ho: length of stay and type of insurance are

independentindependentindependentindependent Ha: length of stay depends on the type of insuranceHa: length of stay depends on the type of insurance  = .01= .01

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

L t A th t th t t d tL t A th t th t t d tLet A = the event that a stay corresponds to Let A = the event that a stay corresponds to someone whose insurance covers less than 25% someone whose insurance covers less than 25% of the costsof the costsof the costsof the costs

Let B = the event a stay lasts less than 5 daysLet B = the event a stay lasts less than 5 days

P (first cell = P (a and B) = (180/660)(110/660) = 1/22P (first cell = P (a and B) = (180/660)(110/660) = 1/22

A 1/22 i th t d ti i th fi t llA 1/22 i th t d ti i th fi t llAs 1/22 is the expected proportion in the first cell,As 1/22 is the expected proportion in the first cell, the expected frequency in that cell is (1/22)(660) = 30the expected frequency in that cell is (1/22)(660) = 30 observationsobservationsobservationsobservations

In general, fc = [(RT)(CT)]/nIn general, fc = [(RT)(CT)]/nIn general, fc [(RT)(CT)]/nIn general, fc [(RT)(CT)]/n

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Contingency Tables with more than two rows:Contingency Tables with more than two rows:

A th l hiA th l hi l f 24 315 i tl f 24 315 i tAs the sample chiAs the sample chi--square value of 24.315 is notsquare value of 24.315 is not within the acceptance region, we reject the nullwithin the acceptance region, we reject the null hypothesishypothesishypothesis.hypothesis.

U i th ChiU i th Chi S T tS T tUsing the ChiUsing the Chi--Square TestSquare Test Precautions in using the ChiPrecautions in using the Chi--Square TestSquare Test

U l l iU l l i-- Use large sample sizesUse large sample sizes

-- Use carefully collected dataUse carefully collected data-- Use carefully collected dataUse carefully collected data

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of Goodness of FitGoodness of Fit

Function of a goodness of fit testFunction of a goodness of fit test

Calculating observed and expected frequenciesCalculating observed and expected frequencies

Stating the hypothesesStating the hypotheses

Ho: A binomial distribution with p = 40 is a goodHo: A binomial distribution with p = 40 is a goodHo: A binomial distribution with p = .40 is a good Ho: A binomial distribution with p = .40 is a good description of the interview processdescription of the interview process

H1: A binomial distribution with p = .40 is not a goodH1: A binomial distribution with p = .40 is not a goodH1: A binomial distribution with p .40 is not a good H1: A binomial distribution with p .40 is not a good description of the interview processdescription of the interview process

 = .20= .20

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of Goodness of FitGoodness of Fit

ChiChi--Square as a Test ofSquare as a Test ofChiChi Square as a Test of Square as a Test of Goodness of FitGoodness of Fit

Using the ChiUsing the Chi--Square Goodness of Fit TestSquare Goodness of Fit Test

With 3 degrees of freedom, the region to the right ofWith 3 degrees of freedom, the region to the right of a chia chi--square value of 4.642 contains .20 of the areasquare value of 4.642 contains .20 of the area under the curveunder the curve

The sample chiThe sample chi square value of 5 0406 falls outsidesquare value of 5 0406 falls outsideThe sample chiThe sample chi--square value of 5.0406 falls outsidesquare value of 5.0406 falls outside this acceptance region. Hence, we reject the nullthis acceptance region. Hence, we reject the null hypothesishypothesishypothesishypothesis

ANOVAANOVA

©2006 Thomson/South-Western 16

ANOVAANOVAANOVAANOVA Function of AnovaFunction of Anova

Uses of AnovaUses of Anova

Grand mean using all the data = (15 + 18 +…+ 15) / 16Grand mean using all the data = (15 + 18 +…+ 15) / 16 = 304/16 = 19= 304/16 = 19 304/16 19 304/16 19

Grand mean as a weighted average of the sampleGrand mean as a weighted average of the sample means, using the relative sample sizes as themeans, using the relative sample sizes as the weights = (5/16)(17) + (5/16)(21) + (6/16)(19) = 304/16weights = (5/16)(17) + (5/16)(21) + (6/16)(19) = 304/16 = 19= 19= 19= 19

ANOVAANOVAANOVAANOVA We can state the hypotheses as follows:We can state the hypotheses as follows:

Ho: µHo: µ11 = µ= µ22 = µ= µ33 H1: µH1: µ11, µ, µ22, µ, µ33 are not all equalare not all equal

Assumptions made in AnovaAssumptions made in Anova

Steps in AnovaSteps in Anova

1)1) Determine one estimate of the population variance from the Determine one estimate of the population variance from the variance among the sample meansvariance among the sample means

2)2) Determine a second estimate of the population varianceDetermine a second estimate of the population variance2)2) Determine a second estimate of the population variance Determine a second estimate of the population variance from the variance within the samplesfrom the variance within the samples

3)3) Compare the two estimates; if they are approximately equal Compare the two estimates; if they are approximately equal i l t th ll h th ii l t th ll h th iin value, accept the null hypothesis in value, accept the null hypothesis

ANOVAANOVAANOVAANOVA Calculating the variance among the sample means:Calculating the variance among the sample means:

Finding the first estimate of the population varianceFinding the first estimate of the population variance

Finding the variance among the sample meansFinding the variance among the sample meansFinding the variance among the sample meansFinding the variance among the sample means

Finding the population variance using the varianceFinding the population variance using the variance among the sample meansamong the sample means

ANOVAANOVAANOVAANOVA Calculating the variance among the sample means:Calculating the variance among the sample means:

Estimating the between column varianceEstimating the between column variance

ANOVAANOVAANOVAANOVA Calculating the variance within the samples:Calculating the variance within the samples:

Finding the second estimate of the populationFinding the second estimate of the population variancevariance

Sample varianceSample variance

Estimate of within column varianceEstimate of within column variance

ANOVAANOVAANOVAANOVA Calculating the variance within the samples:Calculating the variance within the samples:

ANOVAANOVAANOVAANOVA The F test:The F test: F = (first estimate of the population variance basedF = (first estimate of the population variance basedF (first estimate of the population variance based F (first estimate of the population variance based

on the variance among the sample means)/ on the variance among the sample means)/ (second estimate of the population variance (second estimate of the population variance based on the variances within the samples)based on the variances within the samples)

F = between column variance / within columnF = between column variance / within columnF = between column variance / within column F = between column variance / within column variance variance

= 20/14.769 = 1.354 (this is the F ratio)= 20/14.769 = 1.354 (this is the F ratio) 20/14.769 1.354 (this is the F ratio) 20/14.769 1.354 (this is the F ratio)

Interpreting the F ratioInterpreting the F ratio

ANOVAANOVAANOVAANOVA The F distributionThe F distribution

ANOVAANOVAANOVAANOVA Using the F distributionUsing the F distribution

Number of degrees of freedom in the numerator ofNumber of degrees of freedom in the numerator of the F ratio = (number of samples the F ratio = (number of samples –– 1)1)

Number of degrees of freedom in the denominator ofNumber of degrees of freedom in the denominator of the F ratio =the F ratio =  (n(njj 1) = n1) = n kkthe F ratio = the F ratio =  (n(njj –– 1) = n1) = nTT –– kk

Using the F tableUsing the F tableUsing the F tableUsing the F table

Testing the hypothesesTesting the hypotheses

F = between column variance / within column F = between column variance / within column variancevariancevariance variance

= 20/14.769 = 1.354 (this is the F ratio)= 20/14.769 = 1.354 (this is the F ratio)

ANOVAANOVAANOVAANOVA Using the F distributionUsing the F distribution

Number of degrees of freedom in the numerator ofNumber of degrees of freedom in the numerator of the F ratio = (3 the F ratio = (3 –– 1) = 21) = 2 Number of degrees of freedom in the denominator ofNumber of degrees of freedom in the denominator of the F ratio = (5 the F ratio = (5 –– 1) + (5 1) + (5 –– 1) + (6 1) + (6 –– 1) = 131) = 13

Suppose we want the test at the .05 level, theSuppose we want the test at the .05 level, the hypothesis that there is no difference among thehypothesis that there is no difference among thehypothesis that there is no difference among thehypothesis that there is no difference among the three training methods. three training methods.

ANOVAANOVAANOVAANOVA Using the F distributionUsing the F distribution

From the F table, the value we get is 3.81. This valueFrom the F table, the value we get is 3.81. This value of 3.81 sets the upper limit of the acceptance region.of 3.81 sets the upper limit of the acceptance region. As the calculated sample value for F of 1.354 liesAs the calculated sample value for F of 1.354 lies within the acceptance region, we would accept thewithin the acceptance region, we would accept the null hypothesisnull hypothesisnull hypothesis.null hypothesis.

ANOVAANOVAANOVAANOVA Precautions in using the F TestPrecautions in using the F Test

-- Use large sample sizesUse large sample sizes

-- Control all factors except the one being studiesControl all factors except the one being studies

A test for one factorA test for one factor-- A test for one factorA test for one factor

ANOVAANOVA E lE lANOVA ANOVA -- ExampleExample The manufacturer of a tape recorder decides toThe manufacturer of a tape recorder decides to include four alkaline batteries along with theirinclude four alkaline batteries along with theirinclude four alkaline batteries along with theirinclude four alkaline batteries along with their product. Two battery suppliers are considered, brandproduct. Two battery suppliers are considered, brand 1 and brand 2. The supervisor wants to know if the1 and brand 2. The supervisor wants to know if the average lifetimes of the two brands are the same.average lifetimes of the two brands are the same. Each of ten batteries is connected to a test deviceEach of ten batteries is connected to a test device that places a small drain on the battery power andthat places a small drain on the battery power andthat places a small drain on the battery power andthat places a small drain on the battery power and records the battery lifetime. The following data (inrecords the battery lifetime. The following data (in hours) was collected.hours) was collected.hours) was collected.hours) was collected.

Brand 1: 43, 48, 38, 41, 51Brand 1: 43, 48, 38, 41, 51 Brand 2: 30, 26, 37, 31, 34Brand 2: 30, 26, 37, 31, 34

ANOVAANOVA E lE lANOVA ANOVA -- ExampleExample Within Sample Variation Within Sample Variation

xx11bar = 44.2 (sbar = 44.2 (s11 = 5.26)= 5.26)

xx22bar = 31.6 (sbar = 31.6 (s22 = 4.16)= 4.16)

Between Sample VariationBetween Sample VariationBetween Sample VariationBetween Sample Variation

xx11bar is larger than xbar is larger than x22barbarxx11bar is larger than xbar is larger than x22barbar

Measuring VariationMeasuring Variation

SS (total) = SS (between) + SS (within) SS (total) = SS (between) + SS (within) = SS (factor) + SS (error)= SS (factor) + SS (error)= SS (factor) + SS (error)= SS (factor) + SS (error)

Deriving the Sum of SquaresDeriving the Sum of Squares

TT 22 TT 22 TT 22 TT22 SS(factor) = + + ... + SS(factor) = + + ... + --

TT1122

nn11

TT2222

nn22

TTkk22

nnkk

TT22

nn

SS(total) = ∑SS(total) = ∑xx22 -- TT22

SS(total) ∑SS(total) ∑xx nn

TT 22 TT 22 TT 22 SS(error) = ∑SS(error) = ∑xx22 -- + + ... ++ + ... +

TT1122

nn11

TT2222

nn22

TTkk22

nnkk

= SS(total) = SS(total) -- SS(factor)SS(factor)

ANOVAANOVA E l (E l ( tdtd))ANOVA ANOVA –– Example (Example (contdcontd))

The ANOVA TableThe ANOVA Table SourceSource dfdf SSSS MSMS FF FactorFactor kk -- 11 SS(factor)SS(factor) MS(factor)MS(factor) MS(factor) MS(factor) ErrorError nn -- 22 SS(error)SS(error) MS(error)MS(error) MS(error)MS(error)ErrorError nn -- 22 SS(error)SS(error) MS(error)MS(error) MS(error)MS(error) TotalTotal nn -- 11 SS(total)SS(total)

SS(factor)SS(factor) MS(f t )MS(f t )

SS(error)SS(error) MS( )MS( )kk -- 11MS(factor) =MS(factor) = nn -- kkMS(error) =MS(error) =

MS(factor)MS(factor) MS(error)MS(error)FF == ( )( )

ExampleExample

ExampleExample Since alpha = .5, Since alpha = .5,

F F .05, 3, 20.05, 3, 20 = 3.10.= 3.10.

As F* = 10.75 > 3.10, As F* = 10.75 > 3.10,

we reject Ho.we reject Ho.

T k ’ M lti l C iT k ’ M lti l C iTukey’s Multiple Comparison Tukey’s Multiple Comparison TestTestTestTest

QQ == maximum (maximum (XXii) ) –– minimum (minimum (XXii))

MS(error) / MS(error) / nnrr

wherewhere

1.1. Maximum Maximum XXii and minimum and minimum XXii are the largest and smallest meansare the largest and smallest means

2.2. MS(error) is the pooled sample varianceMS(error) is the pooled sample variance2.2. MS(error) is the pooled sample varianceMS(error) is the pooled sample variance

3.3. nnrr is the number of replicates in each sampleis the number of replicates in each sample

ExampleExample There is no evidence ofThere is no evidence of

a difference betweena difference between

brand 1 and the brand 2brand 1 and the brand 2

populations or betweenpopulations or between

the brand 3 and thethe brand 3 and the

brand 4 populationsbrand 4 populations

Chapter 15 Power Point Slides.pdf

CC SS C

ha ChiChi--Square TestsSquare Tests

pter

Chapter ContentsChapter Contents

15

15.1 Chi15.1 Chi--Square Test for IndependenceSquare Test for Independence5 C5 C Squa e est o depe de ceSqua e est o depe de ce 15.2 Chi15.2 Chi--Square Tests for GoodnessSquare Tests for Goodness--ofof--FitFit 15.3 Uniform Goodness15.3 Uniform Goodness--ofof--Fit TestFit Test 15.4 Poisson Goodness15.4 Poisson Goodness--ofof--Fit TestFit Test 15.5 Normal Chi15.5 Normal Chi--Square GoodnessSquare Goodness--ofof--Fit TestFit Test 15.6 ECDF Tests (Optional)15.6 ECDF Tests (Optional)

15-1

C ha

CC SS pter 1

ChiChi--Square TestsSquare Tests

Chapter Learning Objectives (LO’s)Chapter Learning Objectives (LO’s)

15

Chapter Learning Objectives (LO s)Chapter Learning Objectives (LO s)

LO15LO15 11LO15LO15--1: 1: Recognize a contingency table.Recognize a contingency table. LO15LO15--2:2: Find degrees of freedom and use the chiFind degrees of freedom and use the chi--square table of critical square table of critical

values.values.

LO15LO15--3:3: Perform a chiPerform a chi--square test for independence on a contingency square test for independence on a contingency table.table.

LO15LO15--4:4: Perform a goodnessPerform a goodness--ofof--fit (GOF) test for a uniform distribution.fit (GOF) test for a uniform distribution. LO15LO15--5:5: Explain the GOF test for a Poisson distribution.Explain the GOF test for a Poisson distribution.

15-2

C ha

CC SS pter 1

ChiChi--Square TestsSquare Tests

Chapter Learning Objectives (LO’s)Chapter Learning Objectives (LO’s)

15

p g j ( )p g j ( )

LO15LO15--6:6: Use computer software to perform a chiUse computer software to perform a chi square GOF test forsquare GOF test forLO15LO15--6: 6: Use computer software to perform a chiUse computer software to perform a chi--square GOF test for square GOF test for normality.normality.

LO15LO15--7:7: State advantages of ECDF tests as compared to chiState advantages of ECDF tests as compared to chi--square GOFsquare GOFLO15LO15 7: 7: State advantages of ECDF tests as compared to chiState advantages of ECDF tests as compared to chi--square GOF square GOF tests.tests.

15-3

15.1 Chi15.1 Chi--SquareSquare Test forTest for C

ha15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

pter 1 LO15LO15--11

15

LO15LO15--1: 1: Recognize a contingency table.Recognize a contingency table.

•• A A contingency tablecontingency table is a crossis a cross--tabulation of tabulation of nn paired observations into paired observations into

Contingency TablesContingency Tables g yg y pp

categories.categories. •• Each cell shows the count of observations that fall into the Each cell shows the count of observations that fall into the

category defined by its row (category defined by its row (rr) and column () and column (cc) heading) headingcategory defined by its row (category defined by its row (rr) and column () and column (cc) heading.) heading.

15-4

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependenceLO15LO15--11

Contingency TablesContingency Tables

15

•• For example:For example:

15-5

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependenceLO15LO15--33

15LO15LO15--3: 3: Perform a chiPerform a chi--square test for independence on a square test for independence on a contingency table.contingency table.

ChiChi--Square TestSquare Test • In a test of independence for an r x c contingency table the• In a test of independence for an r x c contingency table, the

hypotheses are H0: Variable A is independent of variable B H1: Variable A is not independent of variable B

• Use the chi-square test for independence to test these hypotheses.

• This non-parametric test is based on frequencies.

• The n data pairs are classified into c columns and r rows and then• The n data pairs are classified into c columns and r rows and then the observed frequency fjk is compared with the expected frequency ejk.

15-6

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependenceLO15LO15--22

15

LO15LO15--2: 2: Find degrees of freedom and use the chiFind degrees of freedom and use the chi--square square table of critical valuestable of critical values

ChiChi--Square DistributionSquare Distribution

table of critical values.table of critical values.

•• The critical value comes from the The critical value comes from the chichi--square probability square probability di t ib tidi t ib ti ithith ( 1)( 1) d f f dd f f d

qq

distributiondistribution with with (r – 1)(c – 1) degrees of freedom.degrees of freedom. df = degrees of freedom = (r – 1)(c – 1)

where r = number of rows in the tablewhere r = number of rows in the table c = number of columns in the table

•• Appendix E contains critical values for rightAppendix E contains critical values for right--tail areas of the chitail areas of the chi--pp gpp g square distribution.square distribution.

•• The Excel function =CHISQ.INV.RT(The Excel function =CHISQ.INV.RT(αα, , dfdf) also gives the critical ) also gives the critical l i h i hl i h i h ililvalue in the rightvalue in the right--tail.tail.

15-7

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

ChiChi--Square DistributionSquare Distribution

15

•• Consider the shape of the chiConsider the shape of the chi--square distribution:square distribution:

15-8

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependenceLO15LO15--33

Expected FrequenciesExpected Frequencies

15

•• Assuming that Assuming that HH00 is true, the expected frequency of row is true, the expected frequency of row jj and and column column kk is:is:

e = R C /nejk = RjCk/n where Rj = total for row j (j = 1, 2, …, r)

Ck = total for column k (k = 1, 2, …, c)Ck total for column k (k 1, 2, …, c) n = sample size

15-9

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Steps in Testing the HypothesesSteps in Testing the Hypotheses

15

•• Step 1: State the HypothesesStep 1: State the Hypotheses •• HH00: Variable : Variable AA is independent of variable is independent of variable B B •• HH11: Variable : Variable AA is not independent of variable is not independent of variable BB

•• Step 2: Specify the Decision RuleStep 2: Specify the Decision RuleStep 2: Specify the Decision RuleStep 2: Specify the Decision Rule •• Calculate Calculate dfdf = (= (rr –– 1)(1)(cc –– 1) 1) •• For a givenFor a given , look up the right, look up the right--tail critical value (tail critical value (22RR) from) fromFor a given For a given , look up the right, look up the right tail critical value (tail critical value ( RR) from ) from

Appendix E or by using Excel.Appendix E or by using Excel. •• Reject H0 if test statistic > 2R.. •• Instead of using Appendix E, you can use the Excel function Instead of using Appendix E, you can use the Excel function

=CHISQ.INV.RT(=CHISQ.INV.RT(αα, , dfdf) to get the critical value in the right) to get the critical value in the right--tail.tail.

15-10

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Steps in Testing the HypothesesSteps in Testing the Hypotheses

15

•• For example, for For example, for df df = 6 and = 6 and  = .05, = .05, 22.05.05 = 12.59.= 12.59.

15-11

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Steps in Testing the HypothesesSteps in Testing the Hypotheses

15

•• Here is the rejection region.Here is the rejection region.

15-12

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

St 3 C l l t th E t d F iSt 3 C l l t th E t d F i Steps in Testing the HypothesesSteps in Testing the Hypotheses

15

•• Step 3: Calculate the Expected FrequenciesStep 3: Calculate the Expected Frequencies eejkjk = = RRjjCCkk//nn

•• For example, For example, p ,p ,

15-13

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Steps in Testing the HypothesesSteps in Testing the Hypotheses

15

•• Step 4: Calculate the Test StatisticStep 4: Calculate the Test Statistic •• The chiThe chi--square test statistic issquare test statistic is

•• Step 5: Make the DecisionStep 5: Make the Decision •• Reject Reject HH00 if if 22RR > test statistic or if the > test statistic or if the

pp--valuevalue  ..pp value value  ..

15-14

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Test of Two ProportionsTest of Two Proportions

15

• For a 2 × 2 contingency table, the chi-square test is equivalent to a two-tailed z test for two proportions, if the samples are large enough to ensure normalityenough to ensure normality.

•• The hypotheses for a twoThe hypotheses for a two--tailed test are:tailed test are:

Figure 14.6 15-15

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Th hiTh hi t t i li bl if tht t i li bl if th t dt d f if i Small Expected FrequenciesSmall Expected Frequencies

15

•• The chiThe chi--square test is unreliable if the square test is unreliable if the expectedexpected frequencies are frequencies are too small.too small.

•• Rules of thumb:Rules of thumb:Rules of thumb:Rules of thumb: •• Cochran’s RuleCochran’s Rule requires that requires that eejkjk > 5 for all cells.> 5 for all cells. •• Up to 20% of the cells may have Up to 20% of the cells may have eejkjk < 5 < 5

•• Most agree that a chiMost agree that a chi--square test is infeasible if square test is infeasible if eejkjk < 1 in any cell.< 1 in any cell. •• If this happens, try combining adjacent rows or columns to If this happens, try combining adjacent rows or columns to pp y g jpp y g j

enlarge the expected frequencies.enlarge the expected frequencies.

15-16

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

ChiChi t t f i d d l b d t lt t f i d d l b d t l CrossCross--Tabulating Raw DataTabulating Raw Data

15

•• ChiChi--square tests for independence can also be used to analyze square tests for independence can also be used to analyze quantitative variables by coding them into categories.quantitative variables by coding them into categories.

• For example, the variables Infant Deaths per 1,000 and DoctorsFor example, the variables Infant Deaths per 1,000 and Doctors per 100,000 can each be coded into various categories:

15-17

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

Why Do a ChiWhy Do a Chi--Square Test on Numerical Data?Square Test on Numerical Data?

15

•• The researcher may believe there’s a relationship between The researcher may believe there’s a relationship between XX and and YY but doesn’t want to use linear regressionbut doesn’t want to use linear regressionYY, but doesn t want to use linear regression., but doesn t want to use linear regression.

•• There are outliers or anomalies that prevent us from assuming There are outliers or anomalies that prevent us from assuming that the data came from a normal population.that the data came from a normal population.p pp p

•• The researcher has numerical data for one variable but not the The researcher has numerical data for one variable but not the other.other.

15-18

C ha15.1 Chi15.1 Chi--SquareSquare Test forTest for pter 1

15.1 Chi15.1 Chi Square Square Test for Test for IndependenceIndependence

33--Way Tables and HigherWay Tables and Higher

15

•• More than two variables can be compared using contingency More than two variables can be compared using contingency tables.tables.

•• However it is difficult to visualize a higher order tableHowever it is difficult to visualize a higher order table•• However, it is difficult to visualize a higher order table.However, it is difficult to visualize a higher order table. •• For example, you could visualize a For example, you could visualize a cubecube as a stack of tiled 2as a stack of tiled 2--way way

contingency tables.contingency tables.g yg y •• Major computer packages permit 3Major computer packages permit 3--way tables.way tables.

15-19

15 2 Chi15 2 Chi SquareSquare Test forTest for C

ha 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit

pter 1

Purpose of the TestPurpose of the Test

15

•• The The goodnessgoodness--ofof--fitfit ((GOFGOF) test helps you decide whether your ) test helps you decide whether your sample resembles a particular kind of population.sample resembles a particular kind of population. Th hiTh hi t t ill b d b it i til dt t ill b d b it i til d•• The chiThe chi--square test will be used because it is versatile and square test will be used because it is versatile and easy to understand.easy to understand.

15-20

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit

•• AA multinomial distributionmultinomial distribution is defined by anyis defined by any kk probabilitiesprobabilities   Multinomial GOF TestMultinomial GOF Test

15

•• A A multinomial distributionmultinomial distribution is defined by any is defined by any kk probabilities probabilities 11, , 22, , …, …, kk that sum to unity.that sum to unity.

•• For example, consider the following “official” proportions of M&MFor example, consider the following “official” proportions of M&MFor example, consider the following official proportions of M&M For example, consider the following official proportions of M&M colors.colors.

15-21

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit

The h potheses are Multinomial GOF TestMultinomial GOF Test

15

• The hypotheses are H0: 1 = .13, 2 = .13, 3 = .24, 4 = .20, 5 = .16, 6 = .14 H1: At least one of the j differs from the hypothesized value1 j yp

• No parameters are estimated (m = 0) and there are c = 6 classes, so the degrees of freedom are df = c – m – 1 = 6 – 0 – 1 = 5

15-22

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit Hypotheses for GOFHypotheses for GOF

15

•• The hypotheses are:The hypotheses are: H0: The population follows a _____ distribution H Th l ti d t f llH1: The population does not follow a ______ distribution

•• The blank may contain the name of any theoretical distribution (e gThe blank may contain the name of any theoretical distribution (e g•• The blank may contain the name of any theoretical distribution (e.g., The blank may contain the name of any theoretical distribution (e.g., uniform, Poisson, normal).uniform, Poisson, normal).

15-23

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit Test Statistic and Degrees of Freedom for GOFTest Statistic and Degrees of Freedom for GOF

15

•• Assuming Assuming nn observations, the observations are grouped into observations, the observations are grouped into cc l d th thl d th th hihi t t t ti tit t t ti ti i f d ii f d iclasses and then the classes and then the chichi--square test statisticsquare test statistic is found using:is found using:

wherewhere ffjj = the observed frequency of = the observed frequency of ffjj q yq y observations in class observations in class jj

eejj = the expected frequency in class = the expected frequency in class jj if if HH00 were truewere true

15-24

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit Test Statistic and Degrees of Freedom for GOFTest Statistic and Degrees of Freedom for GOF

15

•• If the proposed distribution gives a good fit to the sample, the test If the proposed distribution gives a good fit to the sample, the test statistic will be near zerostatistic will be near zerostatistic will be near zero.statistic will be near zero.

•• The test statistic follows the chiThe test statistic follows the chi--square distribution with square distribution with cc –– mm –– 1 1 degrees of freedomdegrees of freedomdegrees of freedom degrees of freedom

dfdf = = cc –– mm –– 1 1 •• where where cc is the number of classes (bins) used in the test and is the number of classes (bins) used in the test and mm is is

the number of parameters estimated.the number of parameters estimated.

15-25

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit

Test Statistic and Degrees of Freedom for GOFTest Statistic and Degrees of Freedom for GOF

15

15-26

C ha

15 2 Chi15 2 Chi SquareSquare Test forTest for pter 1 15.2 Chi15.2 Chi--Square Square Test for Test for

GoodnessGoodness--ofof--FitFit

•• Instead of “fishing” for a goodInstead of “fishing” for a good--fitting model, visualize fitting model, visualize a prioria priori the the

DataData--Generating SituationsGenerating Situations

15

g gg g g ,g , pp characteristics of the underlying characteristics of the underlying datadata--generating processgenerating process..

Mixtures: A ProblemMixtures: A Problem •• MixturesMixtures occur when more than one dataoccur when more than one data--generating process is generating process is

superimposed on top of one another.superimposed on top of one another.

Eyeball TestsEyeball Tests •• A simple “eyeball” inspection of the histogram or dot plot mayA simple “eyeball” inspection of the histogram or dot plot may•• A simple eyeball inspection of the histogram or dot plot may A simple eyeball inspection of the histogram or dot plot may

suffice to rule out a hypothesized population.suffice to rule out a hypothesized population.

Small Expected FrequenciesSmall Expected FrequenciesSmall Expected FrequenciesSmall Expected Frequencies •• GoodnessGoodness--ofof--fit tests may lack power in small samples. As a fit tests may lack power in small samples. As a

guideline, a chiguideline, a chi--square goodnesssquare goodness--ofof--fit test should be avoided fit test should be avoided gu de e, a cgu de e, a c squa e good esssqua e good ess oo t test s ou d be a o dedt test s ou d be a o ded if if nn < 25.< 25.

15-27

C ha

15.3 Uniform 15.3 Uniform GoodnessGoodness--ofof--Fit TestFit Test pter 1

LO15LO15--44 15

LO15LO15--4: 4: Perform a goodness ofPerform a goodness of--fit (GOF) test for a uniformfit (GOF) test for a uniform distributiondistribution

Uniform DistributionUniform Distribution distribution.distribution.

•• The The uniform goodnessuniform goodness--ofof--fitfit test is a special case of the multinomial test is a special case of the multinomial in which every value has the same chance of occurrence.in which every value has the same chance of occurrence.

•• The chiThe chi--square test for a uniform distribution compares all square test for a uniform distribution compares all cc groups groups simultaneously.simultaneously.

•• The hypotheses are:The hypotheses are: H0: 1 = 2 = …, c = 1/c H : Not all  are equalH1: Not all j are equal

15-28

C hapter 1

15.3 Uniform 15.3 Uniform GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--44

Uniform GOF Test: Grouped DataUniform GOF Test: Grouped Data

15

•• The test can be performed on data that are already tabulated The test can be performed on data that are already tabulated into groups.into groups.

•• Calculate the expected frequency Calculate the expected frequency eejj for each cell.for each cell. •• The degrees of freedom are The degrees of freedom are dfdf = = cc –– 1 because there are no 1 because there are no

parameters for fitting the uniform distribution.parameters for fitting the uniform distribution. •• Obtain the critical value Obtain the critical value 22 from Appendix E for the desired level from Appendix E for the desired level

of significanceof significance of significance of significance .. •• The The pp--value can be obtained from the Excel function value can be obtained from the Excel function

=CHISQ.DIST.RT(=CHISQ.DIST.RT(22calccalc,, dfdf))CHISQ.DIST.RT(CHISQ.DIST.RT( calccalc, , dfdf)) •• Reject Reject HH00 if if pp--value value  ..

15-29

C hapter 1

15.3 Uniform 15.3 Uniform GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--44

Uniform GOF Test: Raw DataUniform GOF Test: Raw Data

15

•• First form First form cc bins of equal width and create a frequency distribution.bins of equal width and create a frequency distribution. •• Calculate the observed frequency Calculate the observed frequency ffjj for each bin.for each bin.q yq y ffjj •• Define Define eejj = = n/c.n/c. •• Perform the chiPerform the chi--square calculations.square calculations.qq •• The degrees of freedom are The degrees of freedom are dfdf = c = c –– 1 since there are no 1 since there are no

parameters for the uniform distribution.parameters for the uniform distribution. •• Obtain the critical value from Appendix E for a given significance Obtain the critical value from Appendix E for a given significance

level level  and make the decision.and make the decision.

15-30

C hapter 1

15.3 Uniform 15.3 Uniform GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--44

Uniform GOF Test: Raw DataUniform GOF Test: Raw Data

15

•• Maximize the test’s power by defining bin width asMaximize the test’s power by defining bin width as

•• As a result, the expected frequencies will be as large as possible.As a result, the expected frequencies will be as large as possible.

15-31

C hapter 1

15.3 Uniform 15.3 Uniform GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--44

Uniform GOF Test: Raw DataUniform GOF Test: Raw Data

15

•• Calculate the mean and standard deviation of the uniform Calculate the mean and standard deviation of the uniform distribution as:distribution as:

•• If the data are not skewed and the sample size is large (If the data are not skewed and the sample size is large (nn > 30), > 30), then the mean is approximately normally distributedthen the mean is approximately normally distributedthen the mean is approximately normally distributed. then the mean is approximately normally distributed.

•• So, test the hypothesized uniform mean using So, test the hypothesized uniform mean using

15-32

C ha

15.4 Poisson 15.4 Poisson GoodnessGoodness--ofof--Fit TestFit Test pter 1

LO15LO15--55 15

LO15LO15--5: 5: Explain the GOF test for a Poisson distribution.Explain the GOF test for a Poisson distribution.

I P i di t ib ti d lI P i di t ib ti d l XX t th b ft th b f

Poisson DataPoisson Data--Generating SituationsGenerating Situations •• In a Poisson distribution model, In a Poisson distribution model, XX represents the number of represents the number of

events per unit of time or space.events per unit of time or space. •• XX is a discrete nonnegative integer (is a discrete nonnegative integer (XX = 0 1 2 )= 0 1 2 )XX is a discrete nonnegative integer (is a discrete nonnegative integer (XX = 0, 1, 2, …)= 0, 1, 2, …) •• Event arrivals must be independent of each other.Event arrivals must be independent of each other. •• Sometimes called a model ofSometimes called a model of rare eventsrare events becausebecause XX typically hastypically hasSometimes called a model of Sometimes called a model of rare eventsrare events because because XX typically has typically has

a small mean.a small mean.

15-33

C hapter 1

15.4 Poisson 15.4 Poisson GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--55

Poisson GoodnessPoisson Goodness--ofof--Fit TestFit Test

15

•• The mean The mean  is the only parameter.is the only parameter. •• If If  is unknown, it must be estimated from the sample.is unknown, it must be estimated from the sample. •• Use the estimated Use the estimated  to find the Poisson probability to find the Poisson probability PP((XX) for each ) for each

value of value of XX.. •• Compute the expected frequenciesCompute the expected frequencies•• Compute the expected frequencies.Compute the expected frequencies. •• Perform the chiPerform the chi--square calculations.square calculations. •• Make the decisionMake the decision•• Make the decision.Make the decision. •• You may need to combine classes until expected frequencies You may need to combine classes until expected frequencies

become large enough for the test (at least until become large enough for the test (at least until eejj >> 2).2).g g (g g ( jj ))

15-34

C hapter 1

15.4 Poisson 15.4 Poisson GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--55

Poisson GOF Test: Tabulated DataPoisson GOF Test: Tabulated Data

15

•• Calculate the sample mean as:Calculate the sample mean as:

•• Using this estimate mean, calculate the Poisson probabilities Using this estimate mean, calculate the Poisson probabilities ith b i th P i f lith b i th P i f leither by using the Poisson formulaeither by using the Poisson formula

P(x) = (xe-)/x! or Excel.

15-35

C hapter 1

15.4 Poisson 15.4 Poisson GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--55

Poisson GOF Test: Tabulated DataPoisson GOF Test: Tabulated Data

15

•• For For cc classes with classes with mm = 1 parameter estimated, the degrees of = 1 parameter estimated, the degrees of freedom arefreedom are

dfdf == cc –– mm –– 1 =1 = cc –– 22dfdf = = cc –– mm –– 1 = 1 = cc –– 2.2.

•• Obtain the critical value for a given Obtain the critical value for a given  from Appendix E. from Appendix E.

•• Make the decision.Make the decision.

15-36

15 5 Normal15 5 Normal ChiChi--SquareSquare C

ha 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit Test

pter 1 LO15LO15--66

N l D t G ti Sit tiN l D t G ti Sit ti

15

LO15LO15--6: 6: Use computer software to perform a chiUse computer software to perform a chi--square GOF test for normality.square GOF test for normality.

•• Two parameters, the mean Two parameters, the mean  and the standard deviation and the standard deviation , fully , fully

Normal Data Generating SituationsNormal Data Generating Situations

p ,p ,  , y, y describe the normal distribution.describe the normal distribution.

•• Unless Unless  and and  are known are known aa prioripriori, they must be estimated from a , they must be estimated from a samplesamplesample.sample.

•• Using these statistics, the chiUsing these statistics, the chi--square goodnesssquare goodness--ofof--fit test can be fit test can be used.used.

Method 1: Standardizing the DataMethod 1: Standardizing the Data •• Transform the sample observations Transform the sample observations xx11, , xx22, …, , …, xxnn into into pp 11,, 22, ,, , nn

standardized values.standardized values.

15-37

C ha

15 5 Normal15 5 Normal ChiChi--SquareSquare pter 1 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--66

Method 1: Standardizing the DataMethod 1: Standardizing the Data

15

Advantage is a standardized scale.

Disadvantage is that data are no longer in the original

15-38

are no longer in the original units.

C ha

15 5 Normal15 5 Normal ChiChi--SquareSquare pter 1 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--66

T bt i lT bt i l idth bi di id thidth bi di id th t d tt d t i ti t ff

Method 2: Equal Bin WidthsMethod 2: Equal Bin Widths

15

•• To obtain equalTo obtain equal--width bins, divide the width bins, divide the exact data range exact data range into into cc groups of groups of equal width.equal width.

•• Step 1: Count the sample observations in each bin to get observed Step 1: Count the sample observations in each bin to get observed p p gp p g frequencies frequencies ffjj..

•• Step 2: Convert the bin limits into standardized zStep 2: Convert the bin limits into standardized z--values by using the values by using the f lf lformula.formula.

•• Step 3Step 3: Find the normal area within each bin assuming a normal : Find the normal area within each bin assuming a normal distribution.distribution.

•• Step 4Step 4: Find expected frequencies : Find expected frequencies eejj by multiplying each normal area by multiplying each normal area by the sample size by the sample size nn..

•• Classes may need to be collapsed from the ends inward to enlargeClasses may need to be collapsed from the ends inward to enlarge•• Classes may need to be collapsed from the ends inward to enlarge Classes may need to be collapsed from the ends inward to enlarge expected frequencies.expected frequencies.

15-39

C ha

15 5 Normal15 5 Normal ChiChi--SquareSquare pter 1 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--66

D fi hi t bi i h th t l b fD fi hi t bi i h th t l b f

Method 3: Equal Expected FrequenciesMethod 3: Equal Expected Frequencies

15

•• Define histogram bins in such a way that an equal number of Define histogram bins in such a way that an equal number of observations would be observations would be expectedexpected within each bin under the null within each bin under the null hypothesis.hypothesis.

•• Define bin limits so that Define bin limits so that eejj = = nn//cc •• A normal area of 1/A normal area of 1/cc in each of the in each of the cc bins is desired.bins is desired.

Th fi t d l t l t bTh fi t d l t l t b d d f l di t ib tid d f l di t ib ti•• The first and last classes must be openThe first and last classes must be open--ended for a normal distribution, ended for a normal distribution, so to define so to define cc bins, we need bins, we need cc –– 1 cut1 cut--points.points.

•• The upper limit of bin The upper limit of bin jj can be found directly by using Excel.can be found directly by using Excel.e uppe t o be uppe t o b jj ca be ou d d ect y by us g ceca be ou d d ect y by us g ce •• Alternatively, find Alternatively, find zzjj for bin for bin jj using Excel and then calculate the upper limit using Excel and then calculate the upper limit

for bin for bin jj as as szx j •• Once the bins are defined, count the observations Once the bins are defined, count the observations ffjj within each bin and within each bin and

compare them with the expected frequencies compare them with the expected frequencies eejj = = nn//cc..

15-40

C ha

15 5 Normal15 5 Normal ChiChi--SquareSquare pter 1 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--66

Method 3: Equal Expected FrequenciesMethod 3: Equal Expected Frequencies St d d l tSt d d l t i t f l bii t f l bi

15

•• Standard normal cutStandard normal cut--points for equal area bins.points for equal area bins.

Table 15.16

15-41

C ha

15 5 Normal15 5 Normal ChiChi--SquareSquare pter 1 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--66

HistogramsHistograms •• The fitted normal histogram gives visual clues as to the likelyThe fitted normal histogram gives visual clues as to the likely

15

The fitted normal histogram gives visual clues as to the likely The fitted normal histogram gives visual clues as to the likely outcome of the outcome of the GOFGOF test.test.

•• Histograms reveal any outliers or other nonHistograms reveal any outliers or other non--normality issues.normality issues.g yg y yy •• Further tests are needed since histograms vary.Further tests are needed since histograms vary.

15-42

C ha

15 5 Normal15 5 Normal ChiChi--SquareSquare pter 1 15.5 Normal 15.5 Normal ChiChi--SquareSquare GoodnessGoodness--ofof--Fit TestFit TestLO15LO15--66

Critical Values for Normal GOF TestCritical Values for Normal GOF Test

15

•• Since two parameters, Since two parameters, μμ and and σσ, are estimated from the sample, the , are estimated from the sample, the degrees of freedom are degrees of freedom are dfdf = = c c –– mm –– 1.1.

•• We need at least 4 bins to ensure at least 1 degree of freedom.We need at least 4 bins to ensure at least 1 degree of freedom.

15-43

C ha

15.6 ECDF 15.6 ECDF TestsTests pter 1

LO15LO15--77 15LO15LO15--77: State advantages of ECDF tests as compared to chiState advantages of ECDF tests as compared to chi--square GOF tests.square GOF tests.

•• There are alternatives to the chiThere are alternatives to the chi--square test based on the square test based on the Empirical Cumulative Distribution Function (ECDF). ThTh K lK l S iS i (K(K S) t t th l t b l t diffS) t t th l t b l t diff•• The The KolmogorovKolmogorov--Smirnov Smirnov (K(K--S) test uses the largest absolute difference S) test uses the largest absolute difference between the actual and expected cumulative relative frequency of the between the actual and expected cumulative relative frequency of the nn data values.data values.

•• The The KK--SS test assumes that no parameters are estimated. If parameters test assumes that no parameters are estimated. If parameters are estimated, use a are estimated, use a LillieforsLilliefors test. Both tests are done by computer.test. Both tests are done by computer. ThTh A dA d D li (AD li (A D)D) t t i id l d ft t i id l d f litlit•• The The AndersonAnderson--Darling (ADarling (A--D)D) test is widely used for nontest is widely used for non--normality normality because of its power.because of its power.

•• The AThe A--D test is based on a probability plot. When the data fit theD test is based on a probability plot. When the data fit theThe AThe A D test is based on a probability plot. When the data fit the D test is based on a probability plot. When the data fit the hypothesized distribution closely, the probability plot will be close to a hypothesized distribution closely, the probability plot will be close to a straight line.straight line.

15-44

page 453.pdf

page 658.pdf

page 662.pdf

Physicians.xlsx

Data

Time in Examination Rooms (minutes)
Physician 1 Physician 2 Physician 3 Physician 4
34 33 17 28
25 35 30 33
27 31 30 31
31 31 26 27
26 42 32 32
34 33 28 33
21 26 40
29

Extra Sheet

Abuse.xlsx

Data

Computer Abuse Incidents Cross-Tabulated by Punishment and Privilege
Level of Privilege Disciplined Not Disciplined Row Total
Low 20 11 31
Medium 42 3 45
High 33 3 36
Col Total 95 17 112

Extra Sheet

page 450.pdf

Week 6 Overview.pdf

 

Chapter 8 (Section 8.10), Chapter 9 (Section 9.7), Chapter 10 (Section 10.7) Hypothesis Tests and Estimation for Population Variances

Chapter 15 Chi Square Tests

Chapter 11 (Sections 11.1, 11.2, and 11.3) ANOVA

Learning Objectives

After studying the material in Chapter 8 (Section 8.10), Chapter 9 (Section 9.7), Chapter 10 (Section 10.7), you should:

1. Formulate and carry out hypothesis tests for a single population variance. 2. Develop and interpret confidence interval estimates for a single population variance. 3. Formulate and carry out hypothesis tests for the difference between two population variances.

After studying the material in Chapter 15, you should:

1. Recognize a contingency table. 2. Find degrees of freedom and use the chi-square table of critical values. 3. Perform a chi-square test of independence on a contingency table. 4. Perform a goodness of fit test for a uniform distribution. 5. Explain the goodness of fit test for a Poisson distribution. 6. Perform a chi-square goodness of fit test for normality. 7. Know the advantages of ECDF tests as compared to chi-square goodness of fit tests.

After studying the material in Chapter 11 (Sections 11.1, 11.2, and 11.3), you should:

1. Understand the basic logic of analysis variance. 2. Perform a hypothesis test for a single factor design using analysis of variance. 3. Conduct and interpret post-analysis of variance pairwise comparison procedures.

Suggested Study Outline

1. First, briefly go through chapter 8 (section 8.10), chapter 9 (section 9.7), chapter 10 (section 10.7), chapter 15, and chapter 11 (sections 11.1 to 11.3) in the textbook to familiarize yourself with the material.

2. Then, skim through the power point slides which highlight key chapter material, and the lecture files in the “course media player” (these provide a synopsis of the weeks’ chapters).

3. Go through chapter 8 (section 8.10), chapter 9 (section 9.7), chapter 10 (section 10.7), chapter 15, and chapter 11 (sections 11.1 to 11.3) in the textbook in detail again and take a look at the sample problems before attempting the assignment.

Assignment (32 points due by 11 pm August 4th; extended to 11 pm August 5th))

 

Note: You can team up with one of your classmates to complete the assignment (not more than two in a team); if you want to work on the assignment individually, that’s also fine. If you are working in teams, then only one submission is required per team; include both the team members’ last names as part of the assignment submission file name as well as in the assignment submission document. Please provide detailed solutions to the following problems/exercises (4 problems/exercises x 8 points each): 1) Problem 15.4 (page 658 in the text)

2) Problem 15.6 (page 662 in the text)

3) Problem 11.6 (page 450 in the text)

4) Problem 11.12 (page 453 in the text)

Refer to the “Assignments” section in the syllabus and the “Course Orientation” document for more information/instructions regarding assignment submissions. Threaded Discussion (8 points due by 11 pm August 4th; extended to 11 pm August 5th) Ethics & Profiling Because statistics is designed to gain information about groups more than about individuals, the issue of when it may be unethical to treat an individual as a member of group is of particular interest. To help us consider whether we should distinguish the case of when race is a component in a profile from the case of when it is the only component (for example, one can consider the heightened relevancy by airport security in the aftermath of 9/11), writers such as Kinsley (2001) explain that racial profiling ‘has become virtually a synonym for racial discrimination; but if racial profiling means anything specific at all, it means rational discrimination: racial discrimination with a non-racist rationale.’ One view is that such generalizations as morally wrong ‘even if they are statistically valid, and even if not acting on them imposes a real cost;’ i.e. profiling is immoral to the extent that it denies a person’s personhood or reduces a person to an object. Another view is that profiling is neutral or at least acceptable based on the ‘greatest good for the greatest number’ criterion. What are your thoughts on this ethics-profiling (profiling per se is objectionable whatever the cause/reason may be; profiling is acceptable or a necessary evil; and so on)? References: 1) Lesser, L.M. and Nordenhaug, E. (2004). Ethical Statistics & Statistical Ethics: Making an Interdisciplinary Module, Journal of Statistics Education, 12(3). 2) McAplin, J. P. (October 13, 2000). Memos: N.J. Knew of Racial Profiling, Savannah Morning News. 3) Kinsley, M. (October 2, 2001). Some forms of rational discrimination may be acceptable to ensure safety, Savannah Morning News. Please note that you are required to post at least once (the minimum required) directly to this topic posting or to the discussion postings of fellow students. If you do one additional posting (either directly to the topic posting or to the postings of fellow students) you get an extra credit of 4 points (the maximum extra credit available is 4 points irrespective of the number of additional postings you do). In all your postings please ensure “netiquette” is maintained.

 

Refer to the “Threaded Discussions” section in the syllabus and the “Course Orientation” document for more information/instructions regarding threaded discussion postings.

Assignment Week 6.doc

Due by 11pm August 4th; extended to 11 pm August 5th

Chapter 8 (Section 8.10), Chapter 9 (Section 9.7), Chapter 10 (Section 10.7)

Hypothesis Tests and Estimation for Population Variances

Chapter 15

Chi Square Tests

Chapter 11 (Sections 11.1, 11.2, and 11.3)

ANOVA

Upload the completed assignment using the file extension format Lastname_Firstname_Week6.doc.

Assignment

(32 points due by 11 pm August 4th; extended to 11 pm August 5th)

Note: You can team up with one of your classmates to complete the assignment (not more than two in a team); if you want to work on the assignment individually, that’s also fine. If you are working in teams, then only one submission is required per team; include both the team members’ last names as part of the assignment submission file name as well as in the assignment submission document.

Please provide detailed solutions to the following problems/exercises (4 problems/exercises x 8 points each):

1) Problem 15.4 (page 658 in the text)

2) Problem 15.6 (page 662 in the text)

3) Problem 11.6 (page 450 in the text)

4) Problem 11.12 (page 453 in the text)

1