One-tailed vs two-tailed tests: which to use (with R)

statistics
hypothesis-testing
When to use a one-tailed versus a two-tailed test, why the choice must be made before seeing the data, and how each changes the p-value — shown in R.
Author

Rverse Analytics

Published

May 19, 2026

Should your test look for a difference in either direction, or just one? The answer changes your p-value — and getting it wrong is a classic way to fool yourself. (Converting a statistic? Use our p-value calculator.)

The difference

  • Two-tailed: tests for a difference in either direction (the mean is higher or lower). This is the default and the honest choice for most questions.
  • One-tailed: tests in a single, pre-specified direction (only “higher”). It has more power to detect an effect in that direction — but only if you commit before seeing the data.

The same statistic, different p

t_stat <- 1.9; df <- 25

2 * (1 - pt(abs(t_stat), df))   # two-tailed
[1] 0.06902663
1 - pt(t_stat, df)              # one-tailed (right)
[1] 0.03451331

The one-tailed p is exactly half the two-tailed p here. That’s the temptation — and the trap.

Why the direction must be pre-registered

library(ggplot2)
x <- seq(-4, 4, length.out = 400); d <- data.frame(x, y = dnorm(x))
crit <- qnorm(0.975)
ggplot(d, aes(x, y)) +
  geom_area(data = subset(d, x >= crit), fill = "#b02a37", alpha = 0.5) +
  geom_area(data = subset(d, x <= -crit), fill = "#b02a37", alpha = 0.5) +
  geom_line(colour = "#1b2a4a", linewidth = 1) +
  labs(title = "Two-tailed test: 2.5% rejection region in EACH tail",
       x = "Test statistic", y = "Density") +
  theme_minimal(base_family = "sans") +
  theme(plot.title = element_text(face = "bold", colour = "#1b2a4a"))
Figure 1

If you decide the direction after seeing which way the data went, you’ve effectively used both tails while paying for one — inflating your false-positive rate above the 5% you claim.

The rule

Use two-tailed unless you have a strong, pre-registered reason to test a single direction (and you’d genuinely ignore an effect the other way). In R, t.test() takes alternative = "greater" or "less" for one-tailed tests — set it based on your hypothesis, not your results.


Pre-specifying analyses is part of doing statistics honestly. That’s how we work.