Back to homeMathematics · High School Year 3 · Social Sciences · Change subject
Start for free
Prep 3 SS · Mathematics
Statistics · Inference

Hypothesis Testing

Before you start, make sure you know: The normal distribution (High School Year 2 (semesters 3 and 4))

A potato chip factory advertises on the package that each bag weighs $150$ g. An inspector from Profeco (the consumer protection agency) suspects that the bags weigh less. There is a starting claim and a sample that may, or may not, contradict it. Testing a hypothesis is the procedure for deciding, using a sample, whether that claim holds up or is rejected.

Null and alternative hypotheses

Diagram comparing the null hypothesis H0 as an equality with the alternative hypothesis H1 in its two-sided and one-sided forms. H₀: μ = μ₀ (starting claim) H₁: μ ≠ μ₀ (two-sided) or μ > μ₀ or μ < μ₀ (one-sided)

To set the region where $H_0$ is rejected, the significance level $\alpha$ and the standard normal are used. Practice setting up the test and finding the critical values:

Practice★☆☆Not started
In quality control at a crisp factory, we wish to check whether the mean weight of the packets is really $150$ grams, as stated on the packaging. The population standard…

In quality control at a crisp factory, we wish to check whether the mean weight of the packets is really $150$ grams, as stated on the packaging. The population standard deviation is known to be $\sigma = 5$ grams. If it is suspected that the packets may weigh either more or less than stated:

  1. a) State the hypotheses $H_0$ and $H_1$.
  1. b) If we set a significance level of $\alpha = 0.05$, calculate the critical values $z_{\alpha/2}$ that bound the acceptance region.
Solve

Type I and Type II errors

Decision table for a hypothesis test showing the correct decisions and the Type I and Type II errors depending on whether the null hypothesis is true. Correct Type II error (β) Type I error (α) Correct H₀ true H₀ false Fail to reject H₀ Reject H₀
Practice★☆☆Not started
Explain in your own words what it means to make a Type I Error in the context of a study attempting to test whether a new study method improves mathematics marks (where…

Explain in your own words what it means to make a Type I Error in the context of a study attempting to test whether a new study method improves mathematics marks (where $H_0$ is that the method yields no improvement).

Solve
Practice★★☆Not started
A new model of running shoes designed to increase performance is being tested. The manufacturer sets the null hypothesis $H_0$: "The mean performance with the new model…

A new model of running shoes designed to increase performance is being tested. The manufacturer sets the null hypothesis $H_0$: "The mean performance with the new model is equal to that of the previous model" against the alternative hypothesis $H_1$: "The mean performance is higher".

Give reasons explaining what making a Type I error and a Type II error would mean in this practical context. Which of the two errors do you think would be more damaging to the company's brand image if discovered later?

Solve

Test statistic and p-value for a mean

Most commonly used critical values: for $\alpha=0.05$, $z_{0.05}=1.645$ (one-sided) and $z_{0.025}=1.96$ (two-sided); for $\alpha=0.01$, $z_{0.01}=2.326$ and $z_{0.005}=2.576$.

Practice★☆☆Not started
We are conducting a two-tailed hypothesis test for the mean of a normal population with known $\sigma$. After calculating the test statistic with the data from a sample,…

We are conducting a two-tailed hypothesis test for the mean of a normal population with known $\sigma$. After calculating the test statistic with the data from a sample, we obtain a value of $z_{exp} = 2.15$.

If the critical values for a significance level of $\alpha = 0.05$ are $-1.96$ and $1.96$, reason whether we should accept or reject the null hypothesis.

Solve
Practice★★★Not started
A study on youth mental health indicates that the daily mean time that 2nd Baccalaureate students spend on TikTok is $120$ minutes, with a standard deviation of $30$…

A study on youth mental health indicates that the daily mean time that 2nd Baccalaureate students spend on TikTok is $120$ minutes, with a standard deviation of $30$ minutes. A counsellor at a school believes that at their center, due to the pressure of the EBAU exams, the mean time is significantly lower. They take a random sample of $50$ students and obtain a mean of $112$ minutes.

  1. a) Define the appropriate hypothesis test for the counsellor's belief.
  2. b) Calculate the p-value of the obtained sample.
  3. c) If a significance level of $1\%$ is used, what conclusion should the counsellor draw? What if the significance level were $5\%$?
Solve
Practice★★★Not started
We want to investigate whether a new study method improves performance in Mathematics. The historical mean grade in a region is $6.4$ with a standard deviation…

