chi-square = 2.85 chi-square crit = 5.99

Post on 09-Feb-2016

57 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Chi-square = 2.85 Chi-square crit = 5.99 Achievement is unrelated to whether or not a child attended preschool.  2 as a test for goodness of fit. So far. . . . The expected frequencies that we have calculated come from the data They test rather or not two variables are related. - PowerPoint PPT Presentation

TRANSCRIPT

• Chi-square = 2.85• Chi-square crit = 5.99

• Achievement is unrelated to whether or not a child attended preschool.

2 as a test for goodness of fit

• So far. . . .

• The expected frequencies that we have calculated come from the data

• They test rather or not two variables are related

2 as a test for goodness of fit

• But what if:

• You have a theory or hypothesis that the frequencies should occur in a particular manner?

Example

• M&Ms claim that of their candies:• 30% are brown• 20% are red• 20% are yellow• 10% are blue• 10% are orange• 10% are green

Example

• Based on genetic theory you hypothesize that in the population:

• 45% have brown eyes• 35% have blue eyes• 20% have another eye color

To solve you use the same basic steps as before (slightly different order)

• 1) State the hypothesis• 2) Find 2 critical• 3) Create data table• 4) Calculate the expected frequencies• 5) Calculate 2

• 6) Decision• 7) Put answer into words

Example• M&Ms claim that of their candies:

• 30% are brown• 20% are red• 20% are yellow• 10% are blue• 10% are orange• 10% are green

Example

• Four 1-pound bags of plain M&Ms are purchased

• Each M&Ms is counted and categorized according to its color

• Question: Is M&Ms “theory” about the colors of M&Ms correct?

Observed

Brown 602

Red 396

Yellow 379

Blue 227

Orange 242

Green 235

Total 2081

Step 1: State the Hypothesis

• H0: The data do fit the model– i.e., the observed data does agree with M&M’s theory

• H1: The data do not fit the model– i.e., the observed data does not agree with M&M’s

theory

– NOTE: These are backwards from what you have done before

Step 2: Find 2 critical

• df = number of categories - 1

Step 2: Find 2 critical

• df = number of categories - 1

• df = 6 - 1 = 5• = .05

• 2 critical = 11.07

Observed

Brown 602

Red 396

Yellow 379

Blue 227

Orange 242

Green 235

Total 2081

Step 3: Create the data table

Observed ExpectedProp.

Brown 602 .30

Red 396 .20

Yellow 379 .20

Blue 227 .10

Orange 242 .10

Green 235 .10

Total 2081

Step 3: Create the data tableAdd the expected proportion of each category

Observed ExpectedProp.

Brown 602 .30

Red 396 .20

Yellow 379 .20

Blue 227 .10

Orange 242 .10

Green 235 .10

Total 2081

Step 4: Calculate the Expected Frequencies

Observed ExpectedProp.

ExpectedFreq

Brown 602 .30

Red 396 .20

Yellow 379 .20

Blue 227 .10

Orange 242 .10

Green 235 .10

Total 2081

Step 4: Calculate the Expected FrequenciesExpected Frequency = (proportion)(N)

Observed ExpectedProp.

ExpectedFreq

Brown 602 .30 624.30

Red 396 .20

Yellow 379 .20

Blue 227 .10

Orange 242 .10

Green 235 .10

Total 2081

Step 4: Calculate the Expected FrequenciesExpected Frequency = (.30)(2081) = 624.30

Observed ExpectedProp.

ExpectedFreq

Brown 602 .30 624.30

Red 396 .20 416.20

Yellow 379 .20

Blue 227 .10

Orange 242 .10

Green 235 .10

Total 2081

Step 4: Calculate the Expected FrequenciesExpected Frequency = (.20)(2081) = 416.20

Observed ExpectedProp.

ExpectedFreq

Brown 602 .30 624.30

Red 396 .20 416.20

Yellow 379 .20 416.20

Blue 227 .10

Orange 242 .10

Green 235 .10

Total 2081

Step 4: Calculate the Expected FrequenciesExpected Frequency = (.20)(2081) = 416.20

Observed ExpectedProp.

ExpectedFreq

Brown 602 .30 624.30

Red 396 .20 416.20

Yellow 379 .20 416.20

Blue 227 .10 208.10

Orange 242 .10 208.10

Green 235 .10 208.10

Total 2081

Step 4: Calculate the Expected FrequenciesExpected Frequency = (.10)(2081) = 208.10

Step 5: Calculate 2

O = observed frequency

E = expected frequency

2

O E O - E (O - E)2 (O - E)2

E

2

O E O - E (O - E)2 (O - E)2

E602 624.30396 416.20379 416.20227 208.10242 208.10235 208.10

2

O E O - E (O - E)2 (O - E)2

E602 624.30 -22.3396 416.20 -20.2379 416.20 -37.2227 208.10 18.9242 208.10 33.9235 208.10 26.9

2

O E O - E (O - E)2 (O - E)2

