<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>41.2.1.1 Tests of proportion</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<h3>Tests of proportion</h3>
<p><br></p>
<h4>Problem 1</h4>
 <p>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?</p>

 <p><strong>Analysis</strong></p>
 <p>Firstly, we set up two hypotheses concerning the control modules. The first hypothesis, called the null hypothesis is denoted by</p>
<p> \(\qquad H_0:\ \ \) 99% of the control modules match SwitchRight’s specification.</p>
<p>  The second hypothesis, called the alternative hypothesis and is denoted by</p> 
 <p> \(\qquad H_1:\ \ \) less than 99% of the control modules match SwitchRight’s specification.</p>

 <p> 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.</p>

 <p> 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.</p>

 <p> 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:<p>
<p> \(\qquad X\sim B(1000,p)\)</p>
<p> \(\qquad\displaystyle H_0:\ \ p=0.99\qquad\quad H_1:\ \ p&lt;0.99\)</p>

<p>  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\) <strong>is correct</strong> until we can show otherwise. </p>

<p> Given that \(H_0\) is correct we can calculate the mean \(\mu\) and the standard deviation \(\sigma\) of the distribution as follows:</p>
<p> \(\qquad\displaystyle \mu=np=1000\times 0.99=990\)</p>
 <p> \(\displaystyle\qquad \sigma=\sqrt{np(1-p)}=\sqrt{1000\times0.99\times 0.01}=3.15\) </p>

<p>  Notice that
 (a) \(np&gt;5\) and (b) \(n(1-p)&gt;5\)</p>
<p>  so that we can use the normal approximation to the binomial distribution, that is</p>
<p> \(\displaystyle\qquad B(1000,0.99)\approx N(990,3.15^2)\)</p>
<p> 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.</p>

<p> In practice, we use the tail(s) of the standard normal distribution and convert a problem involving the distribution \(N(\mu ,\sigma^2)\) into one involving the distribution \(N(0,1)\). Diagrammatically the situation can be represented as shown below:&nbsp;</p><p><img src="@@PLUGINFILE@@/41.2-figure1-normal.svg" alt="A graph showing the described normal distribution" width="325" height="127" class="img-fluid atto_image_button_text-bottom"><br></p>
<p>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%.</p>
<p> Given this information and a set of tables for the standard normal distribution we can assign values to the limits defining the tails.</p>

 <p style="text-align: center">
   <em>Throughout this Workbook we shall use the 5% proportion to</em>
 </p>
 <p style="text-align: center">
   <em>define the tail(s) of a distribution unless otherwise stated.</em>
 </p>

 <p>In the case we have here, the alternative hypothesis states that \(p\) is <strong>less</strong> than 0.99. Because of this we use only one tail occupying a <strong>total</strong> of 5% of the distribution.</p>
<p>  To discover where the number 985 lies within the distribution (tail or main body) we standardise 985 with respect to the normal distribution \(N(990,3.15^2)\) in the usual way (see 39). The calculation is:</p>
<p> \(\qquad\displaystyle P(X\le 985)=P\left(Z\le\frac{985.5-990}{3.15}\right)=P(Z\le -1.43)\)</p>
 <p> Notice that 985.5 is used and not 985. This because we are using a <em>continuous</em> normal distribution to approximate a <em>discrete</em> binomial distribution and so</p>
<p> \(\qquad\displaystyle P(X=985)\approx P(984.5\le X\le 985.5)\)</p>
 <p> the right-hand side being calculated from the normal distribution.</p> 

 <p> 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 <strong>prove</strong> that the claim is true.</p>

<p> 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 <strong>5% level of significance</strong>.</p>
 <p> The situation is represented by the following three figures: </p>&nbsp;<img src="@@PLUGINFILE@@/41.2-figure2-normal2.svg" alt="A normal distribution showing a 2-sided hypothesis, with 2.5% in each tail" width="499" height="128" class="img-fluid atto_image_button_text-bottom"><p><img src="@@PLUGINFILE@@/41.2-figure3-normal3.svg?time=1755688257471" alt="A normal distribution showing a 1-sided hypothesis, with 5% in the right-hand tail" width="464" height="115" class="img-fluid atto_image_button_text-bottom"><br></p><p><img src="@@PLUGINFILE@@/41.2-figure4-normal4.svg" alt="A normal distribution showing a 1-sided hypothesis, with 5% in the left-hand tail" width="459" height="127" class="img-fluid atto_image_button_text-bottom"><br>
