<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>37.2.3.12 A service engineer can be called (NOT IN QUIZ)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p><p>A service engineer can be called out for maintenance on the photocopiers in the offices of four large companies, A, B, C and D. On any given week there is a probability of {@p@} that he will be called to each of these companies. The event of being called to one company is independent of whether or not he is called to any of the others.</p><p>Find the probability that, on a particular day:</p>
<ol class="HELM_parts">

<li><p>he is called to all four companies: [[input:ans1]] [[validation:ans1]] [[feedback:prt1]]</p></li>

<li><p>he is called to at least three companies: [[input:ans2]] [[validation:ans2]] [[feedback:prt2]]</p></li>

</ol>

<p>Finally, find the expected value:&nbsp;[[input:ans5]] [[validation:ans5]] [[feedback:prt5]] and variance:&nbsp;[[input:ans6]] [[validation:ans6]] [[feedback:prt6]] of the number of these companies which call the engineer on a given day.</p><p><b>Note</b>: please round your answers to \(4\) decimal places.</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p><b>SOLUTION:</b></p><p>Let \( Y \) be the number of companies to which the engineer is called and let \( A \) denote the event that the engineer is called to company A.</p>
<ol class="HELM_parts">

<li><p>\(\text{P}(Y=4) = {@p@}^{4} = {@ta_1@} \)</p></li>

<li><p>\(\text{P}(Y \geq 3) = \left( \begin{array}{c} 4 \\ 3 \end{array} \right) \times  {@p@}^{3} \times {@1 - p@}^{1} + {@p@}^{4} = {@ta_2@} \)</p></li>
<br><p>Finally, if you remember the formulas given in a previous Key point, the mean is \( \text{E}(Y) = np = 4 \times {@p@} = {@ta_5@}. \) The variance is \( V(Y) = np(1-p) = 4 \times {@p@} \times {@1-p@} = {@ta_6@} \)</p></ol>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020070100</text>
    </stackversion>
    <questionvariables>
      <text>p: 0.1 + 0.1*rand(8)
ta_1: decimalplaces(p^4,4)
ta_2: decimalplaces(4*(p^3)*(1-p) + p^4,4)
ta_3: decimalplaces((p^4)/(1 - (1-p)^4),4)
ta_4: decimalplaces(p^3,4)
ta_5: decimalplaces(4*p,4)
ta_6: decimalplaces(4*p*(1-p),4)</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\(\text{P}(Y=4) = {@ta_1@} \), \(\text{P}(Y \geq 3) = {@ta_2@}\), \( \text{E}(Y) = {@ta_5@}\), \( V(Y) = {@ta_6@}\)</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>ta_1</tans>
      <boxsize>4</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:4</options>
    </input>
    <input>
      <name>ans2</name>
      <type>numerical</type>
      <tans>ta_2</tans>
      <boxsize>4</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:4</options>
    </input>
    <input>
      <name>ans5</name>
      <type>numerical</type>
      <tans>ta_5</tans>
      <boxsize>4</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:4</options>
    </input>
    <input>
      <name>ans6</name>
      <type>numerical</type>
      <tans>ta_6</tans>
      <boxsize>4</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:4</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>NumAbsolute</answertest>
        <sans>ans1</sans>
        <tans>ta_1</tans>
        <testoptions>0.0001</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>NumAbsolute</answertest>
        <sans>ans2</sans>
        <tans>ta_2</tans>
        <testoptions>0.0001</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>
    <prt>
      <name>prt5</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumAbsolute</answertest>
        <sans>ans5</sans>
        <tans>ta_5</tans>
        <testoptions>0.0001</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt5-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt5-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt6</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumAbsolute</answertest>
        <sans>ans6</sans>
        <tans>ta_6</tans>
        <testoptions>0.0001</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt6-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt6-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1949041004</deployedseed>
    <deployedseed>1615340875</deployedseed>
    <deployedseed>40654390</deployedseed>
    <deployedseed>1753797241</deployedseed>
    <deployedseed>1971558844</deployedseed>
    <deployedseed>1692867290</deployedseed>
    <deployedseed>1690488024</deployedseed>
    <deployedseed>771117991</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta_1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta_2</value>
      </testinput>
      <testinput>
        <name>ans5</name>
        <value>ta_5</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value>ta_6</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>
      <expected>
        <name>prt5</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt5-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt6</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt6-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>2</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta_2</value>
      </testinput>
      <testinput>
        <name>ans5</name>
        <value>ta_5</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value>ta_6</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>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt5-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt6</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt6-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
