Decision Making and P-Values for a Right-Tailed Hypothesis
Below is an interactive exercise that you can use to calculate Type I
and II errors, and p-values. Just to jog your memory, here are
some definitions:
P-values: The chance of observing the sample result or something
more extreme under the null hypothesis
Type I error (a): The chance of rejecting
the null, when in fact it is true.
Type II error (b): The chance of concluding
the null hypothesis when the alternative is true.
The problem is based on the following hypothesis:
H0: Bag A
H1: Bag B
Remember that larger values support Bag B, the alternative hypothesis. Therefore,
the direction of extreme is to the right. This is an example of a right
tailed hypothesis.
So, when calculating the Type I error, we will be calculating the area to
the right.
As the p-value calculations are also based on the null hypothesis
and direction of extreme, that area is also calculated to the right.
As the p-value represents the chance of observing the sample result
under the null, the smaller the p-value, the more it supports the alternative
hypothesis.
If the p-value <= a, we reject the null hypothesis
in favour of the alternative.
How to use the interactive exercise:
The red line represents your decision rule. All values to the right of
the red line represent the areas where you would reject the null hypothesis
in favour of the alternative hypotheis. That is, you would choose Bag B instead
of Bag A. Therefore, when calculating the Type I error, we are calculating
this area under the null hypothesis (the number of values under Bag A that
is to the right of this line). As you move the line, you will see the change
in the Type I error.
Once a decision rule is made (i.e., you have moved your red line), the area
to the left represents the region where you would conclude Bag A. As the Type
II error is when you conclude Bag A under the alternative, you can calculate
this from the graph. Just count the number of values under Bag B to the left
of this line.
Finally, p-value is the area to the right of the selected sample
point under the null. Move your cursor so that it points to a value under
the null hypothesis, and you will see the p-value. Note that whenever
p-value > a, your conclusion is not to
reject the null hypothesis. Try it.