配对 t 检验计算器

t = d̄ / (s_d/√n), df=n−1

Enter paired measurements of the same subjects (e.g. before and after treatment) to compute the mean and SD of differences and test whether the difference is non-zero, returning t, df and p.

📐 计算公式
配对样本 t 检验(本页代码口径):t=d̄÷(s_d÷√n)(d̄ 差值均值、s_d 差值标准差、n 配对数);自由度 df=n−1;双侧 p 值按不完全贝塔函数 p=I(df÷2, 0.5, df÷(df+t²)) 数值求得。校验:d̄、s_d、n 必填,s_d 必须大于 0,n 必须是至少为 2 的整数。判据:无固定阈值分支,通行口径 p<0.05 视为差值统计显著。

对同一对象前后/配对测量的差值进行检验。

Formula & Standard References

Item Formula / Note Source / Standard
Difference scores d_i = x1_i - x2_i (two measurements on the same unit) Student (1908), The probable error of a mean, Biometrika 6(1)
Paired t statistic t = dbar / (s_d / sqrt(n)), df = n - 1 NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.4
Standard deviation of differences s_d = sqrt( sum(d_i - dbar)^2 / (n - 1) ) NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.4
Effect size Cohen's d_z = dbar / s_d Cohen J., Statistical Power Analysis for the Behavioral Sciences (1988)
📌 计算说明
  • 用于前后对照实验。
  • df=n−1。

📚 深度解析:配对样本 t 检验

💡 常见使用场景

前后测
差值均值 d̄=3、差值 sd=4、n=20:t=3/(4/√20)=3/0.894≈3.354,df=19。临界≈2.093,显著(p<0.01),干预有效。
无效应
d̄=0.5:t=0.5/0.894≈0.56,不显著。

❓ 常见问题(FAQ)

为何用配对而非独立 t?
配对控制个体基线差异,误差更小、功效更高;前提是同一对象前后或配对设计。
差值需正态?
要求差值近似正态,n 大时中心极限可放宽。