Independent Samples Comparisons: Parametric t-Tests and the Wilcoxon-Mann-Whitney Test

Overview of Independent Samples Comparisons

  • Comparing the means of two populations using independently collected sample data is one of the most fundamental hypothesis-testing procedures in statistics.

  • Independent sampling implies that the selection of observations in the first sample has no operational influence on or connection to the observations selected in the second sample.

Comparison of two sample distributions
  • Motivating Example 1: Human Hematocrit by Sex

    • Hematocrit measures the volume percentage of red blood cells in whole blood.

    • Research context: A clinical comparison evaluating hematocrit concentrations between 17-year-old biological males and females.

    • Sample sizes: n1=26n_1 = 26 males and n2=24n_2 = 24 females.

    • Male sample statistics: Mean = 45.8%45.8\%, Standard Deviation (SDSD) = 2.8%2.8\%.

    • Female sample statistics: Mean = 40.6%40.6\%, Standard Deviation (SDSD) = 2.9%2.9\%.

    • Core question: Determine whether the numerical difference between the sample means reflects an underlying true difference in population parameters (μ1≠μ2\mu_1 \neq \mu_2) or simple random sampling error.

  • Motivating Example 2: Psychoactive Treatment in Blowflies

    • Research context: An experimental study evaluating feeding behavior modifications caused by the psychoactive agent Pargyline in blowflies.

    • Treatment group: n=31n = 31 blowflies administered Pargyline.

    • Control group: n=27n = 27 blowflies administered isotonic saline.

    • Response variable: Amount of sucrose solution consumed over a 30-minute30\text{-minute} interval (mg\text{mg}).

    • Control sample statistics: Mean = 14.9 mg14.9\,mg, Standard Deviation (SDSD) = 5.4 mg5.4\,mg.

    • Pargyline sample statistics: Mean = 46.5 mg46.5\,mg, Standard Deviation (SDSD) = 11.7 mg11.7\,mg.

    • Scientific question: Determine if Pargyline significantly stimulates sucrose consumption compared to saline control.

Mathematical Framework of the Independent Samples t-Test

  • Hypothesis Formulation:

    • Non-directional (two-tailed) hypotheses evaluate whether any divergence exists between the two population means:

    • Null Hypothesis (H0H_0):       H0:μ1−μ2=0H_0: \mu_1 - \mu_2 = 0       H0:μ1=μ2H_0: \mu_1 = \mu_2

    • Alternative Hypothesis (HaH_a):       Ha:μ1−μ2≠0H_a: \mu_1 - \mu_2 \neq 0       Ha:μ1≠μ2H_a: \mu_1 \neq \mu_2

  • General Test Statistic Formula:

    • The general test statistic measures the distance between the observed difference in sample means and the hypothesized difference under the null model, scaled by the standard error of that difference:     t=(Xˉ1−Xˉ2)−(μ01−μ02)SE(Xˉ1−Xˉ2)t = \frac{(\bar{X}_1 - \bar{X}_2) - (\mu_{01} - \mu_{02})}{SE_{(\bar{X}_1 - \bar{X}_2)}}

    • Under standard testing conditions, the hypothesized null difference is set to zero (μ01−μ02=0\mu_{01} - \mu_{02} = 0), yielding the operational test statistic:     t=Xˉ1−Xˉ2SE(Xˉ1−Xˉ2)t = \frac{\bar{X}_1 - \bar{X}_2}{SE_{(\bar{X}_1 - \bar{X}_2)}}

  • Standard Error of the Difference Between Means:

    • The standard error (SE(Xˉ1−Xˉ2)SE_{(\bar{X}_1 - \bar{X}_2)}), sometimes abbreviated as sps_p, is computed as:     SE(Xˉ1−Xˉ2)=s12n1+s22n2SE_{(\bar{X}_1 - \bar{X}_2)} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}

    • Hematocrit Standard Error Application: Using standard deviations s1=2.8s_1 = 2.8 and s2=2.9s_2 = 2.9 with sample denominators 2828 and 2424:     SE=2.8228+2.9224=0.794SE = \sqrt{\frac{2.8^2}{28} + \frac{2.9^2}{24}} = 0.794

