The Machinery of Inference

An Interactive Guide to Hypothesis Testing

The Bridge: Sampling Distributions

We can't study everyone, so we take a sample. But how can one sample tell us about the whole population? The answer lies in the **Central Limit Theorem**. It states that if we take many samples, the distribution of their means will look like a normal bell curve, centered on the true population mean. Click the button to build a sampling distribution yourself.

Population Info

True Mean (μ): 100

Sample Stats

Samples Drawn: 0

Last Mean (x̄): N/A

The Framework: Making a Decision

Hypothesis testing is like a trial. The **Null Hypothesis (H₀)** is the defendant, presumed innocent (no effect). The **p-value** is the evidence. If the p-value is smaller than our standard of proof (the **significance level α**), we reject the null. Use the slider to set your alpha level and run a test to see the result.

The Trade-Off: Type I & II Errors

No test is perfect. We can make two kinds of mistakes. Decreasing the risk of one often increases the risk of the other. This is a fundamental trade-off in statistical inference.

Type I Error (α)

False Positive

You reject H₀ when it's actually true.
(You conclude there's an effect when there isn't one)

Type II Error (β)

False Negative

You fail to reject H₀ when it's actually false.
(You miss an effect that truly exists)

The Estimate: Confidence Intervals

Instead of a simple yes/no from a hypothesis test, a confidence interval gives us a range of plausible values for the true population parameter. It's our best estimate, plus or minus a margin of error.

Standard Error (SE):

95% Confidence Interval:

The Toolbox: Choosing the Right Test

Different questions require different tools. This simple flowchart helps you choose between two of the most common types of hypothesis tests.

What kind of data are you analyzing?