test for goodness of fit. the math department at a community college offers 3 classes that satisfy...

38
Test for Goodness of Fit

Upload: jennifer-rice

Post on 23-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Test for Goodness of Fit

Page 2: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The Problem, slide 1The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do not require calculus: College Algebra, Statistics, and Finite Math*.

โ€ข At Saddleback College, we no longer offer Finite Math, as this course proved to be significantly less popular than the other two.

College Algebra

Statistics

Finite Math

Page 3: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The problem, slide 2The math department chair is trying to determine how many sections of each class to offer. She claims that students show no preference for which class they take; if this proves to be so she will offer equal numbers of each class.

She looks at the number of students who enrolled in each class during the previous semester.

College Algebra students

Statisticsstudents

Finite Math students

Page 4: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The problem, slide 3 (data)She finds the following data:

College Algebra Statistics Finite Math

# students enrolled

354 480 246

Determine whether it is reasonable to suppose students have no preference between the three classes (and thus to offer the same number of sections of each.)

Use the goodness-of-fit test with ฮฑ = .05.

Page 5: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Option to work alone and check your answer

If youโ€™d like to try this problem on your own and just check your answer when youโ€™re done go ahead.

When youโ€™re ready to check your answer click on the genius to the right.

If youโ€™d rather work through this problem together click away from the genius or hit the space bar or forward arrow key.

Page 6: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Set-upThe table tells us the observed frequency.

College Algebra Statistics Finite Math

# students enrolled

354 480 246

(Observed frequency)

Itโ€™s our job to calculate the expected frequency.

Page 7: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding a row for expected frequency to the table

College Algebra Statistics Finite Math# students enrolled

(Observed frequency)

354 480 246

Expected frequency

Page 8: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The need to calculate the total number of students

To do this, weโ€™ll need to calculate the total number of students enrolled in all three classes.

College Algebra Statistics Finite Math

# students enrolled

(Observed frequency)

354 480 246

Expected frequency

Page 9: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Calculating the total number of studentsTo do this, weโ€™ll need to calculate the total number of students enrolled in all three classes.

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246

Expected frequency

354480

+ 2461080

Page 10: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding the total to the tableTo do this, weโ€™ll need to calculate the total number of students enrolled in all three classes.

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

354480

+ 2461080

Page 11: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Preparing to calculate expected valuesNow we can calculate the expected frequency. If the students have no preference between the three classes, we would expect the students to be equally distributed between them.

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

Page 12: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

How to calculate the expected values

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

Divide the total number of students by 3, the number of classes they can choose from.

Page 13: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Calculating the expected values

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

1080 รท 3 = 360

Page 14: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding expected frequencies to the table

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

360 360 360

1080 รท 3 = 360

Page 15: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Step 1: State the hypotheses and identify the claim (if there is one).

The claim is that the studentshave no preference---thereโ€™s no math symbol for this, so weโ€™ll just say it in words.

Page 16: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The hypotheses

The students have no preference among the three classes. (claim)

Eeny, meeny, miney, moe

AlgebraStat Finite

This is the Null since the Null always states there is no difference between things.

The students have a preference among the three classes.

We care!

Page 17: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Step (*)

Draw the chi-square distribution and label the area in the right tail.

Hang on!

Can we use this

distribution?

Page 18: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Verifying we can use the chi-square distribution

Since all the expected frequencies are at least 5, we canuse the chi-square distribution!

Page 19: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding the area to the right tail

.05

Remember, the chi-square test is always right-tailed.

(In this case, so is the bull.)

Page 20: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Step 2Step 2: Mark off the critical value.

.05

The critical value is the boundary of the right tail. It will go here.

Page 21: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Table G

Any time we use the Chi-square distribution, we need to use table G.

Remember that the degrees of freedom will be one less than the number of categories (in this case, the number of classes.)

Page 22: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Calculating the degrees of freedom

College Algebra

Statistics

Finite Math

Since there were 3 classes, the degrees of freedom is

3-1 = 2

Page 23: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Finding the critical value on Table G

So we look in the row for d.f. = 2.

And the column for ฮฑ =.05.

5.991

The critical value is 5.991.

Page 24: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding the critical value to the pictureLetโ€™s add this to the picture.

.05

5.991

Page 25: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Step 3:

Calculate the test value.

Page 26: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Formula for the test value

ฮง 2=โˆ‘ (๐‘‚โˆ’๐ธ )2

๐ธ

sum

observed frequency

expected frequency

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

360 360 360Refer back to this table to find the

observed and expected frequencies

Page 27: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The test value is a sum of 3 terms.

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

360 360 360

ฮง 2=โˆ‘ (๐‘‚โˆ’๐ธ )2

๐ธ

ยฟ ยฟโŸ๐ถ๐‘œ๐‘™๐‘™๐‘’๐‘”๐‘’ ๐ด๐‘™๐‘”๐‘’๐‘๐‘Ÿ๐‘Ž

+ ยฟโŸ๐‘†๐‘ก๐‘Ž๐‘ก๐‘–๐‘ ๐‘ก๐‘–๐‘๐‘ 

