Durgical
EN
Open the app

Hypothesis testing

  • Concept

Start by assuming there is no difference, then check whether the data would be rare enough under that assumption to reject it.

Updated

What it is

A hypothesis test is a procedure for deciding whether the data give enough evidence against a null hypothesis (H0), which almost always states that there is no difference or association. A significance level α is set in advance, a test statistic is calculated and compared with a critical value, or its p value is obtained. It underlies nearly every result of clinical trials, and grasping its logic prevents misreading a ‘non-significant’ result.

Function

  • 1. State H0 and H1 before seeing the data.
  • 2. Choose α and whether the test is one- or two-sided.
  • 3. Calculate the test statistic from the data.
  • 4. Compare it with the critical value, or obtain the p value.
  • 5. Decide, and report the result with its confidence interval.

Worked example

  1. Data: a service historically cured 70% with one protocol; with a new one, 80 of 100 patients are cured.
  2. H0: the cure proportion is 0.70. H1 (two-sided): it differs from 0.70. α = 0.05.
  3. SE under H0 = √(0.70 × 0.30 / 100) = √0.0021 = 0.0458.
  4. z = (0.80 − 0.70) / 0.0458 = 2.18 (rounded).
  5. Two-sided critical value = ±1.96. Since 2.18 > 1.96, H0 is rejected; the two-sided p value is about 0.029.
  6. A one-sided test would use 1.645, but it is justified only if chosen before seeing the data.
  7. Reading: an 80% cure rate is hard to reconcile with the historical 70%, although the study had no concurrent control group.

Markers

  • H0
  • H1
  • α
  • z

Common pitfalls

  • Saying ‘H0 is accepted’: the correct wording is ‘H0 is not rejected’; absence of evidence is not evidence of absence.
  • Switching to a one-sided test after seeing the data to reach p < 0.05.
  • Stating the hypotheses after exploring the data (this inflates type I error).

Test yourself

Think of the answer, then tap the question to see it.

What does the null hypothesis usually state?

That there is no difference between groups and no association between variables.

If p = 0.20, what is concluded at α = 0.05?

H0 is not rejected: the data do not give enough evidence of a difference, which does not show there is none.

What is the critical z value for a two-sided test at α = 0.05?

±1.96.

When is a one-sided test justified?

Only when, before seeing the data, it was decided that a difference in the other direction is impossible or would not matter.

Add to my cards (4)

Connections

← All of epidemiology

Educational content on epidemiological and statistical methods; the examples use made-up numbers to teach the calculation. Not a clinical or legal guide: current Colombian rules are in the official sources.

Sources: What are statistical tests? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012); Critical values and p values (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012); What is the relationship between a test and a confidence interval? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012).

Spotted a mistake?We are always improving for the community. Tell us what is wrong and our team will review it.Report a mistake

Representative model, for educational purposes only.