Skip to main content
Statistics LibreTexts

4.2: Pooled Two-sampled t-test (Assuming Equal Variances)

  • Page ID
    2891
  • \( \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}\)

    Pooled Two-sampled t-test (Assuming Equal Variances)

    In the previous section, we made the assumption of unequal variances between our two populations. Welch’s t-test statistic does not assume that the population variances are equal and can be used whether the population variances are equal or not. The test that assumes equal population variances is referred to as the pooled t-test. Pooling refers to finding a weighted average of the two independent sample variances.

    The pooled test statistic uses a weighted average of the two sample variances.

    \[S_p^2 = \frac {(n_1-1)S_1^2+(n_2-1)S_2^2}{n_1+n_2-2} = (\frac {n_1-1}{n_1+n_2-2})S_1^2 + (\frac {n_2-1}{n_1+n_2-2})S_2^2\]

    If \(n_1= n_2\), then \(S^2_p = (\frac {1}{2}s^2_1 + (1/2)s^2_2\), the average of the two sample variances. But whenever n1≠n2, the \(s^2\) based on the larger sample size will receive more weight than the other \(s^2\).

    The advantage of this test statistic is that it exactly follows the student’s t-distribution with n1+ n2– 2 degrees of freedom.

    \[t=\frac {\bar {X_1} - \bar {X_2}}{\sqrt {S_p^2(\frac {1}{n_1}+\frac {1}{n_2})}}=\frac {\bar {X_1}- \bar {X_2}}{S_p\sqrt {\frac {1}{n_1} +\frac {1}{n_2}}}\]

    The hypothesis test procedure will follow the same steps as the previous section.

    It may be difficult to verify that two population variances might be equal based on sample data. The F-test is commonly used to test variances but is not robust. Small departures from normality greatly impact the outcome making the results of the F-test unreliable. It can be difficult to decide if a significant outcome from an F-test is due to the differences in variances or non-normality. Because of this, many researchers rely on Welch’s t when comparing two means.

    Example \(\PageIndex{1}\):

    Growth of pine seedlings in two different substrates was measured. We want to know if growth was better in substrate 2. Growth (in cm/yr) was measured and included in the table below. α = 0.05

    Substrate 1

    Substrate 2

    3.2

    4.5

    4.5

    6.2

    3.8

    5.8

    4.0

    6.0

    3.7

    7.1

    3.2

    6.8

    4.1

    7.2

    Solution

    \(H_0: \mu_1 = \mu_2\)

    \(H_1: \mu_1 < \mu_2\)

    \[S^2_p=\frac {(7-1)0.474^2 +(7-1)0.936^2}{7+7-2} = 0.55\]

    \[t=\frac {3.79-6.23}{\sqrt{0.55(\frac {1}{7}+ \frac {1}{7})}}=\frac {-2.44}{0.396}=-6.16\]

    This is a one-sided test with \(n_1 + n_2 – 2 = 12\) degrees of freedom. The critical value is -1.782. The test statistic is less than the critical value so we will reject the null hypothesis.

    There is enough evidence to support the claim that the mean growth is less in substrate 1. Growth in substrate 2 is greater.

    The confidence interval approach also uses the pooled variance and takes the form:

    \[(\bar {x_1}-\bar {x_2}) \pm t_{\frac {\alpha}{2}}\sqrt {s^2_p(\frac {1}{n_1}+\frac {1}{n_2})}\]

    using \(n_1 + n_2 – 2\) degrees of freedom. So let’s answer the same question with a 90% confidence interval.

    \[(3.79-6.23)\pm 1.782 \sqrt{0.55(\frac {1}{7}+\frac {1}{7})} = (-2.44 \pm 0.7064)=(-3.146,-1.734)\]

    All negative values tell you that there is a significant difference between the mean growth for the two substrates and that the growth in substrate 1 is significantly lower than the growth in substrate 2 with reduction in growth ranging from 1.734 to 3.146 cm/yr.

    Software Solutions

    Minitab

    clipboard_e0ca6e256a1e450c970b0981b5404fb98.png

    clipboard_ea0a5f353deb11c0cb3136eb09fca120e.png

    Two-Sample T-Test and CI: Substrate1, Substrate2

    Two-sample T for Substrate1 vs. Substrate2

     

    N

    Mean

    StDev

    SE Mean

    Substrate1

    7

    3.786

    0.474

    0.18

    Substrate2

    7

    6.229

    0.936

    0.35

    Difference = mu (Substrate1) – mu (Substrate2)

    Estimate for difference: -2.443

    95% upper bound for difference: -1.736

    T-Test of difference = 0 (vs <): T-Value = -6.16 p-value = 0.000 DF = 12

    Both use Pooled StDev = 0.7418

    The p-value (0.000) is less than the level of significance (0.05). We will reject the null hypothesis.

    Excel

    clipboard_ed047dfa3b3b7944ff0e3337abfdeea92.png

    t-Test: Two-Sample Assuming Equal Variances

     

    Variable 1

    Variable 2

    Mean

    3.785714

    6.228571

    Variance

    0.224762

    0.875714

    Observations

    7

    7

    Pooled Variance

    0.550238

     

    Hypothesized Mean Difference

    0

     

    df

    12

     

    t Stat

    -6.16108

     

    P\((T \le t)\) one-tail

    2.43E-05

     

    t Critical one-tail

    1.782288

     

    P\((T \le t)\) two-tail

    4.86E-05

     

    t Critical two-tail

    2.178813

     

    This is a one-sided test (greater than) so use the P\((T \le t)\) one-tail value 2.43E-05. The p-value (0.0000243) is less than the level of significance (0.05). We will reject the null hypothesis.


    This page titled 4.2: Pooled Two-sampled t-test (Assuming Equal Variances) is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Diane Kiernan (OpenSUNY) via source content that was edited to the style and standards of the LibreTexts platform.