Econ 120A - Continuous Random Variables
Continuous Random Variables
Uniformly Distributed Gasoline Sales
The amount of gasoline sold daily at a service station is uniformly distributed between 2,000 and 5,000 gallons.
Find the following probabilities:
a. Probability that daily sales fall between 2,500 and 3,000 gallons.
b. Probability that the service station sells at least 4,000 gallons.
c. Probability that the station sells exactly 2,500 gallons.
Solution
The probability density function is: f(x) = \frac{1}{5,000 - 2,000} = \frac{1}{3,000} when 2,000 \le x \le 5,000
a. P(2,500 \le x \le 3,000) = (3,000 - 2,500) * \frac{1}{3,000} = .1667
b. P(x \ge 4,000) = (5,000 - 4,000) * \frac{1}{3,000} = .3333
c. P(x = 2,500) = 0
Uniform Distribution: Example
Given density function:
f(x) = .40 \text{ for } 0 < x < 1
f(x) = .05 \text{ for } 1 < x < 13a. Graph the density function.
b. Determine the probability that X is less than 8.
c. What is the probability that X lies between .4 and 10? (Homework)
Mean and Variance of Continuous Distributions
General formulas:
For discrete random variables:
\mu = E[X] = \sum_{\text{all } x} x \cdot p(x)
\sigma^2 = E[(X - \mu)^2] = \sum_{\text{all } x} (x - \mu)^2 \cdot p(x)
For continuous variables:
\mu = E[X] = \int_{-\infty}^{\infty} x \cdot f(x) dx
\sigma^2 = E[(X - \mu)^2] = \int_{-\infty}^{\infty} (x - \mu)^2 \cdot f(x) dx
where f(x) is the probability density function (also denoted as p(x)).
Alternate formula for variance:
\sigma^2 = E[X^2] - \mu^2 = \int_{-\infty}^{\infty} x^2 \cdot f(x) dx - \mu^2
Mean and Variance of Continuous Distributions - Uniform Distribution
Uniform distribution:
If X \sim \text{Uniform}(a, b), then f(x) = \frac{1}{b-a} for a \le x \le b
\int{-\infty}^{\infty} x \frac{1}{b-a} dx = \frac{1}{b-a} \frac{x^2}{2} \Big|a^b = \frac{1}{b-a} \left( \frac{b^2}{2} - \frac{a^2}{2} \right) = \frac{b+a}{2}
Therefore, \mu = \frac{b+a}{2}
\int{-\infty}^{\infty} x^2 \frac{1}{b-a} dx - \mu^2 = \frac{1}{b-a} \frac{x^3}{3} \Big|a^b - \mu^2 = \frac{1}{b-a} \left( \frac{b^3}{3} - \frac{a^3}{3} \right) - \left( \frac{b+a}{2} \right)^2
= \frac{b-a}{1} \cdot \frac{a^2 + ab + b^2}{3} \cdot \frac{1}{b-a} - \frac{(b+a)^2}{4} = \frac{4(a^2 + ab + b^2) - 3(b^2 + 2ab + a^2)}{12} = \frac{a^2 + b^2 - 2ab}{12} = \frac{(b-a)^2}{12}
Uniform Probability Distribution
The mean (expected value) of x is E(x) = \frac{a + b}{2}.
The variance of x is Var(x) = \frac{(b – a)^2}{12}.
where:
a = smallest value the variable can assume
b = largest value the variable can assume
Gasoline Sales Example
Max: 5000 gallons
Min: 2000 gallons
The expected value (or mean) of X is
E(X) = \frac{(a + b)}{2} = \frac{(2000 + 5000)}{2} = 3500
The variance of x is
Var(X) = \frac{(b – a)^2}{12} = \frac{(5000 – 2000)^2}{12} = 750000
Normal Probability Distribution
Most common and useful continuous distribution
Used in a wide variety of applications including:
Heights of people
Amounts of rainfall
Standardized Test scores
Scientific measurements
Widely used in statistical inference.
Sometimes called “Gaussian”
Probability Density Function for a Normally Distributed Random Variable
f(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}
where
\mu = \text{mean}
\sigma = \text{standard deviation}
\pi = 3.14159 \dots
e = 2.71828 \dots
- \infty < x < +\infty
Normal Probability Distribution
The tails of the normal curve extend to infinity in both directions and theoretically never touch the horizontal axis.
X \sim N(\mu, \sigma^2)
means random variable X is distributed normally with mean \mu and variance \sigma^2 (or X is distributed normally with mean µ and standard deviation σ ).
Normal Distribution
Random Variable X follows a Normal distribution with mean \mu and standard deviation \sigma
Normal Distribution Properties
A normal distribution is completely defined by two parameters: Its mean and its variance/standard deviation.
The highest point on the normal curve is at the mean, which is also the median and the mode.
Normal Distribution - Different Means
Normal distributions with the same standard deviation and different means: \mu1 and \mu2
Same Standard Deviation and Different Means
FIGURE 6.4 Normal Distributions with Same Standard Deviation and Different Means
Normal Distribution - Different Standard Deviations
Normal distributions with the same mean and different standard deviations: \mu
Same Mean and Different Standard Deviations
FIGURE 6.5 Normal Distributions with Same Mean and Different Standard Deviations
\sigma = 5
\sigma = 10
Normal Probability Distribution - Areas Under the Curve
Probabilities for the normal random variable are given by areas under the curve.
The total area under the curve is 1.
Because the distribution is symmetric, the area under the curve to the left of the mean is 0.50 and the area to the right of the mean is 0.5.
Standard Normal Distribution
A random variable having a normal distribution with a mean µ = 0 and standard deviation σ = 1 (or variance σ^2 = 1) is said to have a standard normal probability distribution.
The letter Z is conventionally used to designate the standard normal random variable.
Z follows a standard normal distribution if Z \sim N(0,1).
Standard Normal Distribution
Random Variable Z follows a Standard Normal distribution (mean = 0 and standard deviation = 1).
\sigma = 1
Probability Density Function for Standard Normal Z-Distribution
\pi and e are constants
To find the probability that a normal random variable is within any specific interval, we must compute the area under the normal curve over the interval.
Probabilities will be based on a table.
f(z) = \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}z^2}