How a probability density turns probabilities into areas, and how integrals give the distribution function, the mean, the variance and the standard deviation, when they exist.
How long will a light bulb last? The answer could be any positive number, so asking for the chance of exactly 1000 hours makes little sense. The useful question is the chance that it lasts between 900 and 1100 hours. For quantities like this, probability becomes area under a curve, and integrals do the work.
Key terms
Continuous random variable
Definition A random variable X is continuous if there is a nonnegative function f, integrable on every bounded interval and called its density, such that for all real numbers a≤b
P(a≤X≤b)=∫abf(x)dx.
It follows that every single value a has probability
P(X=a)=∫aaf(x)dx=0,
so it does not matter whether the endpoints are included.
In plain words A continuous random variable can take any value in an interval, like a time, a length or a weight. Single values have probability zero, and only ranges of values carry probability.
Example If a bus arrives at a random time between 0 and 10 minutes from now, with every moment equally likely, the waiting time X has density f(x)=101 on [0,10] and 0 elsewhere. Then
P(2≤X≤5)=∫25101dx=0.3.
Probability density
Definition A probability density function is a function f with f(x)≥0 for all x, integrable on every bounded interval, such that
∫−∞∞f(x)dx=1.
The value f(x) is not itself a probability. When f is continuous at x and Δx>0 is small,
P(x≤X≤x+Δx)≈f(x)Δx.
In plain words The density shows where the values tend to fall. Probabilities are areas under its graph, and the total area is one.
Example The lifetime X in years of a part has density f(x)=2e−2x for x≥0 and f(x)=0 for x<0. The chance it fails within a year is
P(0≤X≤1)=∫012e−2xdx=1−e−2≈0.865.
Normalization
Definition Let g(x)≥0 for all x, with g integrable on every bounded interval and
0<I=∫−∞∞g(x)dx<∞.
Then f=g/I is a probability density. Choosing the constant c so that cg has total integral 1 is called normalization.
In plain words You often know the shape of a density but not its height. Scale it so the total area is exactly one.
Example Find c so that f(x)=cx(2−x) on [0,2], and 0 elsewhere, is a density. Since
∫02x(2−x)dx=4−38=34,
we need c=43.
Cumulative distribution function
Definition The cumulative distribution function of X is
F(x)=P(X≤x)=∫−∞xf(t)dt.
It is continuous and nondecreasing, limx→−∞F(x)=0, limx→∞F(x)=1, and P(a<X≤b)=F(b)−F(a). By the fundamental theorem of calculus, F′(x)=f(x) at every x where f is continuous.
In plain words The value F(x) is the area under the density to the left of x. It climbs from 0 to 1.
Example For the lifetime density 2e−2x above, F(x)=0 for x<0 and F(x)=1−e−2x for x≥0. So
P(0.5<X≤1)=F(1)−F(0.5)=e−1−e−2≈0.233.
Expected value
Definition The expected value, or mean, of X with density f is
μ=E[X]=∫−∞∞xf(x)dx,
defined only when
∫−∞∞∣x∣f(x)dx<∞.
In plain words The mean is the balance point of the density. If you cut its graph out of cardboard, it would balance on a pin at μ.
Example For f(x)=43x(2−x) on [0,2],
E[X]=43∫02(2x2−x3)dx=43(316−4)=1.
That fits the picture, since the graph is symmetric about x=1.
Variance
Definition Suppose the second moment
E[X2]=∫−∞∞x2f(x)dx
is finite. Then the mean μ exists, and the variance of X is
Var(X)=∫−∞∞(x−μ)2f(x)dx=E[X2]−μ2.
In plain words Variance measures how far values typically fall from the mean, using squared distances.
Example For the same density
E[X2]=43∫02(2x3−x4)dx=43(8−532)=56,
so Var(X)=56−1=51.
Standard deviation
Definition The standard deviation of X is σ=Var(X), defined whenever the variance is.
In plain words Taking the square root brings the spread back to the same units as X, so it can be compared with the values themselves.
Example The density 43x(2−x) has σ=1/5≈0.447. For the lifetime density 2e−2x a similar calculation gives mean 21 and standard deviation 21 year.
Normal distribution
Definition For a real number μ and σ>0, the normal distribution with mean μ and standard deviation σ has density
f(x)=σ2π1e−(x−μ)2/(2σ2),−∞<x<∞.
That it is normalized follows from the Gaussian integral
∫−∞∞e−x2dx=π.
Its antiderivative is not an elementary function, so probabilities are found from tables or numerically.
In plain words This is the bell curve, centered at μ, wider when σ is larger. Many measured quantities are close to normally distributed.
Example Suppose heights are normal with μ=170 cm and σ=8 cm. About 68.3% of values lie within one standard deviation of the mean and about 95.4% within two, so
P(162≤X≤178)≈0.683,P(154≤X≤186)≈0.954.
Existence of moments
Definition For a positive integer n, the nth moment of X is
E[Xn]=∫−∞∞xnf(x)dx.
It is said to exist when the integral converges absolutely, that is, when
∫−∞∞∣x∣nf(x)dx<∞.
If the nth moment exists, then so does every lower moment.
In plain words Mean and variance are improper integrals, and those can diverge. A density with a heavy tail may have no mean or no variance at all.
Example Let f(x)=x32 for x≥1 and 0 otherwise. It is a density, since f≥0 and ∫1∞2x−3dx=1. The mean is
∫1∞x⋅x32dx=∫1∞x22dx=2,
but the second moment is
∫1∞x2⋅x32dx=∫1∞x2dx=∞,
so X has no variance.
Check yourself
Find k so that f(x)=kx2 on [0,3], and 0 elsewhere, is a density. Then find P(X≤1).
Show the answer
The total area is ∫03kx2dx=9k, and setting it equal to 1 gives k=91. Then
P(X≤1)=∫019x2dx=271.
A random variable is uniform on [2,6], with density 41 there. Find its mean and variance.
Show the answer
The mean and second moment are
E[X]=∫264xdx=4,E[X2]=∫264x2dx=352,
so Var(X)=352−16=34.
A waiting time has density 0.5e−0.5x for x≥0. What is the chance it exceeds 4?
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details