Docsity

Chi-Square (χ2) Goodness-of-Fit Test: Analyzing Observed vs. Expected Frequencies - Prof. , Study notes of Statistics

Toggle sidebar
bg1
1
Chi-Square (χ2) Test
A Chi-Square hypothesis test is
used to compare observed
frequency distributions
(sample data) to distributions
we expected to observe
according to some idea
(hypothesized values).
Chi-Square (χ2) Test
We are testing to see if the
idea was a “good fit”or not.
That is, we want to determine
if the expected values
reasonably match (or fit) the
observed values.
χ2“Goodness-of-Fit” Test
H0: The “idea” used to generate
the expected values is valid
(Good-Fit)
H1: The “idea” used to generate
the expected values is not
valid (Bad-Fit)
pf3
pf4
pf5
pf8

Partial preview of the text

Download Chi-Square (χ2) Goodness-of-Fit Test: Analyzing Observed vs. Expected Frequencies - Prof. and more Study notes Statistics in PDF only on Docsity!

Chi-Square ( χ^2 ) Test

A Chi-Square hypothesis test is used to compare observed frequency distributions (sample data) to distributions we expected to observe according to some idea (hypothesized values).

Chi-Square ( χ^2 ) Test

We are testing to see if the idea was a “good fit” or not.

That is, we want to determine if the expected values reasonably match (or fit) the observed values.

χ^2 “Goodness-of-Fit” Test

H 0 : The “idea” used to generate the expected values is valid (Good-Fit)

H 1 : The “idea” used to generate the expected values is not valid (Bad-Fit)

χ^2 “Goodness-of-Fit” Test

Test Statistic Formula :

where O (^) i are the observed values (data), Ei are the expected values (Ei = np (^) i ), and k is the number of categories.

2 2 1

k ( i i )

i (^) i

O E

= E

Let α = “level of significance”

χ^2 “Goodness-of-Fit” Test

Enter the observed values in L (^1) Enter the expected values in L (^2) [PRGM] ▼ X2GOF [ENTER] [ENTER]

If p-value ≤ α, reject Ho. If p-value > α, fail to reject Ho.

χ^2 “Goodness-of-Fit” Test

If you reject H 0 , the “idea” used to generate the expected values is not valid. It was a “bad-fit”. If you fail to reject H 0 , the “idea” used to generate the expected values is valid. It was a “good-fit”.

Calculations

Since the p-value ≈ 0.119 > 0.05 = α, we fail to reject Ho.

Conclusion

The expected (or predicted) values reasonably match (or fit) the observed values.

Hence, my predicted grade distribution percentages for my statistics students were accurate.

Example

What is your favorite primary color?

Blue Red Yellow

Prediction

We predict that …

____ % will pick Blue, ____ % will pick Red, and ____ % will pick Yellow

to be their favorite primary color.

Question

Is our predicted percentages for peoples favorite primary colors accurate?

We need to conduct a χ^2 goodness-of-fit test to answer this question.

χ^2 “Goodness-of-Fit” Test

H 0 : Our predicted percentages for peoples favorite primary colors are accurate.

H 1 : Our predicted percentages for peoples favorite primary colors are not accurate.

Let α = 5%

Example

Randomly pick a number from 1 to 4.

Question:

When asked to do so, do people pick numbers from 1 to 4 randomly?

Solution

Picking at random would mean that each number had the same chance of being selected.

Thus,

for each of the four numbers.

p = = =

χ^2 “Goodness-of-Fit” Test

H 0 : People pick numbers from 1 to 4 randomly when asked to do so.

H 1 : People do not pick numbers from 1 to 4 randomly when asked to do so.

Let α = 5%

Data

4 O 4 = E 4 =

3 O 3 = E 3 =

Total n = n =

2 O 2 = E 2 =

1 O 1 = E 1 =

NumberRandom Observed Expected

E i = npi

Calculations

Conclusion