Tải bản đầy đủ - 0 (trang)
1: Chi-Square Tests for Univariate Data

# 1: Chi-Square Tests for Univariate Data

Tải bản đầy đủ - 0trang

12.1 Chi-Square Tests for Univariate Data

575

The hypotheses to be tested have the form

H0: p1 ϭ hypothesized proportion for Category 1

p2 ϭ hypothesized proportion for Category 2

(

pk ϭ hypothesized proportion for Category k

Ha: H0 is not true, so at least one of the true category proportions differs

from the corresponding hypothesized value.

For the example involving responses to the tax survey, let

p1 ϭ the proportion of all taxpayers who will definitely pay by credit card

p2 ϭ the proportion of all taxpayers who will probably pay by credit card

p3 ϭ the proportion of all taxpayers who will probably not pay by credit card

and

p4 ϭ the proportion of all taxpayers who will definitely not pay by credit card

The null hypothesis of interest is then

H0: p1 ϭ .25, p2 ϭ .25, p3 ϭ .25, p4 ϭ .25

A null hypothesis of the type just described can be tested by first selecting a random

sample of size n and then classifying each sample response into one of the k possible

categories. To decide whether the sample data are compatible with the null hypothesis,

we compare the observed cell counts (frequencies) to the cell counts that would have

been expected when the null hypothesis is true. The expected cell counts are

Expected cell count for Category 1 ϭ np1

Expected cell count for Category 2 ϭ np2

and so on. The expected cell counts when H0 is true result from substituting the corresponding hypothesized proportion for each pi.

Anthony Ise/PhotoDisc/Getty Images//

Cengage Learning/Getty Images

E X A M P L E 1 2 . 1 Births and the Lunar Cycle

A common urban legend is that more babies than expected are born during certain

phases of the lunar cycle, especially near the full moon. The paper “The Effect of the

Lunar Cycle on Frequency of Births and Birth Complications” (American Journal

of Obstetrics and Gynecology [2005]: 1462–1464) classified births according to the

lunar cycle. Data for a sample of randomly selected births occurring during 24 lunar

Lunar Phase

New moon

Waxing crescent

First quarter

Waxing gibbous

Full moon

Waning gibbous

Last quarter

Waning crescent

Number

of Days

Number

of Births

24

152

24

149

24

150

24

152

7,680

48,442

7,579

47,814

7,711

47,595

7,733

48,230

Data set available online

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

576

Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests

cycles consistent with summary quantities appearing in the paper are given in the accompanying table.

Let’s define lunar phase category proportions as follows:

p1 ϭ proportion of births that occur during the new moon

p2 ϭ proportion of births that occur during the waxing crescent moon

p3 ϭ proportion of births that occur during the first quarter moon

p4 ϭ proportion of births that occur during the waxing gibbous moon

p5 ϭ proportion of births that occur during the full moon

p6 ϭ proportion of births that occur during the waning gibbous moon

p7 ϭ proportion of births that occur during the last quarter moon

p8 ϭ proportion of births that occur during the waning crescent moon

If there is no relationship between number of births and the lunar cycle, then the

number of births in each lunar cycle category should be proportional to the number

of days included in that category. Since there are a total of 699 days in the 24 lunar

cycles considered and 24 of those days are in the new moon category, if there is no

relationship between number of births and lunar cycle,

p1 5

24

5 .0343

699

Similarly, in the absence of any relationship,

p2 5

152

5 .2175

699

p3 5

24

5 .0343

699

p4 5

149

5 .2132

699

p5 5

24

5 .0343

699

p7 5

24

5 .0343

699

150

5 .2146

699

152

p8 5

5 .2175

699

p6 5

The hypotheses of interest are then

H0: p1 ϭ .0343, p2 ϭ .2175, p3 ϭ .0343, p4 ϭ .2132, p5 ϭ .0343, p6 ϭ .2146,

p7 ϭ .0343, p8 ϭ .2175

Ha: H0 is not true.

There were a total of 222,784 births in the sample, so if H0 is true, the expected

counts for the first two categories are

a

expected count

hypothesized proportion

b 5 na

b

for new moon

for new moon

5 222,784 1.03432 5 7641.49

a

expected count

hypothesized proportion

b 5 na

b

for waxing crescent

for waxing crescent

5 222,784 1.21752 5 48,455.52

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

12.1 Chi-Square Tests for Univariate Data

577

Expected counts for the other six categories are computed in a similar fashion, and

observed and expected cell counts are given in the following table.

Lunar Phase

New moon

Waxing crescent

First quarter

Waxing gibbous

Full moon

Waning gibbous

Last quarter

Waning crescent

Observed Number

of Births

Expected Number

of Births

7,680

48,442

7,579

47,814

7,711

47,595

7,733

48,230

7,641.49

48,455.52

7,641.49

47,497.55

7,641.49

47,809.45

7,641.49

48,455.52

Because the observed counts are based on a sample of births, it would be somewhat surprising to see exactly 3.43% of the sample falling in the first category, exactly

21.75% in the second, and so on, even when H0 is true. If the differences between

the observed and expected cell counts can reasonably be attributed to sampling variation, the data are considered compatible with H0. On the other hand, if the discrepancy between the observed and the expected cell counts is too large to be attributed

solely to chance differences from one sample to another, H0 should be rejected in

favor of Ha. To make a decision, we need an assessment of how different the observed

and expected counts are.

The goodness-of-fit statistic, denoted by X 2, is a quantitative measure of the extent to which the observed counts differ from those expected when H0 is true. (The

Greek letter x is often used in place of X. The symbol X 2 is referred to as the chisquare [x2] statistic. In using X 2 rather than x2, we are adhering to the convention of

denoting sample quantities by Roman letters.)

The goodness-of-fit statistic, X 2, results from first computing the quantity

1observed cell count 2 expected cell count2 2

expected cell count

for each cell, where, for a sample of size n,

a

expected cell

hypothesized value of corresponding

b 5 na

b

count

population proportion

The X 2 statistic is the sum of these quantities for all k cells:

1observed cell count 2 expected cell count2 2

X2 5 a

expected cell count

all cells

The value of the X 2 statistic reflects the magnitude of the discrepancies between

observed and expected cell counts. When the differences are sizable, the value of X 2

tends to be large. Therefore, large values of X 2 suggest rejection of H0. A small value

of X 2 (it can never be negative) occurs when the observed cell counts are quite similar

to those expected when H0 is true and so would be consistent with H0.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

578

Chapter 12

The Analysis of Categorical Data and Goodness-of-Fit Tests

As with previous test procedures, a conclusion is reached by comparing a P-value

to the significance level for the test. The P-value is computed as the probability of

observing a value of X 2 at least as large as the observed value when H0 is true. This

requires information about the sampling distribution of X 2 when H0 is true.

When the null hypothesis is correct and the sample size is sufficiently large, the

behavior of X 2 is described approximately by a chi-square distribution. A chi-square

curve has no area associated with negative values and is asymmetric, with a longer tail

on the right. There are actually many chi-square distributions, each one identified

with a different number of degrees of freedom. Curves corresponding to several chisquare distributions are shown in Figure 12.1.

df = 8

df = 12

df = 20

FIGURE 12.1

Chi-square curves.

For a test procedure based on the X 2 statistic, the associated P-value is the area under

the appropriate chi-square curve and to the right of the computed X 2 value. Appendix

Table 8 gives upper-tail areas for chi-square distributions with up to 20 df. Our chisquare table has a different appearance from the t table used in previous chapters. In the

t table, there is a single “value” column on the far left and then a column of P-values (tail

areas) for each different number of degrees of freedom. A single column of t values works

for the t table because all t curves are centered at 0, and the t curves approach the z curve

as the number of degrees of freedom increases. However, because the chi-square curves

move farther and farther to the right and spread out more as the number of degrees of

freedom increases, a single “value” column is impractical in this situation.

Chi-square curve for 4 df

FIGURE 12.2

A chi-square upper-tail area.

8.18

To find the area to the right of a particular X 2 value, locate the appropriate df

column in Appendix Table 8. Determine which listed value is closest to the X 2 value

of interest, and read the right-tail area corresponding to this value from the left-hand

column of the table. For example, for a chi-square distribution with df ϭ 4, the area

to the right of X 2 ϭ 8.18 is .085, as shown in Figure 12.2. For this same chi-square

distribution (df ϭ 4), the area to the right of 9.70 is approximately .045 (the area to

the right of 9.74, the closest entry in the table for df ϭ 4).

It is also possible to use computer software or a graphing calculator to compute

areas under a chi-square curve. This provides more accurate values for the area.

Goodness-of-Fit Tests

When H0 is true, the X 2 goodness-of-fit statistic has approximately a chi-square

distribution with df ϭ (k Ϫ 1), as long as none of the expected cell counts are too

small. When expected counts are small, and especially when an expected count is less

1observed cell count 2 expected cell count2 2

can be inflated

than 1, the value of

expected cell count

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

12.1 Chi-Square Tests for Univariate Data

579

because it involves dividing by a small number. It is generally agreed that use of the

chi-square distribution is appropriate when the sample size is large enough for every expected cell count to be at least 5. If any of the expected cell frequencies are less than 5,

categories can be combined in a sensible way to create acceptable expected cell counts.

Just remember to compute the number of degrees of freedom based on the reduced

number of categories.

Goodness-of-Fit Test Procedure

Hypotheses:

Test statistic:

H0: p1 ϭ hypothesized proportion for Category 1

(

pk ϭ hypothesized proportion for Category k

Ha: H0 is not true

1observed cell count 2 expected cell count2 2

expected cell count

all cells

X2 5 a

P-values: When H0 is true and all expected counts are at least 5, X 2 has

approximately a chi-square distribution with df ϭ k Ϫ 1. Therefore, the

P-value associated with the computed test statistic value is the area to the

right of X 2 under the df 5 k 2 1 chi-square curve. Upper-tail areas for

chi-square distributions are found in Appendix Table 8.

Assumptions:

1. Observed cell counts are based on a random sample.

2. The sample size is large. The sample size is large

enough for the chi-square test to be appropriate as

long as every expected cell count is at least 5.

E X A M P L E 1 2 . 2 Births and the Lunar Cycle Revisited

We use the births data of Example 12.1 to test the hypothesis that number of births

is unrelated to lunar cycle. Let’s use a .05 level of significance and the nine-step

hypothesis-testing procedure illustrated in previous chapters.

1. Let p1, p2, p3, p4, p5, p6, p7, and p8 denote the proportions of all births falling in

the eight lunar cycle categories as defined in Example 12.1.

2. H0: p1 5 .0343, p2 ϭ .2175, p3 ϭ .0343, p4 ϭ .2132, p5 ϭ .0343, p6 ϭ .2146,

p7 ϭ .0343, p8 ϭ .2175

3. Ha: H0 is not true.

4. Significance level: a ϭ .05.

1observed cell count 2 expected cell count2 2

expected cell count

all cells

5. Test statistic: X 2 5 a

6. Assumptions: The expected cell counts (from Example 12.1) are all greater than

5. The births represent a random sample of births occurring during the lunar

cycles considered.

7. Calculation:

X2 5

17680 2 7641.492 2

148230 2 48455.522 2

148442 2 48455.522 2

1

1%1

7641.49

48455.52

48455.52

5 .194 1 .004 1 .511 1 2.108 1 .632 1 .962 1 1.096 1 1.050

5 6.557

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

580

Chapter 12

The Analysis of Categorical Data and Goodness-of-Fit Tests

8. P-value: The P-value is based on a chi-square distribution with df ϭ 8 Ϫ 1 ϭ

7. The computed value of X 2 is smaller than 12.01 (the smallest entry in the

df ϭ 7 column of Appendix Table 8), so P-value Ͼ .10.

9. Conclusion: Because P-value Ͼ a, H0 cannot be rejected. There is not sufficient

evidence to conclude that number of births and lunar cycle are related. This is

consistent with the conclusion in the paper: “We found no statistical evidence that

deliveries occurred in a predictable pattern across the phases of the lunar cycle.”

Statistical software can be used to perform a chi-square goodness-of-fit test.

Minitab output for the data and hypothesized proportions of this example is shown

here.

Chi-Square Goodness-of-Fit Test for Observed Counts in Variable: Number of Births

Using category names in Lunar Phase

Category

First Quarter

Full Moon

Last Quarter

New Moon

Waning Crescent

Waning Gibbous

Waxing Crescent

Waxing Gibbous

N

DF

222784

7

Observed

7579

7711

7733

7680

48230

47595

48442

47814

Chi-Sq

6.55683

Test

Proportion

0.0343

0.0343

0.0343

0.0343

0.2175

0.2146

0.2175

0.2132

P-Value

0.476

Expected

7641.5

7641.5

7641.5

7641.5

48455.5

47809.4

48455.5

47497.5

Contribution

to Chi-Sq

0.51105

0.63227

1.09584

0.19406

1.04961

0.96189

0.00377

2.10835

Note that Minitab has reordered the categories from smallest to largest based

on the observed count. Minitab also carried a bit more decimal accuracy in the computation of the chi-square statistic, reporting X 2 ϭ 6.55683 and an associated

P-value of .476. The computed P-value ϭ .476 is consistent with the statement

P-value Ͼ .10 from Step 8 of the hypothesis test.

E X A M P L E 1 2 . 3 Hybrid Car Purchases

USA Today (“Hybrid Car Sales Rose 81% Last Year,” April 25, 2005) reported the

top five states for sales of hybrid cars in 2004 as California, Virginia, Washington,

Florida, and Maryland. Suppose that each car in a sample of 2004 hybrid car sales is

classified by state where the sale took place. Sales from states other than the top five

were excluded from the sample, resulting in the accompanying table.

State

California

Virginia

Washington

Florida

Maryland

Total

Data set available online

Observed Frequency

250

56

34

33

33

406

(The given observed counts are artificial, but they are consistent with hybrid sales

figures given in the article.)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

12.1 Chi-Square Tests for Univariate Data

581

We will use the X 2 goodness-of-fit test and a significance level of a ϭ .01 to

test the hypothesis that hybrid sales for these five states are proportional to the

2004 population for these states. 2004 population estimates from the Census Bureau web site are given in the following table. The population proportion for each

state was computed by dividing each state population by the total population for

all five states.

State

2004 Population

Population Proportion

35,842,038

7,481,332

6,207,046

17,385,430

5,561,332

72,477,178

0.495

0.103

0.085

0.240

0.077

California

Virginia

Washington

Florida

Maryland

Total

If these same population proportions hold for hybrid car sales, the expected

counts are

Expected count for California

Expected count for Virginia

Expected count for Washington

Expected count for Florida

Expected count for Maryland

5

5

5

5

5

406 1.4952

406 1.1032

406 1.0852

406 1.2402

406 1.0772

5

5

5

5

5

200.970

41.818

34.510

97.440

31.362

These expected counts have been entered in Table 12.1.

T AB LE 12 .1 Observed and Expected Counts for Example 12.3

State

California

Virginia

Washington

Florida

Maryland

Observed Counts

Expected Counts

250

56

34

33

33

200.970

41.818

34.510

97.440

31.262

1. Let p1, p2, ... , p5 denote the actual proportion of hybrid car sales for the five states

in the following order: California, Virginia, Washington, Florida, and

Maryland.

2. H0: p1 5 .495, p2 ϭ .103, p3 ϭ .085, p4 ϭ .240, p5 ϭ .077

3. Ha: H0 is not true.

4. Significance level: a ϭ .01

1observed cell count 2 expected cell count2 2

expected cell count

all cells

5. Test statistic: X 2 5 a

6. Assumptions: The sample was a random sample of hybrid car sales. All expected

counts are greater than 5, so the sample size is large enough to use the chi-square

test.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

582

Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests

7. Calculation: From Minitab

Chi-Square Goodness-of-Fit Test for Observed

Counts in Variable: Hybrid Sales

Using category names in State

Category

California

Florida

Maryland

Virginia

Washington

N

DF

406

4

Observed

250

33

33

56

34

Chi-Sq

59.4916

Test

Proportion

0.495

0.240

0.077

0.103

0.085

P-Value

0.000

Expected

200.970

97.440

31.262

41.818

34.510

Contribution

to Chi-Sq

11.9617

42.6161

0.0966

4.8096

0.0075

8. P-value: All expected counts exceed 5, so the P-value can be based on a chisquare distribution with df ϭ 5 Ϫ 1 ϭ 4. From Minitab, the P-value is 0.000.

9. Conclusion: Since P-value Յ a, H0 is rejected. There is convincing evidence that

hybrid sales are not proportional to population size for at least one of the five

states.

Based on the hybrid sales data, we have determined that there is convincing evidence

that at least one of these five states has hybrid sales that are not proportional to population size. Looking back at the Minitab output, notice that there is a column

labeled “Contribution to Chi-Sq.” This column shows the individual values of

1observed cell count 2 expected cell count2 2

, which are summed to produce the

expected cell count

value of the chi-square statistic. Notice that the two states with the largest contribution to the chi-square statistic are Florida and California. For Florida, observed hybrid sales were smaller than expected (observed 5 33, expected 5 97.44), whereas for

California observed sales were higher than expected (observed 5 250, expected 5

200.970).

EX E RC I S E S 1 2 . 1 - 1 2 . 1 3

12.1 From the given information in each case below,

state what you know about the P-value for a chi-square

test and give the conclusion for a significance level of

a ϭ .01.

d. X 2 ϭ 21.3, df ϭ 4

a. X 2 ϭ 7.5, df ϭ 2

2

e. X 2 ϭ 5.0, df ϭ 3

b. X ϭ 13.0, df ϭ 6

2

c. X ϭ 18.0, df ϭ 9

12.2 A particular paperback book is published in a

choice of four different covers. A certain bookstore keeps

copies of each cover on its racks. To test the hypothesis

that sales are equally divided among the four choices, a

random sample of 100 purchases is identified.

Data set available online

a. If the resulting X 2 value were 6.4, what conclusion

would you reach when using a test with significance

level .05?

b. What conclusion would be appropriate at significance level .01 if X 2 5 15.3?

c. If there were six different covers rather than just

four, what would you conclude if X 2 5 13.7 and a

test with a ϭ .05 was used?

12.3 Packages of mixed nuts made by a certain company contain four types of nuts. The percentages of nuts

of Types 1, 2, 3, and 4 are supposed to be 40%, 30%,

20%, and 10%, respectively. A random sample of nuts is

selected, and each one is categorized by type.

Video Solution available

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

12.1 Chi-Square Tests for Univariate Data

a. If the sample size is 200 and the resulting test statistic value is X 2 5 19.0, what conclusion would be

appropriate for a significance level of .001?

b. If the random sample had consisted of only 40 nuts,

would you use the chi-square test here? Explain your

reasoning.

12.4

The article “In Bronx, Hitting Home Runs Is A

Breeze” (USA Today, June 2, 2009) included a classification of 87 home runs hit at the new Yankee Stadium

according to direction that the ball was hit, resulting in

the accompanying data.

Direction

Number of

Home Runs

Left Left

Center Right Right

Field Center

Center Field

18

10

7

18

The authors of the paper “Racial Stereotypes in

Children’s Television Commercials” (Journal of Advertising Research [2008]: 80–93) counted the number of

times that characters of different ethnicities appeared in

commercials aired on Philadelphia television stations, resulting in the data in the accompanying table.

Ethnicity

Observed

Frequency

AfricanAmerican

57

Asian Caucasian Hispanic

11

330

6

Number of Correct Identifications

0

1

2

Observed Count

21

10

13

a. Can a person identify her roommate by smell? If not,

the data from the experiment should be consistent

with what we would have expected to see if subjects

were just guessing on each trial. That is, we would

expect that the probability of selecting the correct shirt

would be 1/3 on each of the two trials. It would then

be reasonable to regard the number of correct identifications as a binomial variable with n ϭ 2 and p ϭ 1/3.

Use this binomial distribution to compute the proportions of the time we would expect to see 0, 1, and 2

correct identifications if subjects are just guessing.

b. Use the three proportions computed in Part (a) to

carry out a test to determine if the numbers of correct identifications by the students in this study are

significantly different than what would have been

expected by guessing. Use a ϭ .05. (Note: One of

the expected counts is just a bit less than 5. For purposes of this exercise, assume that it is OK to proceed with a goodness-of-fit test.)

The paper “Cigarette Tar Yields in Relation to

Mortality from Lung Cancer in the Cancer Prevention

Study II Prospective Cohort” (British Medical Journal

[2004]: 72–79) included the accompanying data on the

12.7

Based on the 2000 Census, the proportion of the U.S.

population falling into each of these four ethnic groups are

.177 for African-American, .032 for Asian, .734 for Caucasian, and .057 for Hispanic. Do the data provide sufficient

evidence to conclude that the proportions appearing in

commercials are not the same as the census proportions?

Test the relevant hypotheses using a significance level of .01.

12.6 The paper “Sociochemosensory and Emotional

Functions” (Psychological Science [2009]: 1118–1124)

describes an interesting experiment to determine if college

students can identify their roommates by smell. Forty-four

female college students participated as subjects in the experiment. Each subject was presented with a set of three

t-shirts that were identical in appearance. Each of the three

t-shirts had been slept in for at least 7 hours by a person

who had not used any scented products (like scented deodorant, soap, or shampoo) for at least 48 hours prior to

sleeping in the shirt. One of the three shirts had been worn

by the subject’s roommate. The subject was asked to identify the shirt worn by her roommate. This process was then

repeated with another three shirts, and the number of times

out of the two trials that the subject correctly identified the

shirt worn by her roommate was recorded. The resulting

data is given in the accompanying table.

34

a. Assuming that it is reasonable to regard this sample

of 87 home runs as representative of home runs hit

at Yankee Stadium, carry out a hypothesis test to

determine if there is convincing evidence that the

proportion of home runs hit is not the same for all

five directions.

b. Write a few sentences describing how the observed

counts for the five directions differ from what would

have been expected if the proportion of home runs is

the same for all five directions.

12.5

583

Data set available online

tar level of cigarettes smoked for a sample of male smokers who subsequently died of lung cancer.

Tar Level

Frequency

0–7 mg

8–14 mg

15–21 mg

Ն22 mg

103

378

563

150

Video Solution available

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

584

Chapter 12

The Analysis of Categorical Data and Goodness-of-Fit Tests

Assume it is reasonable to regard the sample as representative of male smokers who die of lung cancer. Is there

convincing evidence that the proportion of male smoker

lung cancer deaths is not the same for the four given tar

level categories?

12.8

The paper referenced in the previous exercise

also gave the accompanying data on the age at which

smoking started for a sample of 1031 men who smoked

low-tar cigarettes.

Age

Frequency

Ͻ16

16–17

18–20

Ն21

237

258

320

216

not equally likely to occur in each of the 3-hour time

periods used to construct the table? Test the relevant

hypotheses using a significance level of .05.

b. Suppose a safety office proposes that bicycle fatalities

are twice as likely to occur between noon and midnight as during midnight to noon and suggests the

following hypothesis: H0: p1 5 1/3, p2 ϭ 2/3, where

p1 is the proportion of accidents occurring between

midnight and noon and p2 is the proportion occurring between noon and midnight. Do the given data

provide evidence against this hypothesis, or are the

appropriate test. (Hint: Use the data to construct a

one-way table with just two time categories.)

12.10

The report referenced in the previous exercise

(“Fatality Facts 2004: Bicycles”) also classified 719 fatal

a. Use a chi-square goodness-of-fit test to test the null

hypothesis H0: p1 ϭ .25, p2 ϭ .2, p3 ϭ .3, p4 ϭ .25,

where p1 ϭ proportion of male low-tar cigarette

smokers who started smoking before age 16, and p2,

p3, and p4 are defined in a similar way for the other

three age groups.

b. The null hypothesis from Part (a) specifies that half

of male smokers of low-tar cigarettes began smoking

between the ages of 16 and 20. Explain why p2 ϭ .2

and p3 ϭ .3 is consistent with the ages between 16

and 20 being equally likely to be when smoking

started.

The report “Fatality Facts 2004: Bicycles” (Insurance Institute, 2004) included the following table

12.9

classifying 715 fatal bicycle accidents according to time

of day the accident occurred.

Time of Day

Midnight to 3 a.m.

3 a.m. to 6 a.m.

6 a.m. to 9 a.m.

9 a.m. to Noon

Noon to 3 p.m.

3 p.m. to 6 p.m.

6 p.m. to 9 p.m.

9 p.m. to Midnight

Number of Accidents

38

29

66

77

99

127

166

113

a. Assume it is reasonable to regard the 715 bicycle accidents summarized in the table as a random sample

of fatal bicycle accidents in 2004. Do these data support the hypothesis that fatal bicycle accidents are

Data set available online

bicycle accidents according to the month in which the

accident occurred, resulting in the accompanying table.

Month

Number of Accidents

January

February

March

April

May

June

July

August

September

October

November

December

38

32

43

59

78

74

98

85

64

66

42

40

a. Use the given data to test the null hypothesis

H0: p1 5 1/12, p2 ϭ 1/12, ... , p12 ϭ 1/12, where p1

is the proportion of fatal bicycle accidents that occur

in January, p2 is the proportion for February, and so

on. Use a significance level of .01.

b. The null hypothesis in Part (a) specifies that fatal

accidents were equally likely to occur in any of the

12 months. But not all months have the same number of days. What null and alternative hypotheses

would you test to determine if some months are

riskier than others if you wanted to take differing

month lengths into account? (Hint: 2004 was a leap

year, with 366 days.)

c. Test the hypotheses proposed in Part (b) using a .05

significance level.

Video Solution available

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

12.2 Tests for Homogeneity and Independence in a Two-way Table

12.11 An article about the California lottery that appeared in the San Luis Obispo Tribune (December 15,

1999) gave the following information on the age distribution of adults in California: 35% are between 18 and

34 years old, 51% are between 35 and 64 years old, and

14% are 65 years old or older. The article also gave information on the age distribution of those who purchase

lottery tickets. The following table is consistent with the

values given in the article:

Age of Purchaser

18–34

35–64

65 and over

Frequency

36

130

34

12.12 A certain genetic characteristic of a particular

plant can appear in one of three forms (phenotypes). A

researcher has developed a theory, according to which

12.2

the hypothesized proportions are p1 5 .25, p2 5 .50, and

p3 5 .25. A random sample of 200 plants yields X 2 5

4.63.

a. Carry out a test of the null hypothesis that the theory is correct, using level of significance a ϭ .05.

b. Suppose that a random sample of 300 plants had

resulted in the same value of X 2. How would your

analysis and conclusion differ from those in Part (a)?

The article “Linkage Studies of the Tomato”

(Transactions of the Royal Canadian Institute [1931]:

1–19) reported the accompanying data on phenotypes

12.13

resulting from crossing tall cut-leaf tomatoes with dwarf

potato-leaf tomatoes. There are four possible phenotypes: (1) tall cut-leaf, (2) tall potato-leaf, (3) dwarf cutleaf, and (4) dwarf potato-leaf.

Suppose that the data resulted from a random sample of

200 lottery ticket purchasers. Based on these sample

data, is it reasonable to conclude that one or more of

these three age groups buys a disproportionate share of

lottery tickets? Use a chi-square goodness-of-fit test with

a ϭ .05.

585

Phenotype

Frequency

1

2

3

4

926

288

293

104

Mendel’s laws of inheritance imply that p1 ϭ 9/16, p2 ϭ

3/16, p3 ϭ 3/16, and p4 ϭ 1/16. Are the data from this

experiment consistent with Mendel’s laws? Use a .01

significance level.

Data set available online

Video Solution available

Tests for Homogeneity and Independence

in a Two-way Table

Data resulting from observations made on two different categorical variables can also

be summarized using a tabular format. As an example, suppose that residents of a

particular city can watch national news on affiliate stations of ABC, CBS, NBC, or

PBS. A researcher wishes to know whether there is any relationship between political

philosophy (liberal, moderate, or conservative) and preferred news program among

those residents who regularly watch the national news. Let x denote the variable political philosophy and y the variable preferred network. A random sample of 300 regular

watchers is selected, and each individual is asked for his or her x and y values. The

data set is bivariate and might initially be displayed as follows:

Observation

1

2

3

(

299

300

x Value

Liberal

Conservative

Conservative

(

Moderate

Liberal

y Value

CBS

ABC

PBS

(

NBC

PBS

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

### Tài liệu bạn tìm kiếm đã sẵn sàng tải về

1: Chi-Square Tests for Univariate Data

Tải bản đầy đủ ngay(0 tr)

×