AOS4 Topic 5: Continuous Random variables

A continuous random variable is one that can take any value in an interval of the real number line. For example, if \( X \) is the random variable which takes its values as ‘distance in metres that a parachutist lands from a marker’, then \( X \) is a continuous random variable, and here the values which \( X \) may take are the non-negative real numbers.

An example of a continuous random variable

A continuous random variable has no limit as to the accuracy with which it can be measured. For example, let \( W \) be the random variable with values ‘a person’s weight in kilograms’ and let \( W_i \) be the random variable with values ‘a person’s weight in kilograms measured to the \( i \)-th decimal place’.

\( W_0 = 83 \) implies \( 82.5 \leq W < 83.5 \)

\( W_1 = 83.3 \) implies \( 83.25 \leq W < 83.35 \)

\( W_2 = 83.28 \) implies \( 83.275 \leq W < 83.285 \)

\( W_3 = 83.281 \) implies \( 83.2805 \leq W < 83.2815 \)

and so on. Thus, the random variable \( W \) cannot take an exact value, since it is always rounded to the limits imposed by the method of measurement used. Hence, the probability of \( W \) being exactly equal to a particular value is zero, and this is true for all continuous random variables. That is,

\( \Pr(W = w) = 0 \) for all \( w \)

In practice, considering \( W_i \) taking a particular value is equivalent to \( W \) taking a value in an appropriate interval. Thus, from above:

\( \Pr(W_0 = 83) = \Pr(82.5 \leq W < 83.5) \)

To determine the value of this probability, you could begin by measuring the weight of a large number of randomly chosen people, and determine the proportion of the people in the group who have weights in this interval.

Suppose after doing this a histogram of weights was obtained as shown.


From this histogram:

\[ \Pr(W_0 = 83) = \Pr(82.5 \leq W < 83.5) = \frac{\text{shaded area from 82.5 to 83.5}}{\text{total area}} \]

If the histogram is scaled so that the total area under the blocks is 1, then:

\[ \Pr(W_0 = 83) = \Pr(82.5 \leq W < 83.5) = \text{area under block from 82.5 to 83.5} \]

Now suppose that the sample size gets larger and that the class interval width gets smaller. If theoretically this process is continued so that the intervals are arbitrarily small, then the histogram can be modelled by a smooth curve, as shown in the following diagram.


The curve obtained here is of great importance for a continuous random variable. The function f whose graph models the histogram as the number of intervals is increased is called the probability density function. The probability density function f is used to describe the probability distribution of a continuous random variable X.

Now, the probability of interest is no longer represented by the area under the histogram, but by the area under the curve. That is,

\[ \Pr(W_0 = 83) = \Pr(82.5 \leq W < 83.5) = \text{area under the graph of the function with rule } f(w) \text{ from 82.5 to 83.5} \]

\[ \Pr(W_0 = 83) = \int_{82.5}^{83.5} f(w) \, dw \]

Probability Density Functions

In general, a probability density function f is a function with domain some interval (e.g., domain [c, d] or ℝ) such that:

  1. f(x) ≥ 0 for all x in the interval, and
  2. the area under the graph of the function is equal to 1.

If the domain of f is [c, d], then the second condition corresponds to:

\[ \int_{c}^{d} f(x) \, dx = 1 \]

In many cases, however, the domain of f will be an ‘unbounded’ interval such as [1, ∞) or ℝ. Therefore, some new notation is necessary.

  • If the probability density function f has domain [1, ∞), then \(\int_{1}^{\infty} f(x) \, dx = 1\). This integral is computed as \(\lim_{{k \to \infty}} \int_{1}^{k} f(x) \, dx\).
  • If the probability density function f has domain ℝ, then \(\int_{-\infty}^{\infty} f(x) \, dx = 1\). This integral is computed as \(\lim_{{k \to \infty}} \int_{-k}^{k} f(x) \, dx\).

Note: Definite integrals which have one or both limits infinite are called improper integrals. There are possible complications with such integrals which we avoid in this course; you will only need the methods of evaluation illustrated in Examples 1 and 3.

The Probability Density Function of a Random Variable

Now consider a continuous random variable X with range [c, d]. (Alternatively, the range of X may be an unbounded interval such as \((-∞, d]\), [c, ∞), or ℝ.) Let f be a probability density function with domain [c, d]. Then:

We say that f is the probability density function of X if:

Pr(a < X < b) = \(\int_{a}^{b} f(x) \, dx\) for all a < b in the range of X.

Notes:

  • The values of a probability density function f are not probabilities, and f(x) may take values greater than 1.
  • The probability of any specific value of X is 0. That is, Pr(X = a) = 0. It follows that all of the following expressions have the same numerical value:
    • Pr(a < X < b)
    • Pr(a ≤ X < b)
    • Pr(a < X ≤ b)
    • Pr(a ≤ X ≤ b)
  • If f has domain [c, d] and a ∈ [c, d], then Pr(X < a) = Pr(X ≤ a) = \(\int_{c}^{a} f(x) \, dx\).

The Natural Extension of a Probability Density Function

Any probability density function f with domain [c, d] (or any other interval) may be extended to a function f* with domain ℝ by defining:

f*(x) =

  • f(x) if x ∈ [c, d]
  • 0 if x ∉ [c, d]

This leads to the following:

A probability density function f (or its natural extension) must satisfy the following two properties:

  1. f(x) ≥ 0 for all x
  2. \(\int_{-\infty}^{\infty} f(x) \, dx = 1\)

Probability Density Functions with Unbounded Domain

