Skip to content
EvalSuite
Documentation menu

Statistical tests

Independent-samples t-test

Implementedstatistics.t_test_independent

Definition

Tests whether two independent groups have equal means. Welch's version does not assume equal variances.

Formula

t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)

Inputs and outputs

  • sample a
  • sample b
  • equal_var: bool

Returns: StatisticalTestResult

Assumptions

  • Independent observations.
  • Approximately normal sampling distribution of the mean.

Limitations

No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.

Python API

PythonSince v0.2.0
import evalsuite as es

es.t_test(scores_a, scores_b)  # Welch; equal_var=True for Student

References

  1. Student. (1908). The probable error of a mean. Biometrika, 6(1), 1–25.
  2. Welch, B. L. (1947). The generalization of 'Student's' problem when several different population variances are involved. Biometrika, 34(1–2), 28–35.

Implementation status