Perplex
Dashboard
Topics
Exponents & LogarithmsApproximations & ErrorSequences & SeriesFinancial Mathematics
Cartesian plane & linesFunction TheoryModelling
2D & 3D GeometryVoronoi Diagrams
ProbabilityDescriptive StatisticsBivariate StatisticsDistributions & Random VariablesInference & Hypotheses
DifferentiationIntegration
Review VideosFormula BookletMy Progress
BlogLanding Page
Sign UpLogin
Perplex
Perplex
Dashboard
Topics
Exponents & LogarithmsApproximations & ErrorSequences & SeriesFinancial Mathematics
Cartesian plane & linesFunction TheoryModelling
2D & 3D GeometryVoronoi Diagrams
ProbabilityDescriptive StatisticsBivariate StatisticsDistributions & Random VariablesInference & Hypotheses
DifferentiationIntegration
Review VideosFormula BookletMy Progress
BlogLanding Page
Sign UpLogin
Perplex
IB Math AISL
/
Inference & Hypotheses
/
Skills
Edit

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

IB Math AISL
/
Inference & Hypotheses
/
Skills
Edit

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

9 Skills Available

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Hypothesis Testing and p-values

2 skills
Null and alternative hypotheses (H₀ & H₁)
SL AI 4.11

When we want to make a claim using statistics, need sufficient evidence. Flipping a coin and getting 3 heads in a row is not strong evidence that it is biased, but 100 in a row is.


Whatever data we have, we start by assuming that they are produced by random chance alone. We call this the null hypothesis, which we write ​H0​. In the coin flip example, the null hypothesis is ​H0​: the coin is fair.


An alternative hypothesis, denoted ​H1​, is the idea that something "fishy" is going on. In the coin flip example, this could be ​H1​: the coin is biased towards heads.


It's important (both in exams and real life) to assume the null hypothesis is true unless you have good evidence.


Writing down the null and alternative hypotheses can be hard, but you can think of ​H0​​ as a neutral assumption, and ​H1​​ as something we need evidence to prove.


More Examples
  1. Does listening to music while studying hurt test performance?

    • Null hypothesis ​H0​: we assume it makes no difference: the average scores of students with or without music are similar

    • Alternative hypothesis ​H1​: students who listen to music do worse: they have a lower average test score.

  2. Does drinking an energy drink improve reaction time?

    • Null hypothesis ​H0​: we assume it makes no difference: the average reaction times with and without energy drinks are similar.

    • Alternative hypothesis ​H1​: drinking an energy drink lowers the mean reaction time.

Significance Levels & p-values
SL AI 4.11

Once we have our null and alternative hypotheses, we use our data as evidence against the null hypothesis.


Let's take the coin flip example, and start by assuming the null hypothesis: it is fair. That means each time I flip it, I have a ​21​​ probability of getting heads. If the coin gives ​10​ heads in a row, the probability is

​
(21​)10≈0.098%
​

This number is the probability of the data we observed assuming the null hypothesis. The smaller it gets, the less likely that the null hypothesis is true.


We call this the ​p​-value. The smaller the ​p​-value, the stronger the evidence for the alternative hypothesis. If the ​p​ value is less than the significance level ​α, we reject the null hypothesis, which is essentially concluding the alternative hypothesis is true.


p-value: The probability of getting results as surprising (or more) as the observation if the null hypothesis were true.

Significance level (​α​): The cutoff we choose in advance. If the p-value is below ​α, we reject the null hypothesis.

χ² tests

4 skills
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​.

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.

Student's t-test

3 skills
1 tailed and 2 tailed T-tests and their hypotheses
SL AI 4.11

A T-test is a technique that compares whether the means of two groups are significantly different. It works by measuring how different the mean of a sample is from another mean, and comparing that difference to the variance in the sample.


  • The null hypothesis is that the two groups have the same mean ​H0​:μ=μ0​.

  • We can have any of the following alternative hypotheses:

    1. ​H1​:μ<μ0​​ - testing whether our sample has a lower mean that what we're comparing it to

    2. ​H1​:μ>μ0​​ - testing whether our sample has a higher mean that what we're comparing it to

    3. ​H1​:μ=μ0​​ - testing whether our sample has a different mean that what we're comparing it to

The first two alternative hypotheses are called one-tailed because they test difference in a specific direction (one mean greater or smaller than the other).


Examples

We can use a one-tailed T-test to determine whether

  • patients at a certain hospital have a significantly faster (lower) mean recovery time than the national average. This is a one-tailed test.

  • trout in lake A have a significantly different mean weight than trout in lake B. This is a two-tailed test.

T-test for mean μ (1-sample)
SL AI 4.11

We can perform a ​t​-test for a single sample against a known mean by on a calculator:

  1. Enter the sample data into a list.

  2. Navigate to T-Test on a calculator.

  3. Select "DATA" and enter the name of the list where sample is stored.

  4. Select the tail type depending on what our alternative hypothesis is (​μ0​​ is the population mean):

    • ​=μ0​​ for a change in mean

    • ​<μ0​​ for a decrease in mean

    • ​>μ0​​ for an increase in mean

  5. Hit calculate, and interpret the ​p​-value as usual.

Assumptions: This test is assuming that the data are independent, randomly sampled, and approximately normally distributed. IB questions will specifically ask you to state the assumption of normally distributed variables.

2-sample T-Test
SL AI 4.11

