Skip to content

Mathematics · Ch 14 — Probability Distributions

Probability Density Function (p. d. f.)

14.4.1

Probability Density Function (p. d. f.)

Let XX be a continuous random variable on the interval S=(a,b)S=(a,b). A non-negative, integrable function f(x)f(x) is called the probability density function (p.d.f.) of XX if it satisfies three conditions: (1) f(x)≥0f(x) \ge 0 for every x∈Sx \in S; (2) the total area under y=f(x)y=f(x) over SS is 1, i.e. ∫Sf(x) dx=1\int_S f(x)\,dx = 1; (3) for any interval AA inside SS, P[X∈A]=∫Af(x) dxP[X \in A] = \int_A f(x)\,dx.

Worked examples.

Example 1. Let XX have p.d.f. f(x)=3x2f(x) = 3x^2 for 0<x<10 < x < 1. Note carefully that f(x)f(x) is not P[X=x]P[X=x]: for instance f(0.9)=3(0.9)2=2.43>1f(0.9) = 3(0.9)^2 = 2.43 > 1, which could never be a probability. In the continuous case f(x)f(x) is only the height of the density curve at xx; it is the area under the curve that gives probability.

Checking the two p.d.f. conditions: f(x)=3x2≥0f(x)=3x^2 \ge 0 on [0,1][0,1], and ∫013x2 dx=[x3]01=1\int_0^1 3x^2\,dx = [x^3]_0^1 = 1, so ff is a valid p.d.f. For 0≤c<d≤10 \le c < d \le 1, P[c<X<d]=∫cd3x2 dx=d3−c3P[c<X<d] = \int_c^d 3x^2\,dx = d^3-c^3. Taking c=1/2,d=1c=1/2, d=1: P[1/2<X<1]=13−(1/2)3=1−1/8=7/8P[1/2<X<1] = 1^3-(1/2)^3 = 1-1/8 = 7/8. And P[X=1/2]=∫1/21/2f(x) dx=0P[X=1/2] = \int_{1/2}^{1/2} f(x)\,dx = 0 — geometrically, the 'rectangle' over a single point has zero width and hence zero area. This is a general fact: for a continuous random variable, P[X=x]=0P[X=x]=0 for every xx in the support.

Example 2. Let XX have p.d.f. f(x)=x3/4f(x) = x^3/4 on 0<x<c0<x<c. Find cc so that ff is a valid p.d.f.

Since ∫0cx34 dx=[x416]0c=c416\int_0^c \dfrac{x^3}{4}\,dx = \left[\dfrac{x^4}{16}\right]_0^c = \dfrac{c^4}{16} must equal 1, c4=16c^4 = 16, and since c>0c>0, c=2c=2.

Example 6. Verify whether the following are p.d.f.s of a continuous r.v. XX: (i) f(x)=e−xf(x)=e^{-x} for 0<x<∞0<x<\infty, =0=0 otherwise; (ii) f(x)=x/2f(x) = x/2 for −2<x<2-2<x<2, =0=0 otherwise.

(i) e−x>0e^{-x} > 0 for every x>0x>0, and ∫0∞e−x dx=[−e−x]0∞=−(0−1)=1\int_0^\infty e^{-x}\,dx = \left[-e^{-x}\right]_0^\infty = -(0-1) = 1; both conditions hold, so ff is a valid p.d.f. (ii) f(x)=x/2f(x)=x/2 is negative for −2<x<0-2<x<0 (e.g. f(−1)=−1/2<0f(-1)=-1/2<0), violating f(x)≥0f(x)\ge0; so ff is not a valid p.d.f.

Example 7. Find kk so that f(x)=kx2(1−x)f(x) = kx^2(1-x) for 0<x<10<x<1 (and 0 otherwise) is a p.d.f.

∫01kx2(1−x) dx=k∫01(x2−x3) dx=k[x33−x44]01=k(13−14)=k12\int_0^1 kx^2(1-x)\,dx = k\int_0^1 (x^2-x^3)\,dx = k\left[\dfrac{x^3}{3}-\dfrac{x^4}{4}\right]_0^1 = k\left(\dfrac13-\dfrac14\right) = \dfrac{k}{12}. Setting this equal to 1 gives k=12k=12.

Example 8. For each p.d.f., find (a) P(X<1)P(X<1) and (b) P(∣X∣<1)P(|X|<1): (i) f(x)=x2/18f(x)=x^2/18 for −3<x<3-3<x<3; (ii) f(x)=(x+2)/18f(x)=(x+2)/18 for −2<x<4-2<x<4.

(i)(a) P(X<1)=∫−31x218 dx=154[x3]−31=154(1−(−27))=2854=1427P(X<1) = \int_{-3}^1 \dfrac{x^2}{18}\,dx = \dfrac{1}{54}\left[x^3\right]_{-3}^1 = \dfrac{1}{54}(1-(-27)) = \dfrac{28}{54} = \dfrac{14}{27}. …