<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>38.1.1.2 Practical Example</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<hr>
<h4 class="HELM_example">Example</h4>
<p>This example will help you to see how continuous random variables arise and will help you to distinguish between continuous and discrete random variables.</p><p>Consider a de-magnetised compass needle mounted at its centre so that it can spin freely. Its initial
position is shown in Figure 1(a). It is spun clockwise and when it comes to rest the angle \(θ\), from the vertical, is measured. See Figure 1(b).<br></p><p style="text-align: center;">
<img src="@@PLUGINFILE@@/38.1%20figure%201%20%281%29.svg" alt="Initial position is north. The needle stops at a random position and its angle theta is measured clockwise." width="472" height="216" role="presentation" class="img-responsive atto_image_button_text-bottom"><br></p><p style="text-align: center;">"angle \(θ\) measured after each spin".</p><p>Firstly, note that \(X\) is a random variable since it can take any value in the interval \(0\) to \(2\pi\) and we cannot be sure in advance which value it will take. However, after each spin and thinking in probability terms, there are certainly two distinct questions we can ask.</p>
<ul><li>What is the probability that \(X\) lies between two values \(a, b\), i.e. what is \(\text{P}(a &lt; X &lt; b)\)?</li>
<li>What is the probability that \(X\) assumes a <i>particular </i>value, say \(c\). We are really asking what is the value of \(\text{P}(X = c)\)?</li></ul>
<p>The first question is easy to answer provided we assume that the probability of the needle coming to rest in a given interval is given by the formula:</p><p>\(\text{Probability} = \dfrac{\text{Given interval in radians}}{\text{Total interval in radians}}=\dfrac{\text{Given interval in radians}}{2\pi}.\)</p><p>The following results are easily obtained and they clearly coincide with what we intuitively feel is correct:</p>
<p>(a) \(\text{P} (0 &lt; X &lt; \dfrac{\pi}{2}) =
\dfrac{1}{4}\) since the interval \(\left(0, \dfrac{\pi}{2}\right)\) covers one quarter of a full circle.<br> (b) \(\text{P} (\dfrac{\pi}{2} &lt; X &lt; 2\pi) = \dfrac{3}{4}\); since the interval \(\left(\dfrac{\pi}{2}, 2\pi\right)\) covers three quarters of a full circle.</p><p>It is easy to see the generalization of this result for the interval \((a, b)\), in which both \(a, b\) lie in the
interval \(\left(0, 2\pi\right)\) :</p><p>\(\text{P}(a &lt; X&lt; b)=\dfrac{b-a}{2\pi}.\)</p><p>The second question immediately presents problems! In order to answer a question of this kind would
require a measuring device (e.g. a protractor) with infinite precision: no such device exists nor could
one ever be constructed. Hence it can <b>never </b>be verified that the needle, after spinning, takes any
<b>particular </b>value; all we can be reasonably sure of is that the needle lies between two particular
values.<br></p><p>We conclude that in experiments of this kind we <b>never </b>determine the probability that the random
variable assume a particular value but only calculate the probability that it lies within a given range of
values. This kind of random variable is called a <b>continuous random variable</b> and it is characterised,
not by probabilities of the type \(\text{P}(X = c)\) (as was the case with a discrete random variable), but by
a function \(f(x)\) called the <b>probability density function</b> (pdf for short). In the case of the rotating
needle this function takes the simple form given with corresponding plot:</p><p></p><p style="text-align: center;"><img src="@@PLUGINFILE@@/38.1%20figure%202.svg" alt="" width="234" height="97" role="presentation" class="img-responsive atto_image_button_text-bottom"></p><p style="text-align: center;"><b>Figure</b>: Plot of the pdf</p><p></p><p>where definition of the pdf is given by \[ f(x) = \begin{cases} \dfrac{1}{2\pi} &amp; \text{for all $ 0\leq x &lt; 2\pi$} \\ 0 &amp; \text{elsewhere} \end{cases}. \]&nbsp; &nbsp; &nbsp;<br></p><p>The probability \(\text{P}(a &lt; X &lt; b)\) is the <b>area </b>under the function curve \(f(x)\) and so is given by the
integral \[\displaystyle{\int_a^b f(x) \; dx}.\]</p><p>Suppose we wanted to find \(\text{P}(\dfrac{\pi}{6} &lt; X &lt; \dfrac{\pi}{4}).\)&nbsp;Then using the definition of the pdf for this case:</p><p>\(\text{P}(\dfrac{\pi}{6} &lt; X &lt; \dfrac{\pi}{4})= \displaystyle{\int_{\tiny{\dfrac{\pi}{6}}}^{\tiny{\dfrac{\pi}{4}}} \dfrac{1}{2\pi} \; dx} = \left. \dfrac{x}{2\pi} \right \vert_{\tiny{\dfrac{\pi}{6}}}^{ \tiny{\dfrac{\pi}{4}}} = \dfrac{1}{2\pi}\left(\dfrac{\pi}{4}-\dfrac{\pi}{6}\right)=\dfrac{1}{2\pi} \cdot \dfrac{\pi}{12}=\dfrac{1}{24}.\)</p><p>This is reasonable since the interval \(( \dfrac{\pi}{6},
\dfrac{\pi}{4})\) is one twenty-fourth of the interval \(0\) to \(2\pi\).<br></p><p>In general terms we have<br></p><p>\(\text{P}(a&lt;X&lt;b)= \displaystyle{\int_a^b f(t) \; dt} = F(b)-F(a) = \dfrac{b-a}{2\pi}\)</p><p>for the pdf under consideration here.&nbsp;Note also that<br></p><p>(a) \(f(x) \geq 0,\) for all real \(x\)<br></p><p>(b) \(\displaystyle{\int_{-\infty}^{\infty}} f(x) \; dx = \int_0^{2\pi} \dfrac{1}{2\pi} \; dx = 1,\) i.e. total probability is \(1\).</p>
<p>We are now in a position to give a formal definition of a continuous random variable in the following Key Point.</p>
<div class="HELM_keypoint">
<h4>Key Point </h4>
<p>\(X\) is said to be a <b>continuous random variable</b> if there exists a function \(f(x)\) associated with \(X\) called the <b>probability density function</b> with the properties </p>
<ul><li>\(f(x) \geq 0\) for all \(x\);</li> <li>\(\displaystyle{\int_{-\infty}^{\infty}} f(x) \; dx = 1 \);</li><li>\(\text{P}(a &lt; X &lt; b) = \displaystyle{\int_{a}^{b}} f(x) \; dx = F(b) -F(a) \).</li></ul></div><br>
<p>The first two bullet points in the above Key Point are the analogues of the results \(\text{P}(X = x_i) ≥ 0\) and \(\displaystyle{\sum_i&nbsp;P(X = x_i) =1 }\) for discrete random variables.</p>]]></text>
<file name="38.1 figure 1 (1).svg" path="/" encoding="base64">[encoded data, 13196 characters]</file>
<file name="38.1 figure 1.svg" path="/" encoding="base64">[encoded data, 13196 characters]</file>
<file name="38.1 figure 2.svg" path="/" encoding="base64">[encoded data, 21848 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
