Free note · Biostatistics · Asen Zlatarov University

Basic concepts in data comparison and hypothesis testing

Free note: read it whole, no account needed. The other notes of Biostatistics are free with an account.

Inside: 10 sections · 2 labelled pictures · 1 table · 4 min

Topic 12 of 18 in the Asen Zlatarov University syllabus for Biostatistics (Medicine, Year 2). The free AceMed note covers it in 10 sections, about 627 words (4 min of reading). Made by senior students who got a full 6 and reviewed by professors: how our notes are made.

In this note

  1. Introduction
  2. From sample to population
  3. Probability
  4. The two hypotheses
  5. p-value and significance level
  6. Type I and Type II errors
  7. Steps of a hypothesis test
  8. Statistical and clinical significance
  9. High-yield points
  10. Memory aid

Introduction

We almost never study a whole population, so we compare samples and ask whether a difference is real or could be due to chance. Hypothesis testing answers that question with a stated probability of being wrong.

From sample to population

  • Descriptive statistics summarise the data collected; inferential statistics generalise from a representative sample to the population and state the uncertainty.
  • A sample estimate differs from the true value because of sampling error.
  • An observed difference between groups can come from: chance, the factor studied, other real factors, or bias (groups not comparable).

Probability

  • Probability runs from 0 (impossible) to 1 (certain): P(A) = favourable outcomes / all possible outcomes.
  • A priori (by reasoning: a fair die gives a 6 with P = 1/6) or a posteriori (from observed frequencies: if 30% of patients relapse, P(relapse) = 0.3).
  • For a normally distributed variable, probability = area under the normal curve. Convert the value to a z score: z = (x − mean) / SD, then read the area from the table.
  • Example: systolic pressure with mean 120 and SD 10 mmHg. P(pressure above 140) → z = 2 → area beyond z = 2 is 0.023, so about 2.3% of people.

The two hypotheses

  • Null hypothesis (H0): no difference, no relationship; any difference is due to chance.
  • Alternative hypothesis (H1): there is a real difference or relationship.
  • Two-tailed (non-directional): "the groups differ".
  • One-tailed (directional): "group A is higher than group B".
  • The test is done on H0: we either reject H0 (and accept H1) or fail to reject it. Failing to reject H0 does not prove it true; the evidence is simply not strong enough.

p-value and significance level

  • p-value: the probability of getting a result at least as extreme as the one observed if H0 were true.
  • Significance level (α): the cut-off chosen before the test, usually 0.05 or 0.01.
  • Decision rule: p α → reject H0, the difference is statistically significant. Equivalently: test statistic beyond the critical value → reject H0.
  • Conventions: p 0.05 significant; p 0.01 highly significant; p ≥ 0.05 not significant.
  • With α = 0.05, a two-tailed test splits the rejection area into 2.5% in each tail; a one-tailed test puts all 5% in one tail.

Reading a p-value: p below 0.01 is highly significant, between 0.01 and 0.05 significant, and 0.05 or more not significant.

Type I and Type II errors

DecisionH0 really trueH0 really false
Reject H0Type I error (α): a false "difference"Correct (power = 1 − β)
Keep H0CorrectType II error (β): a real difference missed
  • α is fixed by the researcher (0.05); lowering α raises β.
  • β falls (power rises) with a larger sample, less variable measurements, a larger true effect, or a one-tailed test when the direction is known in advance.

Type I and Type II errors: Like a trial: convicting an innocent person is a Type I error, freeing a guilty one is a Type II error.

Steps of a hypothesis test

  • State H0 and H1 (one- or two-tailed).
  • Choose α (0.05 or 0.01).
  • Choose the test: parametric (t-test, ANOVA) for interval or ratio data with a normal distribution; non-parametric (chi-square, rank tests) for nominal or ordinal data or skewed distributions.
  • Calculate the test statistic from the data.
  • Compare it with the critical value (or p with α) and decide.
  • Interpret the result in clinical terms.

Statistical and clinical significance

A statistically significant result is not always clinically important: a huge sample can make a 1 mmHg difference "significant". A small sample can miss a real and important effect. Always look at the size of the difference and its confidence interval, not only at p.

High-yield points

  • H0 = no difference; we reject it or fail to reject it, never "prove" it.
  • p α (0.05) → significant; p is not the size of the effect.
  • Type I = false positive (α); Type II = false negative (β); power = 1 − β.
  • Parametric tests for normal interval data; non-parametric for nominal, ordinal or skewed data.

Memory aid

Type I: "I see a difference that isn't there"; Type II: "Too blind to see one that is."

The 2 labelled pictures of this note are in the app, with its flashcards.

Like this note? Every other available note is free too

A free AceMed account opens every available note, and tracks what you have read. Standard adds flashcard recall, highlights and Ask AI.