<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>38.1.2.3 Darts</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>A target is made of three concentric circles of radii \(r_1 = \displaystyle{@a/sqrt(3)@}\), \(r_2 = {@a@}\) and \(r_3={@a*sqrt(3)@}\) <span>metres</span>. Shots within
the inner circle count \({@s@}\) points, within the middle band \({@s-g@}\) points and within the outer band \({@s-2*g@}\) points. (Shots outside the target count zero.) The distance of a shot from the centre of the
target is a random variable \(R\) with density function \(f(r) = \dfrac{{@b@}}{ \pi ({@c@}+r^2)}\) , \(r &gt; 0\). Calculate the
expected value of the score after five shots.<br></p><p>Expected value of the score after five shots: [[input:ans1]] [[validation:ans1]]</p><p></p><p></p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<h4 class="HELM_solution">Solution</h4>
First we need to calculate the following probabilities:
<p>\(\begin{aligned} P( \text{shot within inner circle}) &amp; = P(0&lt;r&lt;{@a*1/sqrt(3)@}) = \displaystyle{\int_0^{{@a*1/sqrt(3)@}}} {@f(r)@} \; dx \\ &amp;= \dfrac{2}{\pi} tan^{-1} (\dfrac{r}{{@a@}}) |_0^{{@a*1/sqrt(3)@}} = {@Pin@} \end{aligned}\)</p>
<p>\(\begin{aligned} P( \text{shot within middle band}) &amp; = P({@a*1/sqrt(3)@}&lt;r&lt;{@a@}) = \displaystyle{\int_{{@a*1/sqrt(3)@}}^{{@a@}}} {@f(r)@} \; dx \\ &amp; = \dfrac{2}{\pi} tan^{-1} (\dfrac{r}{{@a@}}) |_{{@a*1/sqrt(3)@}}^{{@a@}} = {@Pmid@} \end{aligned}\)</p>
<p>\(\begin{aligned} P( \text{shot within outer band}) &amp; = P({@a@}&lt;r&lt;{@a*sqrt(3)@}) = \displaystyle{\int_{{@a@}}^{{@a*sqrt(3)@}}} {@f(r)@} \; dx\\ &amp; = \dfrac{2}{\pi} tan^{-1} (\dfrac{r}{{@a@}}) |_{{@a@}}^{{@a@}\sqrt(3)} = {@Pout@} \end{aligned}\)<br></p>
<p>\(P( \text{miss target})= \displaystyle{1 -&nbsp;{@Pin@} -&nbsp;{@Pmid@} -&nbsp;{@Pout@} ={@Pmiss@}}.\)<br></p>
<p>Next, we define a random variable S according to the score obtained (our radnom space is \(\{{@s@}, {@s-g@},&nbsp;{@s-2*g@}, 0 \}\)), i.e.&nbsp;</p>
<p>\(P(S={@s@})=P( \text{shot within inner circle})=\displaystyle{{@Pin@}}\)</p>
<p>\(P(S={@s-g@})=P( \text{shot within middle band})=\displaystyle{{@Pmid@}}\)<br></p>
<p>\(P(S={@s-2*g@})=P( \text{shot within outer band})=\displaystyle{{@Pout@}}\)<br></p>
<p>\(P(S=0)=P( \text{miss target})=\displaystyle{{@Pmiss@}}.\)<br></p>
<p>Finally, we calculate the expected value of the score after five shots:</p>
<p>\(\begin{aligned} E[S+S+S+S+S] &amp; = E[5S] = 5E[S] \\ &amp; = \displaystyle 5 \left( {@s@}\cdot{@Pin@} +{@s-g@}\cdot {@Pmid@} + {@s-2*g@}\cdot{@Pout@} +0\cdot{@Pmiss@} \right) \\ &amp;= 5\cdot{@E@} = {@ta1@}. \end{aligned}\)</p>
<p></p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2021072200</text>
    </stackversion>
    <questionvariables>
      <text>a:rand([1,2,3,4,5,6,7,8,9,10]);
b:2*a;
c:a^2;
f(r):=b/(%pi*(c+r^2));
Pin: integrate(f(r),r,0,a*1/sqrt(3));
Pmid: integrate(f(r),r,a*1/sqrt(3),a*1);
Pout: integrate(f(r),r,a*1,a*sqrt(3));
Pmiss: 1-Pin-Pmid-Pout;
s:rand([5,6,7,8,9,10]);
g:rand([1,2]);
E:Pin*s+Pmid*(s-g) + Pout*(s-2*g) + 0*Pmiss;
ta1:5*E;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:prt1]]<br></p><p></p><p><br></p><p></p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\(f(r)={@f(r)@}\) ; shots:\({@s@}, \, {@s-g@}, \, {@s-2*g@}\) ; expected value: {@ta1@}</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>none</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>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>Type in fraction.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords>e integrate </forbidwords>
      <allowwords/>
      <forbidfloat>1</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>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <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>
    <deployedseed>1592055618</deployedseed>
    <deployedseed>30153373</deployedseed>
    <deployedseed>472515672</deployedseed>
    <deployedseed>1807191781</deployedseed>
    <deployedseed>560399236</deployedseed>
    <deployedseed>1717658176</deployedseed>
    <deployedseed>1826370190</deployedseed>
    <deployedseed>1476077669</deployedseed>
    <deployedseed>1916610453</deployedseed>
    <deployedseed>1915918385</deployedseed>
    <deployedseed>1179047611</deployedseed>
    <deployedseed>1259159241</deployedseed>
    <deployedseed>78558259</deployedseed>
    <deployedseed>93806731</deployedseed>
    <deployedseed>539287067</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev(ta1+1,simp)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
