Back to homeMathematics · 2nd Bach. Social Sciences · Change subject
Start for free
Notes

Exercises: Hypothesis testing

Practice★☆☆
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
Practice★☆☆
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★☆☆
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★☆☆
Sara wants to check whether the proportion of users satisfied with her city's municipal bike-sharing service has decreased compared to the official historical figure,…

Sara wants to check whether the proportion of users satisfied with her city's municipal bike-sharing service has decreased compared to the official historical figure, which was $70\,\%$ ($p_0 = 0,70$). To do so, she surveys $n = 100$ randomly selected users and observes that $62$ of them report being satisfied (that is, $\hat{p} = 0,62$). In her notebook, Sara writes the following:

  1. Statement: $H_0: \hat{p} = 0,62$ versus $H_1: \hat{p} < 0,62$.

  2. Test statistic: $z = \dfrac{0,62 - 0,70}{\sqrt{\dfrac{0,62 \cdot 0,38}{100}}} = \dfrac{-0,08}{0,0485} \approx -1,65$.

  1. a) Sara has made two serious conceptual errors in her approach. Identify both errors and explain why they contradict the theoretical foundations of hypothesis testing.
  2. b) Correct Sara's procedure: formulate the null and alternative hypotheses accurately with the appropriate population parameters, and calculate the correct value of the experimental test statistic $z_{\text{exp}}$.
Solve
Practice★☆☆
The Directorate-General for Traffic (DGT) states that the mean speed on a peri-urban stretch regulated with an educational radar is $\mu = 80\text{ km/h}$, with a known…

The Directorate-General for Traffic (DGT) states that the mean speed on a peri-urban stretch regulated with an educational radar is $\mu = 80\text{ km/h}$, with a known population standard deviation of $\sigma = 10\text{ km/h}$. A neighborhood association claims that vehicles travel at a higher mean speed. To test this, they record the speed of a random sample of $n = 100$ vehicles and obtain a sample mean of $\bar{x} = 81,8\text{ km/h}$.

  1. a) Before carrying out any formal calculations, note that the observed difference is only $1,8\text{ km/h}$ over $80\text{ km/h}$. Estimate mentally or off the cuff the standard error of the mean ($\sigma/\sqrt{n}$) and reason whether a deviation of $1,8\text{ km/h}$ seems sufficient to be statistically significant or attributable to mere sampling chance.
  2. b) Formally set up the one-tailed test with $H_0: \mu = 80$ against $H_1: \mu > 80$. Calculate the test statistic $z_{\text{exp}}$ and its corresponding p-value.
  3. c) With a significance level of $\alpha = 5\,\%$ ($z_{0,05} = 1,645$), is the DGT's claim rejected? Compare the conclusion obtained with your initial estimate and reason what role the sample size ($n = 100$) played in the final verdict.
Solve
Practice★★☆
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
Practice★★☆
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★★☆
A health centre 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 centre 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 centre's claim at a standard significance level of $\alpha = 0,05$?

Solve
Practice★★☆
A study was conducted on the monthly leisure expenditure of university students in a city, assuming it follows a normal distribution with $\sigma = 20$ euros. A $95\ \%$…

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

Without carrying out new standardisation calculations, use the relationship between confidence intervals and hypothesis tests to answer: Would the null hypothesis $H_0: \mu = 70$ euros be rejected against $H_1: \mu \neq 70$ euros at a significance level of $\alpha = 0,05$? What if the null hypothesis were $H_0: \mu = 80$ euros? Justify your answer.

Solve
Practice★★☆
According to the INE's Survey on Essential Population and Housing Characteristics, the percentage of Spanish single-person households (where a single person lives)…

According to the INE's Survey on Essential Population and Housing Characteristics, the percentage of Spanish single-person households (where a single person lives) historically stood at $26\,\%$ ($p_0 = 0,26$). A sociologist claims that in major provincial capitals this percentage has increased significantly in recent years. To verify this, they select a simple random sample of $n = 400$ households from a large metropolitan area and find that $124$ of them are single-person.

  1. a) Mathematically justify whether the approximation of the sample proportion using a normal distribution is applicable, checking the theoretical conditions on the expected number of successes and failures under the assumption that the null hypothesis is true.
  2. b) Model the situation using a hypothesis test: state the null and alternative hypotheses corresponding to the sociologist's suspicion, and calculate the standardized test statistic $z_{\text{exp}}$.
  3. c) For a significance level of $1\,\%$ ($z_{0,01} = 2,33$), determine the rejection region and conclude with reasoning in the context of the problem whether there is sufficient evidence to support the sociologist's hypothesis.
