A confidence interval is a range of values within which it is believed that a certain unknown population parameter (often the mean) will fall with a certain degree of confidence. The percentage of confidence is denoted (1 - α)%.
A test of significance is a test to ascertain whether or not the value of an unknown population parameter is as stated by an individual or institution. This test is carried out at a significance level of α, which determines the size of the rejection region.
Note how the confidence interval is related to the test statistic. They are linked by the rejection point(s).
The likelihood that the z-value will be less than the test statistic is what is being tested. Setting up this inequality, and rearranging, the test is:
Confidence intervals can be used to test hypotheses. Note that the right side of the equation is the left endpoint of the confidence interval. Essentially, if the confidence interval contains the value of the unknown population parameter as hypothesized under H0, then H0 would not be rejected in a two-sided hypothesis test with corresponding α; if the confidence interval does not contain the value of the unknown population parameter as hypothesized under H0, then H0 would be rejected in a two-sided hypothesis test with corresponding α.
The reason for the above determination is as follows:
This comparison can be used only for two-sided tests, not one-sided tests, because confidence intervals cannot be linked with one-sided tests.