Differences between TwoTailed and OneTailed Tests
Learn how to differences between twotailed and onetailed tests.
This question is most relevant to hypothesis testing. For simplicity, we will use twotailed tests for all hypothesis testing in this course, except in the

Null hypothesis $H_0$: $\mu_{true}= \mu_0 = 0.03$.

Twosided alternative hypothesis $H_a$: $\mu_{true}\not= \mu_0 = 0.03$.

Onesided null hypothesis $H_0$: $\mu_{true}\le \mu_0 = 0.03$.

Onesided alternative hypothesis $H_a$: $\mu_{true}\gt \mu_0 = 0.03$.

Onesided null hypothesis $H_0$: $\mu_{true}\ge \mu_0 = 0.03$.

Onesided alternative hypothesis $H_a$: $\mu_{true}< \mu_0 = 0.03$.
Three pairs of null and alternative hypotheses are specified. The first pair is for a twotailed test. The second and third pairs are for onetailed tests, with different conditions in the null hypotheses tested.
Regardless of whether a test is onetailed or twotailed, the test statistic remains the same, with a degree of freedom (n − 1):
$t=\frac{\bar{y}\mu_0}{s/ \sqrt{n}}$
The choice of the acceptable Type I error threshold also remains the same: $α = 0.05$.
With the computed tstatistic and degree of freedom, the $p$ value will be identified from a tdistribution table, as before. However, the size of the $p$ value will differ, depending on the nature of the null hypothesis.
Twotailed $p$ value: $\mu_{true}=\mu_0=0.03.$
Lefttailed $p$ value: $\mu_{true}\leq\mu_0=0.03.$
Righttailed $p$ value: $\mu_{true}\ge\mu_0=0.03.$
The decision rule remains the same as well.
We illustrate how twotailed and onetailed tests can differ, using the following R code.
Get handson with 1200+ tech skills courses.