Chapter 12
Study Unit 2.1
TEST OF GOODNESS OF FIT AND
INDEPENDENCE
, Study Unit 2.1.2
The Chi-square χ 2 Test of Independence
https://www.socscistatistics.com/tests/chisquare2/default2.aspx
Webpage to do chi-square without doing your own calculations.
1. The chi-square χ 2 test of independence is used to determine if two categorical variables
from one population are independent.
2. The test firstly poses a question about whether variable A and B are independent. This is
done using a Null and Alternative Hypothesis statements.
3. Thereafter, the test makes use of several calculations to see if the null hypothesis
statement is rejected or not.
4. The test compares what is observed vs. what is expected.
Expected frequency formula:
row s i × colum n j
Expect ed ij = ¿
sample ¿ n ¿
Chi-Squared test statistic formula:
χ 2=∑ ∑ ¿ ¿ ¿ ¿
i j
What does the Chi-square test statistic mean and indicate?
The Chi-square test statistic is a value that will indicate if the null hypothesis 𝐻0
(independence) is true or not.
It compares the observed frequencies vs the expected frequencies, which was
calculated under the assumption of independence, from the two-way cross table.
If the test statistic is a large value, then it means that there is a big difference between
what is observed and what is expected.
If the test statistic is a small value, then it means that what is observed is close to what
is expected.
Example:
Consider the situation of the promotion status of male and female officers of a major
metropolitan police force.
The police force consists of 1200 officers, 960 men and 240 women.
Over the past two years, 324 officers on the police force received promotions.
The specific breakdown of promotions for male and female officers is shown in the table
below:
2
Study Unit 2.1
TEST OF GOODNESS OF FIT AND
INDEPENDENCE
, Study Unit 2.1.2
The Chi-square χ 2 Test of Independence
https://www.socscistatistics.com/tests/chisquare2/default2.aspx
Webpage to do chi-square without doing your own calculations.
1. The chi-square χ 2 test of independence is used to determine if two categorical variables
from one population are independent.
2. The test firstly poses a question about whether variable A and B are independent. This is
done using a Null and Alternative Hypothesis statements.
3. Thereafter, the test makes use of several calculations to see if the null hypothesis
statement is rejected or not.
4. The test compares what is observed vs. what is expected.
Expected frequency formula:
row s i × colum n j
Expect ed ij = ¿
sample ¿ n ¿
Chi-Squared test statistic formula:
χ 2=∑ ∑ ¿ ¿ ¿ ¿
i j
What does the Chi-square test statistic mean and indicate?
The Chi-square test statistic is a value that will indicate if the null hypothesis 𝐻0
(independence) is true or not.
It compares the observed frequencies vs the expected frequencies, which was
calculated under the assumption of independence, from the two-way cross table.
If the test statistic is a large value, then it means that there is a big difference between
what is observed and what is expected.
If the test statistic is a small value, then it means that what is observed is close to what
is expected.
Example:
Consider the situation of the promotion status of male and female officers of a major
metropolitan police force.
The police force consists of 1200 officers, 960 men and 240 women.
Over the past two years, 324 officers on the police force received promotions.
The specific breakdown of promotions for male and female officers is shown in the table
below:
2