Quick answers
- What is a hypothesis?
- A testable statement about the world that data could show to be wrong. Example: adding supplement C to the diet of weaned pigs increases their average daily gain.
- What is the null hypothesis?
- The statement of no effect or no difference, written H₀. For example H₀: the mean ADG on diet C equals the mean on the control diet. The test measures the evidence against it.
- What is the alternative hypothesis?
- What you conclude if the evidence against H₀ is strong enough, written H₁ or Hₐ. Usually that the means differ: H₁: μC ≠ μControl.
- What are the steps of hypothesis testing?
- 1) State H₀ and H₁. 2) Choose α, usually 0.05. 3) Calculate the test statistic. 4) Find the p value or critical value. 5) Reject H₀ or not, and state the conclusion in plain words.
- What are Type I and Type II errors?
- Type I: rejecting a true null hypothesis (a false positive), with probability α. Type II: failing to reject a false one (a false negative), with probability β. Power = 1 − β.
- What is the difference between a one-tailed and a two-tailed test?
- A two-tailed test looks for a difference in either direction; a one-tailed test only in one direction, decided before seeing the data. Two-tailed is the default in agricultural research.
On this page
What is a hypothesis?
A research hypothesis is a proposed explanation or prediction that could be wrong: "the supplement improves gut health, so pigs fed it will grow faster." A good one is specific, measurable and falsifiable. "The supplement is good for pigs" is not: no result could contradict it.
To test a research hypothesis, you translate it into a pair of statistical hypotheses about population parameters, such as means:
- Null hypothesis, H₀: no effect. μC − μControl = 0.
- Alternative hypothesis, H₁: an effect. μC − μControl ≠ 0.
The logic is indirect, like a court trial. The null hypothesis is presumed true ("innocent") and the data are the evidence. If the evidence would be very unlikely under H₀, you reject it. If not, you fail to reject it, which is not the same as proving it true: the trial may simply have been too small. That is why power matters.
The steps of a hypothesis test, on the pig trial
Most tests share this structure: the test statistic is an estimate divided by its standard error, and it is compared with its distribution under H₀. The details of this particular test are in the t-test chapter.
Three ways to decide: critical value, p value, confidence interval
| Method | Reject H₀ when | Pig trial |
|---|---|---|
| Critical value | |test statistic| > critical value | 2.86 > 2.228: reject |
| p value | p < α | 0.017 < 0.05: reject |
| Confidence interval | The interval excludes the null value | 0.03 to 0.25 excludes 0: reject |
The three always agree for the same test. Reports increasingly lead with the confidence interval, because it shows the size of the effect and its uncertainty, not just a yes or no.
95% CI for a difference = (x̄₁ − x̄₂) ± t(0.975, df) × SE of the difference = 0.143 ± 2.228 × 0.050
One-tailed vs two-tailed tests
A two-tailed test (H₁: μ₁ ≠ μ₂) splits α between both tails: 2.5% each. A one-tailed test (H₁: μ₁ > μ₂) puts all 5% in one tail, which makes it easier to reach significance in that direction and impossible in the other.
- Use a one-tailed test only when a difference in the other direction is impossible or would lead to exactly the same action, and decide before collecting data.
- A supplement could in principle depress growth, so the pig trial uses a two-tailed test. Reviewers are rightly wary of one-tailed tests chosen after the fact.
- Non-inferiority questions ("is the cheaper feed no worse than the standard?") are a legitimate one-sided case, with their own design.
Type I and Type II errors
| H₀ is actually true | H₀ is actually false | |
|---|---|---|
| You reject H₀ | Type I error (false positive), probability α | Correct decision, probability 1 − β = power |
| You fail to reject H₀ | Correct decision, probability 1 − α | Type II error (false negative), probability β |
- A Type I error would be recommending a supplement that does nothing. Setting α = 0.05 caps this risk at 1 in 20 for each test.
- A Type II error would be dropping a supplement that works because the trial was too small to show it. Its risk β is often 20% or more in small trials.
- Lowering α reduces Type I errors but raises Type II errors for the same trial. The way to reduce both is more information: more replicates, less noise, better design.
- Running many tests inflates the chance of at least one Type I error; that is what post hoc corrections are for.
Degrees of freedom
Degrees of freedom (df) count the independent pieces of information left for estimating variability after estimating the means. Six control pigs give 6 deviations from their mean, but those deviations must add to zero, so only 5 are free: df = n − 1.
- Two-sample t-test: df = n₁ + n₂ − 2 = 6 + 6 − 2 = 10.
- One-way ANOVA with 4 diets and 24 pigs: 3 df for diets, 20 for error.
- Blocking by litter uses 5 more df for litters, leaving 15 for error, but usually reduces the error variance far more than that costs.
More error df means critical values closer to the normal 1.96 and a more powerful test.
Statistical vs practical significance
"Statistically significant" only means the data are hard to explain by chance. Whether the effect matters is a biological and economic question. A 0.14 kg/day increase is 18% faster growth, clearly worth knowing; a 0.005 kg/day increase might be significant in a trial of 2,000 pigs and still not pay for the supplement.
Key takeaways
- A hypothesis must be testable and falsifiable; it becomes a null (no effect) and an alternative hypothesis.
- Tests ask how surprising the data would be if H₀ were true; failing to reject H₀ does not prove it.
- Critical values, p values and confidence intervals give the same decision; intervals also show effect size.
- Type I error (false positive) has probability α; Type II error (false negative) has probability β; power = 1 − β.
- Use two-tailed tests unless a one-sided question was set before the data were collected.
Questions people ask
Can you accept the null hypothesis?
Strictly, no: you fail to reject it. Absence of evidence is not evidence of absence, especially in small trials. To show two treatments are equivalent, use an equivalence test.
Is a hypothesis the same as a prediction?
Close. The hypothesis is the explanation (the supplement improves gut health); the prediction is what you would observe if it were true (faster growth).
Why is α usually 0.05?
Convention, going back to R. A. Fisher. It is a balance between false positives and the trial sizes people can afford. Some fields use 0.01 or 0.10; state yours in advance.
What is a test statistic?
A number calculated from the data that measures how far the results are from H₀, such as t, F or χ². Its known distribution under H₀ gives the p value.
What is the difference between a research hypothesis and a statistical hypothesis?
The research hypothesis is the scientific idea. The statistical hypotheses (H₀ and H₁) restate it in terms of parameters, such as means, that the data can test.
Sources
- Kaps, M., and Lamberson, W. R. (2017). Biostatistics for Animal Science (3rd ed.), chapter on hypothesis testing. CABI.
- Wasserstein, R. L., and Lazar, N. A. (2016). The ASA statement on p-values: context, process, and purpose. The American Statistician, 70(2), 129–133.
- Steel, R. G. D., Torrie, J. H., and Dickey, D. A. (1997). Principles and Procedures of Statistics: A Biometrical Approach (3rd ed.). McGraw-Hill.