October 18, 2026

The Big Question

How can you determine whether the results from a biology experiment are due to random chance or a change in the independent variable?

Statistics to the Rescue!

The job of a researcher is to discover the unknown, but how do they actually interpret their results?

One way they do this is with the concept of a p-value!

A p-value is the probability that the researcher will obtain the same research results assuming that the null hypothesis (the assumption that there will be no effect) is true.

It allows a scientist to:

  • Reject the null hypothesis and declare the the results of their experiment are statistically significant if the p-value is less than or equal to 0.05.

  • Fail to reject the null hypothesis if the p-value is greater than 0.05.

So how can this concept actually be used?

Let’s say you’re a researcher running an experiment where you want to determine if the mutant wheat colony you made grows faster than the wild type version.

Here are the results of your experiment:

   Mutant1 Mutant2 WildType
1       10      29       30
2       11      35       33
3       15      28       35
4       12      36       31
5       13      24       34
6       10      34       35
7       16      30       33
8       11      28       32
9       14      27       31
10       9      31       29

*The above data is made up and does not originate from a real data set, but the idea was inspired by experiments done in a lab I worked in during the summer

Assessing the data

Graphing the data gives us a quick snapshot of what we’re working with. We can see how spread out the data is from the different trials and how the types differ from each other.

Doing some more preliminary work gives us a rough idea of what our p-value is expected to be. After plotting the means of all of the types, we can see that Mutant 1 is a lot lower than the Wild Type while Mutant 2 is about the same.

Now we need to back up our visual analysis with mathematical analysis.

Deciding on the test

There are multiple types of tests a scientist can use to determine a p-values based on whatever way best fits their experimental design.

While other tests exists, the main three are:

1. Z-test

  • Usually used with larger sample sizes
  • Choose between one sample or two sample test

Equation for one sample:

\(Z = \frac{\bar{x} - \mu}{\sigma / \sqrt{n}}\)

\(\bar{x}\) = sample mean
\(\mu\) = population mean
\(\sigma\) = population standard deviation
\(n\) = sample size

2. T-test

  • Usually used with smaller sample sizes
  • Choose between one sample, paired, or unpaired

Equation for one sample:

\(t = \frac{\bar{x} - \mu}{s / \sqrt{n}}\)

\(\bar{x}\) = sample mean
\(\mu\) = population mean
\(s\) = sample standard deviation
\(n\) = sample size

3. Chi-square

  • Usually used with categorical data

Equation:

\(\chi^2 = \sum \frac{(O - E)^2}{E}\)

\(O\) = observed frequencies
\(E\) = expected frequencies

One or Two Tails

From there, you also want to choose to use either a one or two tailed test.

  1. One-tailed
    • Only tests in one direction
  2. Two-tailed
    • Tests in both directions

Our Choice

For this data, we’ll be using an unpaired two tailed t-test to calculate the p-value as the number of trials is on the smaller side, we want to assume the types are independent, and we want to test in both directions as we don’t have evidence we can discredit one or the other.

The equation for this test is:

\(t = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}\)

\(\bar{x}\) = sample mean
\(s\) = sample standard deviation
\(n\) = sample size

Using R

There are many calculators and platforms out there that will actually calculate your p-value for you.

For example, in R you can use the built in t.test() or chisq.test() functions.

result1 = t.test(edata$Mutant1, edata$WildType)
print(result1)
    Welch Two Sample t-test

data:  edata$Mutant1 and edata$WildType
t = -20.545, df = 17.727, p-value = 8.281e-14
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -22.26789 -18.13211
sample estimates:
mean of x mean of y 
     12.1      32.3 
print(result1$p.value)
[1] 8.280565e-14

result2 = t.test(edata$Mutant2, edata$WildType)
print(result2)
    Welch Two Sample t-test

data:  edata$Mutant2 and edata$WildType
t = -1.5293, df = 13.808, p-value = 0.1488
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -5.0489672  0.8489672
sample estimates:
mean of x mean of y 
     30.2      32.3 
print(result2$p.value)
[1] 0.1487653

While a real p-value would likely never be that small due to experimental noise, 8.28 * 10^-14 is in fact less than 0.05 and would allow a scientist to reject the null hypothesis for Mutant 1. This means that there is less than a 5% chance that these results happen again given that the null hypothesis is true.

For Mutant 2, however, the p-value is greater than 0.05. The results are not statistically significant, and the scientist fails to reject the null hypothesis.

Calculation tools like this allow scientists to quickly determine a p-value especially when they may be dealing with 100s of entries or trials.

Adding more Detail to the Visuals

This graph provides a more detailed overview of our Mutant vs WildType data. At a glance, it showcases how the three groups compare to each other in terms of range, median, and the spread of individual data points. It is also interactive and allows users to see all of these specific values.

Conclusion

While researchers can gain a good understanding of their data from simple statistical tests like median and mean, the p-value sets a standard for how a scientist interprets whether or not an experiment actually worked.

While a p-value less than or equal to 0.05 does not necessarily mean that the experiment was fool proof, it does let scientists know that they may be on the right track.

References