http://www.ck12.org Chapter 10. Chi-Square
Features of the Goodness-of-Fit Test
As mentioned, the Goodness-of-Fit test is used to determine patterns of distinct orcategorical variables. As we
learned in Lesson 6, a categorical variable is one that is not continuous and has observations in separate categories.
Examples of categorical variables include:
-gender (male or female)
-preferences (agreed, neutral or disagreed)
-behaviors (got sent to the office or didn’t get sent to the office)
-physical traits (straight, wavy or curly hair)
Categorical variablesare notthe same as measurement or continuous variables. The following are normallynot
categorical variables:
−height −distance
−weight −income
−test scores
It is important to note that most of these continuous variables could in fact be converted to a categorical variable.
For example, you could create a categorical variable with two values such as ̈Less that 10 miles ̈ and ̈Greater than
10 miles. ̈
In addition to categorical variables, a Goodness-of-Fit test also requires:
-data obtained through arandom sample
-a calculation of theChi-Square statisticusing the formula explained in the last section
-the calculation of theDegrees of Freedom. For a Chi-Square test, the Degrees of Freedom are equal to the number
of categories minus one ord f=c− 1
Using our example about the preferences of types of school lunches, we calculate thed f=3.
df=of categories− 1
3 = 4 − 1
There are many situations that use the Goodness-of-Fit test, including surveys, taste tests and analysis of behaviors.
Interestingly, Goodness-of-Fit tests are also used in casinos to determine if there is cheating in games of chance such
as cards and dice. For example, if a certain card or number on a die shows up more than expected (a high observed
frequency compared to the expected frequency), officials use the Goodness-of-Fit test to determine the likelihood
that the player may be cheating or the game may not be fair.
Evaluating Hypothesis Using the Goodness-of-Fit Test
Let’s use our original example to create and test a hypothesis using the Goodness-of-Fit Chi-Square test. First, we
will need to state the null and alternative hypotheses for our research question. Since our research question states
“Do 11thgrade students prefer a certain type of lunch?” our null hypothesis for the Chi-Square test would state
that there isno differencebetween the observed and the expected frequencies. Therefore, our alternative hypothesis
would state that thereis a significant differencebetween the observed and expected frequencies.
Null Hypothesis(H 0 :O) =E(there is no statistically significant difference between observed and expected fre-
quencies)