Perplex
  • Dashboard
Topics
Exponents & LogarithmsRounding & ErrorSequences & SeriesFinancial MathematicsMatricesComplex Numbers
Cartesian plane & linesFunction TheoryModellingTransformations & asymptotes
2D & 3D GeometryVoronoi DiagramsTrig equations & identitiesVectorsGraph Theory
ProbabilityDescriptive StatisticsBivariate StatisticsDistributions & Random VariablesInference & Hypotheses
DifferentiationIntegrationDifferential Equations
Paper 3
Plus
Calculator Skills
Review VideosFormula BookletAll Study Sets
BlogLanding Page
Sign UpLogin
Perplex
Perplex
  • Dashboard
Topics
Exponents & LogarithmsRounding & ErrorSequences & SeriesFinancial MathematicsMatricesComplex Numbers
Cartesian plane & linesFunction TheoryModellingTransformations & asymptotes
2D & 3D GeometryVoronoi DiagramsTrig equations & identitiesVectorsGraph Theory
ProbabilityDescriptive StatisticsBivariate StatisticsDistributions & Random VariablesInference & Hypotheses
DifferentiationIntegrationDifferential Equations
Paper 3
Plus
Calculator Skills
Review VideosFormula BookletAll Study Sets
BlogLanding Page
Sign UpLogin
Perplex
/
Inference & Hypotheses
/
χ² tests
Student's t-test
χ² tests
Inference & Hypotheses

χ² tests

0 of 0 exercises completed

Expected and observed frequencies in ​χ2​ goodness of fit and independence tests, including degrees of freedom, the test statistic, and comparing ​χ2​ to a critical value to decide whether to reject ​H0​.

Want a deeper conceptual understanding? Try our interactive lesson!

Chi Squared (χ²) Goodness of Fit Test
SL AI 4.11

A χ² goodness of fit test compares actual frequencies to the frequencies that would be expected under the null hypothesis. The bigger the relative difference between actual and expected values, the smaller the ​p​ value it returns.


For example, imagine a ​5​ kilometer race where the number of racers finishing in certain time brackets is recorded, and compared to what is expected based on historical data:

​5km​ time

​t≤18​ minutes

​18<t≤25​

​t>25​

Expected frequncy

13

45

88

Observed frequencies

20

56

70

Notice that the expected and observed frequencies both add up to ​146. They must always be the same.

  • The null hypothesis for this test is that the observed frequencies do fit the expected distribution.

  • The alternative hypothesis is that the observed frequencies do not fit the expected distribution.

To perform a χ² goodness of fit test, you use your calculator:

  1. Enter in ​L1​​ the observed frequencies

  2. Enter in ​L2​​ the expected frequencies

  3. Find the ​χ2​ GOF-Test on your calculator, with

    • Observed: ​L1​​

    • Expected: ​L2​​

    • df: ​(n−1), where ​n​ is the number of categories. (​2​ in our case)

The calculator returns the following:

  • ​χ2≈9.24​

  • ​p≈0.00986​

Degrees of Freedom for a χ² goodness of fit test
SL AI 4.11

The degrees of freedom in a dataset is the number of values that can change while keeping the total sum constant. If there are ​n​ values in a list, the number of degrees of freedom is ​n−1.


The degrees of freedom are important because with more values, there will naturally be more total variation between actual and expected values. The calculator needs to account for this.

χ² critical value
SL AI 4.11

The critical value for a χ² test is a threshold we are given, against which we compare the value of χ² for our data. If our χ² is larger than the critical value, we reject ​H0​.

It's worth seeing what the ​χ2​ distribution actually looks like.

Notice that as the degrees of freedom increase, the curve shifts down and to the right.

The p-values our calculator returns are really area under the curve:

Chi Squared (χ²) Test For Independence using technology
SL AI 4.11

A ​χ2​ test can also be used to test whether categorical variables are related, for example, does favorite movie depend on gender? It works by comparing how far off the observed data is from what we would expect if the variables were not related (​H0​​).


In a ​χ2​ test for independence:

  • The null hypothesis ​H0​​ is that the categories are not independent (not related)

  • The alternative hypothesis ​H1​​ is that the categories are not independent (they are related).


