However, what if want an exact p-value? Well, back in the day, the tables of critical values were huge,
and so you could look up your actual z-value, and find the smallest value of α for which your data would
be significant (which, as discussed earlier, is the very definition of a p-value). However, looking things up
in books is tedious, and typing things into computers is awesome. So let’s do it using R instead. Now,
notice that the α level of a z-test (or any other test, for that matter) defines the total area “under the
curve” for the critical region, right? That is, if we set α “ .05 for a two-sided test, then the critical region
is set up such that the area under the curve for the critical region is .05. And, for the z-test, the critical
value of 1.96 is chosen that way because the area in the lower tail (i.e., below ´1.96) is exactly .025 and
the area under the upper tail (i.e., above 1.96) is exactly .025. So, since our observed z-statistic is 2.26,
why not calculate the area under the curve below ´2.26 or above 2.26? In R we can calculate this using
the pnorm() function. For the upper tail:
However, what if want an exact p-value? Well, back in the day, the tables of critical values were huge,
and so you could look up your actual z-value, and find the smallest value of α for which your data would
be significant (which, as discussed earlier, is the very definition of a p-value). However, looking things up
in books is tedious, and typing things into computers is awesome. So let’s do it using R instead. Now,
notice that the α level of a z-test (or any other test, for that matter) defines the total area “under the
curve” for the critical region, right? That is, if we set α “ .05 for a two-sided test, then the critical region
is set up such that the area under the curve for the critical region is .05. And, for the z-test, the critical
value of 1.96 is chosen that way because the area in the lower tail (i.e., below ´1.96) is exactly .025 and
the area under the upper tail (i.e., above 1.96) is exactly .025. So, since our observed z-statistic is 2.26,
why not calculate the area under the curve below ´2.26 or above 2.26? In R we can calculate this using
the pnorm() function. For the upper tail:
การแปล กรุณารอสักครู่..
