Chi-Square Tests (X²) – Types And Examples

18.03.23 Types of chi-square Time to read: 5min

How do you like this article?

0 Reviews


Chi-square tests are a foundation stone within statistics. Their purpose is to assess connections between categorical variables by comparing actually observed data with the predicted and expected data. If they differ significantly, they are ruled as invaluable for research that involves testing associations or goodness-of-fit for categorical data. Chi-square tests allow researchers to determine dependent and independent variables, adding better quality and accuracy to their statistical analyses.

Chi-Square Tests – In a Nutshell

  • Learn how to determine relationships between variables using chi-square tests
  • Hypothesis testing of frequency distributions
  • The formula for chi-square tests
  • The two most frequently used types of chi-square tests
  • Conducting and reporting chi-square tests correctly

Definition: Chi-square tests

A chi-square test, written as (X²) is a statistical test used to determine if there is a significant relationship between categorical variables by comparing observed frequencies to expected frequencies. In other words, it helps researchers to test their hypotheses.

There are two types of chi-square tests:

  • Chi-square goodness of fit test refers to a statistical test that analyzes and measures to what extend observed data aligns with a set of expected data.
  • Chi-square test of independence, also a statistical test, is used to evaluate whether two categorical variables are dependent or independent of each other.
Give your thesis a final format revision prior to printing
Have a last check of your formatting with our 3D preview feature before sending your thesis to print. The accurate virtual representation of what the physical print will look like, affords you to ensure the printed version aligns with your expectations.

Using chi-square tests

Chi-square tests are usually written using the symbol X². They are usually used to test statistics that don’t follow the expectations of normal distribution.

In contrast, parametric tests cannot test hypotheses regarding categorical variables. Instead, they may involve categorical variables as independent variables. Categorical variables are nominal or ordinal variables that represent sets such as species and races.

You can use them when:

  • you wish to test a hypothesis on a single or more categorical variables
  • you randomly selected your sample from the population
  • you anticipate at least five observations in each set or group combinations

Hypothesis testing of frequency distributions

Two types of Pearson’s chi-square tests exist that determine if the detected frequency dispersal of categorical variables differs notably from the anticipated frequency distribution in the hypothesis. A frequency distribution aims to describe the distribution of observations between various groupings and is usually displayed on a frequency distribution table.

Frequency distribution tables often display the number of observations in individual groupings. Contingency frequency distribution tables are perfect where there are two categorical variables, since they showcase the number of observations in each group combination.


The frequency of toilet visits by men at different ages during 24 hours.

Frequency distribution table:

Men’s age (yrs) Frequency
18 - 28 5
29 - 39 8
50 - 60 11
61 and above 16


Contingency table of the preferred hand of a sample of African and White Americans.

Contingency frequency distribution table:

Sample Right-handed Left-handed
White Americans 240 32
African Americans 292 29

You can use chi-square tests of independence to determine if the observed frequencies differ notably from the anticipated frequencies if the handedness is not related to skin color.

The chi-square formula

The two chi-square tests have the same formula:

  • Xs2 = chi-square test
  • Ʃ = sum (take the sum of)
  • Ο = observed frequency
  • Ε = anticipated frequency

The types of chi-square tests

There are two primary types of Pearson’s chi-square tests: the goodness of fit and the test of independence.

This chi-square test applies when you have a single categorical variable.


The hypothesis explaining the anticipations of equal proportions:

  • Null (H0): The men will visit the toilet in equal proportions
  • Alternative (HA): Men of different ages will visit the toilet in different proportions

Anticipations of varying proportions:

  • Null (H0): The men visit the toilet in the same proportion as the average over the past twenty-four hours
  • Alternative (HA): The men visit the toilet in different proportions from the average over the past twenty-four hours

The test of independence applies when you have multiple categorical variables. This chi-square test helps you determine if two variables are correlated.


  • Null (H0): The proportion of left-handed individuals is the same for white and African Americans
  • Alternative (HA): The proportions of left-handed individuals vary depending on their skin color.

Additional types of chi-square test

Another type of chi-square test is the test of homogeneity. These chi-square tests are similar to the test of independence, as they determine if two populations hail from the same distribution.

There is also McNemar’s test that applies the chi-square tests statistics. It examines if the variables’ proportions are equal.


A sample of 500 children is offered two flavors of soda and asked if they like how each taste.

Contingency table of soda flavor preference:

Soda flavor Like Dislike
Strawberry 37 22
Passion 8 13
  • Null (H0): The proportion of children that like strawberry soda is the same as that of children that like passion soda.
  • Alternative (HA): The proportion of children that like strawberry soda differs from that of children that like passion soda.

Other types of chi-square tests that are not in Pearson’s category are:

  • Test of a single variance
  • Likelihood ratio chi-square test
Ready to print your thesis?
Students in Australia can now also benefit from our printing services at BachelorPrint! Get top-notch quality for printing and binding your thesis at affordable prices from just AU$ 11.90. Add our FREE express delivery and you're good to go.

Conducting a chi-square test correctly

The procedure usually differs depending on the types of chi-square tests.

However, the standard steps are:

  1. Construct a table showing the observed and anticipated frequencies
  2. Calculate X² (chi-square value) using the formula
  3. Determine the critical chi-square value using a statistical table or software
  4. Compare the chi-square and chi-square critical value
  5. Choose whether to reject the null hypothesis


There was no significant correlation between the handedness and skin color, X² (1, n =346) = 0.55, p = .505

Reporting chi-square tests

Chi-square test reports should appear in the final results section. Follow the rules below when reporting chi-square tests according to APA style:

  • A reference or formula is unnecessary
  • Use the X² symbol for chi-square
  • Add a space on each side of the equal sign
  • If X² < 0, you must include the leading zero and two significant figures after the decimal point
  • The X² tests report must be alongside its degrees of freedom, sample proportion, and p-value


The two main types of chi-square tests are:

  • the goodness of fit
  • the test of independence

The test of independence applies when you have several categorical variables. This chi-square test helps you determine if two variables are correlated.

This chi-square test applies when you have a single categorical variable. It tests if the frequency distribution of the variable varies notably from your anticipations noted in the hypothesis.

Pearson’s chi-square tests are statistical tests used to determine if statistical data is notably different from the expectations in the hypothesis.