ARBIMETRA · Financial intelligence, made practical.

ARBIMETRA LAB

Welch's T-test

Compares two independent means without assuming equal variances, using Welch-Satterthwaite degrees of freedom.

What it does

Compares two independent means without assuming equal variances, using Welch-Satterthwaite degrees of freedom.

Use it as the default two-group comparison, particularly when group sizes or spreads differ.

Data you need

  • Numeric outcome
  • Two groups

Supported data: Numeric, Categorical. Level: Beginner.

Formula and method

t = (x̄₁ − x̄₂)/√(s₁²/n₁ + s₂²/n₂) · df ≈ (s₁²/n₁ + s₂²/n₂)² / Σ[(sᵢ²/nᵢ)²/(nᵢ−1)]

Each group contributes its own variance to the standard error. Degrees of freedom come from the Welch-Satterthwaite approximation, which falls towards the smaller group when variances or sizes differ.

Assumptions

  • The groups are independent
  • Means are approximately normal

Input checks

  • Exactly two groups
  • Each group needs at least 2 values

How to read the result

Degrees of freedom are usually not a whole number.

Worked example

Illustrative run on Simulated study data (teaching data). These figures are the actual output of this model on that example, and they say nothing about your own data.

  • Difference in means = 0.8314; t = 0.512, df = 231.7103, p = 0.6091.
  • The difference is not statistically significant at the 5% level.

Limitations

  • Very small samples remain unreliable

Numerical validation

Validated 17 of 17 automated checks passed, including numerical results, invalid input, missing values, small samples, constant variables, charts and the interpretation text.

CheckReferenceResultAbs. errorToleranceSource
Welch t-1.8608-1.860813471.3e-51e-4Published R documentation output (Student's sleep data)
Welch df17.77617.776473524.7e-41e-4Published R documentation output (Student's sleep data)
Welch p0.079390.079394144.1e-61e-3Published R documentation output (Student's sleep data)
Welch p against SciPy0.079394140.079394142.8e-171e-11SciPy

Computed with python 3.13.2, numpy 2.2.5, scipy 1.14.1, pandas 2.3.3, statsmodels 0.14.4, scikit-learn 1.7.0, in your browser. A passing check confirms the listed comparison only. It does not make any result suitable for your data, and it is not a claim of equivalence with other statistical software.

Questions

Why are the degrees of freedom not a whole number?

The Welch-Satterthwaite formula approximates the distribution when variances differ, and generally gives a non-integer value.

ARBIMETRA LAB is an educational and research tool. Results should be checked by the researcher and are not professional advice.