When to use it
Use when each observation in group A directly pairs with an observation in group B (e.g. pre/post test).
Required Inputs
- Pre / Baseline values
- Post / Treatment values
- Confidence level
- Alternative hypothesis
Compare pre/post or paired continuous measurements using the paired samples t-test with mean difference, t-statistic, p-value, and Cohen’s d_z.
Run this test live in StatLab npm i @statlab/coreUse when each observation in group A directly pairs with an observation in group B (e.g. pre/post test).
t = d̄ / (s_d / √n), where d_i = x_{post,i} - x_{pre,i}
from scipy import stats
res = stats.ttest_rel(pre_values, post_values)
print(f"t={res.statistic:.4f}, p={res.pvalue:.4f}")
t.test(pre_values, post_values, paired = TRUE)
import { tPaired } from '@statlab/core';
const result = tPaired(preValues, postValues);
Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.
Explore VoxelPulse →Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.
Explore VoxelAssurance →Explore static calculators across the StatLab inference engine suite.