ARBIMETRA · Financial intelligence, made practical.

ARBIMETRA LAB

Independent Samples T-test

Compares the means of two independent groups, with both pooled-variance and Welch versions.

What it does

Compares the means of two independent groups, with both pooled-variance and Welch versions.

Use it to compare an outcome between two separate groups.

Data you need

  • Numeric outcome
  • Two groups

Supported data: Numeric, Categorical. Level: Beginner.

Formula and method

t = (x̄₁ − x̄₂) / SE, SE² = s²ₚ(1/n₁ + 1/n₂) for the pooled form

The difference in group means is divided by its standard error. The pooled version combines the two variances and uses n₁ + n₂ − 2 degrees of freedom; the Welch version keeps them separate. Both are shown, with a median-centred Levene check.

Assumptions

  • The groups are independent
  • Pooled form: equal variances

Input checks

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

How to read the result

Prefer the Welch result when spreads differ.

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

  • Independence cannot be checked from the numbers

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
Pooled t-1.8608-1.860813471.3e-51e-4Published R documentation output (Student's sleep data)
Pooled p0.079190.079186713.3e-61e-3Published R documentation output (Student's sleep data)
Welch shown as well-1.8608-1.860813471.3e-51e-4Published R documentation output (Student's sleep data)

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

Pooled or Welch?

Welch does not assume equal variances and is a sensible default. The pooled test assumes equal variances. Both are displayed.

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