For a continuous random variable , like a waiting time or a length, probability is area under a curve . With calculus you can now work with any curve, not just rectangles and the normal distribution: the curve is a probability density function , and probabilities, the median, the mean and the variance all come from integrals. This page uses calculus, so any trigonometric functions are in radians .
A continuous random variable X X X has a probability density function (pdf) f ( x ) f(x) f ( x ) with two properties:
f ( x ) ≥ 0 f(x) \ge 0 f ( x ) ≥ 0 for all x x x (the curve never goes below the axis);
the total area under the curve is 1 1 1 : ∫ − ∞ ∞ f ( x ) d x = 1 \displaystyle\int_{-\infty}^{\infty} f(x)\,dx = 1 ∫ − ∞ ∞ f ( x ) d x = 1 .
Most pdfs are zero outside some interval a ≤ x ≤ b a \le x \le b a ≤ x ≤ b , so the condition becomes ∫ a b f ( x ) d x = 1 \displaystyle\int_a^b f(x)\,dx = 1 ∫ a b f ( x ) d x = 1 . If a pdf contains an unknown constant k k k , this condition is how you find it.
P ( c ≤ X ≤ d ) = ∫ c d f ( x ) d x P(c \le X \le d) = \int_c^d f(x)\,dx P ( c ≤ X ≤ d ) = ∫ c d f ( x ) d x
This is the area under the curve between c c c and d d d (see evaluating definite integrals ). A single value has no area, so P ( X = c ) = 0 P(X = c) = 0 P ( X = c ) = 0 , and it doesn’t matter whether you write < \lt < or ≤ \le ≤ .
Note that f ( x ) f(x) f ( x ) itself is not a probability: it can be bigger than 1 1 1 . Only areas are probabilities.
The mode is the value of x x x where f ( x ) f(x) f ( x ) is greatest. Find it with f ′ ( x ) = 0 f'(x) = 0 f ′ ( x ) = 0 (checking it’s a maximum), but remember the maximum can also be at an endpoint of the interval.
The median m m m splits the area in half:
∫ − ∞ m f ( x ) d x = 1 2 \int_{-\infty}^{m} f(x)\,dx = \frac{1}{2} ∫ − ∞ m f ( x ) d x = 2 1
Solve this equation for m m m , by hand if you can, or with your GDC’s solver.
These are the continuous versions of the formulas for discrete random variables , with sums replaced by integrals:
E ( X ) = μ = ∫ − ∞ ∞ x f ( x ) d x E ( X 2 ) = ∫ − ∞ ∞ x 2 f ( x ) d x E(X) = \mu = \int_{-\infty}^{\infty} x f(x)\,dx \qquad\qquad E(X^2) = \int_{-\infty}^{\infty} x^2 f(x)\,dx E ( X ) = μ = ∫ − ∞ ∞ x f ( x ) d x E ( X 2 ) = ∫ − ∞ ∞ x 2 f ( x ) d x
Var ( X ) = E ( X 2 ) − [ E ( X ) ] 2 σ = Var ( X ) \text{Var}(X) = E(X^2) - [E(X)]^2 \qquad\qquad \sigma = \sqrt{\text{Var}(X)} Var ( X ) = E ( X 2 ) − [ E ( X ) ] 2 σ = Var ( X )
The linear transformation rules still hold: E ( a X + b ) = a E ( X ) + b E(aX + b) = aE(X) + b E ( a X + b ) = a E ( X ) + b and Var ( a X + b ) = a 2 Var ( X ) \text{Var}(aX + b) = a^2\,\text{Var}(X) Var ( a X + b ) = a 2 Var ( X ) .
A pdf can be defined by different formulas on different intervals. Integrate each piece over its own interval and add the results. For the median, first find which piece it’s in by checking the area of the first piece.
For a symmetric pdf, the mode (if there’s a single peak), median and mean are all in the middle. If the pdf has a long tail to the right (positively skewed), the mean is pulled right: usually mode < \lt < median < \lt < mean. Example 3 shows this.
On calculator papers you can find integrals, solve for the median and find the maximum with your GDC. Without a calculator, you need to integrate by hand, so practise both. Exact answers are expected when the integrals are straightforward.
X X X has pdf f ( x ) = k x 2 f(x) = kx^2 f ( x ) = k x 2 for 0 ≤ x ≤ 3 0 \le x \le 3 0 ≤ x ≤ 3 , and f ( x ) = 0 f(x) = 0 f ( x ) = 0 otherwise.
(a) Find k k k .
(b) Find P ( 1 ≤ X ≤ 2 ) P(1 \le X \le 2) P ( 1 ≤ X ≤ 2 ) .
Solution.
(a) The total area must be 1 1 1 :
∫ 0 3 k x 2 d x = k [ x 3 3 ] 0 3 = 9 k = 1 ⇒ k = 1 9 \int_0^3 kx^2\,dx = k\left[\frac{x^3}{3}\right]_0^3 = 9k = 1 \quad\Rightarrow\quad k = \frac{1}{9} ∫ 0 3 k x 2 d x = k [ 3 x 3 ] 0 3 = 9 k = 1 ⇒ k = 9 1
(b)
P ( 1 ≤ X ≤ 2 ) = ∫ 1 2 x 2 9 d x = [ x 3 27 ] 1 2 = 8 27 − 1 27 = 7 27 P(1 \le X \le 2) = \int_1^2 \frac{x^2}{9}\,dx = \left[\frac{x^3}{27}\right]_1^2 = \frac{8}{27} - \frac{1}{27} = \frac{7}{27} P ( 1 ≤ X ≤ 2 ) = ∫ 1 2 9 x 2 d x = [ 27 x 3 ] 1 2 = 27 8 − 27 1 = 27 7
X X X has pdf f ( x ) = x 8 f(x) = \dfrac{x}{8} f ( x ) = 8 x for 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 , and 0 0 0 otherwise. Find the mode, median, mean and standard deviation of X X X .
Solution.
Mode. f ( x ) = x 8 f(x) = \dfrac{x}{8} f ( x ) = 8 x is increasing, so its largest value is at the endpoint: the mode is 4 4 4 .
Median.
∫ 0 m x 8 d x = m 2 16 = 1 2 ⇒ m 2 = 8 ⇒ m = 2 2 ≈ 2.83 \int_0^m \frac{x}{8}\,dx = \frac{m^2}{16} = \frac{1}{2} \quad\Rightarrow\quad m^2 = 8 \quad\Rightarrow\quad m = 2\sqrt{2} \approx 2.83 ∫ 0 m 8 x d x = 16 m 2 = 2 1 ⇒ m 2 = 8 ⇒ m = 2 2 ≈ 2.83
(Reject m = − 2 2 m = -2\sqrt{2} m = − 2 2 , which is outside 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 .)
Mean.
E ( X ) = ∫ 0 4 x ⋅ x 8 d x = [ x 3 24 ] 0 4 = 64 24 = 8 3 E(X) = \int_0^4 x \cdot \frac{x}{8}\,dx = \left[\frac{x^3}{24}\right]_0^4 = \frac{64}{24} = \frac{8}{3} E ( X ) = ∫ 0 4 x ⋅ 8 x d x = [ 24 x 3 ] 0 4 = 24 64 = 3 8
Variance.
E ( X 2 ) = ∫ 0 4 x 3 8 d x = [ x 4 32 ] 0 4 = 8 E(X^2) = \int_0^4 \frac{x^3}{8}\,dx = \left[\frac{x^4}{32}\right]_0^4 = 8 E ( X 2 ) = ∫ 0 4 8 x 3 d x = [ 32 x 4 ] 0 4 = 8
Var ( X ) = 8 − ( 8 3 ) 2 = 72 − 64 9 = 8 9 \text{Var}(X) = 8 - \left(\frac{8}{3}\right)^2 = \frac{72 - 64}{9} = \frac{8}{9} Var ( X ) = 8 − ( 3 8 ) 2 = 9 72 − 64 = 9 8
The standard deviation is 8 / 9 = 2 2 3 ≈ 0.943 \sqrt{8/9} = \dfrac{2\sqrt{2}}{3} \approx 0.943 8/9 = 3 2 2 ≈ 0.943 (3 s.f.).
X X X has pdf f ( x ) = 3 64 x ( 4 − x ) 2 f(x) = \dfrac{3}{64}x(4 - x)^2 f ( x ) = 64 3 x ( 4 − x ) 2 for 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 , and 0 0 0 otherwise.
(a) Find the mode.
(b) Find the median.
(c) Show that E ( X ) = 1.6 E(X) = 1.6 E ( X ) = 1.6 and find Var ( X ) \text{Var}(X) Var ( X ) .
Solution.
(a) Differentiate x ( 4 − x ) 2 x(4 - x)^2 x ( 4 − x ) 2 with the product rule:
d d x [ x ( 4 − x ) 2 ] = ( 4 − x ) 2 − 2 x ( 4 − x ) = ( 4 − x ) ( 4 − 3 x ) \frac{d}{dx}\Big[x(4 - x)^2\Big] = (4 - x)^2 - 2x(4 - x) = (4 - x)(4 - 3x) d x d [ x ( 4 − x ) 2 ] = ( 4 − x ) 2 − 2 x ( 4 − x ) = ( 4 − x ) ( 4 − 3 x )
This is 0 0 0 at x = 4 x = 4 x = 4 (where f ( x ) = 0 f(x) = 0 f ( x ) = 0 , a minimum) and at x = 4 3 x = \dfrac{4}{3} x = 3 4 , where f f f has its maximum. The mode is 4 3 ≈ 1.33 \dfrac{4}{3} \approx 1.33 3 4 ≈ 1.33 .
(b) Solve ∫ 0 m 3 64 x ( 4 − x ) 2 d x = 0.5 \displaystyle\int_0^m \frac{3}{64}x(4 - x)^2\,dx = 0.5 ∫ 0 m 64 3 x ( 4 − x ) 2 d x = 0.5 with the GDC (enter the integral as a function of m m m and use the solver, or graph it and intersect with y = 0.5 y = 0.5 y = 0.5 ):
m = 1.54 (3 s.f.) m = 1.54 \text{ (3 s.f.)} m = 1.54 (3 s.f.)
(c) Expand: x ( 4 − x ) 2 = 16 x − 8 x 2 + x 3 x(4 - x)^2 = 16x - 8x^2 + x^3 x ( 4 − x ) 2 = 16 x − 8 x 2 + x 3 .
E ( X ) = 3 64 ∫ 0 4 ( 16 x 2 − 8 x 3 + x 4 ) d x = 3 64 [ 16 x 3 3 − 2 x 4 + x 5 5 ] 0 4 = 3 64 ( 1024 3 − 512 + 1024 5 ) = 3 64 ⋅ 512 15 = 1.6 E(X) = \frac{3}{64}\int_0^4 (16x^2 - 8x^3 + x^4)\,dx = \frac{3}{64}\left[\frac{16x^3}{3} - 2x^4 + \frac{x^5}{5}\right]_0^4 = \frac{3}{64}\left(\frac{1024}{3} - 512 + \frac{1024}{5}\right) = \frac{3}{64}\cdot\frac{512}{15} = 1.6 E ( X ) = 64 3 ∫ 0 4 ( 16 x 2 − 8 x 3 + x 4 ) d x = 64 3 [ 3 16 x 3 − 2 x 4 + 5 x 5 ] 0 4 = 64 3 ( 3 1024 − 512 + 5 1024 ) = 64 3 ⋅ 15 512 = 1.6
E ( X 2 ) = 3 64 ∫ 0 4 ( 16 x 3 − 8 x 4 + x 5 ) d x = 3 64 ( 1024 − 8192 5 + 2048 3 ) = 3 64 ⋅ 1024 15 = 3.2 E(X^2) = \frac{3}{64}\int_0^4 (16x^3 - 8x^4 + x^5)\,dx = \frac{3}{64}\left(1024 - \frac{8192}{5} + \frac{2048}{3}\right) = \frac{3}{64}\cdot\frac{1024}{15} = 3.2 E ( X 2 ) = 64 3 ∫ 0 4 ( 16 x 3 − 8 x 4 + x 5 ) d x = 64 3 ( 1024 − 5 8192 + 3 2048 ) = 64 3 ⋅ 15 1024 = 3.2
Var ( X ) = 3.2 − 1.6 2 = 0.64 \text{Var}(X) = 3.2 - 1.6^2 = 0.64 Var ( X ) = 3.2 − 1. 6 2 = 0.64
So the standard deviation is 0.8 0.8 0.8 .
Graph of f(x) = 3/64 x (4 - x) squared on 0 to 4, skewed to the right, with the mode 1.33, median 1.54 and mean 1.6 marked.
1
2
3
4
0.2
0.4
mode 1.33
mean 1.6
median 1.54
0.5
y = f(x)
x
A pdf with a long tail to the right: mode ≈ 1.33 \approx 1.33 ≈ 1.33 , median ≈ 1.54 \approx 1.54 ≈ 1.54 , mean = 1.6 = 1.6 = 1.6 .
X X X has pdf
f ( x ) = { k x , 0 ≤ x ≤ 2 k ( 6 − x ) 2 , 2 < x ≤ 6 0 , otherwise f(x) = \begin{cases} kx, & 0 \le x \le 2 \\ \dfrac{k(6 - x)}{2}, & 2 \lt x \le 6 \\ 0, & \text{otherwise} \end{cases} f ( x ) = ⎩ ⎨ ⎧ k x , 2 k ( 6 − x ) , 0 , 0 ≤ x ≤ 2 2 < x ≤ 6 otherwise
(a) Find k k k .
(b) Find P ( X > 4 ) P(X \gt 4) P ( X > 4 ) .
(c) Find the median.
(d) Find E ( X ) E(X) E ( X ) .
Solution.
(a) Add the areas of the two pieces:
∫ 0 2 k x d x + ∫ 2 6 k ( 6 − x ) 2 d x = 2 k + k 2 [ 6 x − x 2 2 ] 2 6 = 2 k + k 2 ( 18 − 10 ) = 6 k = 1 \int_0^2 kx\,dx + \int_2^6 \frac{k(6 - x)}{2}\,dx = 2k + \frac{k}{2}\left[6x - \frac{x^2}{2}\right]_2^6 = 2k + \frac{k}{2}(18 - 10) = 6k = 1 ∫ 0 2 k x d x + ∫ 2 6 2 k ( 6 − x ) d x = 2 k + 2 k [ 6 x − 2 x 2 ] 2 6 = 2 k + 2 k ( 18 − 10 ) = 6 k = 1
So k = 1 6 k = \dfrac{1}{6} k = 6 1 . (The graph is a triangle with base 6 6 6 and height f ( 2 ) = 2 k f(2) = 2k f ( 2 ) = 2 k , so the area is 1 2 ( 6 ) ( 2 k ) = 6 k \tfrac{1}{2}(6)(2k) = 6k 2 1 ( 6 ) ( 2 k ) = 6 k . ✓)
The pdf is f ( x ) = x 6 f(x) = \dfrac{x}{6} f ( x ) = 6 x on 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 and f ( x ) = 6 − x 12 f(x) = \dfrac{6 - x}{12} f ( x ) = 12 6 − x on 2 < x ≤ 6 2 \lt x \le 6 2 < x ≤ 6 .
(b)
P ( X > 4 ) = ∫ 4 6 6 − x 12 d x = 1 12 [ 6 x − x 2 2 ] 4 6 = 1 12 ( 18 − 16 ) = 1 6 P(X \gt 4) = \int_4^6 \frac{6 - x}{12}\,dx = \frac{1}{12}\left[6x - \frac{x^2}{2}\right]_4^6 = \frac{1}{12}(18 - 16) = \frac{1}{6} P ( X > 4 ) = ∫ 4 6 12 6 − x d x = 12 1 [ 6 x − 2 x 2 ] 4 6 = 12 1 ( 18 − 16 ) = 6 1
(c) The first piece has area ∫ 0 2 x 6 d x = 1 3 < 1 2 \displaystyle\int_0^2 \frac{x}{6}\,dx = \frac{1}{3} \lt \frac{1}{2} ∫ 0 2 6 x d x = 3 1 < 2 1 , so the median is in the second piece. It’s easiest to use the area to the right of m m m , which must also be 1 2 \tfrac{1}{2} 2 1 :
∫ m 6 6 − x 12 d x = ( 6 − m ) 2 24 = 1 2 ⇒ ( 6 − m ) 2 = 12 ⇒ m = 6 − 2 3 ≈ 2.54 \int_m^6 \frac{6 - x}{12}\,dx = \frac{(6 - m)^2}{24} = \frac{1}{2} \quad\Rightarrow\quad (6 - m)^2 = 12 \quad\Rightarrow\quad m = 6 - 2\sqrt{3} \approx 2.54 ∫ m 6 12 6 − x d x = 24 ( 6 − m ) 2 = 2 1 ⇒ ( 6 − m ) 2 = 12 ⇒ m = 6 − 2 3 ≈ 2.54
(Take 6 − m = + 12 6 - m = +\sqrt{12} 6 − m = + 12 , since m = 6 + 2 3 m = 6 + 2\sqrt{3} m = 6 + 2 3 is outside the interval.)
(d)
E ( X ) = ∫ 0 2 x 2 6 d x + ∫ 2 6 x ( 6 − x ) 12 d x = 8 18 + 1 12 [ 3 x 2 − x 3 3 ] 2 6 = 4 9 + 1 12 ⋅ 80 3 = 4 9 + 20 9 = 8 3 E(X) = \int_0^2 \frac{x^2}{6}\,dx + \int_2^6 \frac{x(6 - x)}{12}\,dx = \frac{8}{18} + \frac{1}{12}\left[3x^2 - \frac{x^3}{3}\right]_2^6 = \frac{4}{9} + \frac{1}{12}\cdot\frac{80}{3} = \frac{4}{9} + \frac{20}{9} = \frac{8}{3} E ( X ) = ∫ 0 2 6 x 2 d x + ∫ 2 6 12 x ( 6 − x ) d x = 18 8 + 12 1 [ 3 x 2 − 3 x 3 ] 2 6 = 9 4 + 12 1 ⋅ 3 80 = 9 4 + 9 20 = 3 8
Triangular pdf rising from (0, 0) to (2, 1/3) and falling to (6, 0). The area left of the median 2.54 is 0.5, and the area to the right of 4 is 1/6.
1
2
3
4
5
6
1/6
1/3
(2, 1/3)
m ≈ 2.54
0.5
1/6
x
The piecewise pdf of Example 4. Half the area lies left of m = 6 − 2 3 ≈ 2.54 m = 6 - 2\sqrt{3} \approx 2.54 m = 6 − 2 3 ≈ 2.54 , and P ( X > 4 ) = 1 6 P(X \gt 4) = \tfrac{1}{6} P ( X > 4 ) = 6 1 .
Treating f(x) as a probability. f ( 2 ) = 1 3 f(2) = \tfrac{1}{3} f ( 2 ) = 3 1 in Example 4 does not mean P ( X = 2 ) = 1 3 P(X = 2) = \tfrac{1}{3} P ( X = 2 ) = 3 1 . For a continuous variable, P ( X = 2 ) = 0 P(X = 2) = 0 P ( X = 2 ) = 0 ; probabilities come from areas.
Forgetting the x in the mean. E ( X ) = ∫ x f ( x ) d x E(X) = \int x f(x)\,dx E ( X ) = ∫ x f ( x ) d x , not ∫ f ( x ) d x \int f(x)\,dx ∫ f ( x ) d x (that’s always 1 1 1 ). For E ( X 2 ) E(X^2) E ( X 2 ) , multiply by x 2 x^2 x 2 .
Assuming the mode is where f′(x) = 0. The maximum might be at an endpoint, as in Example 2, where f f f is increasing all the way to x = 4 x = 4 x = 4 . Always compare with the endpoints.
Integrating over the wrong interval for the median. For a piecewise pdf, check the area of the first piece first. If it’s less than 1 2 \tfrac{1}{2} 2 1 , the median is in a later piece, and you must include the whole first piece’s area.
Keeping a root outside the domain. Equations for the median often have two solutions. Keep only the one inside the interval where the pdf is defined.
Writing Var(X) = E(X²). Subtract [ E ( X ) ] 2 [E(X)]^2 [ E ( X ) ] 2 . If your variance is bigger than a quarter of the square of the interval’s width, something has gone wrong.
1. (Warm-up) X X X has pdf f ( x ) = k x f(x) = kx f ( x ) = k x for 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 , and 0 0 0 otherwise. Find k k k and P ( X < 1 ) P(X \lt 1) P ( X < 1 ) .
Solution ∫ 0 2 k x d x = k [ x 2 2 ] 0 2 = 2 k = 1 ⇒ k = 1 2 \int_0^2 kx\,dx = k\left[\frac{x^2}{2}\right]_0^2 = 2k = 1 \quad\Rightarrow\quad k = \frac{1}{2} ∫ 0 2 k x d x = k [ 2 x 2 ] 0 2 = 2 k = 1 ⇒ k = 2 1 P ( X < 1 ) = ∫ 0 1 x 2 d x = [ x 2 4 ] 0 1 = 1 4 P(X \lt 1) = \int_0^1 \frac{x}{2}\,dx = \left[\frac{x^2}{4}\right]_0^1 = \frac{1}{4} P ( X < 1 ) = ∫ 0 1 2 x d x = [ 4 x 2 ] 0 1 = 4 1
2. (Warm-up) X X X has pdf f ( x ) = 1 5 f(x) = \dfrac{1}{5} f ( x ) = 5 1 for 2 ≤ x ≤ 7 2 \le x \le 7 2 ≤ x ≤ 7 , and 0 0 0 otherwise. Find P ( X > 6 ) P(X \gt 6) P ( X > 6 ) , the median and E ( X ) E(X) E ( X ) .
Solution P ( X > 6 ) = 1 5 ( 7 − 6 ) = 1 5 P(X \gt 6) = \dfrac{1}{5}(7 - 6) = \dfrac{1}{5} P ( X > 6 ) = 5 1 ( 7 − 6 ) = 5 1 (a rectangle of width 1 1 1 and height 1 5 \tfrac{1}{5} 5 1 ).
The pdf is symmetric about the centre of the interval, so the median is 2 + 7 2 = 4.5 \dfrac{2 + 7}{2} = 4.5 2 2 + 7 = 4.5 .
E ( X ) = ∫ 2 7 x 5 d x = [ x 2 10 ] 2 7 = 49 − 4 10 = 4.5 E(X) = \int_2^7 \frac{x}{5}\,dx = \left[\frac{x^2}{10}\right]_2^7 = \frac{49 - 4}{10} = 4.5 E ( X ) = ∫ 2 7 5 x d x = [ 10 x 2 ] 2 7 = 10 49 − 4 = 4.5
3. (Core) X X X has pdf f ( x ) = k ( 4 − x 2 ) f(x) = k(4 - x^2) f ( x ) = k ( 4 − x 2 ) for 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 , and 0 0 0 otherwise.
(a) Find k k k .
(b) Find P ( X < 1 ) P(X \lt 1) P ( X < 1 ) .
(c) State the mode and find E ( X ) E(X) E ( X ) .
Solution (a)
∫ 0 2 k ( 4 − x 2 ) d x = k [ 4 x − x 3 3 ] 0 2 = k ( 8 − 8 3 ) = 16 k 3 = 1 ⇒ k = 3 16 \int_0^2 k(4 - x^2)\,dx = k\left[4x - \frac{x^3}{3}\right]_0^2 = k\left(8 - \frac{8}{3}\right) = \frac{16k}{3} = 1 \quad\Rightarrow\quad k = \frac{3}{16} ∫ 0 2 k ( 4 − x 2 ) d x = k [ 4 x − 3 x 3 ] 0 2 = k ( 8 − 3 8 ) = 3 16 k = 1 ⇒ k = 16 3 (b)
P ( X < 1 ) = 3 16 [ 4 x − x 3 3 ] 0 1 = 3 16 ⋅ 11 3 = 11 16 P(X \lt 1) = \frac{3}{16}\left[4x - \frac{x^3}{3}\right]_0^1 = \frac{3}{16}\cdot\frac{11}{3} = \frac{11}{16} P ( X < 1 ) = 16 3 [ 4 x − 3 x 3 ] 0 1 = 16 3 ⋅ 3 11 = 16 11 (c) f f f is decreasing on 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 , so the mode is 0 0 0 .
E ( X ) = 3 16 ∫ 0 2 ( 4 x − x 3 ) d x = 3 16 [ 2 x 2 − x 4 4 ] 0 2 = 3 16 ( 8 − 4 ) = 3 4 E(X) = \frac{3}{16}\int_0^2 (4x - x^3)\,dx = \frac{3}{16}\left[2x^2 - \frac{x^4}{4}\right]_0^2 = \frac{3}{16}(8 - 4) = \frac{3}{4} E ( X ) = 16 3 ∫ 0 2 ( 4 x − x 3 ) d x = 16 3 [ 2 x 2 − 4 x 4 ] 0 2 = 16 3 ( 8 − 4 ) = 4 3
4. (Core) X X X has pdf f ( x ) = 3 8 x 2 f(x) = \dfrac{3}{8}x^2 f ( x ) = 8 3 x 2 for 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 , and 0 0 0 otherwise. Find the median, the mean and the variance of X X X .
Solution Median:
∫ 0 m 3 8 x 2 d x = m 3 8 = 1 2 ⇒ m 3 = 4 ⇒ m = 4 3 ≈ 1.59 \int_0^m \frac{3}{8}x^2\,dx = \frac{m^3}{8} = \frac{1}{2} \quad\Rightarrow\quad m^3 = 4 \quad\Rightarrow\quad m = \sqrt[3]{4} \approx 1.59 ∫ 0 m 8 3 x 2 d x = 8 m 3 = 2 1 ⇒ m 3 = 4 ⇒ m = 3 4 ≈ 1.59 Mean and variance:
E ( X ) = 3 8 ∫ 0 2 x 3 d x = 3 8 ⋅ 4 = 1.5 E ( X 2 ) = 3 8 ∫ 0 2 x 4 d x = 3 8 ⋅ 32 5 = 2.4 E(X) = \frac{3}{8}\int_0^2 x^3\,dx = \frac{3}{8}\cdot 4 = 1.5 \qquad E(X^2) = \frac{3}{8}\int_0^2 x^4\,dx = \frac{3}{8}\cdot\frac{32}{5} = 2.4 E ( X ) = 8 3 ∫ 0 2 x 3 d x = 8 3 ⋅ 4 = 1.5 E ( X 2 ) = 8 3 ∫ 0 2 x 4 d x = 8 3 ⋅ 5 32 = 2.4 Var ( X ) = 2.4 − 1.5 2 = 0.15 \text{Var}(X) = 2.4 - 1.5^2 = 0.15 Var ( X ) = 2.4 − 1. 5 2 = 0.15
5. (Core) X X X has pdf f ( x ) = k sin x f(x) = k\sin x f ( x ) = k sin x for 0 ≤ x ≤ π 0 \le x \le \pi 0 ≤ x ≤ π (radians), and 0 0 0 otherwise.
(a) Find k k k .
(b) Find P ( X < π 3 ) P\left(X \lt \dfrac{\pi}{3}\right) P ( X < 3 π ) .
(c) Write down the mode and the median.
Solution (a)
∫ 0 π k sin x d x = k [ − cos x ] 0 π = k ( 1 + 1 ) = 2 k = 1 ⇒ k = 1 2 \int_0^{\pi} k\sin x\,dx = k\Big[-\cos x\Big]_0^{\pi} = k(1 + 1) = 2k = 1 \quad\Rightarrow\quad k = \frac{1}{2} ∫ 0 π k sin x d x = k [ − cos x ] 0 π = k ( 1 + 1 ) = 2 k = 1 ⇒ k = 2 1 (b)
P ( X < π 3 ) = 1 2 [ − cos x ] 0 π / 3 = 1 2 ( − 1 2 + 1 ) = 1 4 P\left(X \lt \frac{\pi}{3}\right) = \frac{1}{2}\Big[-\cos x\Big]_0^{\pi/3} = \frac{1}{2}\left(-\frac{1}{2} + 1\right) = \frac{1}{4} P ( X < 3 π ) = 2 1 [ − cos x ] 0 π /3 = 2 1 ( − 2 1 + 1 ) = 4 1 (c) sin x \sin x sin x has its maximum at x = π 2 x = \dfrac{\pi}{2} x = 2 π , so the mode is π 2 \dfrac{\pi}{2} 2 π . The graph is symmetric about x = π 2 x = \dfrac{\pi}{2} x = 2 π , so the median is also π 2 \dfrac{\pi}{2} 2 π .
6. (Core) X X X has pdf
f ( x ) = { x 10 , 0 ≤ x ≤ 2 k , 2 < x ≤ 6 0 , otherwise f(x) = \begin{cases} \dfrac{x}{10}, & 0 \le x \le 2 \\ k, & 2 \lt x \le 6 \\ 0, & \text{otherwise} \end{cases} f ( x ) = ⎩ ⎨ ⎧ 10 x , k , 0 , 0 ≤ x ≤ 2 2 < x ≤ 6 otherwise
Find k k k , the median and E ( X ) E(X) E ( X ) .
Solution Area of the first piece: ∫ 0 2 x 10 d x = 4 20 = 0.2 \displaystyle\int_0^2 \frac{x}{10}\,dx = \frac{4}{20} = 0.2 ∫ 0 2 10 x d x = 20 4 = 0.2 . Area of the second piece: 4 k 4k 4 k . So 0.2 + 4 k = 1 0.2 + 4k = 1 0.2 + 4 k = 1 and k = 0.2 k = 0.2 k = 0.2 .
The first piece has area 0.2 < 0.5 0.2 \lt 0.5 0.2 < 0.5 , so the median is in the second piece:
0.2 + 0.2 ( m − 2 ) = 0.5 ⇒ m − 2 = 1.5 ⇒ m = 3.5 0.2 + 0.2(m - 2) = 0.5 \quad\Rightarrow\quad m - 2 = 1.5 \quad\Rightarrow\quad m = 3.5 0.2 + 0.2 ( m − 2 ) = 0.5 ⇒ m − 2 = 1.5 ⇒ m = 3.5 E ( X ) = ∫ 0 2 x 2 10 d x + ∫ 2 6 0.2 x d x = 8 30 + 0.1 [ x 2 ] 2 6 = 4 15 + 3.2 = 52 15 ≈ 3.47 E(X) = \int_0^2 \frac{x^2}{10}\,dx + \int_2^6 0.2x\,dx = \frac{8}{30} + 0.1\Big[x^2\Big]_2^6 = \frac{4}{15} + 3.2 = \frac{52}{15} \approx 3.47 E ( X ) = ∫ 0 2 10 x 2 d x + ∫ 2 6 0.2 x d x = 30 8 + 0.1 [ x 2 ] 2 6 = 15 4 + 3.2 = 15 52 ≈ 3.47
7. (Core) X X X has pdf f ( x ) = k e − x / 2 f(x) = k\,e^{-x/2} f ( x ) = k e − x /2 for 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 , and 0 0 0 otherwise.
(a) Show that k = 1 2 ( 1 − e − 2 ) k = \dfrac{1}{2(1 - e^{-2})} k = 2 ( 1 − e − 2 ) 1 .
(b) Use your GDC to find the median and the mean of X X X .
Solution (a)
∫ 0 4 k e − x / 2 d x = k [ − 2 e − x / 2 ] 0 4 = k ( 2 − 2 e − 2 ) = 1 ⇒ k = 1 2 ( 1 − e − 2 ) \int_0^4 k\,e^{-x/2}\,dx = k\Big[-2e^{-x/2}\Big]_0^4 = k(2 - 2e^{-2}) = 1 \quad\Rightarrow\quad k = \frac{1}{2(1 - e^{-2})} ∫ 0 4 k e − x /2 d x = k [ − 2 e − x /2 ] 0 4 = k ( 2 − 2 e − 2 ) = 1 ⇒ k = 2 ( 1 − e − 2 ) 1 (k ≈ 0.578 k \approx 0.578 k ≈ 0.578 .)
(b) Solving ∫ 0 m k e − x / 2 d x = 0.5 \displaystyle\int_0^m k\,e^{-x/2}\,dx = 0.5 ∫ 0 m k e − x /2 d x = 0.5 with the GDC gives m = 1.13 m = 1.13 m = 1.13 (3 s.f.). (By hand: e − m / 2 = 1 + e − 2 2 e^{-m/2} = \dfrac{1 + e^{-2}}{2} e − m /2 = 2 1 + e − 2 , so m = − 2 ln ( 1 + e − 2 2 ) m = -2\ln\left(\dfrac{1 + e^{-2}}{2}\right) m = − 2 ln ( 2 1 + e − 2 ) .)
E ( X ) = ∫ 0 4 x ⋅ k e − x / 2 d x = 1.37 (3 s.f., GDC) E(X) = \int_0^4 x \cdot k\,e^{-x/2}\,dx = 1.37 \text{ (3 s.f., GDC)} E ( X ) = ∫ 0 4 x ⋅ k e − x /2 d x = 1.37 (3 s.f., GDC)
8. (Challenge) X X X has pdf f ( x ) = a x + b f(x) = ax + b f ( x ) = a x + b for 0 ≤ x ≤ 3 0 \le x \le 3 0 ≤ x ≤ 3 , and 0 0 0 otherwise. Given that E ( X ) = 1.75 E(X) = 1.75 E ( X ) = 1.75 , find a a a and b b b .
Solution Total area:
∫ 0 3 ( a x + b ) d x = 9 a 2 + 3 b = 1 \int_0^3 (ax + b)\,dx = \frac{9a}{2} + 3b = 1 ∫ 0 3 ( a x + b ) d x = 2 9 a + 3 b = 1 Mean:
∫ 0 3 ( a x 2 + b x ) d x = 9 a + 9 b 2 = 1.75 \int_0^3 (ax^2 + bx)\,dx = 9a + \frac{9b}{2} = 1.75 ∫ 0 3 ( a x 2 + b x ) d x = 9 a + 2 9 b = 1.75 From the first equation, b = 1 − 4.5 a 3 b = \dfrac{1 - 4.5a}{3} b = 3 1 − 4.5 a . Substitute into the second:
9 a + 1.5 ( 1 − 4.5 a ) = 1.75 ⇒ 2.25 a = 0.25 ⇒ a = 1 9 9a + 1.5(1 - 4.5a) = 1.75 \quad\Rightarrow\quad 2.25a = 0.25 \quad\Rightarrow\quad a = \frac{1}{9} 9 a + 1.5 ( 1 − 4.5 a ) = 1.75 ⇒ 2.25 a = 0.25 ⇒ a = 9 1 Then b = 1 − 0.5 3 = 1 6 b = \dfrac{1 - 0.5}{3} = \dfrac{1}{6} b = 3 1 − 0.5 = 6 1 .
Check: f ( x ) = x 9 + 1 6 ≥ 0 f(x) = \dfrac{x}{9} + \dfrac{1}{6} \ge 0 f ( x ) = 9 x + 6 1 ≥ 0 on 0 ≤ x ≤ 3 0 \le x \le 3 0 ≤ x ≤ 3 , so it’s a valid pdf. ✓
9. (Challenge) X X X has the pdf from Example 2, f ( x ) = x 8 f(x) = \dfrac{x}{8} f ( x ) = 8 x for 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 . Let Y = 2 X + 3 Y = 2X + 3 Y = 2 X + 3 .
(a) Find E ( Y ) E(Y) E ( Y ) and Var ( Y ) \text{Var}(Y) Var ( Y ) .
(b) Find P ( Y > 9 ) P(Y \gt 9) P ( Y > 9 ) .
Solution (a) From Example 2, E ( X ) = 8 3 E(X) = \dfrac{8}{3} E ( X ) = 3 8 and Var ( X ) = 8 9 \text{Var}(X) = \dfrac{8}{9} Var ( X ) = 9 8 .
E ( Y ) = 2 ⋅ 8 3 + 3 = 25 3 Var ( Y ) = 2 2 ⋅ 8 9 = 32 9 E(Y) = 2\cdot\frac{8}{3} + 3 = \frac{25}{3} \qquad \text{Var}(Y) = 2^2\cdot\frac{8}{9} = \frac{32}{9} E ( Y ) = 2 ⋅ 3 8 + 3 = 3 25 Var ( Y ) = 2 2 ⋅ 9 8 = 9 32 (b) Y > 9 Y \gt 9 Y > 9 means 2 X + 3 > 9 2X + 3 \gt 9 2 X + 3 > 9 , so X > 3 X \gt 3 X > 3 :
P ( X > 3 ) = ∫ 3 4 x 8 d x = [ x 2 16 ] 3 4 = 1 − 9 16 = 7 16 P(X \gt 3) = \int_3^4 \frac{x}{8}\,dx = \left[\frac{x^2}{16}\right]_3^4 = 1 - \frac{9}{16} = \frac{7}{16} P ( X > 3 ) = ∫ 3 4 8 x d x = [ 16 x 2 ] 3 4 = 1 − 16 9 = 16 7
Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.
In every question, f ( x ) = 0 f(x) = 0 f ( x ) = 0 outside the interval given. Give GDC answers to 3 significant figures.
H1. (Foundations) Without a calculator: X X X has pdf f ( x ) = k ( x + 1 ) f(x) = k(x + 1) f ( x ) = k ( x + 1 ) for 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 .
(a) Find k k k .
(b) Find P ( X > 1 ) P(X \gt 1) P ( X > 1 ) .
H2. (Foundations) Without a calculator: X X X has pdf f ( x ) = k x 3 f(x) = kx^3 f ( x ) = k x 3 for 0 ≤ x ≤ 2 0 \le x \le 2 0 ≤ x ≤ 2 .
(a) Show that k = 1 4 k = \dfrac{1}{4} k = 4 1 .
(b) Find P ( 0.5 ≤ X ≤ 1.5 ) P(0.5 \le X \le 1.5) P ( 0.5 ≤ X ≤ 1.5 ) .
(c) Find E ( X ) E(X) E ( X ) and Var ( X ) \text{Var}(X) Var ( X ) .
H3. (Core) X X X has pdf f ( x ) = 2 x 2 f(x) = \dfrac{2}{x^2} f ( x ) = x 2 2 for 1 ≤ x ≤ 2 1 \le x \le 2 1 ≤ x ≤ 2 .
(a) Show that f f f is a valid pdf.
(b) Write down the mode, and explain why it isn’t found with f ′ ( x ) = 0 f'(x) = 0 f ′ ( x ) = 0 .
(c) Find the median exactly.
(d) Show that E ( X ) = 2 ln 2 E(X) = 2\ln 2 E ( X ) = 2 ln 2 , and find Var ( X ) \text{Var}(X) Var ( X ) to 3 significant figures.
H4. (Core) Without a calculator: X X X has pdf f ( x ) = k ( 4 − x ) f(x) = k(4 - x) f ( x ) = k ( 4 − x ) for 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 .
(a) Find k k k and P ( X > 2 ) P(X \gt 2) P ( X > 2 ) .
(b) Show that the median m m m satisfies m 2 − 8 m + 8 = 0 m^2 - 8m + 8 = 0 m 2 − 8 m + 8 = 0 .
(c) Solve this equation and decide which root is the median. Explain your choice.
(d) Find E ( X ) E(X) E ( X ) .
H5. (Core) (IB style) X X X has pdf f ( x ) = k x 2 ( 3 − x ) f(x) = kx^2(3 - x) f ( x ) = k x 2 ( 3 − x ) for 0 ≤ x ≤ 3 0 \le x \le 3 0 ≤ x ≤ 3 .
(a) Show that k = 4 27 k = \dfrac{4}{27} k = 27 4 .
(b) Use calculus to find the mode of X X X .
(c) Find E ( X ) E(X) E ( X ) and Var ( X ) \text{Var}(X) Var ( X ) exactly.
(d) Use your GDC to find the median of X X X .
(e) Put the mode, median and mean in order, and explain how the order matches the shape of the graph.
H6. (Core) The time T T T minutes that a commuter waits for a streetcar in Toronto is modelled (hypothetically) by the pdf
f ( t ) = 3 1000 ( 10 − t ) 2 , 0 ≤ t ≤ 10 f(t) = \frac{3}{1000}(10 - t)^2, \qquad 0 \le t \le 10 f ( t ) = 1000 3 ( 10 − t ) 2 , 0 ≤ t ≤ 10
(a) Show that f f f is a valid pdf.
(b) Find the probability that the commuter waits more than 5 5 5 minutes.
(c) Find the probability that the commuter waits less than 2 2 2 minutes.
(d) Find the median waiting time, to the nearest second.
(e) Find the mean and the standard deviation of the waiting time.
H7. (Challenge) X X X has pdf
f ( x ) = { k x 2 , 0 ≤ x ≤ 2 k ( 6 − x ) , 2 < x ≤ 6 0 , otherwise f(x) = \begin{cases} kx^2, & 0 \le x \le 2 \\ k(6 - x), & 2 \lt x \le 6 \\ 0, & \text{otherwise} \end{cases} f ( x ) = ⎩ ⎨ ⎧ k x 2 , k ( 6 − x ) , 0 , 0 ≤ x ≤ 2 2 < x ≤ 6 otherwise
(a) Find k k k .
(b) Write down the mode of X X X .
(c) Show that the median lies in the second piece, then find it exactly. Check that your answer is in 2 < x ≤ 6 2 \lt x \le 6 2 < x ≤ 6 .
(d) Find E ( X ) E(X) E ( X ) .
H8. (Challenge) Let g ( x ) = x 2 − 4 x + 3 g(x) = x^2 - 4x + 3 g ( x ) = x 2 − 4 x + 3 .
(a) A student wants k g ( x ) kg(x) k g ( x ) for 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 to be a pdf. They make the total area 1 1 1 and get a value of k k k . Find this value.
(b) Explain why k g ( x ) kg(x) k g ( x ) on 0 ≤ x ≤ 4 0 \le x \le 4 0 ≤ x ≤ 4 is not a pdf for this k k k , or for any other value of k k k .
(c) Instead, let h ( x ) = g ( x ) h(x) = g(x) h ( x ) = g ( x ) for 3 ≤ x ≤ b 3 \le x \le b 3 ≤ x ≤ b , where b > 3 b \gt 3 b > 3 . Explain why h ( x ) ≥ 0 h(x) \ge 0 h ( x ) ≥ 0 on this interval, show that b b b satisfies b 3 − 6 b 2 + 9 b − 3 = 0 b^3 - 6b^2 + 9b - 3 = 0 b 3 − 6 b 2 + 9 b − 3 = 0 , and use your GDC to find b b b .
H9. (Challenge) For a constant n > 0 n \gt 0 n > 0 , X X X has pdf f ( x ) = k x n f(x) = kx^n f ( x ) = k x n for 0 ≤ x ≤ 1 0 \le x \le 1 0 ≤ x ≤ 1 .
(a) Show that k = n + 1 k = n + 1 k = n + 1 .
(b) Given that P ( X ≤ 0.5 ) = 1 16 P(X \le 0.5) = \dfrac{1}{16} P ( X ≤ 0.5 ) = 16 1 , find n n n .
(c) For this value of n n n , find the exact median, E ( X ) E(X) E ( X ) and Var ( X ) \text{Var}(X) Var ( X ) .
(d) Is the median bigger or smaller than the mean? Explain why that makes sense from the graph of f f f .
H10. (Challenge) The time X X X hours to fully charge a power-tool battery is modelled (hypothetically) by the pdf f ( x ) = 3 4 ( x − 1 ) ( 3 − x ) f(x) = \dfrac{3}{4}(x - 1)(3 - x) f ( x ) = 4 3 ( x − 1 ) ( 3 − x ) for 1 ≤ x ≤ 3 1 \le x \le 3 1 ≤ x ≤ 3 . A student’s work is shown.
Mode: f ′ ( x ) = 0 f'(x) = 0 f ′ ( x ) = 0 gives x = 2 x = 2 x = 2 , so the mode is 2 2 2 hours.
Variance: Var ( X ) = ∫ 1 3 x 2 f ( x ) d x = 4.2 \text{Var}(X) = \displaystyle\int_1^3 x^2 f(x)\,dx = 4.2 Var ( X ) = ∫ 1 3 x 2 f ( x ) d x = 4.2 .
In minutes, Y = 60 X Y = 60X Y = 60 X , so Var ( Y ) = 60 × 4.2 = 252 \text{Var}(Y) = 60 \times 4.2 = 252 Var ( Y ) = 60 × 4.2 = 252 .
Answer these:
(a) Which step is correct? Find the two errors and explain each one.
(b) Find the correct Var ( X ) \text{Var}(X) Var ( X ) and the correct standard deviation of Y Y Y in minutes.
(c) Find the probability that a charge takes longer than 2.5 2.5 2.5 hours.