Probability Density Function
Definition of Probability Density Function
We call \(X\) a continuous random variable if \(X\) can take any value on an interval, which is often the entire set of real numbers \(\mathbb{R}.\)
Every continuous random variable \(X\) has a probability density function \(\left( {PDF} \right),\) written \(f\left( x \right),\) that satisfies the following conditions:
- \(f\left( x \right) \ge 0\) for all \(x,\) and
- \(\int\limits_{ - \infty }^\infty {f\left( x \right)dx} = 1.\)
The probability that a random variable \(X\) takes on values in the interval \(a \le X \le b\) is defined as
which is the area under the curve \(f\left( x \right)\) from \(x = a\) to \(x = b.\)
Mean and Median
If a random variable \(X\) has a density function \({f\left( x \right)},\) then we define the mean value (also known as the average value or the expectation) of \(X\) as
The median of a continuous probability distribution \(f\left( x \right)\) is the value of \(x = m\) that splits the probability distribution into two portions whose areas are identical and equal to \(\frac{1}{2}:\)
Note that not all \(PDFs\) have mean values. For example, the Cauchy distribution is an example of a probability distribution which has no mean.
Variance
The variance of a continuous random variable is defined by the integral
where \(\mu\) is the mean of the random variable \(X.\)
Uniform Distribution
The simplest \(PDF\) is the uniform distribution. The density of the uniform distribution is defined by
The mean value of the uniform distribution across the interval \(\left[ {a,b} \right]\) is
If a random variable \(X\) is distributed uniformly in the interval \(\left[ {a,b} \right],\) the probability to fall within a range \(\left[ {c,d} \right] \in \left[ {a,b} \right]\) is expressed by the formula
The variance of the distribution is
Exponential Distribution
The exponential distribution is a continuous distribution that is commonly used to describe the waiting time until some specific event occurs. For example, the amount of time until a hurricane or other dangerous weather event occurs obeys an exponential distribution law.
The one-parameter exponential distribution of the probability density function \(PDF\) is described as follows:
where the rate \(\lambda\) represents the average amount of events per unit of time.
The mean value (or the average waiting for the next event) is \(\mu = \frac{1}{\lambda }.\) The median of the exponential distribution is \(m = \frac{{\ln 2}}{\lambda }, \) and the variance is given by \({\sigma ^2} = \frac{1}{{{\lambda ^2}}}.\)
Normal Distribution
The normal distribution is the most widely known probability distribution since it describes many natural phenomena.
The \(PDF\) of the normal distribution is given by the formula
where \(\mu\) is the mean of the distribution, and \({\sigma^2}\) is the variance.
The two parameters \(\mu\) and \({\sigma}\) entirely define the shape and all other properties of the normal distribution function.
If a random variable \(X\) follows the normal distribution with the parameters \(\mu\) and \(\sigma,\) we write \(X \sim N\left( {\mu ,\sigma } \right).\)
The normal distribution is said to be standard when \(\mu = 0\) and \(\sigma = 1.\) In this special case, the normal random variable \(X\) is called a standard score or a \(Z-\)score. Thus, by definition, \(Z \sim N\left( {0 ,1} \right).\)
Every normal random variable \(X\) can be transformed into a \(Z-\)score by using the substitution
Pay attention to the notations: \(X, Z\) denote the random variables, and \(x,z\) denote the possible values of the variables.
To compute probabilities for \(Z,\) we use a standard normal table (\(Z-\)table) or a software tool.
To find the probability that a normally distributed random variable \(X\) falls within a range \(\left[ {a,b } \right],\) we rely on the \(Z-\)score and use the formula
Solved Problems
Click or tap a problem to see the solution.
Example 1
Calculate the mean value \(\mu\) and the variance \({\sigma^2}\) of the uniform distribution \[f\left( x \right) = \frac{1}{{b - a}}\] for \(a \le x \le b.\)
Example 2
Let \(X\) be a random variable distributed uniformly in the interval \(\left[ {{x_0} - L,{x_0} + L} \right].\) Find the mean \(\mu\) and variance \({\sigma^2}\) of the random variable \(X.\)
Example 3
Find the mean value \(\mu\) and the median \(m\) of the exponential distribution \[f\left( x \right) = \lambda {e^{ - \lambda x}}.\]
Example 4
Assume that the waiting time for your next email is described by the exponential density function with rate \(\lambda = 3\) (emails per hour). Determine the probability that you receive no email during the next hour.
Example 1.
Calculate the mean value \(\mu\) and the variance \({\sigma^2}\) of the uniform distribution \[f\left( x \right) = \frac{1}{{b - a}}\] for \(a \le x \le b.\)
Solution.
First we find the mean \(\mu:\)
Now let's derive the expression for the variance \({\sigma ^2}.\) By definition,
Expanding the square in the integrand, we can write:
Recall that
Then
Example 2.
Let \(X\) be a random variable distributed uniformly in the interval \(\left[ {{x_0} - L,{x_0} + L} \right].\) Find the mean \(\mu\) and variance \({\sigma^2}\) of the random variable \(X.\)
Solution.
Make sure that the mean value coincides with the middle of the interval:
Compute the variance:
Example 3.
Find the mean value \(\mu\) and the median \(m\) of the exponential distribution \[f\left( x \right) = \lambda {e^{ - \lambda x}}.\]
Solution.
The mean value \(\mu\) is determined by the integral
Integrating by parts, we have
We evaluate the second term with the help of l'Hopital's Rule:
Hence, the mean (average) value of the exponential distribution is
Determine the median \(m:\)
Example 4.
Assume that the waiting time for your next email is described by the exponential density function with rate \(\lambda = 3\) (emails per hour). Determine the probability that you receive no email during the next hour.
Solution.
The probability density function has the form
where the time \(t\) is measured in hours.
Let's calculate the probability that you receive an email during the hour. Integrating the exponential density function from \(t = 0\) to \(t = 1,\) we have
So, the probability \({P^C}\) of the opposite (complementary) event (that is, that you will not receive any email within an hour) is equal to