This is an excerpt from the wikipedia article on test statistics:
Suppose the task is to test whether a coin is fair (i.e. has equal probabilities of producing a head or a tail). If the coin is flipped 100 times and the results are recorded, the raw data can be represented as a sequence of 100 heads and tails. If there is interest in the marginal probability of obtaining a head, only the number T out of the 100 flips that produced a head needs to be recorded. But T can also be used as a test statistic in one of two ways:
- the exact sampling distribution of T under the null hypothesis is the binomial distribution with parameters 0.5 and 100.
My interpretation of the first bullet: this saying that $T$ is a test statistic because we know that the distribution SHOULD be binomial with known parameters, so if the empirical distribution of T is too different than the binomial distribution, we would reject the null hypothesis that it's a fair coin.
If that interpretation is true, what would the mechanics of carrying out this test look like? In other words, how would we mark the threshold of what "too different" looks like when it comes to the empirical distribution and the binomial/null distribution?