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.
| Check | Reference | Result | Abs. error | Tolerance | Source |
|---|---|---|---|---|---|
| Welch t | -1.8608 | -1.86081347 | 1.3e-5 | 1e-4 | Published R documentation output (Student's sleep data) |
| Welch df | 17.776 | 17.77647352 | 4.7e-4 | 1e-4 | Published R documentation output (Student's sleep data) |
| Welch p | 0.07939 | 0.07939414 | 4.1e-6 | 1e-3 | Published R documentation output (Student's sleep data) |
| Welch p against SciPy | 0.07939414 | 0.07939414 | 2.8e-17 | 1e-11 | SciPy |
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.
