Chapter 4 Continuous Random Variables

4.1 Probability Density Functions

A continuous random variable takes on an uncountably infinite number of possible values. For a discrete random variable X that takes on a finite or countably infinite number of possible values, we determined \(P(X=x)\) for all of the possible values of X, and called it the probability mass function (“p.m.f.”). For continuous random variables, as we shall soon see, the probability that takes on any particular value x is 0. That is, finding \(P(X=x)\) for a continuous random variable X is not going to work. Instead, we’ll need to find the probability that X falls in some interval \((a, b)\), that is, we’ll need to find \(P(a<X<b)\). We’ll do that using a probability density function (“p.d.f.”). We’ll first motivate a p.d.f. with an example, and then we’ll formally define it.

4.2 Probability Density Function (“p.d.f.”)

The probability density function (“p.d.f.”) of a continuous random variable \(X\) with support \(S\) is an integrable function \(f(x)\) satisfying the following:

  1. \(f(x)\) is positive everywhere in the support \(S\), that is, \(f(x)>0\), for all \(x\) in \(S\)
  2. The area under the curve \(f(x)\) in the support \(S\) is 1, that is: \[\int_S f(x)dx=1\]
  3. If \(f(x)\) is the p.d.f. of \(x\), then the probability that x, belongs to A, where A is some interval, is given by the integral of \(f(x)\) over that interval, that is:

\[P(X \in A)=\int_A f(x)dx\]

As you can see, the definition for the p.d.f. of a continuous random variable differs from the definition for the p.m.f. of a discrete random variable by simply changing the summations that appeared in the discrete case to integrals in the continuous case. Let’s test this definition out on an example.

4.2.1 Example

Let X be a continuous random variable whose probability density function is:

\(f(x)=3x^2, \qquad 0<x<1\)

To prove that \(f(x) = 3x^2\) is a valid probability density function (pdf) for the continuous random variable \(X\) over the interval \(0 < x < 1\), we need to verify two conditions:

  1. Non-negativity: \(f(x) \geq 0\) for all \(x\) in the support of \(X\).
  2. Integrates to 1: \(\int_{-\infty}^{\infty} f(x) \, dx = 1\).

Let’s prove each condition:

  1. Non-negativity:
    • For \(0 < x < 1\), \(x^2\) is always non-negative.
    • Multiplying by a positive constant, \(3\), doesn’t change the sign.
    • Therefore, \(f(x) = 3x^2\) is non-negative for \(0 < x < 1\).
  2. Integrates to 1: \[ \int_{-\infty}^{\infty} f(x) \, dx = \int_{0}^{1} 3x^2 \, dx = \left[ x^3 \right]_{0}^{1} = 1 - 0 = 1 \]
    • Thus, the integral of \(f(x)\) over the entire support \(0 < x < 1\) equals 1.

Since \(f(x) = 3x^2\) satisfies both conditions, it is a valid probability density function for the continuous random variable \(X\) over the interval \(0 < x < 1\).

b.) What is the probability that X falls between 1/2 and 1? That is, what is \(P\left(\frac{1}{2}<X<1\right)\)?

To find the probability that \(X\) falls between \(\frac{1}{2}\) and 1, denoted as \(P\left(\frac{1}{2}<X<1\right)\), we need to integrate the probability density function \(f(x)\) over the interval \(\left(\frac{1}{2}, 1\right)\):

\[ P\left(\frac{1}{2}<X<1\right) = \int_{1/2}^{1} f(x) \, dx \]

Given that the probability density function \(f(x) = 3x^2\) for \(0 < x < 1\), we can perform the integration:

\[ P\left(\frac{1}{2}<X<1\right) = \int_{1/2}^{1} 3x^2 \, dx \]

Let’s calculate this integral:

\[ P\left(\frac{1}{2}<X<1\right) = \left[ x^3 \right]_{1/2}^{1} = 1^3 - \left(\frac{1}{2}\right)^3 = 1 - \frac{1}{8} = \frac{7}{8} \]

Therefore, the probability that \(X\) falls between \(\frac{1}{2}\) and 1 is \(\frac{7}{8}\).

c.) What is \(P\left(X=\frac{1}{2}\right)\)?

Since \(X\) is a continuous random variable, the probability \(P\left(X = \frac{1}{2}\right)\) for a specific value \(x = \frac{1}{2}\) is zero. This is because for continuous random variables, the probability of any single point is infinitesimally small and thus considered to be zero.

In other words, for a continuous probability density function \(f(x)\), the probability of \(X\) being exactly equal to any specific value \(x\) is zero.

So, \(P\left(X = \frac{1}{2}\right) = 0\).

4.2.2 Example

Let X be a continuous random variable whose probability density function is: \[f(x)=\dfrac{x^3}{4}\] for an interval \(0<x<c\). What is the value of the constant \(c\) that makes \(f(x)\) a valid probability density function?

