The process of computing a numerical value, known as the test statistic, that is used to determine the likelihood of observing a particular outcome under a specified statistical hypothesis. This calculation is a crucial step in hypothesis testing, where the test statistic is compared to a critical value to assess the significance of the observed data and make inferences about the population parameters.