<p>The values \(\pm1.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%.</p>
 <p> The corresponding values of \(Z\) are \(\pm 2.58\), \(+2.33\) and \(-2.33\) depending on whether a one-tailed or a two-tailed test is being performed.</p>
<p> Particular note must always be taken of the form of the hypotheses and the corresponding test, one-tailed or two-tailed.</p>
 
<p><br></p>
<h5> Extracts from the normal probability integral table</h5>
 <p><strong>Case 1 - 5% level of significance</strong></p>
<p> <table class="HELM_table">
  <thead>
    <tr>
	<th>\[Z=\dfrac{X-\mu}{\sigma}\]</th> <th>0.00</th> <th>0.01</th> <th>0.02</th> <th>0.03</th> <th>0.04</th> <th>0.05</th> <th>0.06</th> <th>0.07</th> <th>0.08</th> <th>0.09</th> </tr> </thead>
	<tbody> <tr> <td>1.6</td> <td>.4452</td> <td>4463</td> <td>4474</td> <td>4485</td> <td>4495</td> <td>4505</td> <td>4515</td> <td>4525</td> <td>4535</td> <td>4545</td> </tr>
	<tr> <td>1.9</td> <td>.4713</td> <td>4719</td> <td>4726</td> <td>4732</td> <td>4738</td> <td>4744</td> <td>4750</td> <td>4756</td> <td>4762</td> <td>4767</td> </tr> </tbody> </table> <p></p>
 
  <p><strong>Case 2 - 1% level of significance</strong></p>
 <table class="HELM_table">
  <thead>
    <tr><th>\[Z=\dfrac{X-\mu}{\sigma}\]</th> <th>0.00</th> <th>0.01</th> <th>0.02</th> <th>0.03</th> <th>0.04</th> <th>0.05</th> <th>0.06</th> <th>0.07</th> <th>0.08</th> <th>0.09</th></tr></thead>
	<tbody> <tr> <td>2.3</td> <td>.4893</td> <td>4896</td> <td>4898</td> <td>4901</td> <td>4904</td> <td>4906</td> <td>4909</td> <td>4911</td> <td>4913</td> <td>4916</td></tr>
	<tr> <td>2.5</td> <td>.4938</td> <td>4940</td> <td>4941</td> <td>4943</td> <td>4945</td> <td>4946</td> <td>4948</td> <td>4949</td> <td>4951</td> <td>4952</td></tr>
  </tbody>
</table></p>
 
 <p>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.</p>

<p><br></p>
<h4>Problem 2</h4>
 <p>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?</p>

<p><strong>Analysis</strong></p>
<p> 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 </p>
<p>\(\qquad\displaystyle X\sim B(60,p)\)</p>
<p>where \(p\) is the probability that a casting passes the inspection.</p>
<p> 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. </p>
<p>The problem can be summarised as:</p>
<p> \(\qquad\displaystyle X\sim B(60,p)\) </p>
<p>\(\qquad\displaystyle H_0:\ \ p=0.90\qquad\quad H_1:\ \ p&gt;0.90\)<p>

<p><strong>The form of the alternative hypothesis dictates that we do a one-tailed test.</strong></p>
<p>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: </p>
<p> \(\qquad\displaystyle \mu=np=60\times 0.90=54\) </p>
<p> \(\qquad\displaystyle \sigma=\sqrt{np(1-p)}=\sqrt{60\times 0.90\times 0.10}=2.32\) </p>
<p>Notice that </p>
<p> &nbsp; (a) \( np&gt;5 \) &nbsp; and &nbsp; (b) \(n(1-p)&gt;5\) </p>
<p>so that we can use the normal approximation to the binomial distribution, that is</p>
<p>\(\qquad\displaystyle B(60,0.90)\approx N(54,2.32^2)\)</p>
<p>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: </p>
<p>\(\qquad\displaystyle H_0:\ \ p=0.90\qquad H_1:\ \ p&gt;0.90\)</p>
<p>so that we must do a one-tailed test with a critical value of \(Z=1.645\).</p>
<p>The calculation is:</p>
<p> \(\qquad\displaystyle P(X\ge59)=P\left(Z\ge\frac{58.5-54}{2.32}\right)=P(Z\ge 1.94)\) </p>
The situation is represented by the following figure.&nbsp;</p><p><img src="@@PLUGINFILE@@/41.2-figure5-normalisation.svg" alt="A figure depicting the normalisation of the random variable X" width="684" height="159" class="img-fluid atto_image_button_text-bottom"><br></p>
<p>Since \(1.94&gt;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.</p></p>]]></text>
<file name="41.2-figure1-normal.svg" path="/" encoding="base64">[encoded data, 27408 characters]</file>
<file name="41.2-figure2-normal2.svg" path="/" encoding="base64">[encoded data, 54024 characters]</file>
<file name="41.2-figure3-normal3.svg" path="/" encoding="base64">[encoded data, 49540 characters]</file>
<file name="41.2-figure4-normal4.svg" path="/" encoding="base64">[encoded data, 50736 characters]</file>
<file name="41.2-figure5-normalisation.svg" path="/" encoding="base64">[encoded data, 44160 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
