7. Product and Process Comparisons 7.1. Introduction 7.1.5. What is the relationship between a test and a confidence interval? 

There is a correspondence between hypothesis testing and confidence intervals 
In general, for every test of hypothesis there is an equivalent
statement about whether the hypothesized parameter value is
included in a confidence interval. For example, consider the
previous example of linewidths where
photomasks are tested to ensure that their linewidths have a mean
of 500 micrometers. The null and alternative hypotheses are:
H_{a}: mean linewidth 500 micrometers 
Hypothesis test for the mean 
For the test, the sample mean, ,
is calculated from N linewidths chosen at random positions
on each photomask. For the purpose of the test, it is assumed that
the standard deviation,
, is known
from a long history of this process. A test statistic is calculated
from these sample statistics, and the null hypothesis is rejected if:
where z_{α/2} and z_{1α/2} are tabled values from the normal distribution. 
Equivalent confidence interval 
With some algebra, it can be seen that the null hypothesis is
rejected if and only if the value 500 micrometers is not in the
confidence interval

Equivalent confidence interval  In fact, all values bracketed by this interval would be accepted as null values for a given set of test data. 