CK-12 Probability and Statistics - Advanced

(Marvins-Underground-K-12) #1
10.1. The Goodness-of-Fit Test http://www.ck12.org

Example: We would use the Chi-Square Goodness-of-Fit test to evaluate if there was a preference in the types of
lunch that 11thgrade students bought in the cafeteria. For this type of comparison it helps to make a table to visualize
the problem. We could construct the following table to compare the observed and expected values.
Research Question: Do 11thgrade students prefer a certain type of lunch?
Using a sample of 11thgrade students, we recorded the following information:

TABLE10.1: Frequency of Type of School Lunch Chosen by Students


Type of Lunch Observed Frequency Expected Frequency
Salad 21 25
Sub Sandwich 29 25
Daily Special 14 25
Brought Own Lunch 36 25

If there is no difference in which type of lunch is preferred, we would expect the students to prefer each type of
lunch equally. To calculate the expected frequency of each category as if school lunch preferences were distributed
equally, we divide the number of observations by the number of categories. Since there are 100 observations and 4
categories, the expected frequency of each category is 100/4 or 25.
The value that indicates the comparison between the observed and expected frequency is called theChi-Square
statistic. The idea is that if the observed frequency is close to the expected frequency, then the Chi-Square statistic
will be small. Or, if the difference between the two frequencies is big, then we expect the Chi-Square statistic to be
large.
To calculate the Chi-Square statistic(X^2 ), we use the formula:

X^2 =∑i(Oi−Ei)

2
Ei where:
X^2 =Chi-Square statistical value
Oi=observed frequency value for each event
Ei=expected frequency value for each event
Once calculated, we take this Chi-Square value along with the degrees of freedom (this will be discussed later) and
look up the Chi-Square value on a standardChi-Square distributiontable. The Chi-Square distribution allows us
to determine the probability that a sample fits an expected pattern. In contrast, the t-distribution tests how likely it is
that the means of two different samples will differ. Please see the table below for more details.

TABLE 10.2: The Difference Between the Chi-Square and the Student’s t-test when Using to
Compare Two Sample Means


Type of Distribution Tells Us Every Day Example Data Needed to Deter-
mine Value
Chi-Square The relationship between
two or more categorical
variables.

Analyzing survey data
with categorical variables.

Observed and expected
frequencies for categori-
cal variables, degrees of
freedom.
Student’s t-Test The differences between
the means of two groups
with respect to a continu-
ous variable.

Determining if there is a
difference in the mean of
the SAT scores between
schools.

The mean values for sam-
ples from two popula-
tions, degrees of freedom.
Free download pdf