v0.4.3
Wiki/Statistical Procedures

Independent-Samples T-Test

Comparison of means between two independent groups with Levene's test and Satterthwaite degrees of freedom.

Verified vs SciPy (≤ 10⁻⁶)IBM SPSS Algorithms pp. 1063–1065

1. Overview#

The Independent-Samples T-Test procedure tests the significance of the difference between the means of two independent groups. StatCraft automatically produces a canonical two-row SPSS Pivot Table containing both:

  1. 1.Equal variances assumed (Student's t-test with pooled variance);
  2. 2.Equal variances not assumed (Welch-Satterthwaite test with adjusted degrees of freedom).

2. Mathematical Specification#

Let sample 1 have size n1n_1, mean Xˉ1\bar{X}_1, and variance s12s_1^2, and sample 2 have size n2n_2, mean Xˉ2\bar{X}_2, and variance s22s_2^2.

The Welch t-statistic is:

t=Xˉ1−Xˉ2s12n1+s22n2t = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

The Satterthwaite degrees of freedom are computed as:

df=(s12n1+s22n2)2(s12/n1)2n1−1+(s22/n2)2n2−1df = \frac{\left(\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}\right)^2}{\frac{(s_1^2 / n_1)^2}{n_1 - 1} + \frac{(s_2^2 / n_2)^2}{n_2 - 1}}

3. Levene's Test for Homogeneity#

Before evaluating the t-statistic, StatCraft evaluates Levene's test of homogeneity of variance. Absolute deviations from group means zij=∣xij−xˉi∣z_{ij} = |x_{ij} - \bar{x}_i| are subjected to an analysis of variance FF-test.

Canonical SPSS Syntax Example

SPSS SYNTAX (.SPS)
1T-TEST GROUPS=gender(1 2)
2 /MISSING=ANALYSIS
3 /VARIABLES=salary
4 /CRITERIA=CI(.95).