# How is the p-value calculated

## -Value

Next page:Test variable, critical value and Upwards:Test procedure Previous page:Significance level (probability of error) & nbsp index

In computer programs, a so-called “test variable” of a statistical test is often used -Value calculated (p value). This is the probability that the test variable will assume at least the value calculated in the sample, i.e. this value or a larger value, if the »null hypothesis« is valid. The value calculated for the sample is denoted by and the test variable with , then it is about the following (exceedance) probability: . In other words: it is the probability of error with which one can just barely refute the null hypothesis.

Some computer programs designate the Value therefore also as significance. However, that's not particularly fortunate in that the level of significance in front and does not have to be determined after the test has been carried out: In front Carrying out the test, considering the risks of a possible wrong decision (errors of the first and second kind), one must determine what probability of error one would like to allow in the test. It is inadmissible if the significance level retrospectively to the -Value of the sample, depending on whether one would like to achieve a significant or a non-significant result.

But then why do you need that -Value? The advantage of the p-value is that, on the one hand, you do not need a table of the test distribution to determine a critical value of the test variable or the rejection range of the null hypothesis. On the other hand, you can use the - Read the value of how far the (previously) selected level of significance is undershot or exceeded, i.e. whether the null hypothesis is only barely or very clearly refuted or confirmed.

When using the p-value (instead of a critical value of the test variable), a test is decided as follows:

• : Null hypothesis refuted,
• : Null hypothesis confirmed.
It is the previously selected significance level. In test procedures in which one or two-sided alternative hypotheses are possible, one must, however, pay very close attention to how the computer program does the -Value calculated. In the case of a one-sided alternative hypothesis, it may be necessary to use the -Value to halve.

Next page:Test variable, critical value and Upwards:Test procedure Previous page:Significance level (probability of error) & nbsp index HJA 2001-10-01