We want to investigate whether a new study method improves performance in Mathematics. The historical mean grade in a region is $6.4$ with a standard deviation $\sigma = 1.2$. The new method is applied to an experimental group of $36$ students and a mean grade of $6.9$ is obtained.

  1. a) Carry out a one-tailed hypothesis test for a significance level $\alpha = 0.05$ (state $H_0$ and $H_1$, calculate the critical value and the rejection region, and conclude).
  1. b) If the $95\%$ confidence interval for the mean of this group were $(6.508 ; 7.292)$, could you have answered the previous part without calculating the test statistic? Explain the relationship between confidence intervals and hypothesis testing.
Solve

Test for a proportion

Standard normal curve with the rejection region in the right tail starting at the critical value z alpha, and the statistic z exp, almost at the boundary, inside the non-rejection zone. zα = 1.645 rejection region zexp ≈ 1.60
Practice★★☆Not started
In a sustainability study, it is known that two years ago $30\ \%$ of young people in a town used public transport to get to school. Following an environmental awareness…

In a sustainability study, it is known that two years ago $30\ \%$ of young people in a town used public transport to get to school. Following an environmental awareness campaign, we want to test whether this percentage has increased. A random sample of $150$ young people is taken, and it is observed that $54$ of them now use public transport.

From these data, and with a significance level of $5\ \%$, can it be concluded that the campaign was effective and the proportion of users has increased? Set up the corresponding hypothesis test.

p₀ = 0.30 z_α = ? α = 5% (Rejection) Sample Data n = 150 x = 54 p̂ = 54/150 = ? Hypotheses H₀: p ≤ 0.30 H₁: p > 0.30 Does p̂ fall in the rejection region? p̂ = ?
Solve
Practice★★☆Not started
A health center claims that the proportion of smokers among young people aged between 16 and 18 is $15\ \%$. To verify this, a study is conducted on a sample of $400$…

A health center claims that the proportion of smokers among young people aged between 16 and 18 is $15\ \%$. To verify this, a study is conducted on a sample of $400$ young people in that age range, revealing that $72$ of them smoke.

Calculate the p-value (the probability of obtaining a result as extreme as, or more extreme than, the observed result under the null hypothesis) for a two-tailed test. In light of the result, would you reject the health center's claim at a standard significance level of $\alpha = 0.05$?

Solve
Practice★★★Not started
In a debate on sustainability, it is claimed that $75\%$ of young people in a city separate plastic packaging from the rest of the rubbish. To verify this, a sample of…

In a debate on sustainability, it is claimed that $75\%$ of young people in a city separate plastic packaging from the rest of the rubbish. To verify this, a sample of $150$ young people is selected, and it is observed that $105$ of them recycle correctly.

  1. a) Set up the hypothesis test to check whether the true proportion is lower than claimed.
  2. b) Is the initial claim acceptable for a significance level of $10\%$?
  3. c) Suppose that the true proportion were $65\%$. What decision would most likely be made with this test if the sample size were only $20$ people? Reason about the importance of sample size on the power of the test.
Solve

The t-test when $\sigma$ is unknown

Two means

Confidence interval and hypothesis test

Equivalence between a two-sided confidence interval and the test: if the hypothesized value falls outside the interval, H0 is rejected. CI at 1−α μ₀ outside → H₀ is rejected
Practice★★☆Not started
A study was conducted on the monthly leisure expenditure of university students in a city, assuming it follows a normal distribution with $\sigma = 400$ pesos. A…

A study was conducted on the monthly leisure expenditure of university students in a city, assuming it follows a normal distribution with $\sigma = 400$ pesos. A $95\ \%$ confidence interval for the mean was obtained as $(1\,502; 1\,698)$.

Without carrying out new standardization calculations, use the relationship between confidence intervals and hypothesis tests to answer: Would the null hypothesis $H_0: \mu = 1\,400$ pesos be rejected against $H_1: \mu \neq 1\,400$ pesos at a significance level of $\alpha = 0.05$? What if the null hypothesis were $H_0: \mu = 1\,600$ pesos? Justify your answer.

Solve

Back to the beginning: the inspector takes a sample of $36$ bags and obtains $\bar{x} = 148$ g, with $\sigma = 6$ g. Then $z_{exp} = \frac{148 - 150}{6 / \sqrt{36}} = -2$. For $H_1:\mu\neq150$ and $\alpha = 0.05$, since $|-2| > 1.96$, $H_0$ is rejected: there is statistical evidence that the bags do not weigh what the package says.

Summary

See all the exercises in this section