+ ยฟโŸ๐น๐‘–๐‘›๐‘–๐‘ก๐‘’ h๐‘€๐‘Ž๐‘ก

Page 28: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The term with info from college algebra

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

360 360 360

ฮง 2=โˆ‘ (๐‘‚โˆ’๐ธ )2

๐ธ

ยฟ(354โˆ’360 )2

360โŸ๐ถ๐‘œ๐‘™๐‘™๐‘’๐‘”๐‘’ ๐ด๐‘™๐‘”๐‘’๐‘๐‘Ÿ๐‘Ž

+ ยฟโŸ๐‘†๐‘ก๐‘Ž๐‘ก๐‘–๐‘ ๐‘ก๐‘–๐‘๐‘ 

+ ยฟโŸ๐น๐‘–๐‘›๐‘–๐‘ก๐‘’ h๐‘€๐‘Ž๐‘ก

Page 29: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding in the second term, corresponding to statistics

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

360 360 360

ฮง 2=โˆ‘ (๐‘‚โˆ’๐ธ )2

๐ธ

ยฟ(354โˆ’360 )2

360โŸ๐ถ๐‘œ๐‘™๐‘™๐‘’๐‘”๐‘’ ๐ด๐‘™๐‘”๐‘’๐‘๐‘Ÿ๐‘Ž

+(480โˆ’360 )2

360โŸ๐‘†๐‘ก๐‘Ž๐‘ก๐‘–๐‘ ๐‘ก๐‘–๐‘๐‘ 

+ ยฟโŸ๐น๐‘–๐‘›๐‘–๐‘ก๐‘’ h๐‘€๐‘Ž๐‘ก

Page 30: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding in the third term, corresponding to Finite Math

College Algebra

Statistics Finite Math Total

# students enrolled

(Observed frequency)

354 480 246 1080

Expected frequency

360 360 360

ฮง 2=โˆ‘ (๐‘‚โˆ’๐ธ )2

๐ธ

ยฟ(354โˆ’360 )2

360โŸ๐ถ๐‘œ๐‘™๐‘™๐‘’๐‘”๐‘’ ๐ด๐‘™๐‘”๐‘’๐‘๐‘Ÿ๐‘Ž

+(480โˆ’360 )2

360โŸ๐‘†๐‘ก๐‘Ž๐‘ก๐‘–๐‘ ๐‘ก๐‘–๐‘๐‘ 

+(246โˆ’360 )2

360โŸ๐น๐‘–๐‘›๐‘–๐‘ก๐‘’ h๐‘€๐‘Ž๐‘ก

Page 31: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Final calculation of test value

ฮง 2=โˆ‘ (๐‘‚โˆ’๐ธ )2

๐ธ

ยฟ(354โˆ’360 )2

360โŸ๐ถ๐‘œ๐‘™๐‘™๐‘’๐‘”๐‘’ ๐ด๐‘™๐‘”๐‘’๐‘๐‘Ÿ๐‘Ž

+(480โˆ’360 )2

360โŸ๐‘†๐‘ก๐‘Ž๐‘ก๐‘–๐‘ ๐‘ก๐‘–๐‘๐‘ 

+(246โˆ’360 )2

360โŸ๐น๐‘–๐‘›๐‘–๐‘ก๐‘’ h๐‘€๐‘Ž๐‘ก

ยฟ76.2

Page 32: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Adding the test value to the pictureNow add the test value to the picture.

.05

5.991 76.2

76.2 is (much) bigger than 5.991, so it goes to the right.

Page 33: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Step 4: Make the decision.

.05

5.991 76.2

The test value is in the critical region. Reject the Null!

Page 34: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

The Null expresses disappointment

๐ป0

RATS! Rejected again!

We rats had nothing to do with it.

Page 35: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Step 5: Answer the question in plain English.

There is enough evidence to reject the claim that students have no preference among the three math classes.

Page 36: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

Hereโ€™s a quick summary โ€ฆ

Page 37: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

SummaryEach click will show you one step. Step (*) is broken up into two clicks.

Step 1 ๐ป0 :ยฟ

h๐‘‡ ๐‘’๐‘ ๐‘ก๐‘ข๐‘‘๐‘’๐‘›๐‘ก๐‘  h๐‘Ž๐‘ฃ๐‘’๐‘›๐‘œ๐‘๐‘Ÿ๐‘’๐‘“๐‘’๐‘Ÿ๐‘’๐‘›๐‘๐‘’๐‘Ž๐‘š๐‘œ๐‘›๐‘” h๐‘ก ๐‘’h๐‘ก ๐‘Ÿ๐‘’๐‘’๐‘๐‘™๐‘Ž๐‘ ๐‘ ๐‘’๐‘  .(๐‘๐‘™๐‘Ž๐‘–๐‘š)

ยฟ ยฟ

Step (*).05

5.991Step 2 76.2 Step 3

Step 4 Reject the Null.

Step 5 There is enough evidence to reject the claim that the students have no preference among the three classes.

Page 38: Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do

And there was much rejoicing