The Chi-Square Distribution (College Board AP® Statistics): Revision Note

Naomi C

Written by: Naomi C

Reviewed by: Dan Finlay

Updated on

Chi-square distributions

What is the chi-square distribution?

  • The chi-square ( χ2) distribution is a continuous probability distribution of the sum of the squares of k independent variables

    • Each of these independent variables follows a standard normal distribution

  • Chi-square distributions:

    • are skewed right

    • take only non-negative values

    • have a shape that depends on the degrees of freedom

Graph of a chi-square distribution with a right-skewed curve.
  • Degrees of freedom (df) is a parameter that defines the shape of the chi-square distribution curve

    • The df is the number of independent standard normal random variables, k

    • The chi-square distribution curve approximates a normal curve more closely as the degrees of freedom increase

When is the chi-square distribution used?

  • The chi-square distribution is used for:

    • Tests of independence

    • Tests of homogeneity

What are observed and expected counts?

  • A chi-square test compares two sets of counts in a two-way table

    • The observed counts are the counts from the sample data

    • The expected counts are the counts you would expect if the null hypothesis were true

  • If the observed counts are close to the expected counts, the data are consistent with the null hypothesis

  • If the observed counts are far from the expected counts, this gives evidence against the null hypothesis

How do I calculate expected counts?

  • To find the expected count for a cell, multiply the row total by the column total and divide by the grand total

    • expected count=row total×column totalgrand total

  • This is the same as multiplying together

    • the proportion of all individuals in that row

    • the proportion of all individuals in that column

    • and the grand total

  • e.g. a random sample of 200 students from two grade levels were asked to choose their preferred lunch option

    • The observed counts are shown below

Pizza

Salad

Sandwich

Total

9th grade

30

20

50

100

10th grade

40

15

45

100

Total

70

35

95

200

  • The expected count for 9th graders who prefer pizza is 100×70200=35

  • The table below shows all the expected counts

Pizza

Salad

Sandwich

Total

9th grade

35

17.5

47.5

100

10th grade

35

17.5

47.5

100

Total

70

35

95

200

  • The row and column totals of the expected counts are the same as for the observed counts

Examiner Tips and Tricks

Expected counts do not need to be whole numbers. Do not round them, as this can lead to errors in the chi-square test statistic.

How do I calculate the chi-square test statistic?

  • The chi-square test statistic measures how far the observed counts are from the expected counts

  • χ2=∑(observed−expected)2expected

    • Calculate (observed−expected)2expected for every cell in the table (not the totals)

    • then add them all together

  • The formula is given in the exam

  • The test statistic can never be negative

    • The larger the value of χ2, the further the observed counts are from the expected counts

      • This gives stronger evidence against the null hypothesis

  • e.g. for the lunch example above

    • χ2=(30−35)235+(20−17.5)217.5+(50−47.5)247.5+(40−35)235+(15−17.5)217.5+(45−47.5)247.5

    • χ2=2.406...

How do I find the degrees of freedom?

  • For a two-way table, the number of degrees of freedom (df) is

    • df=(number of rows−1)(number of columns−1)

  • Do not count the total row or the total column

  • e.g. the lunch table has 2 rows and 3 columns

    • df=(2−1)(3−1)=2

How do I use the chi-square table?

  • The chi-square table is given in the exam

    • Each row is a number of degrees of freedom

    • Each column is a tail probability, p: the area to the right of the value in the table

  • To find a critical value

    • Find the row for the degrees of freedom

    • Find the column for the significance level, α

    • The value where they meet is the critical value

    • e.g. for df=2 and α=0.05, the critical value is 5.99

  • If the test statistic is greater than or equal to the critical value, reject the null hypothesis

  • To find a range for the p-value

    • Find the row for the degrees of freedom

    • See which two table values the test statistic lies between

    • The p-value lies between the tail probabilities at the top of those columns

    • e.g. for the lunch example, χ2=2.406... with df=2

      • This is less than 2.77, the value in the p=0.25 column

      • So the p-value is greater than 0.25

  • A calculator gives the exact p-value, but you should still be able to use the table

Examiner Tips and Tricks

Don’t get confused with all the tables in the exam! Both the t-distribution table and the χ2 table give the area to the right of the value in the table. The shape of each distribution is shown above its table.

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Build on this topic

Naomi C

Author: Naomi C

Expertise: Maths Content Creator

Naomi graduated from Durham University in 2007 with a Masters degree in Civil Engineering. She has taught Mathematics in the UK, Malaysia and Switzerland covering GCSE, IGCSE, A-Level and IB. She particularly enjoys applying Mathematics to real life and endeavours to bring creativity to the content she creates.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Portfolio Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.