In: Biology
perform a x^2 test and interpret it
The Chi-Square Test of Independence is also known as Pearson’s Chi-Square and has two major applications: 1) goodness of fit test and 2) test of independence.
The Chi-Square Test can test whether the frequencies of a categorical variable are equal across various categories.
It tests whether the frequencies of one categorical variable differ across levels of another categorical variable. In other words, it tests whether there exists a statistically significant relationship or not between the two variables.
Pearson’s Chi Square Test of Independence is an approximate test. This means that the distribution of test statistics produced by this analysis only approximate the Chi-Square distribution. This approximation improves with large sample sizes,but it poses a problems with small sample sizes, say when expected cell sizes are below five.
The formula for the chi-square statistic used in the chi square test is:
Example
256 visual artists were surveyed to find out their zodiac sign. The results were: Aries (29), Taurus (24), Gemini (22), Cancer (19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius (23), Capricorn (18), Aquarius (20), Pisces (23). Test the hypothesis that zodiac signs are evenly distributed across visual artists.
Step 1: Make a table with columns for
“Categories,” “Observed,” “Expected,” “Residual (Obs-Exp)”,
“(Obs-Exp)2” and “Component (Obs-Exp)2 / Exp.” Don’t worry what
these mean right now; We’ll cover that in the following
steps.
Step 2: Fill in your categories. Categories
should be given to you in the question. There are 12 zodiac signs,
so:
Step 3: Write your counts. Counts are the
number of each items in each category in column 2. You’re given the
counts in the question:
Step 4: Calculate your expected value for
column 3. In this question, we would expect the 12 zodiac signs to
be evenly distributed for all 256 people, so 256/12=21.333. Write
this in column 3.
Step 5: Subtract the expected value (Step 4) from the
Observed value (Step 3) and place the result in the
“Residual” column. For example, the first row is Aries:
29-21.333=7.667.
Step 6: Square your results from Step 5 and
place the amounts in the (Obs-Exp)2 column.
Step 7: Divide the amounts in Step 6 by the expected
value (Step 4) and place those results in the final
column.
Step 8: Add up (sum) all the values in the last
column.
This is the chi-square statistic: 5.094