<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>39.1.5.3 Exercises - Question 2</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>

<p>  If \(Z\) has a standard normal distribution, find \(k\)&nbsp; to 2 decimal places in each of the following cases:</p><ol class="HELM_parts">

<li><p>If \(\text{P}(Z &lt; k) = {@numa@}\), then \(k =\) [[input:ans1]] [[validation:ans1]] [[feedback:prt1]] </p></li>

<li><p>If \(\text{P}(Z &lt; k) = {@numb@}\), then \(k =\) [[input:ans2]] [[validation:ans2]] [[feedback:prt2]] </p></li>

<li><p>If \(\text{P}(0 &lt; Z &lt; k) = {@numc@}\), then \(k=\) [[input:ans3]] [[validation:ans3]] [[feedback:prt3]] </p></li>

</ol>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<h4 class="HELM_solution">Solution</h4><ol class="HELM_parts"><li>As \(\text{P}(Z &lt; k) &lt; 0.5\) then the value for \(k\) will be negative. The standard Normal table only provides values, so we first need to transform the probability using the symmetry of the Normal distribution: \(\text{P}(Z &lt; k) = \text{P}(Z &gt; -k) = 1 - \text{P}(Z &lt; -k)\) where the last equality comes from applying the complement rule. Next we need to partition the probability with respect to the mean of \(0\):&nbsp;\(\text{P}(Z &lt; k) = 1 - \left[\text{P}(Z&lt;0) + \text{P}(0&lt;Z&lt;-k)\right] = 0.5 - \text{P}(0&lt;Z&lt;-k)\) since \(\text{P}(Z&lt;0) = 0.5\). Therefore: \[\begin{align*}\text{P}(Z &lt; k) &amp;= {@displaydp(numa,4)@}\\0.5 - \text{P}(0&lt;Z&lt;-k) &amp; =&nbsp; {@displaydp(numa,4)@}\\ \text{P}(0&lt;Z&lt;-k) &amp; = {@displaydp(0.5-numa,4)@}\end{align*}\] Reading from the standard Normal table we see that \(-k = {@displaydp(-ta1,2)@}\) and so \(k = {@displaydp(ta1,2)@}\) to 2 decimal places.</li>

<li>As \(\text{P}(Z &lt; k) &gt; 0.5\) then the value for \(k\) will be positive. Partitioning the probability with respect to the mean of \(0\) gives: \[\begin{align*} \text{P}(Z &lt; k) &amp;= {@displaydp(numb,4)@}\\&nbsp;\text{P}(Z &lt; 0) + \text{P}(0 &lt;Z &lt; k) &amp;= {@displaydp(numb,4)@}\\ \text{P}(0 &lt;Z &lt; k) &amp;= {@displaydp(numb,4)@} - \text{P}(Z &lt; 0)\\&nbsp;\text{P}(0 &lt;Z &lt; k) &amp;= {@displaydp(numb-0.5,4)@} \end{align*}\] Reading from the standard Normal table we see that \(k = {@displaydp(ta2,2)@}\) to 2 decimal places.</li>

<li>The structure of the probability is in the correct for to apply the standard Normal table, which we can read directly to find that \(k = {@displaydp(ta3,2)@}\) to 2 decimal places.</li>

</ol>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2021072200</text>
    </stackversion>
    <questionvariables>
      <text>ta1: decimalplaces(float(rand_with_step(-0.50, -0.30, 0.01)),2);
ta2: decimalplaces(float(rand_with_step( 1.60,  1.80, 0.01)),2);
ta3: decimalplaces(float(-ta1),2);

numa: decimalplaces(float(cdf_normal(ta1,0,1)),4);
numb: decimalplaces(float(cdf_normal(ta2,0,1)),4);
numc: decimalplaces(float(cdf_normal(ta3,0,1)-0.5),4);

checka: decimalplaces(float(quantile_normal(numa,0,1)),2);
checkb: decimalplaces(float(quantile_normal(numb,0,1)),2);
checkc: decimalplaces(float(quantile_normal(numc+0.5,0,1)),2);

/*
tablea: significantfigures(rand([1179, 1217, 1255, 1293, 1331, 1368, 1406, 1443, 1480, 1517, 1555, 1591, 1628, 1664, 1700, 1736, 1772, 1808, 1844, 1879]),4);
enta: decimalplaces(float(tablea/10000),4);
numa: decimalplaces(float(0.5-enta),4);
valuea: decimalplaces(float(quantile_normal(numa,0,1)),2);
minusvaluea: decimalplaces(-valuea,2);

tableb:significantfigures(rand([4452, 4463, 4474, 4484, 4495, 4505, 4515, 4525, 4535, 4545, 4554, 4564, 4573, 4582, 4591, 4599, 4608, 4616, 4625, 4633]),4);
entb:decimalplaces(float(tableb/10000),4);
numb:decimalplaces(float(0.5+entb),4);
valueb:decimalplaces(float(quantile_normal(numb,0,1)),2);

numc:enta;
valuec:minusvaluea;

ta1:valuea;
ta2:valueb;
ta3:valuec;
*/</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Numbers = \(\{{@numa@}, {@numb@}, {@numc@}\}\), Answers = \(\{{@ta1@}, {@ta2@}, {@ta3@}\}\), Check = \(\{{@checka@}, {@checkb@}, {@checkc@}\}\)</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>dispdp(ta1,2)</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>2 d.p.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:2, mindp:2</options>
    </input>
    <input>
      <name>ans2</name>
      <type>numerical</type>
      <tans>dispdp(ta2,2)</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>2 d.p.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:2, mindp:2</options>
    </input>
    <input>
      <name>ans3</name>
      <type>numerical</type>
      <tans>dispdp(ta3,2)</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>2 d.p.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>maxdp:2, mindp:2</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>2</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>NumDecPlaces</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions>2</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>prt3</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumDecPlaces</answertest>
        <sans>ans3</sans>
        <tans>ta3</tans>
        <testoptions>2</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt3-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt3-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1193540556</deployedseed>
    <deployedseed>345421054</deployedseed>
    <deployedseed>58677855</deployedseed>
    <deployedseed>1593401563</deployedseed>
    <deployedseed>216724312</deployedseed>
    <deployedseed>838028539</deployedseed>
    <deployedseed>1839486529</deployedseed>
    <deployedseed>1562358276</deployedseed>
    <deployedseed>2016378684</deployedseed>
    <deployedseed>103465995</deployedseed>
    <deployedseed>687380998</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>dispdp(ta1,2)</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>dispdp(ta2,2)</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>dispdp(ta3,2)</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>prt3</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt3-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>dispdp(ev(ta1+1,simp),2)</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>dispdp(ev(ta2+1,simp),2)</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>dispdp(ev(ta3+1,simp),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>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt3-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
