Two-tailed test
A two-tailed test, is a method in which the critical area of a distribution is two-sided and tests whether a sample is greater than or less than a certain range of values.
Suppose that we want to determine the Z critical value for a two-tailed test having a significance level equal to 0.01, we are passing the value to the p argument of the qnorm function to 0.01/2 and the lower.tail value of false since it is the two-tailed test in R.
R
# Determine Z critical value qnorm (p=.01/2, lower.tail= FALSE ) |
Output:
Interpretation of output:
When we conduct the two-tailed test, we get two critical values. Here, the two Z critical values come out to be equal to 2.575 and -2.575. Therefore, if the test statistics comes out to be lesser than -2.575 or greater than 2.575 then the outcome of the hypothesis test would be considered statistically significant.
How to Find Z Critical Values in R
When we conduct a hypothesis test, we obtain test statistics as an outcome. Now in order to find out whether the outcome of the hypothesis test is statistically significant, the Z critical value is compared with the test statistic. If the absolute value of the test statistic comes out to be greater than the Z critical value then the outcome of the hypothesis test is considered statistically significant.