Difficulty: Introductory | Prerequisites: Basic algebra, familiarity with scatterplots
Linear regression and basic statistics form the quantitative backbone of introductory biology. You will use these tools to determine whether observed patterns in biological data (allele frequencies, phenotype distributions, treatment effects) are real or just noise. This material bridges your biology content with the data-analysis skills you need for interpreting experiments, reading published studies, and answering exam questions that hand you a scatterplot and ask what it means. You should already be comfortable reading a basic scatterplot and understanding what a mean (average) represents.
Linear regression fits a straight line through two continuous variables and asks whether that line's slope is meaningfully different from flat. R² tells you how much of the variation in y is explained by x (closer to 1 = stronger relationship). The p-value tells you whether the pattern you see is likely real or just chance, and sample size affects both the reliability and the sensitivity of your results.
Linear regression
A statistical method for fitting a straight line (the line of best fit) through a scatterplot of two continuous variables. In simple terms, it asks: "As x goes up, does y go up or down in a predictable way?"
Line of best fit
The straight line drawn through a scatterplot that minimises the overall distance between the line and all data points. Think of it as the single line that best summarises the trend in your data.
Null hypothesis (H₀)
The default assumption that there is no relationship between x and y. Visually, this means the line of best fit is flat (slope of zero). In simple terms, the null says: "Nothing interesting is going on here."
Alternate hypothesis (H₁)
The opposite claim, that the line of best fit is not flat, meaning the slope is meaningfully different from zero. Think of it as: "There is a real relationship worth paying attention to."
Test statistic
A number calculated from the data that measures how far the observed pattern deviates from what the null hypothesis predicts. A larger test statistic generally means a steeper slope and tighter clustering of points around the line.
P-value
The probability of seeing a pattern at least as extreme as the one in your data, assuming the null hypothesis is true. A p-value below 0.05 is the conventional threshold for rejecting the null. In simple terms, a small p-value means: "This pattern is unlikely to be just luck."
R² (coefficient of determination)
The fraction of variation in y that is explained by variation in x. Ranges from 0 to 1. An R² of 0.9 means 90% of the variation in y can be accounted for by x. Think of it as a score for how useful x is for predicting y.
Standard error
A measure of how much a statistic (like a mean or proportion) would vary if you repeated the study with a new sample of the same size. In simple terms, it tells you how much wobble to expect in your estimate.
Statistical significance
A result is statistically significant when the p-value falls below the chosen threshold (typically 0.05), meaning the observed effect is unlikely to have arisen by chance alone. This does not necessarily mean the effect is large or practically important.
Sample size
The number of individual observations in a study. Larger samples reduce the impact of outliers and make the sample more representative, but very large samples can detect trivially small differences and flag them as significant.
Linear regression works with two continuous variables plotted as a scatterplot
The line of best fit is the straight line that best describes the trend in the data
The slope of the line of best fit tells you how much y tends to change for each 1-unit change in x
If the slope is zero (flat line), there is no linear relationship between the variables
R² ranges from 0 to 1 and represents the fraction of variation in y explained by variation in x
R² = 0.9 means 90% of the variation in y is explained by x. This is a strong, useful relationship.
R² = 0.01 means only 1% of the variation in y is explained by x. Even if the p-value is significant, the relationship has almost no practical explanatory power. Something else accounts for the remaining 99%.
The closer R² is to 1, the more tightly the data points cluster around the line of best fit
R² close to 0 means the data looks more like a random scatter of points
The null hypothesis for regression is that the slope equals zero (no relationship)
To calculate the test statistic, you assume the null hypothesis is true
The p-value answers: "If the null were true, how likely would we be to see a pattern this strong or stronger?"
p < 0.05 is the conventional cutoff for rejecting the null and calling the result statistically significant
A p-value of 0.35 means there is a 35% chance you would see a difference this large by chance alone, so you do not reject the null
Statistical significance (small p-value) and practical significance (large R²) are separate questions. A result can be statistically significant but explain very little of the variation.
Benefits of large samples: More representative of the population, reduces the impact of outliers, detects even modest real effects
Risks of very large samples: Standard error shrinks as sample size grows, which means even trivially small differences can produce significant p-values. The result is "statistically significant" but meaningless in practice.
The takeaway: always look at R² alongside the p-value. A significant p-value with a tiny R² tells you the relationship is real but negligible.
Experimental studies (with controls, randomisation, blinding) can establish cause and effect
Observational studies can only show association, not causation
Blind studies and randomisation help prevent psychological and social biases
When evaluating data, ask: how good was the experimental design? Was it truly experimental, or just observational?
Standard error bars on a graph show the range of variation you would expect if the study were repeated with a new sample of the same size
You should be able to draw and interpret standard error bars on exam graphs
R² = fraction of variation in y explained by variation in x
Slope of line of best fit = the change in y per 1-unit change in x
p < 0.05 = reject the null hypothesis (conventional threshold)
Standard error decreases as sample size increases
Regression analysis is how researchers determine whether a treatment actually affects an outcome, whether a gene variant correlates with a trait, or whether an environmental factor predicts population change. When a medical study reports that a drug "significantly" lowers blood pressure, it means the p-value crossed the threshold, and the R² (or effect size) tells you by how much.
Students often think a statistically significant result means the effect is large. It does not. A tiny effect can be statistically significant if the sample is large enough.
Students confuse R² with the p-value. R² tells you how much variation is explained; the p-value tells you whether the relationship is likely real. They answer different questions.
Students sometimes believe that R² = 0.09 means the relationship explains 90% of the variation. It does not. R² = 0.09 means 9%. R² = 0.9 means 90%. Read the decimal carefully.
Students assume observational studies can prove causation. They cannot. Only controlled experiments with randomisation and blinding can establish cause and effect.
⚠️ You will be given scatterplots and asked to interpret R² and p-values together. Know what each one tells you separately.
⚠️ Be prepared to explain why a statistically significant result with a very low R² is not practically meaningful.
⚠️ You may be asked to draw or interpret standard error bars on a graph.
⚠️ Exam questions will test whether you can distinguish experimental from observational studies and explain why that distinction matters for causal claims.
⚠️ Know what a specific p-value means in plain English (e.g. "p = 0.35 means a 35% chance of seeing this result under the null").
True or false: R² = 0.02 with p < 0.01 means x is a strong predictor of y.
Fill in the blank: The null hypothesis for linear regression states that the slope of the line of best fit is ______.
True or false: A p-value of 0.35 means you should reject the null hypothesis.
Fill in the blank: Standard error ______ as sample size increases.
True or false: Observational studies can establish cause and effect.
Answers: 1. False (significant but explains almost nothing). 2. Zero (flat). 3. False (0.35 > 0.05). 4. Decreases. 5. False (only experiments can).
Q: A study reports R² = 0.01 and p = 0.003. Is the relationship between x and y practically meaningful? Explain.
A: No. The p-value tells you the relationship is statistically significant (unlikely due to chance), but R² = 0.01 means x explains only 1% of the variation in y. The remaining 99% is explained by other factors. The relationship is real but negligible.
Q: What does a p-value of 0.35 tell you about the null hypothesis?
A: It means that if the null hypothesis were true, there is a 35% chance of observing a pattern at least as extreme as the one in the data. Since 0.35 > 0.05, you fail to reject the null hypothesis.
Q: Why might a very large sample size produce misleading statistical results?
A: Large samples shrink the standard error, which makes even trivially small differences statistically significant. A study with millions of observations might report p < 0.001 for a difference that has no practical importance.
Q: A researcher observes that students who drink coffee score higher on exams. Can she conclude that coffee improves exam performance? Why or why not?
A: No. This is an observational study, so it can only show a correlation, not causation. There may be confounding variables (e.g. coffee drinkers may study more). Only a controlled experiment with randomisation could establish a causal link.
Q: In a regression analysis, the slope of the line of best fit is 3.2. What does this number mean?
A: For every 1-unit increase in x, y tends to increase by 3.2 units.
This material connects directly to genetics and evolution. When the course discusses allele frequency changes across generations, you will use regression and R² to measure how strongly a variable (e.g. selection pressure) predicts the observed change. Understanding p-values is essential for interpreting whether observed phenotype ratios deviate significantly from Mendelian predictions. The experimental design concepts (blinding, randomisation, controls) come back in every lab and research-methods unit.
Linear regression, R-squared, R², coefficient of determination, p-value, null hypothesis, alternate hypothesis, test statistic, line of best fit, best fit line, slope, standard error, standard error bars, sample size, statistical significance, observational study, experimental study, randomisation, blinding, blind study, scatterplot, continuous variables, variation explained, correlation vs causation, BIOL 180, introductory biology statistics