← Back to Math Roadmap

Inferential Statistics

Drawing conclusions from data — hypothesis testing, confidence intervals, and statistical significance.

Confidence Intervals

▼
A confidence interval provides a range of plausible values for an unknown population parameter based on a sample. A ninety-five percent confidence interval means that if you repeated the sampling process many times, about ninety-five percent of the computed intervals would contain the true parameter value. The width of the interval depends on three factors: the sample size (larger sample means narrower interval), the variability in the data (more variable means wider interval), and the confidence level (higher confidence means wider interval). The formula involves the sample mean plus or minus a critical value from the t-distribution times the standard error. The standard error is the standard deviation divided by the square root of the sample size — it measures how precisely you have estimated the mean.
Confidence interval for a mean. The critical value t* comes from the t-distribution. s over the square root of n is the standard error of the mean.

Hypothesis Testing

▼
A hypothesis test evaluates evidence against a claim. The null hypothesis (H0) is the default position — usually "no effect" or "no difference." The alternative hypothesis (Ha) is what you suspect might be true. The test computes a p-value: the probability of observing data at least as extreme as what you actually observed, assuming the null hypothesis is true. If the p-value is below a pre-chosen significance level alpha (commonly zero point zero five), you reject the null hypothesis in favor of the alternative. Important: a p-value greater than alpha means "we don't have enough evidence to reject the null," NOT "the null is true." Absence of evidence is not evidence of absence.

Types of Errors

▼
Hypothesis testing involves two types of errors. A Type I error (false positive) occurs when you reject a true null hypothesis — you claim an effect exists when it actually does not. The probability of a Type I error is the significance level alpha. A Type II error (false negative) occurs when you fail to reject a false null hypothesis — you miss a real effect. The power of a test is one minus the probability of a Type II error. Power increases with larger sample sizes, larger effect sizes, and lower variability.

Common Pitfalls in Statistical Inference

▼
Common Pitfalls in Statistical Inference
P-hacking: repeatedly testing until you find significance, then reporting only the significant result. Multiple comparisons problem: testing many hypotheses inflates the Type I error rate — use corrections like Bonferroni. Confusing statistical significance with practical importance: a tiny effect can be statistically significant with a large enough sample. Survivorship bias: analyzing only the successes and ignoring the failures. Confounding variables: a hidden third variable may explain the observed correlation.

Worked Example

▼
Worked Example
A sample of 36 students has a mean test score of 78 with standard deviation 12. Find the 95% CI for the population mean.
Standard error = 12/sqrt(36) = 2. For 35 df, t* ≈ 2.03.
CI: 78 ± 2.03×2 = 78 ± 4.06 = [73.94, 82.06].

We are 95% confident the true population mean test score is between 73.94 and 82.06.

Confidence Interval Simulator

▼
Explore probability distributions. Toggle Normal (bell curve), Exponential (waiting times), and Poisson (counts). Adjust mu/sigma or lambda with sliders to see how the shape, center, and spread change.