12.5: Full Hypothesis Test Examples
- Page ID
- 140466
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Jeffrey, a young adult athlete, established a mean time of 16.43 seconds for swimming the 25-yard freestyle, with a standard deviation of 0.8 seconds. His athletic trainer, Frank, thought that Jeffrey could swim the 25-yard freestyle faster if he participated in a mobility program. Frank conducted a mobility program with Jeffrey twice a week and timed Jeffrey for 15 25-yard freestyle swims each day. For the 15 swims, Jeffrey's mean time was 16 seconds. Frank thought that the mobility program helped Jeffrey to swim faster than the 16.43 seconds. Conduct a hypothesis test using a preset α = 0.05. Assume that the swim times for the 25-yard freestyle are normal.
- Answer
-
Set up the Hypothesis Test:
Since the problem is about a mean, this is a test of a single population mean.
\(H_0: \mu=16.43 \quad H_a: \mu<16.43\)
For Jeffrey to swim faster, his time will be less than 16.43 seconds. The "<" tells you this is left-tailed.
Determine the distribution needed:
Random variable: \(\bar{X}=\) the mean time to swim the 25-yard freestyle.
Distribution for the test: \(\bar{X}\) is normal (population standard deviation is known: \(\sigma=0.8\) )
\(\bar{X} \sim N\left(\mu, \dfrac{\sigma_X}{\sqrt{n}}\right)\) Therefore, \(\bar{X} \sim N\left(16.43, \dfrac{0.8}{\sqrt{15}}\right)\)
\(\mu=16.43\) comes from \(H_0\) and not the data. \(\sigma=0.8\), and \(n=15\).
Calculate the \(p\)-value using the normal distribution for a mean:
\(p\)-value \(=P(\bar{x}<16)=0.0187\) where the sample mean in the problem is given as 16.
\(p\)-value \(=0.0187\) (This is called the actual level of significance.) The \(p\)-value is the area to the left of the sample mean is given as 16.
Figure \(\PageIndex{1}\) \(\mu=16.43\) comes from \(H_0\). Our assumption is \(\mu=16.43\).
Interpretation of the \(\boldsymbol{p}\)-value: If \(\boldsymbol{H}_0\) is true, there is a 0.0187 probability ( \(1.87 \%\) ) that Jeffrey's mean time to swim the 25-yard freestyle is 16 seconds or less. Because a \(1.87 \%\) chance is small, the mean time of 16 seconds or less is unlikely to have happened randomly. It is a rare event.
Compare \(\alpha\) and the \(p\)-value:
\[\alpha=0.05 p \text {-value }=0.0187 \alpha>p \text {-value }\]
Make a decision: Since \(\alpha>p\)-value, reject \(H_0\).
This indicates that you reject the null hypothesis that the mean time to swim the 25-yard freestyle is at least 16.43 seconds.
Conclusion: At the \(5 \%\) significance level, there is sufficient evidence that Jeffrey's mean time to swim the 25-yard freestyle is less than 16.43 seconds. Thus, based on the sample data, we conclude that Jeffrey swims faster when completing in the mobility program.
The Type I and Type II errors for this problem are as follows:
The Type I error is to conclude that Jeffrey swims the 25-yard freestyle, on average, in less than 16.43 seconds when, in fact, he actually swims the 25-yard freestyle, on average, in at least 16.43 seconds. (Reject the null hypothesis when the null hypothesis is true.)The Type II error is that there is not evidence to conclude that Jeffrey swims the 25-yard freestyle, on average, in less than 16.43 seconds when, in fact, he actually does swim the 25-yard free-style, on average, in less than 16.43 seconds. (Do not reject the null hypothesis when the null hypothesis is false.)
Jasmine is a researcher testing a new electrolyte recovery drink designed for endurance athletes. In a pilot study of 16 trials, it was found that the athletes retained an average of 108 mg of sodium per liter of fluid with a standard deviation of 12 mg. The laboratory policy requires that for a recovery drink to be labeled "High-Retention," it must exceed a mean of 100 mg per liter. Can we conclude that Jasmine's recovery drink has met this requirement at the significance level of 5% (a 95% confidence level)?
- Answer
-
1. \(H_0: \mu \leq 100\)
\(H_a: \mu>100\)
The null and alternative hypotheses are for the parameter μ because the number of mg of sodium is a continuous random variable. Also, this is a one-tailed test because the laboratory is only interested in whether the sodium retention is at or below a particular threshold, rather than it being "too high." This can be thought of as making a claim that the "High-Retention" requirement is being met; therefore, the claim is located in the alternative hypothesis, as we are looking for sufficient evidence to prove the mean is greater than 100 mg.
2. Test statistic: \(t_c=\dfrac{\bar{x}-\mu_0}{\dfrac{s}{\sqrt{n}}}=\dfrac{108-100}{\left(\dfrac{12}{\sqrt{16}}\right)}=2.67\)
3. Critical value: \(t_a=1.753\) with \(\mathrm{n}-1\) degrees of freedom \(=15\)
The test statistic is a Student's t because the sample size is below 30; therefore, we cannot assume the population standard deviation is known or use the normal distribution directly. Comparing the calculated value of the test statistic to the critical value of t at a 5% significance level, we see that the calculated value of 2.67 falls deep into the tail of the distribution. Thus, we conclude that 108 mg of sodium per liter is significantly larger than the hypothesized value of 100 mg. Consequently, we cannot accept the null hypothesis. There is sufficient evidence to support that the recovery drink meets the laboratory standards for high-retention labeling.
Figure \(\PageIndex{2}\)
Hypothesis Test for Proportions
Just as there were confidence intervals for proportions, or more formally, the population parameter p of the binomial distribution, there is the ability to test hypotheses concerning p.
The population parameter for the binomial is \(p\). The estimated value (point estimate) for \(p\) is \(p^{\prime}\) where \(p^{\prime}=x / n, x\) is the number of successes in the sample and \(n\) is the sample size.
When you perform a hypothesis test of a population proportion \(p\), you take a simple random sample from the population. The conditions for a binomial distribution must be met, which are: there are a certain number \(n\) of independent trials meaning random sampling, the outcomes of any trial are binary, success or failure, and each trial has the same probability of a success \(p\). The shape of the binomial distribution needs to be similar to the shape of the normal distribution. To ensure this, the quantities \(n p^{\prime}\) and \(n q^{\prime}\) must both be greater than five ( \(n p^{\prime}>5\) and \(n q^{\prime}>\) 5). In this case the binomial distribution of a sample (estimated) proportion can be approximated by the normal distribution with \(\mu=\mathrm{np}\) and \(\sigma=\sqrt{\mathrm{npq}}\). Remember that \(q=1-p\). There is no distribution that can correct for this small sample bias and thus if these conditions are not met we simply cannot test the hypothesis with the data available at that time. We met this condition when we first were estimating confidence intervals for p.
Again, we begin with the standardizing formula modified because this is the distribution of a binomial.
\[Z=\dfrac{\mathrm{p}^{\prime}-p}{\sqrt{\dfrac{\mathrm{pq}}{n}}}\]
Substituting \(p_0\), the hypothesized value of \(p\), we have:
\[Z_c=\dfrac{\mathrm{p}^{\prime}-p_0}{\sqrt{\dfrac{p_0 q_0}{n}}}\]
This is the test statistic for testing hypothesized values of \(p\), where the null and alternative hypotheses take one of the following forms:
| Two-tailed test | One-tailed test | One-tailed test |
| \(H_0: p=p_0\) | \(H_0: p \leq p_0\) | \(H_0: p \geq p_0\) |
| \(H_a: p \neq p_0\) | \(H_a: p \gt p_0\) | \(H_a: p \lt p_0\) |
The decision rule stated above applies here also: if the calculated value of \(Z_c\) shows that the sample proportion is "too many" standard deviations from the hypothesized proportion, the null hypothesis cannot be accepted. The decision as to what is "too many" is pre-determined by the analyst depending on the level of significance required in the test.
Problem
A university kinesiology department is interested in the physical activity habits of middle school students. National data suggests that 50% of children in this age group participate in organized sports. The researchers believe the participation rate in their specific school district might be the same or different from this national average.
They sample 100 students from the district and find that 53 of them participate in organized sports. They choose a 5% level of significance for their hypothesis test.
Answer
STEP 1: Set the null and alternative hypothesis. H0:p=0.50 Ha: p does not = 0.50
The words "is the same or different from" tell you this is a two-tailed test.
- Type I error: To conclude that the proportion of students in the district participating in sports is different from 50% when, in fact, it is actually 50%. (Rejecting H0 when it is true).
- Type II error: Failing to conclude that the proportion differs from 50% when, in fact, the proportion does differ. (Failing to reject H0 when it is false).
STEP 2: Decide the level of significance and identify the critical values. The level of significance (α) is set at 5%. Because this is a two-tailed test, one-half of the alpha value (0.025) will be in the upper tail and one-half in the lower tail. The critical value (zc) for the normal distribution at a 95% confidence level is ±1.96.
-
Figure \(\PageIndex{4}\) STEP 3: Calculate the sample parameters and the test statistic. The test statistic for a population proportion uses the normal distribution (Z):
\[Z=\dfrac{\mathrm{p}^{\prime}-p_0}{\sqrt{\dfrac{p_0 q_0}{n}}}=\dfrac{.53-.50}{\sqrt{\dfrac{.5(.5)}{100}}}=0.60\]
In this case, the sample proportion (p′) is 53/100=0.53. The statistical question is: "Is 0.53 significantly different from 0.50?" The calculation shows that 0.53 is only 0.60 standard deviations away from the hypothesized mean of 0.50. This is very close to the center of the standard normal distribution.
STEP 4: Compare the test statistic and the critical value. The calculated Z-value of 0.60 falls well within the non-rejection region (between −1.96 and +1.96). To reject the null hypothesis, we would need the sample value to be much further away from the hypothesized value. In this case, the difference is not statistically significant.
STEP 5: Reach a conclusion
The formal conclusion is: "At a 5% level of significance, we cannot reject the null hypothesis that 50% of students in this district participate in organized sports." While the sample showed 53%, the data does not provide enough evidence to say that the district as a whole differs from the national norm.


