Exercise

Significance testing: one-sided versus two-sided (2)

In the last exercise, we calculated the cut-off value for a one-sided significance test. It is however more common to do a two-tailed significance test. If we stick to our significance level of 0.05, we would have to chop this value into two. This means that we get two rejection regions each corresponding to a cumulative probability of 0.025. Let's consider what this means visually:

In the above visualization, we have taken as an example the sampling distribution of the beard length of samples of 40 scandinavian hipsters. The mean here is 25 and the standard error is 0.55 round(3.5 / sqrt(40), 2). The red area is considered the rejection region when we are doing a two-tailed hypothesis test. This corresponds to the alternative hypothesis which checks whether the population mean of the beard length of scandinavian hipsters is not equal to 25 millimeters. As you can see the 0.05 probability is divided into two chunks of 0.025.

Instructions

100 XP
  • The visualization mentions the values of 23.92 and 26.08. These values indicate the start of the rejection region. Consider our example mentioned above with a mean beard length of 25 and a standard error of 0.55. Reproduce the value of 23.92 using the qnorm() function and assign it to the variable lower_cut_off. Make sure to round every value in this exercise to two digits.
  • Reproduce the value of 26.08 using the qnorm() function and assign it to the variable upper_cut_off. Make sure to round every value in this exercise to two digits.
  • Print the values of lower_cut_off and upper_cut_off to the console