12Acontinuousrandomvariables

Continuous random variables


 * Continuous random variables ** are associated with experiments that involve measurements like weight, length, temperature and time.

In theory, there is no limit to the accuracy of a continuous random variable (say //X)//.

For example, (assuming our scale shows steps of 1kg)
 * if we say a person weighs 83kg, we are really saying that they weigh somewhere between 82.5 and 83.5kg.
 * If our scale shows steps of 0.5kg, then a result of 83kg is really somewhere between 82.75kg and 83.25kg
 * No matter how fine the scale is, we can never be sure the weight is __exactly__ 83kg.

Hence the probability of //X// being exactly equal to a particular value is zero.

Pr ( //X = x// ) = 0 for all //x//

Suppose the hisogram below shows the weight of a large number of randomly chosen people.

math \\ . \qquad Pr ( W \approx 83) =Pr (82.5 \leqslant W \leqslant 83.5) \\. \\ .\qquad \qquad\qquad\quad=\dfrac{\text{area shaded from 82.5 to 83.5}}{\text{total area}} \qquad. math

If the histogram is scaled so that its total area is one, then

math \\ . \qquad Pr ( W \approx 83) =Pr (82.5 \leqslant W \leqslant 83.5) \\. \\ . \qquad \qquad\qquad\quad=\text{area shaded from 82.5 to 83.5} \qquad. math

As the size of the sample becomes larger and the class interval smaller, the histogram can be modelled by a smooth curve. The function //f// whose graph models this smooth curve is called the ** __probability density function__ **. Remember the function is scaled so that the total area under the graph is equal to 1. o

So in the example above, if the curve is modelled by f(w), we can calculate the probability using: math . \qquad Pr(82.5 < W < 83.5) = \displaystyle{\int\limits_{82.5}^{83.5} \; f(w)\;dw} \qquad. math

Since the graph represents the probability distribution of a continuous variable, the graph:
 * can not be below the //x//-axis (y __>__ 0 for all x) and
 * must have a total area equal to 1

In general, for any probability density function, f(x), the probability is represented by the shaded region of the graph below, that is the area between the curve, the x-axis and the lines x = a and x = b. The probability can be found by calculus.

math . \qquad Pr(a < X < b) = \displaystyle{\int\limits_{a}^{b} \; f(x)\;dx} \qquad. math



Properties of a probability density function

math \\ \text{1.}\qquad{f(x)} \geqslant 0\qquad\text{for all } \; x \in R \qquad. \\ . \\ \text{2.}\qquad \displaystyle{ \int\limits_{-\infty}^\infty \; f(x) \; dx} =1 \qquad. math

As stated earlier, //X// can not take an exact value. Since

math . \qquad Pr(X = a) = \displaystyle{ \int\limits_{a}^{a} \; f(x) \; dx} = 0 \qquad. math we have math . \qquad Pr (a \leqslant X \leqslant b) = Pr(a < X < b) \qquad. \\ . \\ . \qquad \qquad \qquad \qquad = \displaystyle{ \int\limits_{a}^{b} \; f(x) \; dx} \qquad. math

Hybrid Functions

Some probability density functions will be defined as a hybrid function with a rule covering a specified domain and 0 elsewhere.

**Example 1**

Supoose that the random variable //X// has density function:

math . \qquad f(x)= \Bigg\{ \begin{matrix} 1.5(1-x^2) & \quad 0 \leqslant x \leqslant 1 \\ 0 & x<0 \quad \text{ or } \quad x >1 \qquad. \\ \end {matrix} math

... ... ** (a) ** Sketch the graph of //f(x)//. ... ... ** (b) ** Show that //f(x)// is a probability density function.


 * __Solution:__**

... ... . The endpoints of the graph are (0, 1.5) and (1, 0). ... ... . Everywhere else the function is zero.
 * (a) ** ... The graph of //f(x)// is part of a parabola over the domain [0, 1].

The places where f(x) is zero **__must__** be shown on the graph. (See the blue lines on the x-axis at the right.)

... .. . This meets the first property of probability density functions, that f(x) __>__ 0 for all x in R.
 * (b) ** ... From the graph we can see that the function is positive or zero for its entire domain.

... .. . To prove the second property, we need to show the area under the graph of f(x) is equal to 1.

math \\ . \qquad \displaystyle{ \int\limits_{0}^1 \;1.5(1-x^2) \; dx } \\. \\ . \qquad \qquad=1.5\left[x-\dfrac{x^3}{3}\right]_{0}^{1} \qquad .\\. \\ . \qquad \qquad=1.5(1-\dfrac{1}{3})\\. \\ . \qquad \qquad=1 math

Since //f(x)// satisfies both properties it __**is**__ a probability density function.


 * Example 2 **

Suppose that the random variable //X// has a function:

math . \qquad f(x)=\Bigg\{ \begin{matrix} cx&& 0 \leqslant {x} \leqslant 2 \qquad. \\ 0&&\text{ elsewhere} \\ \end {matrix} math ... ... where c is a constant.

Find the value of //c// that makes //f(x)// a __**probability density function**__.

__Solution:__

For the function to be a probability density function, the area under the graph of //f(x)// equals 1.

math \\ . \qquad \displaystyle{ \int\limits_{0}^2 \; cx \; dx} =1 \qquad. \\ . \\ . \qquad \left[\dfrac{cx^2}{2}\right]_{0}^{2} = 1 \\. \\ . \qquad 2c = 1 \\. \\ . \qquad c = \frac{1}{2} math

.