Some intervals for which definite integrals need to be evaluated are of the form \((-∞, a]\), \([a, ∞)\), or \((-∞, ∞)\). For a function f with non-negative values, such integrals are defined as follows (provided the limits exist):

  • To integrate over the interval \((-∞, a]\), find:
    \[ \lim_{k \to -∞} \int_a^k f(x) \, dx \]
  • To integrate over the interval \([a, ∞)\), find:
    \[ \lim_{k \to ∞} \int_k^a f(x) \, dx \]
  • To integrate over the interval \((-∞, ∞)\), find:
    \[ \lim_{k \to ∞} \int_{-k}^{k} f(x) \, dx \]
Example 1

Suppose that the random variable X has the probability density function with rule:

f(x) = \[ \begin{cases} cx & \text{if } 0 \leq x \leq 2 \\ 0 & \text{if } x > 2 \text{ or } x < 0 \end{cases} \]

a) Find the value of c that makes f a probability density function.

b) Find Pr(X > 1.5).

Solution:

a) Since f is a probability density function, we know that:

\[ \int_{-\infty}^{\infty} f(x) \, dx = 1 \] \[ \int_{-\infty}^{\infty} f(x) \, dx = \int_0^2 cx \, dx \quad \text{since f(x) = 0 elsewhere} \] \[ = \left[ \frac{cx^2}{2} \right]_0^2 = 2c \] \[ \text{Therefore, } 2c = 1 \quad \text{and so } c = 0.5 \]

b) To find Pr(X > 1.5):

\[ \Pr(X > 1.5) = \int_{1.5}^2 0.5x \, dx \] \[ = 0.5 \left[ \frac{x^2}{2} \right]_1.5^2 \] \[ = 0.5 \left( \frac{4}{2} - \frac{2.25}{2} \right) \] \[ = 0.5 \times 0.875 = 0.4375 \]
Example 2

Consider the function f with the rule:

f(x) = \[ \begin{cases} 1.5(1 - x^2) & \text{if } 0 \leq x \leq 1 \\ 0 & \text{if } x > 1 \text{ or } x < 0 \end{cases} \]

a) Sketch the graph of f

b) Show that f is a probability density function

c) Find Pr(X > 0.5), where the random variable X has probability density function f


a) Sketch the graph of f

For \(0 \leq x \leq 1\), the graph of \(y = f(x)\) is part of a parabola with intercepts at (0, 1.5) and (1, 0).



b) Show that f is a probability density function

From the graph, we can see that \(f(x) \geq 0\) for all x, and so the first condition holds.

The second condition to check is that: \[ \int_{-\infty}^{\infty} f(x) \, dx = 1 \] \[ \int_{-\infty}^{\infty} f(x) \, dx = \int_0^1 1.5(1 - x^2) \, dx \quad \text{since } f(x) = 0 \text{ elsewhere} \] \[ = 1.5 \left[ x - \frac{x^3}{3} \right]_0^1 \] \[ = 1.5 \left[1 - \frac{1}{3}\right] \] \[ = 1 \]

Thus, the second condition holds, and hence f is a probability density function.

c) Find Pr(X > 0.5), where the random variable X has probability density function f

\[ \text{Pr}(X > 0.5) = \int_{0.5}^1 1.5(1 - x^2) \, dx \] \[ = 1.5 \left[ x - \frac{x^3}{3} \right]_{0.5}^1 \] \[ = 1.5 \left[\left(1 - \frac{1}{3}\right) - \left(0.5 - \frac{0.125}{3}\right)\right] \] \[ = 0.3125 \]
Example 3

Consider the exponential probability density function f with the rule:

f(x) = \[ \begin{cases} 2e^{-2x} & \text{if } x > 0 \\ 0 & \text{if } x \leq 0 \end{cases} \]

a) Sketch the graph of f

b) Show that f is a probability density function

c) Find Pr(X > 1), where the random variable X has probability density function f


Solution

a) Sketch the graph of f

For \(x > 0\), the graph of \(y = f(x)\) is part of the graph of an exponential function with y-axis intercept 2. As \(x \to \infty\), \(y \to 0\).


b) Show that f is a probability density function

Since \(f(x) \geq 0\) for all \(x\), the first condition holds.

The second condition to check is that: \[ \int_{-\infty}^{\infty} f(x) \, dx = 1 \] \[ \int_{-\infty}^{\infty} f(x) \, dx = \int_0^{\infty} 2e^{-2x} \, dx \quad \text{since } f(x) = 0 \text{ elsewhere} \] \[ = \lim_{k \to \infty} \int_0^k 2e^{-2x} \, dx \] \[ = \lim_{k \to \infty} \left[\frac{-2e^{-2x}}{-2}\right]_0^k \] \[ = \lim_{k \to \infty} \left[-e^{-2k} - (-e^0)\right] \] \[ = 0 + 1 = 1 \]

Thus, f satisfies the two conditions for a probability density function.

c) Find Pr(X > 1), where the random variable X has probability density function f

\[ \text{Pr}(X > 1) = \lim_{k \to \infty} \int_1^k 2e^{-2x} \, dx \] \[ = \lim_{k \to \infty} \left[\frac{-2e^{-2x}}{-2}\right]_1^k \] \[ = \lim_{k \to \infty} \left[-e^{-2k} - (-e^{-2})\right] \] \[ = 0 + e^{-2} = \frac{1}{e^2} = 0.1353 \quad \text{(correct to four decimal places)} \]
Exercise &&1&& (&&1&& Question)

What is the probability that a continuous random variable takes on any specific value?

1
Submit

Exercise &&2&& (&&1&& Question)

If \( X \) is a continuous random variable, what does the area under the probability density function \( f(x) \) between two values \( a \) and \( b \) represent?

2
Submit