E602 624.30 -22.3 497.29396 416.20 -20.2 408.04379 416.20 -37.2 1383.84227 208.10 18.9 357.21242 208.10 33.9 1149.21235 208.10 26.9 723.61

2

O E O - E (O - E)2 (O - E)2

E602 624.30 -22.3 497.29 .80396 416.20 -20.2 408.04 .98379 416.20 -37.2 1383.84 3.32227 208.10 18.9 357.21 1.72242 208.10 33.9 1149.21 5.22235 208.10 26.9 723.61 3.48

2

O E O - E (O - E)2 (O - E)2

E602 624.30 -22.3 497.29 .80396 416.20 -20.2 408.04 .98379 416.20 -37.2 1383.84 3.32227 208.10 18.9 357.21 1.72242 208.10 33.9 1149.21 5.22235 208.10 26.9 723.61 3.48

15.52

Step 6: Decision

• Thus, if 2 > than 2critical

– Reject H0, and accept H1

• If 2 < or = to 2critical

– Fail to reject H0

Step 6: Decision

• Thus, if 2 > than 2critical

– Reject H0, and accept H1

• If 2 < or = to 2critical

– Fail to reject H0

2 = 15.52

2 crit = 11.07

Step 7: Put answer into words

• H1: The data do not fit the model

• M&M’s color “theory” did not significantly (.05) fit the data

Practice• Among women in the general population under

the age of 40:

• 60% are married• 23% are single• 4% are separated• 12% are divorced• 1% are widowed

Practice

• You sample 200 female executives under the age of 40

• Question: Is marital status distributed the same way in the population of female executives as in the general population ( = .05)?

Observed

Married 100

Single 44

Separated 16

Divorced 36

Widowed 4

Total 200

Step 1: State the Hypothesis

• H0: The data do fit the model– i.e., marital status is distributed the same way in the

population of female executives as in the general population

• H1: The data do not fit the model– i.e., marital status is not distributed the same way in

the population of female executives as in the general population

Step 2: Find 2 critical

• df = number of categories - 1

Step 2: Find 2 critical

• df = number of categories - 1

• df = 5 - 1 = 4• = .05

• 2 critical = 9.49

Step 3: Create the data table

Observed ExpectedProp.

Married 100 .60

Single 44 .23

Separated 16 .04

Divorced 36 .12

Widowed 4 .01

Total 200

Step 4: Calculate the Expected Frequencies

Observed ExpectedProp.

ExpectedFreq.

Married 100 .60 120

Single 44 .23 46

Separated 16 .04 8

Divorced 36 .12 24

Widowed 4 .01 2

Total 200

Step 5: Calculate 2

O = observed frequency

E = expected frequency

2

O E O - E (O - E)2 (O - E)2

E100 120 -20 400 3.3344 46 -2 4 .0916 8 8 64 836 24 12 144 64 2 2 4 2

19.42

Step 6: Decision

• Thus, if 2 > than 2critical

– Reject H0, and accept H1

• If 2 < or = to 2critical

– Fail to reject H0

Step 6: Decision

• Thus, if 2 > than 2critical

– Reject H0, and accept H1

• If 2 < or = to 2critical

– Fail to reject H0

2 = 19.42

2 crit = 9.49

Step 7: Put answer into words

• H1: The data do not fit the model

• Marital status is not distributed the same way in the population of female executives as in the general population ( = .05)

Practice• Is there a significant ( = .05) relationship

between gender and a persons favorite Thanksgiving “side” dish?

• Each participant reported his or her most favorite dish.

Results

Sweet Potatoes

Stuffing Cranberries

Female 18 10 2

Male 22 50 18

Side Dish

Gend

er

Step 1: State the Hypothesis

• H1: There is a relationship between gender and favorite side dish

• Gender and favorite side dish are independent of each other

Step 3: Find 2 critical

• df = (R - 1)(C - 1)

• df = (2 - 1)(3 - 1) = 2• = .05

• 2 critical = 5.99

Results

Sweet Potatoes

Stuffing Cranberries

Female 18 (10)

10 (15)

2 (5)

Male 22 (30)

50 (45)

18 (15)

Side Dish

Gend

er

Step 5: Calculate 2

O E O - E (O - E)2 (O - E)2

E 18 10 8 64 6.4 10 15 -5 25 1.67 2 5 -3 9 1.8

22 30 -8 64 2.13 50 45 5 25 .55 18 15 3 9 .6

2 = 13.15

Step 6: Decision

• Thus, if 2 > than 2critical

– Reject H0, and accept H1

• If 2 < or = to 2critical

– Fail to reject H0

Step 6: Decision

• Thus, if 2 > than 2critical

– Reject H0, and accept H1

• If 2 < or = to 2critical

– Fail to reject H0

2 = 13.15

2 crit = 5.99

Step 7: Put answer into words

• H1: There is a relationship between gender and favorite side dish

• A person’s favorite Thanksgiving side dish is significantly (.05) related to their gender

Cookbook

top related