Based on an observed data set, a statistical hypothesis test
is to find out whether a certain hypothesis should be either
accepted or rejected. Typically this is a null hypothesis, denoted by
, e.g., there is no difference between the mean
of
the data set and a hypothesized mean
, or between the
means
and
of two data sets, against an
alternative hypothesis,
denoted by
, e.g., the two means are not the same,
or one is larger or smaller than the other.
The test of the hypothesis is based on a constructed random variable, the test statistic, with certain probability density function (pdf). For example:
The significance of the test result is measured by a
pre-determined significance level, denoted by
(typically
), based on which the
critical (rejection) region is defined as the
region in the domain of the pdf of the test statistic
so that the probability for the value of the test
statistic to fall inside the region is
. The
lower bound of the region is the critical value.
The p-value, denoted by , is the probability of
finding the observed or more extreme data toward the
direction of the alternative hypothesis
, given
that
is true.
If the value of the test statistic falls inside the critical
(rejection) region, or, alternatively and equivalently,
, then the null hypothesis
is rejected due
to the occurrence of a small-probability event according to
. Otherwise we fail to reject
.