Assumptions and Variance Homogeneity Testing via the F-Distribution

  • Parametric Assumptions:

    • Both samples are randomly selected and mutually independent.

    • The underlying populations are normally distributed.

    • Homoscedasticity: The population variances are equal (σ12=σ22\sigma_1^2 = \sigma_2^2).

  • Equal Variance Standardization:

    • When standard deviations are equal (σ1=σ2\sigma_1 = \sigma_2), sample variances are combined into a single pooled variance estimate (s2s^2), enhancing standard error precision and boosting test power:     SE=s2n1+n2n1n2SE = \sqrt{s^2 \frac{n_1 + n_2}{n_1 n_2}}

    • When sample sizes are balanced (n1=n2=nn_1 = n_2 = n), this simplifies algebraically:     SE=s22nn2=2s2nSE = \sqrt{s^2 \frac{2n}{n^2}} = \sqrt{\frac{2s^2}{n}}

  • The F-Distribution and the F-Test for Equal Variances:

    • The F-statistic evaluates equality of variance by calculating a ratio of sample variances:     F=s22s12F = \frac{s_2^2}{s_1^2}

    • The F-distribution is bounded from 00 to +∞+\infty, non-symmetric, and skewed to the right. Its exact probability density profile depends upon numerator degrees of freedom (ν1\nu_1) and denominator degrees of freedom (ν2\nu_2).

Probability density plots of F-distributions
  • As displayed in the distribution density models:

    • For F(4,12)F(4, 12), 5%5\% of the distribution lies above 3.263.26.

    • For F(10,100)F(10, 100), 5%5\% of the distribution lies above 1.931.93.

  • Standard calculation convention assigns the larger sample variance to the numerator, guaranteeing an empirical F≥1F \ge 1.

    • Hypotheses for Variance Equality:

  • Null hypothesis: H0:σ1=σ2H_0: \sigma_1 = \sigma_2

  • Alternative hypothesis: Ha:σ1≠σ2H_a: \sigma_1 \neq \sigma_2

    • Strategic Risk: Because statistical power is maximized when the equal-variance assumption holds, researchers deliberately protect against a Type II error (failing to detect unequal variances when they truly differ). Setting the significance threshold α\alpha higher than typical values (e.g., α=0.10\alpha = 0.10 or α=0.20\alpha = 0.20) is common practice.

Percentage Points of the F Distribution

Determining Degrees of Freedom

  • Welch-Satterthwaite Approximation:

    • When population variances cannot be assumed equal, the degrees of freedom (dfdf) are calculated using the Welch-Satterthwaite equation:     df=(SE12+SE22)2SE14n1−1+SE24n2−1df = \frac{(SE_1^2 + SE_2^2)^2}{\frac{SE_1^4}{n_1 - 1} + \frac{SE_2^4}{n_2 - 1}}

    • Individual group standard errors are defined as:     SE1=s1n1SE_1 = \frac{s_1}{\sqrt{n_1}}     SE2=s2n2SE_2 = \frac{s_2}{\sqrt{n_2}}

  • Comparative Strategies for Degrees of Freedom:

    • Most conservative manual approach: Take the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 (min⁡(n1−1,n2−1)\min(n_1 - 1, n_2 - 1)). This minimizes Type I error risk.

    • Least conservative approach: Sum individual degrees of freedom, using n1+n2−2n_1 + n_2 - 2.

    • The Welch-Satterthwaite formula produces an intermediate value strictly positioned between the conservative and least conservative bounds.

Critical values of the t-distribution

Step-by-Step Two-Sample t-Test: Lizard Malaria Parasitemia

  • Study Setup and Empirical Data:

    • A study examined whether infection with the malarial parasite Plasmodium reduces red blood cell concentrations in lizards.

    • Sample: 2727 field-caught lizards, separated by malarial infection status.

    • Red blood cell count units: 103 cells/mm310^3\,\text{cells/mm}^3.

    • Sample parameters:

    • Noninfected lizards: n=12n = 12, Xˉ=972.1\bar{X} = 972.1, s=245.1s = 245.1

    • Infected lizards: n=15n = 15, Xˉ=843.4\bar{X} = 843.4, s=251.2s = 251.2

  • Hypotheses Formulation:

    • Directional alternative hypotheses testing for cell count reduction:

    • Directional null: H0:μInf≥μUnH_0: \mu_{\text{Inf}} \ge \mu_{\text{Un}}

    • Directional alternative: Ha:μInf<μUnH_a: \mu_{\text{Inf}} < \mu_{\text{Un}}

    • Non-directional equivalent formulation:

    • H0:μ1=μ2H_0: \mu_1 = \mu_2

    • Ha:μ1≠μ2H_a: \mu_1 \neq \mu_2

    • Significance level: α=0.05\alpha = 0.05.

  • Step 1: Preliminary F-Test for Homogeneity of Variance:

    • Ratio computation (larger variance in numerator):     F=s22s12=(251.2)2(245.1)2=1.05F = \frac{s_2^2}{s_1^2} = \frac{(251.2)^2}{(245.1)^2} = 1.05

    • Numerator degrees of freedom: ν1=15−1=14\nu_1 = 15 - 1 = 14.

  • Denominator degrees of freedom: ν2=12−1=11\nu_2 = 12 - 1 = 11.

    • Statistical inference: The calculated F=1.05F = 1.05 is far below critical table thresholds. Thus, fail to reject H0:σ1=σ2H_0: \sigma_1 = \sigma_2. Equal variance can be assumed.

  • Step 2: Calculating the Standard Error of the Difference:

    • Evaluating independent standard errors:     SE(Xˉ1−Xˉ2)=245.1212+251.2215=95.98≈96.0SE_{(\bar{X}_1 - \bar{X}_2)} = \sqrt{\frac{245.1^2}{12} + \frac{251.2^2}{15}} = 95.98 \approx 96.0

  • Step 3: Determining the Decision Threshold (Critical Value of t):

    • Using the conservative approach for manual calculation: df=min⁡(12−1,15−1)=11df = \min(12 - 1, 15 - 1) = 11.

    • For a two-tailed test at α=0.05\alpha = 0.05 with df=11df = 11, Table IV yields critical values:     tcritical=±2.201t_{\text{critical}} = \pm 2.201

    • Decision rule: Reject the null hypothesis only if calculated t>+2.201t > +2.201 or t<−2.201t < -2.201.

  • Step 4: Computing the t-Statistic:

    • Substituting sample values into the test statistic:     t=972.1−843.496.0=128.796.0=1.34t = \frac{972.1 - 843.4}{96.0} = \frac{128.7}{96.0} = 1.34

  • Step 5: Statistical Conclusion:

    • Since 1.341.34 is well within the interval [−2.201,+2.201][-2.201, +2.201], fail to reject H0H_0.

    • Conclusion: There is insufficient evidence to conclude that infected and noninfected lizards possess different red blood cell concentrations.

    • Error Analysis: While this conclusion could represent a Type II error (false negative), setting α=0.05\alpha = 0.05 explicitly controls the maximum risk of committing a Type I error (false positive).

