Statistics Glossary → One-sided and two-sided tests (hypothesis direction)
One-sided and two-sided tests (hypothesis direction)concept
The choice of whether the alternative hypothesis looks for a difference in one direction only (one-sided) or in either direction (two-sided).
In a two-sided test the alternative says 'there is a difference' (e.g. μ ≠ μ₀); deviations in either direction count as evidence against the null, and α is split between the two tails of the distribution. In a one-sided (right- or left-tailed) test the alternative predicts a single direction (e.g. μ > μ₀), and all of α is placed in that tail. So, on the same data, when the observed difference lies in the predicted direction, the one-sided p value is about half the two-sided one.
A one-sided test is legitimate only when the direction was fixed before the data were collected, on theoretical or practical grounds; choosing the direction after seeing the results effectively doubles the Type I error rate. However large a difference in the opposite direction turns out to be, a one-sided test will not call it significant. When in doubt, use the two-sided test, which is also what most journals expect by default.
An everyday example
A teacher expects a new study method to raise exam scores and writes this down in advance. Scores could also fall, but her question is only 'did they go up?'. When the class mean rises from 68 to 72, the right-tailed test gives p = 0.03, while the two-sided test on the same data gives p = 0.06. Had she picked the direction afterwards, that advantage would not be justified.
In MerQur
Offered as the 'Hypothesis direction' option in the t-tests, the permutation test, Mann-Whitney U, Wilcoxon, binomial, sign, McNemar and correlation analyses (two-sided, right-tailed, left-tailed; P > p₀ and P < p₀ in the binomial test); in Fisher's exact test the same option is called 'Direction'. In the independent t-test the first group is the one that appears first in the file. The runs test offers fewer/more runs, the Mann-Kendall test increase/decrease, point pattern analysis clustering/regularity, and the Bayesian t-test and Bayesian correlation a directional alternative hypothesis (BF+0, BF-0).
Analyses where this concept appears
One-Sample t-TestIndependent-Samples t-TestPaired t-TestPermutation TestMann-Whitney UWilcoxon Signed-RankKruskal-WallisFriedmanBinomial TestSign TestRuns TestChi-Square Goodness of FitFisher's Exact TestMcNemar TestCochran-Mantel-Haenszel (CMH) TestMR × MR CrosstabCorrelation AnalysisConfusion Matrix MetricsBayesian t-Test (JZS Bayes Factor)Bayesian CorrelationMann-Kendall + Sen's SlopeMoran's I (Spatial Autocorrelation)Point Pattern Analysis (Ripley K/L, G/F/J, CSR)