تجاوز إلى المحتوى الرئيسي

From the Biostatistics & Health Informatics curriculum

In this topic (5)

Hypotheses and the two errors; p values and decisions; t-tests; Two-sample and paired t, non-parametric tests…

Hypotheses and the two errors

  1. H0 states no difference (vegetarian children eat the usual 70 g of fat a day); H1 is what we accept if H0 is rejected.
  2. Decisions: reject H0, or fail to reject (accept) it.
H0 trueH0 false
Accept H0correctType II error (beta)
Reject H0Type I error (alpha)correct (probability = power)
  1. Alpha = level of significance = probability of a Type I error. Power = 1 - beta. The goal is to keep both errors small.

p values and decisions

  1. A statistic (mean, proportion, rate) from the sample estimates a parameter of the population.
  2. Hypothesis testing asks whether a difference is more likely random variation or real.
  3. Compute a test statistic, compare it with its known distribution and get the p value.
  4. If p < alpha (usually 0.05), reject H0: the difference is bigger than chance alone would give. With alpha 0.01, p = 0.04 is not significant.

The critical value comes from the table using alpha and the degrees of freedom; a calculated statistic beyond it falls in the rejection region.

  • Alternative hypothesis (H1): The statement supported when a statistical test rejects the null hypothesis. (lecture slide 2)
  • p value: The probability, assuming the null hypothesis is true, of obtaining a test statistic at least as extreme as the observed one. (lecture slide 8)

t-tests

  1. One-sample t: compares a sample mean with a known population mean: t = (x-bar - mu) / (s / square root of n), df = n - 1. Example: mean 124 vs 120, SD 18, n 81 gives t = 4 / 2 = 2.0.
  2. Read the critical t from the table by df and two-tailed alpha (df 28: 2.05 at 0.05, 2.76 at 0.01, 3.67 at 0.001).
  3. Assumptions: random, independent sample from a normal population of continuous data.

Two-sample and paired t, non-parametric tests

  1. Independent (two-sample) t: compares the means of two separate samples using a pooled variance, df = n1 + n2 - 2.
  2. Paired (dependent) t: the same people measured twice, or matched pairs; work with the differences (mean and SD of the differences).
  3. If data stay non-normal, use rank-based non-parametric tests: Mann-Whitney U for two independent groups, Wilcoxon signed-rank for paired data.
  4. Nominal data are tested with chi-square.

Chi-square

  1. Used for counts in categories (absolute numbers, not a proportion alone): is there a relation between two categorical variables, or do proportions differ? H0: P1 = P2.
  2. Data go in a contingency (cross-tabulation) table, exposure as rows and outcome as columns.
  3. Expected count per cell = row total x column total / grand total.
  4. chi-square = sum of (O - E) squared / E; large gaps between O and E reject H0. It is always an upper one-sided test.
  5. df = (rows - 1) x (columns - 1); the critical value depends on alpha and df (3.84 at df 1, alpha 0.05).
  6. Validity: no expected count below 1, and fewer than 20% below 5; for a small 2 x 2 table use Fisher's exact test, and Yates' correction can be applied to 2 x 2.

Influenza: vaccine 20 of 240 infected, placebo 80 of 220. Expected for the vaccine cell = 240 x 100 / 460 = 52.2. chi-square = about 53.0, far above 10.83 (df 1, alpha 0.001), so p < 0.001 and the vaccine effect is real.

  • Chi-square test: A test that compares observed and expected category counts to assess an association or a difference in proportions. (lecture slide 7)
  • Expected count: The number predicted for a table cell under the null hypothesis, calculated by multiplying its row and column totals and dividing by the grand total. (lecture slide 5)

Keep reading this subunit

Sign up free to read the rest of this subunit; we bring you back here.

  • p values and decisions
  • t-tests
Start freeLog in

Last updated:

A preview of “Hypothesis testing, t-tests and chi-square” from the unit “Biostatistics” in Biostatistics & Health Informatics: 5 lesson sections, 20 definitions, 40 worked questions.

Source: Mutah, 1d728627259bc1bf.pdf (pages 2-4)

More in this unit

Continue studying