linguistic:voice_change, quality:correction
Calculation

Usually, T {\displaystyle T} is a test statistic. A test statistic is the output of a scalar function of all the observations. This statistic provides a single number, such as a t -statistic or an F -statistic. As such, the test statistic follows a distribution determined by the function used to define that test statistic and the distribution of the input observational data.

For the important case in which the data are hypothesized to be a random sample from a normal distribution, depending on the nature of the test statistic and the hypotheses of interest about its distribution, different null hypothesis tests have been developed. Some such tests are the z -test for hypotheses concerning the mean of a normal distribution with known variance, the t -test based on Student's t -distribution of a suitable statistic for hypotheses concerning the mean of a normal distribution when the variance is unknown, the F -test based on the F -distribution of yet another statistic for hypotheses concerning the variance. For data of other nature, for instance, categorical (discrete) data, test statistics might be constructed whose null hypothesis distribution is based on normal approximations to appropriate statistics obtained by invoking the central limit theorem for large samples, as in the case of Pearson's chi-squared test.

Thus computing a p -value requires a null hypothesis, a test statistic (together with deciding whether the researcher is performing a one-tailed test or a two-tailed test), and data. Even though computing the test statistic on given data may be easy, computing the sampling distribution under the null hypothesis, and then computing its cumulative distribution function (CDF) is often a difficult problem. Today, this computation is done using statistical software, often via numeric methods (rather than exact formulae), but, in the early and mid 20th century, this was instead done via tables of values, and one interpolated or extrapolated p -values from these discrete values. Rather than using a table of p -values, Fisher instead inverted the CDF, publishing a list of values of the test statistic for given fixed p -values; this corresponds to computing the quantile function (inverse CDF).