Nonparametric Alternative: The Wilcoxon-Mann-Whitney Test

  • Characteristics of Nonparametric Testing:

    • Used when continuous outcome data violate the distributional assumption of normality.

    • Function as distribution-free procedures based on relative ranks rather than raw parametric measurements.

    • Trade-off: Nonparametric tests exhibit lower statistical power than the independent-samples t-test when population normality is satisfied, but remain valid when normality fails.

  • Case Study: Soil Respiration in Forest Canopy Gaps:

    • Measurement: Soil respiration expressed as microbial output in moles of CO2 g−1 hr−1\text{moles of } CO_2\,g^{-1}\,hr^{-1}.

    • Environmental habitats:

    • Growth zone: Underneath a dense, closed forest canopy (n1=7n_1 = 7).

    • Gap zone: Underneath an opening in the forest canopy (n2=8n_2 = 8).

    • Raw observations:

    • Growth (Y1Y_1): 17,20,170,315,22,190,6417, 20, 170, 315, 22, 190, 64

    • Gap (Y2Y_2): 6,13,14,15,16,18,22,296, 13, 14, 15, 16, 18, 22, 29

  • Normality Assessment via Probability Plots:

Probability Plot of Growth
  • Growth distribution summary: Mean = 114114, Standard Deviation = 114.4114.4, Sample size N=7N = 7, Anderson-Darling (ADAD) = 0.5020.502, p-value=0.132p\text{-value} = 0.132. The extreme right-skew demonstrates non-normality.

Probability Plot of Gap
  • Gap distribution summary: Mean = 16.6316.63, Standard Deviation = 6.7606.760, Sample size N=8N = 8, Anderson-Darling (ADAD) = 0.2760.276, p-value=0.551p\text{-value} = 0.551.

    • Formulation of Hypotheses:

  • Non-directional framing:

    • Null hypothesis (H0H_0): Gap and growth areas do not differ with respect to soil respiration rates.

    • Alternative hypothesis (HaH_a): Gap and growth areas do differ with regard to soil respiration rates.

  • Directional framing:

    • Null hypothesis (H0H_0): Growth areas either do not differ from Gap areas in soil respiration rates, or show lower rates.

    • Alternative hypothesis (HaH_a): Growth areas tend to show higher soil respiration rates than Gap areas.

    • Ranking Procedure and Counting Inversions (K1K_1 and K2K_2):

  • For each observation in a given sample, tally how many observations in the opposing sample have a smaller value. Exact ties are credited as 0.50.5.

Sorted Growth (Y1Y_1)

Number of Gap Obs Smaller

Sorted Gap (Y2Y_2)

Number of Growth Obs Smaller

1717

55 (exceeds 6,13,14,15,166, 13, 14, 15, 16)

66

00

2020

66 (exceeds previous plus 1818)

1313

00

2222

6.56.5 (exceeds 6 values, ties 2222)

1414

00

6464

88 (exceeds all 88 Gap obs)

1515

00

170170

88 (exceeds all 88 Gap obs)

1616

00

190190

88 (exceeds all 88 Gap obs)

1818

11 (exceeds 1717)

315315

88 (exceeds all 88 Gap obs)

