t-Statistic Calculator

Enter the sample mean, hypothesised mean, standard deviation and sample size to compute the t statistic for a mean hypothesis test.

📐 計算公式
t 統計量(本頁程式碼口徑):t=(樣本均值 x̄−假設均值 μ)÷(s÷√n);標準誤 SE=s÷√n;自由度 df=n−1。左尾 p=P(T≤t)、右尾 p=P(T≥t)、雙側 p=2×min(左尾,右尾)。校驗:x̄、μ、s、n 經輸入守衛必填且合法;s>0、n 為 ≥2 的整數。前提:獨立觀測、總體近似正態或 n 較大;單側方向須在檢視資料前確定。

輸入樣本均值 x̄、假設均值 μ、標準差 s、樣本量 n 與備擇方向,求 t 統計量及對應尾機率;結果附獨立性與分佈前提說明。

Assumptions: independent observations and sample size n (df = n − 1); the population is approximately normal, or n is large enough for the CLT. The 95% CI corresponds to the two-sided p; for a pre-specified left- or right-tail alternative, use the matching tail p rather than halving the two-sided p.

Formula & Standard References

Item Formula / Note Source / Standard
t statistic t = (xbar - mu0) / (s / sqrt(n)) Student (1908), The probable error of a mean, Biometrika 6(1)
Difference from z When sigma is unknown, s replaces sigma and the statistic follows a t distribution Student (1908); NIST/SEMATECH e-Handbook §1.3.5.2
Degrees of freedom df = n - 1 NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.2
Limiting behavior As n grows, the t distribution converges to the standard normal NIST/SEMATECH e-Handbook of Statistical Methods, t distribution
📌 計算說明
  • 單樣本 t 檢驗的核心量。
  • (105−100)/(10/5) → 2.5。