<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>(not in quiz) 37.3.3.10 The Poisson Process: Factory tools</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p></p><p></p>A factory uses tools of a particular type. From time to time failures in these tools occur and
they need to be replaced. The number of such failures in a day has a Poisson distribution with
mean \({@a@}\). At the beginning of a particular day there are five replacement tools in stock. A
new delivery of replacements will arrive after four days. If all five spares are used before the
new delivery arrives then further replacements cannot be made until the delivery arrives.
Find<p></p>
<ol class="HELM_parts_inline">
<li>&nbsp;the probability that three replacements are needed over the next four days: [[input:ans1]] [[validation:ans1]]</li>
<p></p><li>&nbsp;the expected number of replacements actually made over the next four days: [[input:ans2]] [[validation:ans2]]</li><br></ol>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<h4 class="HELM_solution">Solution</h4>
<ol class="HELM_parts_inline">
<li>&nbsp;Let \(X\) be the number of replacements required over four days. Then \(E[X]=4 \cdot {@a@}={@la@}\) and \(X~\) Poisson(\(5\)). Hence, \(P(X=3)={@la@}^3 \cdot e^{-{@la@}} / 3!={@ta1@}.\)</li><p></p><li>&nbsp;Let \(R\) be the number of replacements made. Then,<br>&nbsp; &nbsp; &nbsp; &nbsp; \(E[R]= \displaystyle{\sum_{i=0}^4} i \cdot P(X=i) + 5 \cdot P(X\geq 5),\)<br>and<br>&nbsp; &nbsp; &nbsp; &nbsp; \(P(X\geq 5)=1 - [P(X=0)+ \dots + P(X=4)]. \)<br>Hence,<br>&nbsp; &nbsp; &nbsp; &nbsp; \(E[R]= 5 - 5\cdot P(X=0) - 4 \cdot P(X=1) - 3 \cdot P(X=2) - 2 \cdot P(X=3) - 1 \cdot P(X=4)= {@ta2@}.\)<br></li><br></ol>
<p><br></p><br>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020070100</text>
    </stackversion>
    <questionvariables>
      <text>a:rand([1.25,1.5,1.75,2]);
rnddp(x,dp):=float((round(x*10^dp)/10^dp));
la: a*4;
s1: la^3 * %e^(-la)/3!;
ta1:float(rnddp(s1,4));
s2: 5-5*(la^0 * %e^(-la)/0!) - 4*(la^1 * %e^(-la)/1!) -3*(la^2 * %e^(-la)/2!) - 2*(la^3 * %e^(-la)/3!) - 1*(la^4 * %e^(-la)/4!);
ta2:float(rnddp(s2,3));</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[[[feedback:prt1]]&nbsp;<p></p><p>[[feedback:prt2]]</p><p><br></p><p></p><p></p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>{@a@} ; {@ta1@} ; {@ta2@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:green;"><i class="fa fa-check"></i></span> Correct answer, well done.]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:orange;"><i class="fa fa-adjust"></i></span> Your answer is partially correct.]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:red;"><i class="fa fa-times"></i></span> Incorrect answer.]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans1</name>
      <type>numerical</type>
      <tans>ta1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>1</insertstars>
      <syntaxhint>Round to 4 decimal places.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans2</name>
      <type>numerical</type>
      <tans>ta2</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>1</insertstars>
      <syntaxhint>Round to 4 significant figures.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumDecPlaces</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions>4</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumSigFigs</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions>4</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>167224224</deployedseed>
    <deployedseed>1469797830</deployedseed>
    <deployedseed>787285063</deployedseed>
    <deployedseed>898210132</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>2</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