Solve
Practice★★☆
In a canning plant in Navarra, the nominal net weight of asparagus jars must be $\mu = 250\text{ g}$. From historical controls, it is known that the population standard…

In a canning plant in Navarra, the nominal net weight of asparagus jars must be $\mu = 250\text{ g}$. From historical controls, it is known that the population standard deviation of the packaging process is $\sigma = 8\text{ g}$. To verify that the automatic filling machine has not become miscalibrated (neither above nor below), the quality team takes a random sample of $n = 64$ jars and obtains a mean weight of $\bar{x} = 252,2\text{ g}$. With a significance level $\alpha = 0,05$, three engineers propose three different ways to make the decision:

  • Lucía proposes constructing the $95\,\%$ confidence interval for the population mean and checking whether $\mu_0 = 250\text{ g}$ belongs to that interval.

  • Carlos proposes calculating the standardized statistic $z_{\text{exp}}$ and comparing it with the two-tailed critical values $\pm 1,96$.

  • Elena proposes directly calculating the exact p-value of the statistic and comparing it with $\alpha = 0,05$.

  1. a) Apply the procedures of Lucía and Carlos. Show your calculations and explain why both necessarily lead to the same statistical decision in a two-tailed test.
  2. b) Suppose that the operations director needs an answer to the following question: “What was the exact probability of having obtained a deviation from the nominal weight as large as or larger than the observed one if the machine were perfectly calibrated?”. Justify which of the three methods directly answers that question, calculate it, and interpret the result in terms of evidence against the null hypothesis.
Solve
Practice★★★
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 centre, 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★★★
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
Practice★★★
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
Practice★★★
An express courier company in Spain guarantees a mean delivery time between provinces of $\mu_0 = 24\text{ hours}$, with a known dispersion of $\sigma = 3\text{ hours}$.…

An express courier company in Spain guarantees a mean delivery time between provinces of $\mu_0 = 24\text{ hours}$, with a known dispersion of $\sigma = 3\text{ hours}$. Management audits the service using the test $H_0: \mu = 24$ against $H_1: \mu > 24$ (suspicion of delays) at a significance level $\alpha = 0,05$ ($z_{0,05} = 1,645$).

  1. a) If the auditors examine a sample of $n = 36$ independent shipments, determine the threshold value of the sample mean, $\bar{x}_c$, above which $H_0$ would be rejected. That is, what is the minimum observed mean time that would raise management's alarms?
  2. b) Management considers it unacceptable that a sample mean of $\bar{x} = 24,6\text{ hours}$ is not sufficient to reject $H_0$ at the level $\alpha = 0,05$. Solve the inverse problem: what is the minimum sample size $n$ that the auditors should have collected so that a record of $\bar{x} = 24,6\text{ hours}$ would have been enough to reject $H_0$ at that same significance level?
  3. c) Analyze the theoretical expression of the critical value $\bar{x}_c = \mu_0 + z_\alpha \cdot \dfrac{\sigma}{\sqrt{n}}$. Justify what happens to the test's ability to detect minimal deviations of the true mean from the null hypothesis when $n$ approaches infinity, keeping $\alpha$ constant.
Solve
Practice★★★
The Ebro Hydrographic Confederation (CHE) conducts periodic checks on discharges from a paper mill into a riverbed. Due to environmental regulations, the mean nitrate…

The Ebro Hydrographic Confederation (CHE) conducts periodic checks on discharges from a paper mill into a riverbed. Due to environmental regulations, the mean nitrate concentration must not exceed $\mu_0 = 15\text{ mg/l}$. It is assumed that the measurements follow a normal distribution with a known standard deviation $\sigma = 2\text{ mg/l}$. The administration takes a sample of $n = 16$ independent water samples and sets up the test $H_0: \mu \le 15$ against $H_1: \mu > 15$.

  1. a) Precisely define what it means to commit a Type I error and a Type II error in this specific scenario. Explain in detail the practical and real consequences that each would entail for the paper mill and for the river ecosystem.
  2. b) At the technical committee, a disagreement arises regarding the significance level: the company's legal counsel requests setting $\alpha = 0,01$, while the environmental protection technicians prefer $\alpha = 0,10$. Reason which type of error each party seeks to minimize and which of the two levels provides greater guarantee of immediate intervention in the event of actual pollution.
  3. c) After performing the laboratory analyses of the $n = 16$ samples, a mean concentration of $\bar{x} = 16,1\text{ mg/l}$ is obtained. Calculate the p-value of the test and determine with reasoning what penalty or administrative resolution would be adopted under the company's criterion ($\alpha = 0,01$) and under the environmental criterion ($\alpha = 0,10$). How does this result illustrate that the chosen significance threshold conditions decision-making?
Solve