Determining the Z critical values in R
R provides us the qnorm() function using which we can determine the Z critical values in R. The function has the following syntax:
qnorm(p, mean = 0, sd = 0, lower.tail = TRUE)
Here,
- p: It represents the significant level to be used
- mean: It represents the mean of the normal distribution
- sd: It represents the standard deviation of the normal distribution
- lower.tail = TRUE: Then the probability to the left of p in the normal distribution is returned.
- lower.tail = TRUE: Then the probability to the right is returned.
- Note that by default lower.tail is TRUE.
Now let’s discuss how we can determine the Z critical value for the left-tailed test, a right-tailed test, and a two-tailed test.
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.