The ideas of test statistics and pivots are very closely related.
If a function \(g(X_1, \dots, X_n, \theta)\) can be used as a pivot for \(\theta\), then \(g(X_1, \dots, X_n, \theta_0)\) can be used as a test statistic for testing whether \(\theta = \theta_0\).
To simplify the notation, we will express the distributions as \(Q(\theta) \sim \mathcal{Standard\;distn}\).
Relationship between confidence interval and test
Confidence intervals and tests about the parameter \(\theta\) are also closely related. The diagram below illustrates a possible standard distribution for \(Q(\theta) \sim \mathcal{Standard\;distn}\). The distribution could be a \(\NormalDistn(0,1)\) distribution, a \(\ChiSqrDistn(k \text{ df})\) distribution or any other standard distribution.
Quantiles of this distribution have also been shown with tail probabilities of \(\frac {\alpha}{2}\) in each tail and probability \((1 - \alpha)\) between them.
Because of this relationship between confidence intervals and tests, we can perform a hypothesis test from a confidence interval.
Test from confidence interval
If we reject the null hypothesis in a 2-tailed test about whether \(\theta = \theta_0\) when the parameter value \(\theta_0\) is outside a \((1 - \alpha)\) confidence interval for \(\theta\), then the test has significance level \(\alpha\).
Similarly, we can find a confidence interval based on a hypothesis test.
Confidence interval from test
A \((1 - \alpha)\) confidence interval can be found as the values \(\theta_0\) that are not rejected by a 2-tailed test of whether \(\theta = \theta_0\) at significance level \(\alpha\).
We will give examples of both in the following pages.