UNIHIVE

Study Hub UNIPORT STA 264

STA 264 · Statistics for Biological and Agricultural Sciences

Tests of hypothesis

Null and alternative hypotheses, errors, p-values, and t tests.

Our notes

2 min read

The logic

Assume nothing is happening (the null), then ask how surprising the data are.

  • H₀ (null): no effect. μ₁ = μ₂.
  • H₁ (alternative): an effect. μ₁ ≠ μ₂ (two-tailed), or μ₁ > μ₂ (one-tailed).

Steps

  1. State H₀, H₁ and α (commonly 0.05).
  2. Pick the test.
  3. Calculate the test statistic.
  4. Compare with the critical value, or find the p-value.
  5. Conclude in terms of the science.

Errors

H₀ trueH₀ false
Reject H₀Type I error (α)Correct
Keep H₀CorrectType II error (β)

Power = 1 − β, the chance of detecting a real effect. It rises with sample size.

Type I: saying a useless fertiliser works. Type II: missing a fertiliser that works.

p-value

The p-value is the probability of data at least this extreme, if H₀ is true. If p ≤ α, reject H₀.

A p-value is not the probability that H₀ is true.

One-sample t test

t = (x̄ − μ₀) ÷ (s/√n), df = n − 1.

Example: a variety is said to yield 3 t/ha. Five plots give x̄ = 4, s = 1.22. Is it different?

t = (4 − 3)/0.546 = 1.83. The critical value (df 4, two-tailed 0.05) is 2.776.

Since 1.83 < 2.776, we do not reject H₀. The data don't show a difference from 3.

Check: the 95% interval (2.48, 5.52) includes 3. This agrees.

Two-sample t test

t = (x̄₁ − x̄₂) ÷ [sₚ√(1/n₁ + 1/n₂)], df = n₁ + n₂ − 2.

Example: two feeds on broilers (weight gain, kg). Feed A: n = 8, x̄ = 2.2, s² = 0.04. Feed B: n = 8, x̄ = 2.0, s² = 0.05.

  • s²ₚ = 0.045; sₚ = 0.212
  • SE = 0.212 × √(2/8) = 0.106
  • t = 0.2/0.106 = 1.89
  • df = 14; the critical value is 2.145

So, no significant difference at 5%.

Paired t test

Used when measures come in pairs: the same animal before and after, or twin plots. Work out the differences, and do a one-sample test on them.

Example: differences for 5 goats: 1, 2, 0, 3, 2.

  • d̄ = 1.6, s_d = 1.14
  • SE = 1.14/√5 = 0.510
  • t = 3.14. Critical (df 4) = 2.776

So, a significant change. Pairing often removes the variation between animals, making a test more powerful.

Check of s_d: Σd² = 18; (Σd)²/n = 64/5 = 12.8; (18 − 12.8)/4 = 1.3; √1.3 = 1.14. Correct.

Assumptions

  • Random, independent samples
  • Roughly normal data, particularly for small n
  • Similar variances, in the pooled test

Significant is not the same as important

A huge trial may show that a yield gain of 1 kg/ha is "significant", though it is of no use to a farmer. Report the size of the effect, with an interval.

Exams usually ask: state hypotheses; run a one-sample, two-sample or paired t test; define Type I and II errors; interpret a p-value.

Common mistake: concluding "H₀ is proved". Failing to reject means there isn't enough evidence for an effect, not that there is none.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All STA 264 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.