<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>9.4.5 (Example of calculating binomial probability)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<h3>Example</h3>

<p>An archer has a \(90\%\) chance of hitting a target with each arrow they fire. If five arrows are fired determine:</p>
<ol> 
<li>The chance of hitting the target twice.</li>
<li>The chance of hitting the target at most three times.</li>
</ol>

<h3>Solution</h3>

<p>Begin by noticing that this is a binomial experiment where the probability of success is \(0.9\). Let \(X\) be the number of arrows to hit the target. From the definition above we can calculate the probability function of \(X\) as
\[
p(x) = {n \choose x} p^x(1-p)^{n-x} = {5 \choose x} 0.9^x(0.1)^{5-x}.
\]
We can use this to find the required probabilities. 
</p>
<ol> 
<li>The chance of hitting the target twice is the quantity P(X = 2), thus substituting this into the probability function we have 
\[
P(X = 2) = {5 \choose 2} 0.9^2(0.1)^{3} = 10 \times 0.81 \times 0.0001 =0.0081
\]</li>
<li>The chance of hitting the target at most three times is the quantity \(P(X \leq 3)\). We can calculate this as:
\[
\begin{align*}
P(X \leq 3) &= P(X=0) + P(X=1) + P(X=2) + P(X=3)
\\
&= {5 \choose 0} 0.9^0(0.1)^{5} + {5 \choose 1} 0.9^1(0.1)^{4} + {5 \choose 2} 0.9^2(0.1)^{3} + {5 \choose 3} 0.9^3(0.1)^{2}
\\
&= (0.1)^5 + 5 (0.9)(0.1)^4 + 10(0.9)^2(0.1)^3 + 10(0.9)^3(0.1)^2 
\\
&\approx 0.0815.
\end{align*}
\]</li>
</ol>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
