By ToolzHive · Updated
Here n is sample size, x̄ the sample mean, s the sample SD and p̂ a sample proportion. Choose a formula that matches the design and estimand.
Reference table
| Quantity | Formula | Condition / meaning |
|---|---|---|
| Mean | x̄ = Σxᵢ / n | Arithmetic average |
| Sample variance | s² = Σ(xᵢ − x̄)² / (n − 1) | n > 1 |
| Mean standard error | SE = s / √n | Independent observations |
| One-sample t | t = (x̄ − μ₀) / (s / √n) | Normal model for exact small-sample inference |
| Mean interval | x̄ ± t* s / √n | t* uses n − 1 degrees of freedom |
| Proportion | p̂ = successes / n | Binary outcome |
| Proportion SE approximation | √[p̂(1 − p̂)/n] | Can fail near 0 or 1 |
| Risk ratio | RR = risk₁ / risk₀ | Nonzero denominator risk |
| Odds ratio, 2×2 table | OR = ad / bc | Specify layout; zero cells need care |
Worked example
For n = 25 and s = 10, SE = 10 / √25 = 2. An interval also needs a confidence level and suitable critical value.
Design matters
Paired, clustered, weighted and repeated observations need methods that retain their dependence. Independent-sample formulas may understate uncertainty.
Try the related tools
- Odds Ratio Calculator — Odds ratio with confidence interval, z-test and Fisher's exact p from a 2×2 table.
- Relative Risk Calculator — Relative risk, risk difference, ARR, RRR and NNT with confidence intervals.
- Confidence Interval Calculator — Confidence intervals for means, proportions, differences, odds ratios and relative risks.