1 Tests of proportion
1.1 Problem 1
SwitchRight, a manufacturer of engine management systems requires its supplier of control modules to supply modules with at least 99% complying with their specification. The quality control operators at SwitchRight check a random sample of 1000 control modules delivered to SwitchRight and find that 985 match the specification. Does this result imply that less than 99% of the control modules supplied do not match SwitchRight’s specification?
Analysis
Firstly, we set up two hypotheses concerning the control modules. The first hypothesis, called the null hypothesis is denoted by
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}$ 99% of the control modules match SwitchRight’s specification.
The second hypothesis, called the alternative hypothesis and is denoted by
$\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}$ less than 99% of the control modules match SwitchRight’s specification.
The alternative hypothesis is essentially saying that in this case, that SwitchRight cannot rely on its supplier of control modules supplying delivering batches of modules where 99% match SwitchRight’s specification.
Secondly, we describe the random sample from a statistical point of view, that is we find a statistical distribution which describes the behaviour of the sample. Suppose that $X$ is the number of control modules in a random sample of 1000 matching SwitchRight’s specification.
We assume that the control modules are independent and that for each module the specification is either matched or it isn’t. Under these conditions, $X$ has a binomial distribution and the problem can be summarised as follows:
$\phantom{\rule{2em}{0ex}}X\sim B\left(1000,p\right)$
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p=0.99\phantom{\rule{2em}{0ex}}\phantom{\rule{1em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p<0.99$
Thirdly, we set up a mechanism to enable us to make a decision between the two hypotheses. This is done by assuming that ${H}_{0}$ is correct until we can show otherwise.
Given that ${H}_{0}$ is correct we can calculate the mean $\mu $ and the standard deviation $\sigma $ of the distribution as follows:
$\phantom{\rule{2em}{0ex}}\mu =np=1000\times 0.99=990$
$\phantom{\rule{2em}{0ex}}\sigma =\sqrt{np\left(1p\right)}=\sqrt{1000\times 0.99\times 0.01}=3.15$
Notice that
 $np>5$ and

$n\left(1p\right)>5$
so that we can use the normal approximation to the binomial distribution, that is
$\phantom{\rule{2em}{0ex}}B\left(1000,0.99\right)\approx N\left(990,3.1{5}^{2}\right)$
The sample value obtained is 985 and we now assess how close 985 is to the expected result of 990 by defining a remote left tail (in this case) of the normal distribution and asking if the number 985 occurs in the left tail of the distribution or in the main body of the distribution.
In practice, we use the tail(s) of the standard normal distribution and convert a problem involving the distribution $N\left(\mu ,{\sigma}^{2}\right)$ into one involving the distribution $N\left(0,1\right)$ . Diagrammatically the situation can be represented as shown below:
Figure 1
In general, the tails of a distribution can be defined to occupy any proportion of the distribution that we wish, the proportions chosen are usually taken as either 5% or 1%.
Given this information and a set of tables for the standard normal distribution we can assign values to the limits defining the tails.
Throughout this Workbook we shall use the 5% proportion to
define the tail(s) of a distribution unless otherwise stated.
In the case we have here, the alternative hypothesis states that $p$ is less than 0.99. Because of this we use only one tail occupying a total of 5% of the distribution.
To discover where the number 985 lies within the distribution (tail or main body) we standardise 985 with respect to the normal distribution $N\left(990,3.1{5}^{2}\right)$ in the usual way (see HELM booklet 39). The calculation is:
$\phantom{\rule{2em}{0ex}}P\left(X\le 985\right)=P\left(Z\le \frac{985.5990}{3.15}\right)=P\left(Z\le 1.43\right)$
Notice that 985.5 is used and not 985. This because we are using a continuous normal distribution to approximate a discrete binomial distribution and so
$\phantom{\rule{2em}{0ex}}P\left(X=985\right)\approx P\left(984.5\le X\le 985.5\right)$
the righthand side being calculated from the normal distribution.
The number $1.43$ is greater than (to the right of) $1.645$ and so the number 985 occurs in the main body of the distribution not in the left tail. This suggests that the evidence does not support the claim that the number of control modules supplied meeting SwitchRight’s specification is different from 99%. Essentially, we accept the null hypothesis since we do not have the evidence necessary to reject it. Note that this result does not prove that the claim is true.
Before looking at similar problems, we will look at the possible ways of defining the tails of the standard normal distribution. As stated previously, we shall, in these notes, always use a total of 5% for the tail or tails of a distribution.
We say that we are making a decision at the 5% level of significance . The situation is represented by the following three figures:
Figure 2
Figure 3
Figure 4
The values $\pm 1.96$ , $+1.645$ and $1.645$ are easily obtained from the standard normal table (Table 1) given at the end of this Workbook. The appropriate lines from the table are reproduced on the following page for ease of reference. Note that it is sometimes advisable to be 99% sure (rather than 95% sure) of either correctly accepting or rejecting a null hypothesis. In this case we say that we are working at the 1% level of significance. The situation diagrammatically is exactly the same as the one shown above except that the 5% tail areas become 1% and the 2.5% areas become 0.5%.
The corresponding values of $Z$ are $\pm 2.58$ , $+2.33$ and $2.33$ depending on whether a onetailed or a twotailed test is being performed.
Particular note must always be taken of the form of the hypotheses and the corresponding test, onetailed or twotailed.
1.2 Extracts from the normal probability integral table
Case 1  5% level of significance
$Z=\frac{X\mu}{\sigma}$  0.00  0.01  0.02  0.03  0.04  0.05  0.06  0.07  0.08  0.09 
1.6  .4452  4463  4474  4485  4495  4505  4515  4525  4535  4545 
1.9  .4713  4719  4726  4732  4738  4744  4750  4756  4762  4767 
Case 2  1% level of significance
$Z=\frac{X\mu}{\sigma}$  0.00  0.01  0.02  0.03  0.04  0.05  0.06  0.07  0.08  0.09 
2.3  .4893  4896  4898  4901  4904  4906  4909  4911  4913  4916 
2.5  .4938  4940  4941  4943  4945  4946  4948  4949  4951  4952 
We shall now look at a problem which is similar in type to Problem 1 and solve it using the ideas discussed in the analysis of that problem.
1.3 Problem 2
The Head of Quality Control in a foundry claims that the castings produced in the foundry are ‘better than average.’ In support of this claim he points out that of a random sample of 60 castings inspected, 59 passed. It is known that the industry average percentage of castings passing quality control inspections is 90%. Do these results support the Head’s claim?
Analysis
Let $X$ denote the number of castings passing the quality control inspection from the sample of 60. Assuming that a casting either passes or fails the inspection process, we can assume that $X$ follows the binomial distribution
$\phantom{\rule{2em}{0ex}}X\sim B\left(60,p\right)$
where $p$ is the probability that a casting passes the inspection.
The null hypothesis ${H}_{0}$ , is that the probability that a casting passes the inspection is the same as the industry average. The alternative hypothesis ${H}_{1}$ , is that the Head of Quality Control is correct in his claim that castings produced in his foundry have a greater chance of passing the inspection. The problem can be summarised as:
$\phantom{\rule{2em}{0ex}}X\sim B\left(60,p\right)$
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p=0.90\phantom{\rule{2em}{0ex}}\phantom{\rule{1em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p>0.90$
The form of the alternative hypothesis dictates that we do a onetailed test.
If ${H}_{0}$ is correct we can calculate the mean and standard deviation of the binomial distribution above and, assuming that the appropriate condition are met, use the normal distribution with the same mean and standard deviation to solve the problem. The calculations are:
$\phantom{\rule{2em}{0ex}}\mu =np=60\times 0.90=54$
$\phantom{\rule{2em}{0ex}}\sigma =\sqrt{np\left(1p\right)}=\sqrt{60\times 0.90\times 0.10}=2.32$
Notice that
 $np>5$ and

$n\left(1p\right)>5$
so that we can use the normal approximation to the binomial distribution, that is
$\phantom{\rule{2em}{0ex}}B\left(60,0.90\right)\approx N\left(54,2.3{2}^{2}\right)$
In order to make a decision, we need to know whether or not the value 59 is in the remote tails of the distribution or in the main body. Recall that the hypotheses are:
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p=0.90\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p>0.90$
so that we must do a onetailed test with a critical value of $Z=1.645$ .
The calculation is:
$\phantom{\rule{2em}{0ex}}P\left(X\ge 59\right)=P\left(Z\ge \frac{58.554}{2.32}\right)=P\left(Z\ge 1.94\right)$
The situation is represented by the following figure.
Figure 5
Since $1.94>1.645$ , the result is significant at the 5% level and so we reject the null hypothesis. The evidence suggests that we accept the alternative hypothesis that, at the 5% level of significance, the Head of Quality Control is making a justified claim.
Task!
A firm manufactures heavy current switch units which depend for their correct operation on a relay. The relays are provided by an outside supplier and out of a random sample of 150 relays delivered, 140 are found to work correctly. Can the relay manufacturer justifiably claim that at least 90% of the relays provided will function correctly?
Let $X$ represent the number of relays working correctly. The required hypotheses are:
$\phantom{\rule{2em}{0ex}}X\sim B\left(150,p\right)\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p=0.90\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}p>0.90$
We perform a onetailed test with critical value $Z=1.645$ . The necessary calculations are:
$\phantom{\rule{2em}{0ex}}\mu =np=150\times 0.90=135$
$\phantom{\rule{2em}{0ex}}\sigma =\sqrt{np\left(1p\right)}=\sqrt{150\times 0.90\times 0.10}=3.67$
Since $np>5$ and $n\left(1p\right)>5$ , we can use the normal approximation to the binomial distribution. We approximate $B\left(150,0.90\right)\approx N\left(135,3.6{7}^{2}\right)$ . Hence:
$\phantom{\rule{2em}{0ex}}P\left(X\ge 140\right)=P\left(Z=\frac{139.5135}{3.67}\right)=P\left(Z\ge 1.23\right)$
Since $1.23<1.645$ we cannot reject the null hypothesis at the 5% level of significance.
There is insufficient evidence to support the manufacturer’s claim that at least 90% of the relays provided will function correctly.