2222

2.52.5 (exceeds 17,2017, 20, ties 2222)

—

—

2929

33 (exceeds 17,20,2217, 20, 22)

Sum

K1=49.5K_1 = 49.5

Sum

K2=6.5K_2 = 6.5

  • Verification Identity for Hand Calculation:

    • The sum of K1K_1 and K2K_2 must strictly equal the product of the two sample sizes:     K1+K2=n1×n2K_1 + K_2 = n_1 \times n_2     49.5+6.5=5649.5 + 6.5 = 56     7×8=567 \times 8 = 56

  • Test Statistic and Critical Evaluation:

    • The Wilcoxon-Mann-Whitney test statistic (UsU_s) is defined as the larger of the two sums:     Us=max⁡(K1,K2)=49.5U_s = \max(K_1, K_2) = 49.5

Table 6 Critical Values of U, the Wilcoxon-Mann-Whitney Statistic
  • In Table 6 (Critical Values of U), for sample sizes n=8n = 8 and n′=7n' = 7 at a two-tailed significance level of α=0.05\alpha = 0.05, the critical value is 4646.

  • Inference Decision: Because calculated Us=49.5>46U_s = 49.5 > 46, reject the null hypothesis (H0H_0).

  • Substantive conclusion: Soil respiration values are distributed significantly differently between growth and gap environments.

  • Directional evaluation: The empirical median of the growth areas is substantially higher, supporting the one-tailed claim that growth zones exhibit elevated soil respiration compared to gap zones.

    • Computational Output via Minitab:

  • Minitab output analysis:

    • Growth (N=7N = 7): Median = 64.064.0

    • Gap (N=8N = 8): Median = 15.515.5

    • Point estimate for ETA1−ETA2\text{ETA1} - \text{ETA2} is 48.548.5

    • 95.7%95.7\% Confidence Interval for ETA1−ETA2\text{ETA1} - \text{ETA2}: (3.0,176.0)(3.0, 176.0)

    • Rank sum statistic: W=77.5W = 77.5

    • Two-tailed test significance: p=0.0151p = 0.0151 (unadjusted), p=0.0150p = 0.0150 (adjusted for ties).

  • Both the manual rank comparison (Us=49.5U_s = 49.5) and the software-based Mann-Whitney test confirm rejection of the null hypothesis at α=0.05\alpha = 0.05.

Lecture

For a T-test for independent samples, you will be testing for a difference in means. So the hypothesis will be something like:

  • H0:μ1−μ2=0H_0 : \mu_1 - \mu_2 =0 OR H0:μ1=μ2H_0 : \mu_1 = \mu_2

  • Ha:μ1−μ2≠0\displaylines{H_a:\mu_1-\mu_2\ne} 0 OR Ha:μ1≠μ2H_a : \mu_1 \ne \mu_2


Test Statistic: t=(X‾1−X‾2)−(μ01−μ02)SE(X‾1−X‾2)\displaylines{t=\frac{\left(\overline{X}_1-\overline{X}_2\right)-\left(\mu_{01}-\mu_{02}\right)}{SE_{\left(\overline{X}_1-\overline{X}_2\right)}}\\ } ; BUT YOU HAVE THE POWER OF MINITAB

TWO BIG QUESTIONS:

  1. What is SE(X‾1−X‾2)\displaylines{SE_{\left(\overline{X}_1-\overline{X}_2\right)}\\ \\ } ?

    • SE(X‾1−X‾2)=s12n1+s22n2\displaylines{SE_{\left(\overline{X}_1-\overline{X}_2\right)}=\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}\\ }

    • If the populations can be assumed to have the same variance, you can utilize the formula:

      • SE=s2(n1+n2)n1n2\displaylines{SE=\sqrt{s_{_{}}^2\frac{\left(n_1+n_2\right)}{n_1n_2}}\\ }

      • OR SE=s22nn2\displaylines{SE=\sqrt{s^2\frac{2n}{n^2}}\\ } IF the samples are also the same size

      • Test statistic to determine if the variance is the same: The f statistic - the ratio of two variance, should range closer to 1. Put the larger variance on the numerator. Numerator and denominator of degrees of freedom. You gain greater power if you fail to reject the null hypothesis and so you want to guard AGAINST a type II error, so alpha should be high.

  2. What are the appropriate degrees of freedom?

    • Typically use the most conservative and choose the lower of the two.

    • The least conservative would be df=n1+n2−2df = n_1 + n_2 - 2

You CAN be wrong, but you have CONTROLLED the likelihood of being wrong by setting alpha.

Solving Problems on Minitab

Run a normality test to see if you CAN run a t test.

Need to see the variance of both data sets to see if they have a similar variance.

  • Go to stat and then ANOVA

  • Go to test for equal variances

Run the t-test: go to 2-sample t-test which IS for independent samples.