To compare the means of two samples using a ​T​-test, we use a calculator:

  1. Enter each sample in its own list.

  2. Navigate to 2-SampTTest.

  3. Select "Data", then enter the names of the lists containing the samples.

  4. Select the tail type depending on what our alternative hypothesis is:

    • ​μ1​=μ2​​ for different means

    • ​<μ2​​ for first list mean smaller than second

    • ​>μ2​​ for first list mean greater than second

  5. Set "Pooled" to true.

  6. The calculator reports the ​t​-value and ​p​-value, which we interpret as usual.

Assumptions: This test is assuming that the data are approximately normally distributed, and that both samples have the same variance. IB questions will specifically ask you to state these assumptions.

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

9 Skills Available

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Hypothesis Testing and p-values

2 skills
Null and alternative hypotheses (H₀ & H₁)
SL AI 4.11

When we want to make a claim using statistics, need sufficient evidence. Flipping a coin and getting 3 heads in a row is not strong evidence that it is biased, but 100 in a row is.


Whatever data we have, we start by assuming that they are produced by random chance alone. We call this the null hypothesis, which we write ​H0​. In the coin flip example, the null hypothesis is ​H0​: the coin is fair.


An alternative hypothesis, denoted ​H1​, is the idea that something "fishy" is going on. In the coin flip example, this could be ​H1​: the coin is biased towards heads.


It's important (both in exams and real life) to assume the null hypothesis is true unless you have good evidence.


Writing down the null and alternative hypotheses can be hard, but you can think of ​H0​​ as a neutral assumption, and ​H1​​ as something we need evidence to prove.


More Examples
  1. Does listening to music while studying hurt test performance?

    • Null hypothesis ​H0​: we assume it makes no difference: the average scores of students with or without music are similar

    • Alternative hypothesis ​H1​: students who listen to music do worse: they have a lower average test score.

  2. Does drinking an energy drink improve reaction time?

    • Null hypothesis ​H0​: we assume it makes no difference: the average reaction times with and without energy drinks are similar.

    • Alternative hypothesis ​H1​: drinking an energy drink lowers the mean reaction time.

Significance Levels & p-values
SL AI 4.11

Once we have our null and alternative hypotheses, we use our data as evidence against the null hypothesis.


Let's take the coin flip example, and start by assuming the null hypothesis: it is fair. That means each time I flip it, I have a ​21​​ probability of getting heads. If the coin gives ​10​ heads in a row, the probability is

​
(21​)10≈0.098%
​

This number is the probability of the data we observed assuming the null hypothesis. The smaller it gets, the less likely that the null hypothesis is true.


We call this the ​p​-value. The smaller the ​p​-value, the stronger the evidence for the alternative hypothesis. If the ​p​ value is less than the significance level ​α, we reject the null hypothesis, which is essentially concluding the alternative hypothesis is true.


p-value: The probability of getting results as surprising (or more) as the observation if the null hypothesis were true.

Significance level (​α​): The cutoff we choose in advance. If the p-value is below ​α, we reject the null hypothesis.

χ² tests

4 skills
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​.

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.

Student's t-test

3 skills
1 tailed and 2 tailed T-tests and their hypotheses
SL AI 4.11

A T-test is a technique that compares whether the means of two groups are significantly different. It works by measuring how different the mean of a sample is from another mean, and comparing that difference to the variance in the sample.


  • The null hypothesis is that the two groups have the same mean ​H0​:μ=μ0​.

  • We can have any of the following alternative hypotheses:

    1. ​H1​:μ<μ0​​ - testing whether our sample has a lower mean that what we're comparing it to

    2. ​H1​:μ>μ0​​ - testing whether our sample has a higher mean that what we're comparing it to

    3. ​H1​:μ=μ0​​ - testing whether our sample has a different mean that what we're comparing it to

The first two alternative hypotheses are called one-tailed because they test difference in a specific direction (one mean greater or smaller than the other).


Examples

We can use a one-tailed T-test to determine whether

  • patients at a certain hospital have a significantly faster (lower) mean recovery time than the national average. This is a one-tailed test.

  • trout in lake A have a significantly different mean weight than trout in lake B. This is a two-tailed test.

T-test for mean μ (1-sample)
SL AI 4.11

We can perform a ​t​-test for a single sample against a known mean by on a calculator:

  1. Enter the sample data into a list.

  2. Navigate to T-Test on a calculator.

  3. Select "DATA" and enter the name of the list where sample is stored.

  4. Select the tail type depending on what our alternative hypothesis is (​μ0​​ is the population mean):

    • ​=μ0​​ for a change in mean

    • ​<μ0​​ for a decrease in mean

    • ​>μ0​​ for an increase in mean

  5. Hit calculate, and interpret the ​p​-value as usual.

Assumptions: This test is assuming that the data are independent, randomly sampled, and approximately normally distributed. IB questions will specifically ask you to state the assumption of normally distributed variables.

2-sample T-Test
SL AI 4.11

To compare the means of two samples using a ​T​-test, we use a calculator:

  1. Enter each sample in its own list.

  2. Navigate to 2-SampTTest.

  3. Select "Data", then enter the names of the lists containing the samples.

  4. Select the tail type depending on what our alternative hypothesis is:

    • ​μ1​=μ2​​ for different means

    • ​<μ2​​ for first list mean smaller than second

    • ​>μ2​​ for first list mean greater than second

  5. Set "Pooled" to true.

  6. The calculator reports the ​t​-value and ​p​-value, which we interpret as usual.

Assumptions: This test is assuming that the data are approximately normally distributed, and that both samples have the same variance. IB questions will specifically ask you to state these assumptions.