Chi Square Test

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Chi-square test

• A Chi-square test is a hypothesis testing method.


• Two common Chi-square tests involve checking if observed frequencies in one or more categories
match expected frequencies. χ² is symbol for chi-square.
• Chi- square test is used when you have counts(frequencies) of values for a categorical variable.
• Chi-square statistic can be used to see whether a frequency distribution fits a specific pattern

Two Chi-square tests


1. Chi-square goodness of fit test. For a single measurement variable
2. Chi-square test of independence. For two measurement variables r

Chi-square goodness of fit test


• The Chi-square goodness of fit test checks whether your sample data is likely to be from a specific
theoretical distribution. We have a set of data values, and an idea about how the data values are
distributed. The test gives us a way to decide if the data values have a “good enough” fit to our idea, or
if our idea is questionable.
• When you are testing to see whether a frequency distribution fits a specific pattern, you can use the chi-
square goodness-of-fit test.

To apply the goodness of fit test to a data set we need:


• Data values that are a simple random sample from the full population.
• Categorical or nominal data. The Chi-square goodness of fit test is not appropriate for continuous data.
• A data set that is large enough so that at least five values are expected in each of the observed data
categories.

Example:

Suppose as a market analyst you wished to see whether consumers have any preference among five flavors of
a new fruit soda. A sample of 100 people provided these data:
In the goodness-of-fit test, the degrees of freedom are equal to the number of categories minus 1. For
this example, there are five categories (cherry, strawberry, orange, lime, and grape); hence, the degrees of
freedom are 5 - 1 = 4. This is so because the number of subjects in each of the first four categories is free to
vary. But in order for the sum to be 100—the total number of subjects—the number of subjects in the last
category is fixed.

Two assumptions are needed for the goodness-of-fit test.


Test for Independence
The chi-square independence test can be used to test the independence of two variables.
For example, suppose a new postoperative procedure is administered to a number of patients in
a large hospital.
The researcher can ask the question, Do the doctors feel differently about this procedure from
the nurses, or do they feel basically the same way?
Note that the question is not whether they prefer the procedure but whether there is a
difference of opinion between the two groups. To answer this question, a researcher selects a sample
of nurses and doctors and tabulates the data in table form, as shown.

You might also like