To find the value of the constant \(c\) that makes \(f(x)\) a valid probability density function, we need to ensure that the total area under the density function over the interval \(0 < x < c\) is equal to 1.

The integral of \(f(x)\) over the interval \(0 < x < c\) should be equal to 1:

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

Given that \(f(x) = \frac{x^3}{4}\) for \(0 < x < c\), we can integrate this function over the interval \(0 < x < c\) and set the result equal to 1 to find the value of \(c\).

\[ \int_{0}^{c} \frac{x^3}{4} \, dx = 1 \]

Let’s solve this integral equation to find the value of \(c\).

\[ \int_{0}^{c} \frac{x^3}{4} \, dx = \frac{1}{4} \int_{0}^{c} x^3 \, dx \]

\[ = \frac{1}{4} \left[ \frac{x^4}{4} \right]_{0}^{c} \]

\[ = \frac{1}{4} \left( \frac{c^4}{4} - 0 \right) \]

\[ = \frac{c^4}{16} \]

Now, setting this equal to 1:

\[ \frac{c^4}{16} = 1 \]

\[ c^4 = 16 \]

\[ c = \sqrt[4]{16} \]

\[ c = 2 \]

Therefore, the value of the constant \(c\) that makes \(f(x)\) a valid probability density function is \(c = 2\).

This means the interval for the density function \(f(x)\) becomes \(0 < x < 2\).

4.3 Cumulative Distribution Functions

You might recall that the cumulative distribution function is defined for discrete random variables as:

\[F(x)=P(X\leq x)=\sum\limits_{t \leq x} f(t)\] Again, \(f(x)\) accumulates all of the probability less than or equal to \(x\). The cumulative distribution function for continuous random variables is just a straightforward extension of that of the discrete case. All we need to do is replace the summation with an integral.

4.3.1 Cumulative Distribution Function (“c.d.f.”)

The cumulative distribution function (“c.d.f.”) of a continuous random variable X is defined as: \[F(x)=\int_{-\infty}^x f(t)dt\]

for \(-\infty<x<\infty\).

You might recall, for discrete random variables, that \(F(x)\) is, in general, a non-decreasing step function. For continuous random variables, \(F(x)\) is a non-decreasing continuous function.

4.3.2 Example

Let’s return to the example in which X has the following probability density function: \[f(x)=3x^2, \qquad 0<x<1\]

What is the cumulative distribution function \(F(x)\)?

To find the cumulative distribution function \(F(x)\) for the given probability density function \(f(x) = 3x^2\) over the interval \(0 < x < 1\), we integrate \(f(x)\) with respect to \(x\) from \(0\) to \(x\).

The cumulative distribution function \(F(x)\) is defined as:

\[F(x) = \int_{0}^{x} f(t) \, dt\]

Given \(f(x) = 3x^2\), let’s integrate it with respect to \(t\) from \(0\) to \(x\):

\[F(x) = \int_{0}^{x} 3t^2 \, dt\]

\[= \left[t^3\right]_{0}^{x}\]

\[= x^3 - 0^3\]

\[= x^3\]

Therefore, the cumulative distribution function \(F(x)\) for \(0 < x < 1\) is:

\[F(x) = x^3\]

This function represents the probability that \(X\) takes on a value less than or equal to \(x\), for \(0 < x < 1\).

4.3.3 Example

Let’s return to the example in which X has the following probability density function:

\[f(x)=\dfrac{x^3}{4}\] for \(0<x<2\). What is the cumulative distribution function of X?

To find the cumulative distribution function \(F(x)\) for the given probability density function \(f(x) = \frac{x^3}{4}\) over the interval \(0 < x < 2\), we integrate \(f(x)\) with respect to \(x\) from \(0\) to \(x\).

The cumulative distribution function \(F(x)\) is defined as:

\[F(x) = \int_{0}^{x} f(t) \, dt\]

Given \(f(x) = \frac{x^3}{4}\), let’s integrate it with respect to \(t\) from \(0\) to \(x\):

\[F(x) = \int_{0}^{x} \frac{t^3}{4} \, dt\]

\[= \frac{1}{4} \int_{0}^{x} t^3 \, dt\]

\[= \frac{1}{4} \left[\frac{t^4}{4}\right]_{0}^{x}\]

\[= \frac{1}{4} \left(\frac{x^4}{4} - 0^4\right)\]

\[= \frac{1}{4} \cdot \frac{x^4}{4}\]

\[= \frac{x^4}{16}\]

Therefore, the cumulative distribution function \(F(x)\) for \(0 < x < 2\) is:

\[F(x) = \frac{x^4}{16}\]

This function represents the probability that \(X\) takes on a value less than or equal to \(x\), for \(0 < x < 2\).