On a calculator:

  • Enter the observed frequencies in a matrix (table)

  • Enter the expected frequencies in a separate matrix or leave them blank if they are not given.

  • Navigate to ​χ2​-Test on your calculator, and enter the observed and expected matrices (select an empty matrix and your calculator will find the expected values itself) you just filled.

  • The calculator returns the ​χ2​ value and the p value.

Nice work completing χ² tests, here's a quick recap of what we covered:

Skills covered

Mixed Practice

Exercises checked off

I'm Plex, here to help you understand this concept!
/
Inference & Hypotheses
/
χ² tests
Student's t-test
χ² tests
Inference & Hypotheses

χ² tests

0 of 0 exercises completed

Expected and observed frequencies in ​χ2​ goodness of fit and independence tests, including degrees of freedom, the test statistic, and comparing ​χ2​ to a critical value to decide whether to reject ​H0​.

Want a deeper conceptual understanding? Try our interactive lesson!

Chi Squared (χ²) Goodness of Fit Test
SL AI 4.11

A χ² goodness of fit test compares actual frequencies to the frequencies that would be expected under the null hypothesis. The bigger the relative difference between actual and expected values, the smaller the ​p​ value it returns.


For example, imagine a ​5​ kilometer race where the number of racers finishing in certain time brackets is recorded, and compared to what is expected based on historical data:

​5km​ time

​t≤18​ minutes

​18<t≤25​

​t>25​

Expected frequncy

13

45

88

Observed frequencies

20

56

70

Notice that the expected and observed frequencies both add up to ​146. They must always be the same.

  • The null hypothesis for this test is that the observed frequencies do fit the expected distribution.

  • The alternative hypothesis is that the observed frequencies do not fit the expected distribution.

To perform a χ² goodness of fit test, you use your calculator:

  1. Enter in ​L1​​ the observed frequencies

  2. Enter in ​L2​​ the expected frequencies

  3. Find the ​χ2​ GOF-Test on your calculator, with

    • Observed: ​L1​​

    • Expected: ​L2​​

    • df: ​(n−1), where ​n​ is the number of categories. (​2​ in our case)

The calculator returns the following:

  • ​χ2≈9.24​

  • ​p≈0.00986​

Degrees of Freedom for a χ² goodness of fit test
SL AI 4.11

The degrees of freedom in a dataset is the number of values that can change while keeping the total sum constant. If there are ​n​ values in a list, the number of degrees of freedom is ​n−1.


The degrees of freedom are important because with more values, there will naturally be more total variation between actual and expected values. The calculator needs to account for this.

χ² critical value
SL AI 4.11

The critical value for a χ² test is a threshold we are given, against which we compare the value of χ² for our data. If our χ² is larger than the critical value, we reject ​H0​.

It's worth seeing what the ​χ2​ distribution actually looks like.

Notice that as the degrees of freedom increase, the curve shifts down and to the right.

The p-values our calculator returns are really area under the curve:

Chi Squared (χ²) Test For Independence using technology
SL AI 4.11

A ​χ2​ test can also be used to test whether categorical variables are related, for example, does favorite movie depend on gender? It works by comparing how far off the observed data is from what we would expect if the variables were not related (​H0​​).


In a ​χ2​ test for independence:

  • The null hypothesis ​H0​​ is that the categories are not independent (not related)

  • The alternative hypothesis ​H1​​ is that the categories are not independent (they are related).


On a calculator:

  • Enter the observed frequencies in a matrix (table)

  • Enter the expected frequencies in a separate matrix or leave them blank if they are not given.

  • Navigate to ​χ2​-Test on your calculator, and enter the observed and expected matrices (select an empty matrix and your calculator will find the expected values itself) you just filled.

  • The calculator returns the ​χ2​ value and the p value.

Nice work completing χ² tests, here's a quick recap of what we covered:

Skills covered

Mixed Practice

Exercises checked off

I'm Plex, here to help you understand this concept!

Generating starter questions...

1 free

Generating starter questions...

1 free