Transcript Ch11 - YSU

Chapter 11 Comparisons Involving Proportions and A Test of Independence

1

Chapter Outline

 Goodness of Fit test  Test of Independence 2

Goodness of Fit Test  Hypothesis test for proportions of a multinomial population  It compares the observed and expected frequencies in each category to test either that all categories contain the same proportion of values or that each category contains a user-specified proportion of values.

3

Goodness of Fit Test  Procedure 1. Set up the null and alternative hypotheses; 2. Select a random sample and record the observed frequency,

f i

, for each of the

k

categories; 3. Assuming

H 0

is true, compute the expected frequency,

e i

, in each category by multiplying the category probability by the sample size.

4

Goodness of Fit Test  Procedure 4. Compute the value of the test statistic:  2 

i k

  1 (

f i

e i

) 2

e i

where:

f i e i

= observed frequency for category = expected frequency for category

i i k

= number of categories Note: The test statistic has a chi-square distribution with

k

– 1 degrees of freedom provided that the expected frequencies are 5 or more for all categories.

5

Goodness of Fit Test  Procedure 5. Rejection rule:

p

-value approach: Reject

H

0 if

p

-value <  Critical value approach: Reject

H

0 if    2 where  is the significance level and there are

k

- 1 degrees of freedom 6

 Goodness of Fit Test Example: Market Share In the Scott Market Research example in the textbook, after company C introduced a new product to the market, a survey was conducted on 200 customers to study if there is any change in the market shares. Out of the 200 customers, 48 prefer company A’s product, 98 prefer company B’s, and 54 prefer company’s C’s. Before the introduction of the new product by company C, the market shares of the three companies were:

p A

 0 .

3 ,

p B

 0 .

5 ,

p C

 0 .

2 7

Goodness of Fit Test   Example: Market Share Hypotheses H 0 :

p

A = .3;

p B

= .5;

p

C = .2

H a : The population proportions are not

p

A = .3;

p B

= .5;

p

C = .2

where:

p

A = the population market share of company A;

p B

= the population market share of company B;

p

C = the population market share of company C.

8

Goodness of Fit Test   Example: Market Share Rejection rule Reject H 0 if p-value < .05 or  2 > 5.99.

With  = .05 and k - 1 = 3 - 1 = 2 degrees of freedom Do Not Reject H 0 5.99

Reject H 0  2 9

Goodness of Fit Test   Example: Market Share Expected Frequencies 

e A

=.3(200)=60;

e B

=.5(200)=100;

e C

=.2(200)=40 Observed Frequencies

f A

= 48;

f B

= 98;

f C

= 54  Test Statistic  2   48  60   98  100   54  40  2 60 100 40 = 2.4+0.04+4.9

= 7.34

10

Goodness of Fit Test   Example: Market Share

p

-Value Approach Area in Upper Tail .10 .05 .025 .01 .005

 2 Value (df = 2) 4.6 5.99 7.38 9.21 10.60

Because  2 = 7.34 is between 5.99 and 7.38, the area in the upper tail of the distribution is between .05 and .025.

The

p

-value <  = .05. We can reject the null hypothesis.

11

Goodness of Fit Test   Example: Market Share Critical Value Approach  2 = 7.34 > 5.99

We reject, at the .05 level of significance, the assumption that the market shares of companies A, B, and C remain the same after Company C introduced a new product.

12

Test of Independence: Contingency Tables  Hypothesis test for independence between two variables.

 Similar to a Goodness of Fit test, it computes  2 test statistic based on the observed frequencies and expected frequencies (assuming the null hypothesis is true, i.e. the two variables are independent from each other). 13

Test of Independence  Procedure 1. Set up the null and alternative hypotheses; 2. Select a random sample and record the observed frequency,

f ij

, for each cell of the contingency table; 3. Assuming

H 0

is true, compute the expected frequency,

e ij

, for each cell as follows:

e ij

j

Sample Size 14

Test of Independence  Procedure 4. Compute the test statistic  2  

i

j

(

f ij

e ij

) 2

e ij

5. Determine the rejection rule Reject

H

0 if

p

-value <  or  2   .  2 where  is the significance level and, with

n

rows and

m

columns, there are (

n

- 1)(

m

- 1) degrees of freedom.

15

 Test of Independence Example: Field of Study The following table shows the results of recent study regarding gender of individuals and their selected field of study.

Field of Study Male Female Total Medicine

80 40 120

Business Engineering

60 20 80 160 40 200

Total

300 100 400 16

Test of Independence   Example: Field of Study Hypothesis

H

0 : Field of study

is independent

of gender

H

a : Field of study

is not independent

of gender 17

Test of Independence   Example: Field of Study Expected Frequencies

Field of Study Male Female Total Medicine Business Engineering

300*120/400 =

90

100*120/400 =

30

120 300*80/400 =

60

100*80/400 =

20

80 300*200/400 =

150

100*200/400 =

50

200

Total

300 100 400 18

Test of Independence   Example: Field of Study Rejection Rule Reject

H

0  2 if

p

-value <  =.05 or > 5.99 [d.f. = (2-1)(3-1)=2].

 Test Statistic  2   80  90   60  60  2 90 60     40  50  2 50 = 1.11 + 0 + . . . + 2 = 7.11

19

Test of Independence   Example: Field of Study

p

-Value Approach Area in Upper Tail .10 .05 .025 .01 .005

 2 Value (df = 2) 4.6 5.99 7.38 9.21 10.60

Because  2 = 7.11 is between 5.99 and 7.38, the area in the upper tail of the distribution is between .05 and .025.

The

p

-value <  = .05. We can reject the null hypothesis.

20

Test of Independence   Example: Field of Study Critical Value Approach  2 = 7.11 > 5.99

We reject, at the .05 level of significance, the null hypothesis that the selected field of study is independent of gender.

21