Skip to main content
Mathematics LibreTexts

12.3: Two Means Z Test

  • Page ID
    105868
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \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{\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}\)

    Next, we will learn how to apply the Two Means \(Z\) Procedure to test a statistical claim about 2 population means when population standard deviations are known. Consider the following example.

    A group of researchers wants to know whether men’s life expectancy is shorter than women’s life expectancy in the US in 2018. Historically, the standard deviation of men’s life expectancy is known to be 15.8 years and of women’s life expectancy is 13.4 years. The average life expectancy among 68 men in the sample was found to be 76.3 years and the average life expectancy among 54 women in the sample was found to be 81.4 years.

    At \(10\%\) significance level, test the claim that men had a shorter life expectancy than women in the US in 2018.

    Note that the sample means are \(\bar{x}_1=76.3\) years and \(\bar{x}_2=81.4\) years for men and women respectively, the sample sizes are \(n_1=68\) for men and \(n_2=54\) for women, and the population standard deviations are given \(\sigma_1=15.8\) years and \(\sigma_2=13.4\) years for men and women respectively.

    Now, let’s identify the statistical claim that needs to be tested:

    “men’s life expectancy is shorter than women’s”

    The claim is that the men’s life expectancy is shorter than women’s, so we can symbolically express the claim as

    \(\mu_1<\mu_2\) or \(\mu_1-\mu_2<0\)

    Since the claim is about the 2 population means and the population standard deviations are known we will use the 2 Means \(Z\) Procedure. Let’s check if all necessary assumptions are satisfied:

    • The samples are simple random and independent
    • The CLT must be applicable i.e. the populations are normal or the samples are greater than 30
    • The population standard deviations are known

    We will use the following template to perform the hypothesis testing:

    In step 1, we will set up the hypothesis:

    Since the claim is in the form of an inequality, therefore it must be set as an alternative hypothesis, therefore the null hypothesis is \(\mu_1-\mu_2=0\) and the test is left-tail, that is:

    \(H_0: \mu_1-\mu_2=0\)

    \(H_a: \mu_1-\mu_2<0\)

    LT

    In step 2, we will identify the significance level:

    The significance level can always be found in the text of the problem. In our case it is \(10\%\), thus:

    \(\alpha=0.10\)

    In step 3, we will find the test statistic using the formula:

    \(z_0=\frac{\bar{x}_1-\bar{x}_2}{\sqrt{\frac{\sigma^2_1}{n_1}+\frac{\sigma^2_2}{n_2}}}=\frac{76.3-81.4}{\sqrt{\frac{15.8^2}{68}+\frac{13.4^2}{54}}}=-1.928\)

    In step 4, we will perform either the critical value approach or p-value approach to test the claim:

    • In critical value approach, we construct the rejection region using the \(Z\)-curve:

    RR: less than \(-z_{0.10}=-1.282\)

    • In p-value approach, we compute the p-value:

    P-Value: \(P(Z<-1.928)=0.027\)

    In step 5, we will draw the conclusion:

    • In the critical value approach, we must check whether the test statistic is in the rejection region or not. Our test statistic is \(-1.928\) and it is to the left of the critical value \(-1.282\), thus it is in the rejection region.
    • In the p-value approach, we must check whether the p-value is less than the significance level or not. Our p-value is \(0.027\) and it is less than \(\alpha=0.10\).

    Both tests suggest that we DO reject the null hypothesis in favor of the alternative.

    In step 6, we will interpret the results:

    Under \(10\%\) significance level we DO have sufficient evidence to suggest that men’s life expectancy was less than women’s life expectancy in the US in 2018.

    We discussed how to apply the Two Means \(Z\) Procedure to test a statistical claim about two population means with known population standard deviations.


    12.3: Two Means Z Test is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?