Hypothesis Testing Formula

Hypothesis testing is a systematic method to decide whether sample data provides enough evidence to reject a claim (null hypothesis) about a population.

The Formula

z=xˉμ0σ/nz = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}

When to use: Think of a courtroom trial: the null hypothesis (H0H_0) is 'innocent until proven guilty.' You look at the evidence (data) and ask: 'Is this evidence so strong that it would be very unlikely if the defendant were truly innocent?' If yes, you reject the null hypothesis. If not, you don't have enough evidence to convict—but that doesn't prove innocence.

Quick Example

A company claims batteries last μ=500\mu = 500 hours. You test 36 batteries and get xˉ=485\bar{x} = 485, s=40s = 40. z=48550040/36=156.672.25z = \frac{485 - 500}{40 / \sqrt{36}} = \frac{-15}{6.67} \approx -2.25 Since z>1.96|z| > 1.96, reject H0H_0 at α=0.05\alpha = 0.05—evidence suggests batteries last less than claimed.

Notation

H0H_0: null hypothesis (the default claim). HaH_a: alternative hypothesis (what we suspect). α\alpha: significance level (typically 0.050.05).

What This Formula Means

A systematic method to decide whether sample data provides enough evidence to reject a claim (null hypothesis) about a population parameter.

Think of a courtroom trial: the null hypothesis (H0H_0) is 'innocent until proven guilty.' You look at the evidence (data) and ask: 'Is this evidence so strong that it would be very unlikely if the defendant were truly innocent?' If yes, you reject the null hypothesis. If not, you don't have enough evidence to convict—but that doesn't prove innocence.

Formal View

z=xˉμ0σ/nz = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}; reject H0H_0 if z>zα/2|z| > z_{\alpha/2} (two-tailed) or equivalently if p-value <α< \alpha

Worked Examples

Example 1

medium
A school claims its students average 75 on standardized tests. A sample of n=36n=36 gives xˉ=78\bar{x}=78 with σ=12\sigma=12. Test H0:μ=75H_0: \mu=75 vs Ha:μ>75H_a: \mu>75 at α=0.05\alpha=0.05.

Answer

z=1.5z=1.5, p=0.067>0.05p=0.067 > 0.05. Fail to reject H0H_0. Evidence is inconclusive.

First step

1
Calculate test statistic: z=xˉμ0σ/n=787512/36=32=1.5z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}} = \frac{78 - 75}{12/\sqrt{36}} = \frac{3}{2} = 1.5

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan — every worked solution, all subjects

Example 2

hard
A medication is claimed to reduce blood pressure by 10 mmHg on average. A clinical trial with n=49n=49 patients shows xˉ=8.2\bar{x}=8.2 mmHg reduction, s=7s=7 mmHg. Test H0:μ=10H_0: \mu=10 vs Ha:μ10H_a: \mu \neq 10 at α=0.05\alpha=0.05.

Example 3

medium
A factory claims defect rate 5%5\%. From n=400n = 400, p^=0.08\hat p = 0.08. Test H0:p=0.05H_0: p = 0.05 vs Ha:p>0.05H_a: p > 0.05 at α=0.05\alpha = 0.05.

Common Mistakes

  • Treating 'fail to reject H0H_0' as 'prove H0H_0 true' - it only means insufficient evidence against it.
  • Choosing α\alpha after seeing the data - set the significance level before testing to avoid cherry-picking.
  • Confusing the null and alternative - H0H_0 is the default 'no effect' claim; HaH_a is what you suspect.

Why This Formula Matters

Hypothesis testing is how science decides whether an effect is real or just chance — does the new drug beat the placebo, is the coin fair? It forces students to quantify 'surprising' with a significance level, replacing gut feeling about whether a result 'looks big' with a measured rule. Recognizing it by "Am I deciding whether sample data is surprising enough to reject a specific stated claim about a population?" — rather than by familiar numbers — is what lets a student tell it apart from confidence interval and p-value and type i / type ii errors in a mixed problem set.

Frequently Asked Questions

What is the Hypothesis Testing formula?

A systematic method to decide whether sample data provides enough evidence to reject a claim (null hypothesis) about a population parameter.

How do you use the Hypothesis Testing formula?

Think of a courtroom trial: the null hypothesis (H0H_0) is 'innocent until proven guilty.' You look at the evidence (data) and ask: 'Is this evidence so strong that it would be very unlikely if the defendant were truly innocent?' If yes, you reject the null hypothesis. If not, you don't have enough evidence to convict—but that doesn't prove innocence.

What do the symbols mean in the Hypothesis Testing formula?

H0H_0: null hypothesis (the default claim). HaH_a: alternative hypothesis (what we suspect). α\alpha: significance level (typically 0.050.05).

Why is the Hypothesis Testing formula important in Math?

Hypothesis testing is how science decides whether an effect is real or just chance — does the new drug beat the placebo, is the coin fair? It forces students to quantify 'surprising' with a significance level, replacing gut feeling about whether a result 'looks big' with a measured rule. Recognizing it by "Am I deciding whether sample data is surprising enough to reject a specific stated claim about a population?" — rather than by familiar numbers — is what lets a student tell it apart from confidence interval and p-value and type i / type ii errors in a mixed problem set.

What do students get wrong about Hypothesis Testing?

The procedure for hypothesis testing is the easy part; the trap is treating 'fail to reject H0H_0' as 'prove H0H_0 true'. Asking "Am I deciding whether sample data is surprising enough to reject a specific stated claim about a population?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

What should I learn before the Hypothesis Testing formula?

Before studying the Hypothesis Testing formula, you should understand: sampling distribution, normal distribution, probability.