MATH 141 Calculus 2 • McGill University, Montreal

Corrected exercises: probability density functions (MATH 141)

This is the corrected exercise set for section 8.5 of Stewart, probability density functions, in MATH 141, Calculus 2, the integral calculus course taken at McGill University. It is the chapter where improper integrals, substitution and integration by parts stop being techniques and start answering questions about waiting times and lifetimes. Every answer is exact, as on the calculator-free exam: e−2e^{-2}, 4ln⁡24\ln 2, 136\frac{13}{6}, and when an order of magnitude helps it is derived from e≈2.72e \approx 2.72 and ln⁡2≈0.69\ln 2 \approx 0.69.

The thread running through the whole set: a probability is an AREA under the density, never a HEIGHT of it. The constant kk is fixed by the total area 11; P(a≤X≤b)P(a \le X \le b) is the area over [a,b][a, b]; the cumulative distribution function is the area accumulated from −∞-\infty; the median is the cut that splits the area in half; the mean is the balance point, an integral that must converge before any symmetry is invoked. The height f(x)f(x) is a probability per unit length, which may exceed 11, and P(X=a)=0P(X = a) = 0 whatever f(a)f(a) is.

The traps named explicitly in the solutions: checking the total area but not the sign, taking the area instead of its reciprocal for kk, plugging ∞\infty into a bracket instead of writing a limit, restarting FF at 00 on each piece, taking the middle of the interval for the median, believing that half of the customers wait longer than the mean, using symmetry to give a mean that does not exist, and forgetting that the complement of a central strip is made of two tails.

10 corrected exercises • 100 points • 150 minutes

Revision sheet for this chapter → Every MATH 141 chapter →

Course recap

  • • ff is a density when f(x)≥0f(x) \ge 0 for all xx AND ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1. Then P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx, and P(X=a)=0P(X = a) = 0.
  • • Cumulative distribution function: F(x)=∫−∞xf(t) dtF(x) = \int_{-\infty}^{x} f(t)\,dt; P(a≤X≤b)=F(b)−F(a)P(a \le X \le b) = F(b) - F(a) and F′=fF' = f where ff is continuous.
  • • Mean: μ=∫−∞∞xf(x) dx\mu = \int_{-\infty}^{\infty} x f(x)\,dx, when this improper integral converges. Median: the number mm with F(m)=12F(m) = \frac12.
  • • Exponential density with mean μ\mu: f(t)=1μe−t/μf(t) = \frac{1}{\mu}e^{-t/\mu} for t≥0t \ge 0; F(t)=1−e−t/μF(t) = 1 - e^{-t/\mu}; median μln⁡2\mu\ln 2.
  • • Normal density: f(x)=1σ2πe−(x−μ)2/(2σ2)f(x) = \frac{1}{\sigma\sqrt{2\pi}}e^{-(x - \mu)^2/(2\sigma^2)}, symmetric about its mean μ\mu, inflection points at μ±σ\mu \pm \sigma; no elementary antiderivative.
  • • ∫1∞dxxp\int_1^\infty \frac{dx}{x^p} converges exactly when p>1p > 1, with value 1p−1\frac{1}{p - 1}.

Part A: the basics (/50)

Exercise 1: Is it a density? Two conditions, and a height of 3 that is allowed

A function ff is a probability density function of a random variable XX when f(x)≥0f(x) \ge 0 for every xx AND ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1. Then P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx: a probability is an AREA under the graph of ff. Nothing in the definition bounds the HEIGHT of ff.

Each function below is 00 outside the interval where it is given. The figure shows the first one.

0.250.50.7511.251.50.511.522.533.5f(x) = 3x²height 3shaded: P(X ≤ 1/2)f = 0 for x > 1
  • a) f(x)=3x2f(x) = 3x^2 on [0,1][0, 1]. Show that ff is a density even though f(1)=3f(1) = 3, then compute P(X≤12)P(X \le \frac{1}{2}) and P(X≥12)P(X \ge \frac{1}{2}).
  • b) g(x)=xg(x) = x on [−1,3][-1, \sqrt{3}]. Compute ∫−13g(x) dx\int_{-1}^{\sqrt{3}} g(x)\,dx. Is gg a density?
  • c) h(x)=2(1+x)3h(x) = \frac{2}{(1 + x)^3} on [0,∞)[0, \infty). Show that hh is a density, writing the improper integral as a limit, and compute P(X>1)P(X > 1).
  • d) q(x)=1xq(x) = \frac{1}{x} on [1,∞)[1, \infty). Explain why no constant cc makes c q(x)c\,q(x) a density.
  • e) A student writes: since f(1)=3f(1) = 3 in part a), ff cannot be a density, because a probability never exceeds 11. Correct the reasoning and say what the number f(1)=3f(1) = 3 does mean.
Show the solution

Answers

  • a) f≥0f \ge 0 and ∫013x2 dx=1\int_0^1 3x^2\,dx = 1: a density. P(X≤12)=18P(X \le \frac12) = \frac18, P(X≥12)=78P(X \ge \frac12) = \frac78.
  • b) ∫−13x dx=1\int_{-1}^{\sqrt3} x\,dx = 1, but g<0g < 0 on [−1,0)[-1, 0): NOT a density.
  • c) lim⁡t→∞(1−1(1+t)2)=1\lim_{t \to \infty}\left(1 - \frac{1}{(1+t)^2}\right) = 1: a density. P(X>1)=14P(X > 1) = \frac14.
  • d) ∫1tdxx=ln⁡t→∞\int_1^t \frac{dx}{x} = \ln t \to \infty: the area is infinite for c>0c > 0, negative or zero otherwise.
  • e) f(1)f(1) is a probability PER UNIT LENGTH: P(1−Δx≤X≤1)≈3 ΔxP(1 - \Delta x \le X \le 1) \approx 3\,\Delta x, and P(X=1)=0P(X = 1) = 0.

a) Two conditions, checked one at a time. Sign: 3x2≥03x^2 \ge 0 on [0,1][0, 1] and f=0f = 0 elsewhere, so f≥0f \ge 0 everywhere. Area: ∫−∞∞f(x) dx=∫013x2 dx=[x3]01=1\int_{-\infty}^{\infty} f(x)\,dx = \int_0^1 3x^2\,dx = \left[x^3\right]_0^1 = 1. Both hold, so ff is a density, and the value f(1)=3f(1) = 3 plays no role in either condition. Then P(X≤12)=∫01/23x2 dx=[x3]01/2=18P(X \le \frac12) = \int_0^{1/2} 3x^2\,dx = \left[x^3\right]_0^{1/2} = \frac18, the shaded area of the figure, and P(X≥12)=1−18=78P(X \ge \frac12) = 1 - \frac18 = \frac78. Half of the interval carries only one eighth of the probability: the mass sits near 11, where the curve is high. That is how the height of ff matters: it says WHERE the probability is concentrated, not how large a probability is.

b) ∫−13x dx=[x22]−13=32−12=1\int_{-1}^{\sqrt3} x\,dx = \left[\frac{x^2}{2}\right]_{-1}^{\sqrt3} = \frac32 - \frac12 = 1. The area condition holds, and it is a trap: the integral is a SIGNED area, and the negative part over [−1,0)[-1, 0) has been cancelled by extra positive area on the right. Since g(x)=x<0g(x) = x < 0 for −1≤x<0-1 \le x < 0, the sign condition fails and gg is NOT a density. Used as one, it would give P(−1≤X≤0)=∫−10x dx=−12P(-1 \le X \le 0) = \int_{-1}^0 x\,dx = -\frac12, a negative probability. Checking only that the total is 11 is the classic half-answer, and it costs the whole question.

c) Sign: (1+x)3>0(1 + x)^3 > 0 for x≥0x \ge 0, so h>0h > 0 there. Area: the interval is infinite, so the integral is improper and is written as a limit. An antiderivative of 2(1+x)−32(1 + x)^{-3} is −(1+x)−2-(1 + x)^{-2}; check by differentiating: ddx[−(1+x)−2]=2(1+x)−3\frac{d}{dx}\left[-(1+x)^{-2}\right] = 2(1+x)^{-3}. So ∫0th(x) dx=[−1(1+x)2]0t=1−1(1+t)2\int_0^t h(x)\,dx = \left[-\frac{1}{(1+x)^2}\right]_0^t = 1 - \frac{1}{(1+t)^2}, which tends to 11 as t→∞t \to \infty. hh is a density. Then P(X>1)=lim⁡t→∞∫1th(x) dx=lim⁡t→∞(14−1(1+t)2)=14P(X > 1) = \lim_{t \to \infty} \int_1^t h(x)\,dx = \lim_{t \to \infty}\left(\frac14 - \frac{1}{(1+t)^2}\right) = \frac14. Writing [−1(1+x)2]1∞\left[-\frac{1}{(1+x)^2}\right]_1^{\infty} with ∞\infty plugged in as a number is what markers penalize: the limit is the definition, and it must appear.

d) The sign condition forces c≥0c \ge 0, and c=0c = 0 gives area 00, not 11. For c>0c > 0: ∫1tcx dx=cln⁡t→∞\int_1^t \frac{c}{x}\,dx = c \ln t \to \infty as t→∞t \to \infty. The area under 1x\frac{1}{x} on [1,∞)[1, \infty) is INFINITE, and no positive multiple of an infinite area equals 11. Normalizing means dividing by the total area, which is only possible when that area is finite and non-zero. Compare with part c): 2(1+x)3\frac{2}{(1+x)^3} decreases fast enough for the area to converge, 1x\frac{1}{x} does not.

e) The student confuses a height with an area. The value f(x)f(x) is a probability per unit length, like a density in kilograms per metre: only its product with a length, and in general its integral, is a probability. For a short interval, P(1−Δx≤X≤1)≈f(1) Δx=3 ΔxP(1 - \Delta x \le X \le 1) \approx f(1)\,\Delta x = 3\,\Delta x. With Δx=0.01\Delta x = 0.01 this is about 0.030.03, and the exact value is 1−0.993=0.0297011 - 0.99^3 = 0.029701. As Δx→0\Delta x \to 0 the probability tends to 00: P(X=1)=∫11f(x) dx=0P(X = 1) = \int_1^1 f(x)\,dx = 0, whatever the height f(1)f(1) is. So heights can be any non-negative number, including 33 or 10001000; what can never exceed 11 is an area.

Exercise 2: Finding k: normalize first, then every probability is an area

When a density is given up to a constant, f(x)=k φ(x)f(x) = k\,\varphi(x), the constant is not a free choice: the condition ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1 fixes it. Any probability computed with a wrong kk is wrong by the same factor, so kk is always the first line of the answer.

The figure shows the shape of the first density, with the strip of part b) shaded; its vertical scale is what part a) must find.

1/213/22y = k x(2 − x)
  • a) f(x)=kx(2−x)f(x) = kx(2 - x) on [0,2][0, 2] and 00 elsewhere. Find kk.
  • b) Compute P(X≤12)P(X \le \frac12), then P(12≤X≤32)P(\frac12 \le X \le \frac32) without a second integral.
  • c) What is P(X=1)P(X = 1)? What is P(X<1)P(X < 1), and why is it equal to P(X≤1)P(X \le 1)?
  • d) g(x)=k1+x2g(x) = \frac{k}{1 + x^2} for every real xx. Find kk, then P(X>1)P(X > 1) and P(∣X∣≤3)P(|X| \le \sqrt3).
  • e) The graph of gg is symmetric about 00. A student concludes that the mean of XX is 00. Test the claim by writing the integral that defines the mean.
Show the solution

Answers

  • a) ∫02x(2−x) dx=43\int_0^2 x(2 - x)\,dx = \frac43, so k=34k = \frac34.
  • b) P(X≤12)=532P(X \le \frac12) = \frac{5}{32}; by symmetry P(12≤X≤32)=1−2⋅532=1116P(\frac12 \le X \le \frac32) = 1 - 2 \cdot \frac{5}{32} = \frac{11}{16}.
  • c) P(X=1)=0P(X = 1) = 0; P(X<1)=P(X≤1)=12P(X < 1) = P(X \le 1) = \frac12.
  • d) k=1πk = \frac{1}{\pi}; P(X>1)=14P(X > 1) = \frac14; P(∣X∣≤3)=23P(|X| \le \sqrt3) = \frac23.
  • e) ∫0txπ(1+x2) dx=12πln⁡(1+t2)→∞\int_0^t \frac{x}{\pi(1 + x^2)}\,dx = \frac{1}{2\pi}\ln(1 + t^2) \to \infty: the mean does not exist.

a) Sign first: x(2−x)≥0x(2 - x) \ge 0 on [0,2][0, 2], so f≥0f \ge 0 forces k≥0k \ge 0. Area: ∫02(2x−x2) dx=[x2−x33]02=4−83=43\int_0^2 (2x - x^2)\,dx = \left[x^2 - \frac{x^3}{3}\right]_0^2 = 4 - \frac83 = \frac43. The condition k⋅43=1k \cdot \frac43 = 1 gives k=34k = \frac34. The frequent slip is k=43k = \frac43: the constant is the RECIPROCAL of the area, since it has to scale the area down to 11. The quick test is the one you should always run: with k=43k = \frac43 the total area would be 169>1\frac{16}{9} > 1.

b) With FF written as the area from 00: P(X≤12)=34[x2−x33]01/2=34(14−124)=34⋅524=532P(X \le \frac12) = \frac34\left[x^2 - \frac{x^3}{3}\right]_0^{1/2} = \frac34\left(\frac14 - \frac{1}{24}\right) = \frac34 \cdot \frac{5}{24} = \frac{5}{32}. Now f(2−x)=k(2−x)x=f(x)f(2 - x) = k(2 - x)x = f(x): the graph is symmetric about x=1x = 1, so the right-hand strip [32,2][\frac32, 2] has the same area 532\frac{5}{32}. The middle strip is what remains: 1−2⋅532=2232=11161 - 2 \cdot \frac{5}{32} = \frac{22}{32} = \frac{11}{16}. Direct check: 34[x2−x33]1/23/2=34(98−524)=34⋅2224=1116\frac34\left[x^2 - \frac{x^3}{3}\right]_{1/2}^{3/2} = \frac34\left(\frac98 - \frac{5}{24}\right) = \frac34 \cdot \frac{22}{24} = \frac{11}{16}. Symmetry is worth a line on an exam only if you STATE the identity f(2−x)=f(x)f(2 - x) = f(x) that justifies it.

c) P(X=1)=∫11f(x) dx=0P(X = 1) = \int_1^1 f(x)\,dx = 0, even though f(1)=34f(1) = \frac34 is the maximum of ff: a single point has no width, hence no area. Consequently P(X<1)=P(X≤1)−P(X=1)=P(X≤1)P(X < 1) = P(X \le 1) - P(X = 1) = P(X \le 1), and by the symmetry of part b) this is 12\frac12. For a continuous random variable, strict and non-strict inequalities give the same probability; the distinction matters only for discrete variables, which are not in this chapter.

d) Here the domain is the whole line, so the integral is improper at BOTH ends and must be split at a point, say 00, each half being a limit: ∫0tdx1+x2=arctan⁡t→π2\int_0^t \frac{dx}{1 + x^2} = \arctan t \to \frac{\pi}{2} as t→∞t \to \infty, and likewise ∫−t0dx1+x2=arctan⁡t→π2\int_{-t}^0 \frac{dx}{1+x^2} = \arctan t \to \frac{\pi}{2}. The total is π\pi, so k=1πk = \frac{1}{\pi}. Then P(X>1)=1πlim⁡t→∞(arctan⁡t−arctan⁡1)=1π(π2−π4)=14P(X > 1) = \frac{1}{\pi}\lim_{t \to \infty}(\arctan t - \arctan 1) = \frac{1}{\pi}\left(\frac{\pi}{2} - \frac{\pi}{4}\right) = \frac14, and P(∣X∣≤3)=1π(arctan⁡3−arctan⁡(−3))=1π⋅2π3=23P(|X| \le \sqrt3) = \frac{1}{\pi}\left(\arctan\sqrt3 - \arctan(-\sqrt3)\right) = \frac{1}{\pi} \cdot \frac{2\pi}{3} = \frac23. Every value is exact: arctan⁡1=π4\arctan 1 = \frac{\pi}{4} and arctan⁡3=π3\arctan\sqrt3 = \frac{\pi}{3} are the ones to know.

e) The mean is μ=∫−∞∞x g(x) dx\mu = \int_{-\infty}^{\infty} x\,g(x)\,dx, an improper integral that exists only if BOTH halves converge. On the right, with u=1+x2u = 1 + x^2: ∫0txπ(1+x2) dx=12πln⁡(1+t2)\int_0^t \frac{x}{\pi(1 + x^2)}\,dx = \frac{1}{2\pi}\ln(1 + t^2), which tends to ∞\infty. The right half diverges, so the integral that defines the mean diverges and XX HAS NO MEAN. The student computed, in effect, lim⁡t→∞∫−ttx g(x) dx=0\lim_{t \to \infty}\int_{-t}^{t} x\,g(x)\,dx = 0, the symmetric limit: that is not the definition of an integral over (−∞,∞)(-\infty, \infty), and here it hides two infinite halves. Symmetry about 00 gives the mean only once the mean is known to exist. This density, called the Cauchy density, is the standard counterexample.

Exercise 3: The cumulative distribution function: from f to F, and back

The cumulative distribution function of XX is F(x)=P(X≤x)=∫−∞xf(t) dtF(x) = P(X \le x) = \int_{-\infty}^{x} f(t)\,dt: the area accumulated from the far left up to xx. It turns every probability into a subtraction, P(a≤X≤b)=F(b)−F(a)P(a \le X \le b) = F(b) - F(a), and it gives the density back by the Fundamental Theorem, F′(x)=f(x)F'(x) = f(x) wherever ff is continuous.

The triangular density of the figure is f(x)=xf(x) = x on [0,1][0, 1], f(x)=2−xf(x) = 2 - x on [1,2][1, 2], and 00 elsewhere.

-0.50.511.522.50.250.50.7511.25y = f(x)
  • a) Check that ff is a density from the figure alone.
  • b) Find F(x)F(x) on each of the four intervals x<0x < 0, 0≤x≤10 \le x \le 1, 1≤x≤21 \le x \le 2 and x>2x > 2.
  • c) Use FF to compute P(12≤X≤32)P(\frac12 \le X \le \frac32) and P(X>32)P(X > \frac32), and check the second one with the figure.
  • d) Another variable YY has FY(y)=0F_Y(y) = 0 for y<1y < 1 and FY(y)=1−1y3F_Y(y) = 1 - \frac{1}{y^3} for y≥1y \ge 1. Find its density, P(Y>2)P(Y > 2), and the number mm with P(Y≤m)=12P(Y \le m) = \frac12.
  • e) A student writes, for 1≤x≤21 \le x \le 2: F(x)=∫1x(2−t) dt=2x−x22−32F(x) = \int_1^x (2 - t)\,dt = 2x - \frac{x^2}{2} - \frac32. Find what is missing, and give two tests that would have caught it.
Show the solution

Answers

  • a) f≥0f \ge 0 and the triangle has area 12⋅2⋅1=1\frac12 \cdot 2 \cdot 1 = 1.
  • b) F=0F = 0; F=x22F = \frac{x^2}{2}; F=2x−x22−1F = 2x - \frac{x^2}{2} - 1; F=1F = 1.
  • c) F(32)−F(12)=78−18=34F(\frac32) - F(\frac12) = \frac78 - \frac18 = \frac34; P(X>32)=18P(X > \frac32) = \frac18.
  • d) fY(y)=3y4f_Y(y) = \frac{3}{y^4} for y>1y > 1 (00 for y<1y < 1); P(Y>2)=18P(Y > 2) = \frac18; m=23m = \sqrt[3]{2}.
  • e) The area F(1)=12F(1) = \frac12 already accumulated is missing; FF must be continuous and F(2)=1F(2) = 1.

a) The graph is never below the axis, so f≥0f \ge 0. The region under it is a triangle with base 22 and height 11, of area 12⋅2⋅1=1\frac12 \cdot 2 \cdot 1 = 1. Both conditions hold: ff is a density. Reading an area by geometry is legitimate and fast; it is exactly what the integral would give.

b) For x<0x < 0 no area has accumulated: F(x)=0F(x) = 0. For 0≤x≤10 \le x \le 1: F(x)=∫0xt dt=x22F(x) = \int_0^x t\,dt = \frac{x^2}{2}. For 1≤x≤21 \le x \le 2 the area accumulated on [0,1][0, 1] must be CARRIED: F(x)=F(1)+∫1x(2−t) dt=12+[2t−t22]1x=12+2x−x22−32=2x−x22−1F(x) = F(1) + \int_1^x (2 - t)\,dt = \frac12 + \left[2t - \frac{t^2}{2}\right]_1^x = \frac12 + 2x - \frac{x^2}{2} - \frac32 = 2x - \frac{x^2}{2} - 1. For x>2x > 2 all the area is behind: F(x)=1F(x) = 1. Checks at the joints: the middle formula gives F(1)=2−12−1=12F(1) = 2 - \frac12 - 1 = \frac12, as the first one does, and F(2)=4−2−1=1F(2) = 4 - 2 - 1 = 1. A cumulative distribution function is continuous, increasing, starts at 00 and ends at 11; the solution figure shows it next to ff.

c) F(32)=3−98−1=78F(\frac32) = 3 - \frac98 - 1 = \frac78 and F(12)=18F(\frac12) = \frac18, so P(12≤X≤32)=78−18=34P(\frac12 \le X \le \frac32) = \frac78 - \frac18 = \frac34. Then P(X>32)=1−F(32)=18P(X > \frac32) = 1 - F(\frac32) = \frac18. On the figure, the region to the right of x=32x = \frac32 is a small triangle with base 12\frac12 and height f(32)=12f(\frac32) = \frac12, of area 12⋅12⋅12=18\frac12 \cdot \frac12 \cdot \frac12 = \frac18. The two methods agree, and on an exam the geometric one is a ten-second check of the algebraic one.

d) Going back from FF to ff is FTC 1: fY(y)=FY′(y)=3y4f_Y(y) = F_Y'(y) = \frac{3}{y^4} for y>1y > 1, and fY(y)=0f_Y(y) = 0 for y<1y < 1. Check: ∫1t3y−4 dy=1−t−3→1\int_1^t 3y^{-4}\,dy = 1 - t^{-3} \to 1. Then P(Y>2)=1−FY(2)=18P(Y > 2) = 1 - F_Y(2) = \frac{1}{8}, read directly from FF without any integral. The median solves FY(m)=12F_Y(m) = \frac12: 1−1m3=121 - \frac{1}{m^3} = \frac12, so m3=2m^3 = 2 and m=23m = \sqrt[3]{2}. With FF in hand, every probability is an evaluation and the median is an equation; this is why the question often asks for FF first.

e) The student started the area at x=1x = 1 instead of at −∞-\infty: the term F(1)=12F(1) = \frac12, the probability already accumulated on [0,1][0, 1], is missing, and the formula is too small by exactly 12\frac12. Two tests catch it at once. Continuity: the student's formula gives 2−12−32=02 - \frac12 - \frac32 = 0 at x=1x = 1, while the first piece gives 12\frac12; a cumulative distribution function never jumps when XX has a density. The end value: at x=2x = 2 the student's formula gives 4−2−32=124 - 2 - \frac32 = \frac12, but F(2)F(2) must equal 11 since all the area is behind. The correct formula is 2x−x22−12x - \frac{x^2}{2} - 1.

-0.50.511.522.50.250.50.7511.25fF

Exercise 4: Mean and median: the balance point and the half-area point

The mean of XX is μ=∫−∞∞xf(x) dx\mu = \int_{-\infty}^{\infty} x f(x)\,dx. Since the total area under ff is 11, it is exactly the xx-coordinate of the centroid of the region under the graph: the point where that region would balance. The median is the number mm with ∫−∞mf(x) dx=12\int_{-\infty}^{m} f(x)\,dx = \frac12: the vertical line that cuts the region into two halves of equal AREA.

These are two different cuts, and on a lopsided density they do not fall at the same place. The figure shows the two densities of the exercise, each 00 outside [0,1][0, 1].

0.250.50.7511.250.511.522.533.5y = 2xy = 3(1 − x)²
  • a) For f(x)=2xf(x) = 2x on [0,1][0, 1], compute μ\mu and mm exactly.
  • b) Decide without a calculator which of the two is larger, and explain the order from the shape of the graph.
  • c) For g(x)=3(1−x)2g(x) = 3(1 - x)^2 on [0,1][0, 1], compute μ\mu and mm exactly.
  • d) Show without a calculator that m<μm < \mu for gg, by comparing (34)3\left(\frac34\right)^3 with 12\frac12.
  • e) A student claims that the median of any density on [0,1][0, 1] is 12\frac12, the middle of the interval. Give the correct statement, and a condition under which the student happens to be right.
Show the solution

Answers

  • a) μ=23\mu = \frac23, m=22m = \frac{\sqrt2}{2}.
  • b) m2=12>49=μ2m^2 = \frac12 > \frac49 = \mu^2, so m>μm > \mu: the thin tail is on the left and pulls the mean towards 00.
  • c) μ=14\mu = \frac14, m=1−123m = 1 - \frac{1}{\sqrt[3]{2}}.
  • d) (34)3=2764<12\left(\frac34\right)^3 = \frac{27}{64} < \frac12, so 123>34\frac{1}{\sqrt[3]2} > \frac34 and m<14=μm < \frac14 = \mu.
  • e) The median solves F(m)=12F(m) = \frac12; it is 12\frac12 when ff is symmetric about 12\frac12, for instance f(1−x)=f(x)f(1 - x) = f(x).

a) μ=∫01x⋅2x dx=[2x33]01=23\mu = \int_0^1 x \cdot 2x\,dx = \left[\frac{2x^3}{3}\right]_0^1 = \frac23. For the median, first F(x)=∫0x2t dt=x2F(x) = \int_0^x 2t\,dt = x^2 on [0,1][0, 1], then F(m)=12F(m) = \frac12 gives m2=12m^2 = \frac12, so m=12=22m = \frac{1}{\sqrt2} = \frac{\sqrt2}{2}, the positive root since mm lies in [0,1][0, 1]. The mean multiplies by xx inside the integral; the median does not, it solves an equation in the upper bound. Mixing the two, for example solving ∫0mxf(x) dx=12\int_0^m x f(x)\,dx = \frac12, is a frequent slip.

b) Both numbers are positive, so compare their squares: m2=12=918m^2 = \frac12 = \frac{9}{18} and μ2=49=818\mu^2 = \frac49 = \frac{8}{18}. Hence m>μm > \mu, with m≈0.71m \approx 0.71 and μ≈0.67\mu \approx 0.67. The shape explains it: the density 2x2x is heavy near 11 and thins out towards 00, so its TAIL is on the left. The median only counts area, while the mean weighs each piece of area by its position, like a torque: the thin left tail has little area but a long lever arm, and it pulls the balance point to the left of the half-area cut. Rule to remember: the mean lies on the side of the tail.

c) μ=∫013x(1−x)2 dx=3∫01(x−2x2+x3) dx=3(12−23+14)=3⋅112=14\mu = \int_0^1 3x(1 - x)^2\,dx = 3\int_0^1 (x - 2x^2 + x^3)\,dx = 3\left(\frac12 - \frac23 + \frac14\right) = 3 \cdot \frac{1}{12} = \frac14. For FF, with the substitution u=1−tu = 1 - t: F(x)=∫0x3(1−t)2 dt=[−(1−t)3]0x=1−(1−x)3F(x) = \int_0^x 3(1 - t)^2\,dt = \left[-(1 - t)^3\right]_0^x = 1 - (1 - x)^3. Then F(m)=12F(m) = \frac12 gives (1−m)3=12(1 - m)^3 = \frac12, so 1−m=1231 - m = \frac{1}{\sqrt[3]2} and m=1−123m = 1 - \frac{1}{\sqrt[3]{2}}. That is the exact answer, and on a MATH 141 paper it is the expected one.

d) m<14m < \frac14 is equivalent to 1−123<141 - \frac{1}{\sqrt[3]2} < \frac14, that is 123>34\frac{1}{\sqrt[3]2} > \frac34. Cubing, a legitimate step between positive numbers since t↦t3t \mapsto t^3 is increasing, it becomes 12>2764\frac12 > \frac{27}{64}, which is true because 12=3264\frac12 = \frac{32}{64}. Hence m<μ=14m < \mu = \frac14, with m≈0.21m \approx 0.21. This time the mass is piled near 00 and the tail runs to the right, so the mean is pulled to the right of the median: the same rule as in part b), mirrored. A comparison of two exact numbers is settled by an algebraic chain like this one, never by a decimal from a machine.

e) The median is defined by an AREA condition, F(m)=12F(m) = \frac12, and nothing forces the solution to be the middle of the interval: part a) gives 22\frac{\sqrt2}{2} and part c) gives 1−1231 - \frac{1}{\sqrt[3]2}, neither of which is 12\frac12. The student is right when the density is symmetric about 12\frac12, that is f(1−x)=f(x)f(1 - x) = f(x), as for the uniform density f=1f = 1 or for f(x)=6x(1−x)f(x) = 6x(1 - x): then the two halves of the region are mirror images and have equal areas. In that case the mean is 12\frac12 too, and it certainly exists because the interval is bounded.

Exercise 5: The exponential density: waiting at a service counter

The waiting time TT, in minutes, of a customer at a service counter is modelled by the exponential density f(t)=14e−t/4f(t) = \frac14 e^{-t/4} for t≥0t \ge 0, and f(t)=0f(t) = 0 for t<0t < 0. The exponential density is the standard model of a waiting time in a queue.

No calculator: answers are exact, and an order of magnitude, when useful, is obtained from e≈2.72e \approx 2.72 and ln⁡2≈0.69\ln 2 \approx 0.69.

24681012140.050.10.150.20.250.3f(t) = (1/4) e^(−t/4)P(T > 8)t (min)
  • a) Show that ff is a density, writing the improper integral as a limit, and find F(t)F(t) for t≥0t \ge 0.
  • b) Compute P(T>8)P(T > 8) and P(2≤T≤4)P(2 \le T \le 4) exactly, then give an order of magnitude of each.
  • c) Compute the mean waiting time, naming the integration by parts and the limit that closes it.
  • d) Find the median waiting time exactly. Which fraction of the customers wait LESS than the mean?
  • e) Among the customers who have already waited 22 minutes, which fraction will wait more than 66 minutes in total? Compare with P(T>4)P(T > 4) and comment.
Show the solution

Answers

  • a) ∫0t14e−s/4 ds=1−e−t/4→1\int_0^t \frac14 e^{-s/4}\,ds = 1 - e^{-t/4} \to 1; F(t)=1−e−t/4F(t) = 1 - e^{-t/4}.
  • b) P(T>8)=e−2≈0.14P(T > 8) = e^{-2} \approx 0.14; P(2≤T≤4)=e−1/2−e−1≈0.24P(2 \le T \le 4) = e^{-1/2} - e^{-1} \approx 0.24.
  • c) μ=4\mu = 4 minutes.
  • d) m=4ln⁡2≈2.8m = 4\ln 2 \approx 2.8 minutes; P(T<4)=1−e−1≈0.63P(T < 4) = 1 - e^{-1} \approx 0.63.
  • e) P(T>6)P(T>2)=e−3/2e−1/2=e−1=P(T>4)\frac{P(T > 6)}{P(T > 2)} = \frac{e^{-3/2}}{e^{-1/2}} = e^{-1} = P(T > 4): the time already spent does not change what remains.

a) f≥0f \ge 0 since an exponential is positive. For the area: ∫0t14e−s/4 ds=[−e−s/4]0t=1−e−t/4\int_0^t \frac14 e^{-s/4}\,ds = \left[-e^{-s/4}\right]_0^t = 1 - e^{-t/4}, and e−t/4→0e^{-t/4} \to 0 as t→∞t \to \infty, so the total area is 11 and ff is a density. The same computation IS the cumulative distribution function: F(t)=1−e−t/4F(t) = 1 - e^{-t/4} for t≥0t \ge 0, and F(t)=0F(t) = 0 for t<0t < 0. From now on every probability is a subtraction of values of FF, which is the efficient way to work with this density.

b) P(T>8)=1−F(8)=e−8/4=e−2P(T > 8) = 1 - F(8) = e^{-8/4} = e^{-2}, the shaded tail of the figure. Order of magnitude: e2≈2.722≈7.4e^2 \approx 2.72^2 \approx 7.4, so e−2≈0.14e^{-2} \approx 0.14, about one customer in seven. Then P(2≤T≤4)=F(4)−F(2)=(1−e−1)−(1−e−1/2)=e−1/2−e−1P(2 \le T \le 4) = F(4) - F(2) = (1 - e^{-1}) - (1 - e^{-1/2}) = e^{-1/2} - e^{-1}. With 1e≈0.37\frac1e \approx 0.37 and 1e≈11.65≈0.61\frac{1}{\sqrt e} \approx \frac{1}{1.65} \approx 0.61, this is about 0.240.24. The exact forms e−2e^{-2} and e−1/2−e−1e^{-1/2} - e^{-1} are the answers; the decimals only tell the reader that the numbers make sense.

c) μ=∫0∞t⋅14e−t/4 dt=lim⁡s→∞∫0st4e−t/4 dt\mu = \int_0^\infty t \cdot \frac14 e^{-t/4}\,dt = \lim_{s \to \infty}\int_0^s \frac{t}{4} e^{-t/4}\,dt. Integration by parts with u=tu = t and dv=14e−t/4 dtdv = \frac14 e^{-t/4}\,dt, so du=dtdu = dt and v=−e−t/4v = -e^{-t/4}; the choice puts the power of tt in uu, where differentiating removes it. Then ∫0st4e−t/4 dt=[−te−t/4]0s+∫0se−t/4 dt=−se−s/4+4(1−e−s/4)\int_0^s \frac{t}{4}e^{-t/4}\,dt = \left[-te^{-t/4}\right]_0^s + \int_0^s e^{-t/4}\,dt = -se^{-s/4} + 4\left(1 - e^{-s/4}\right). The limit lim⁡s→∞se−s/4=lim⁡s→∞ses/4\lim_{s \to \infty} se^{-s/4} = \lim_{s \to \infty}\frac{s}{e^{s/4}} is of the form ∞∞\frac{\infty}{\infty}; by L'Hôpital's rule it equals lim⁡s→∞114es/4=0\lim_{s \to \infty}\frac{1}{\frac14 e^{s/4}} = 0. Hence μ=4\mu = 4 minutes. In general the exponential density 1μe−t/μ\frac1\mu e^{-t/\mu} has mean μ\mu, which is why its parameter is written that way.

d) The median solves F(m)=12F(m) = \frac12: 1−e−m/4=121 - e^{-m/4} = \frac12, so e−m/4=12e^{-m/4} = \frac12, −m4=−ln⁡2-\frac{m}{4} = -\ln 2 and m=4ln⁡2≈2.8m = 4\ln 2 \approx 2.8 minutes. It is SMALLER than the mean 44. The fraction of customers who wait less than the mean is P(T<4)=F(4)=1−e−1≈0.63P(T < 4) = F(4) = 1 - e^{-1} \approx 0.63: almost two customers out of three wait less than the average wait. There is no contradiction: a few very long waits, the long right tail of the figure, pull the mean up, while the median only counts customers. Saying that half the customers wait more than the mean is the classic error on this density.

e) The customers who have already waited 22 minutes are those with T>2T > 2, a proportion P(T>2)=e−1/2P(T > 2) = e^{-1/2} of all customers. Among them, those who wait more than 66 minutes in total form the proportion P(T>6)=e−3/2P(T > 6) = e^{-3/2} of all customers. The fraction asked for is the ratio of the two tail areas: e−3/2e−1/2=e−1\frac{e^{-3/2}}{e^{-1/2}} = e^{-1}. That is exactly P(T>4)=e−1P(T > 4) = e^{-1}, the probability that a customer who just arrived waits more than 44 minutes. Having already waited 22 minutes changes nothing about the 44 extra minutes: the exponential density has no memory. It is a good model for a queue fed by random arrivals, and a poor one for a machine that wears out, which exercise 9 treats.

Part B: problems and reasoning (/50)

Exercise 6: The normal density, handled by symmetry only

The normal density with mean μ\mu and standard deviation σ>0\sigma > 0 is f(x)=1σ2π e−(x−μ)2/(2σ2)f(x) = \frac{1}{\sigma\sqrt{2\pi}}\,e^{-(x - \mu)^2/(2\sigma^2)} for every real xx. The function e−x2e^{-x^2} has no elementary antiderivative, so no normal probability is ever computed from a primitive. You are given the fact ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1, and every question below is settled by SYMMETRY, by a SUBSTITUTION, or by the one integral of the chapter that does have a primitive.

The scores XX on a standardized test are modelled by a normal density with μ=500\mu = 500 and σ=100\sigma = 100. You are told that P(400≤X≤600)=pP(400 \le X \le 600) = p, a number you do not need to know. The figure shows the bell with its central strip [500,600][500, 600] shaded.

400500600y = f(x)
  • a) Show that f(μ+h)=f(μ−h)f(\mu + h) = f(\mu - h) for every hh, deduce P(X≤500)P(X \le 500), and give the median of XX.
  • b) Express in terms of pp: P(X≥600)P(X \ge 600), P(500≤X≤600)P(500 \le X \le 600), P(X≤400 or X≥600)P(X \le 400 \text{ or } X \ge 600) and P(X≤600)P(X \le 600).
  • c) With the substitution u=x−μσu = \frac{x - \mu}{\sigma}, show that P(400≤X≤600)=∫−1112πe−u2/2 duP(400 \le X \le 600) = \int_{-1}^{1}\frac{1}{\sqrt{2\pi}}e^{-u^2/2}\,du. What does this say about the probability of falling within one standard deviation of the mean, for other values of μ\mu and σ\sigma?
  • d) Prove that the mean of XX is μ\mu, by computing ∫μ∞(x−μ)f(x) dx\int_{\mu}^{\infty}(x - \mu)f(x)\,dx with a substitution BEFORE using any symmetry.
  • e) Show that the graph of ff has its inflection points exactly at x=μ±σx = \mu \pm \sigma, the two outer dashed lines of the figure.
Show the solution

Answers

  • a) (±h)2=h2(\pm h)^2 = h^2, so f(μ+h)=f(μ−h)f(\mu + h) = f(\mu - h); P(X≤500)=12P(X \le 500) = \frac12; median 500500.
  • b) 1−p2\frac{1 - p}{2}; p2\frac{p}{2}; 1−p1 - p; 1+p2\frac{1 + p}{2}.
  • c) The σ\sigma cancels and the bounds become ±1\pm 1: the same value pp for every normal density.
  • d) ∫μ∞(x−μ)f(x) dx=σ2π\int_\mu^\infty (x - \mu)f(x)\,dx = \frac{\sigma}{\sqrt{2\pi}}, finite; the left half is its opposite, so ∫xf=μ\int x f = \mu.
  • e) f′′(x)=f(x)σ4[(x−μ)2−σ2]f''(x) = \frac{f(x)}{\sigma^4}\left[(x - \mu)^2 - \sigma^2\right] changes sign exactly at x=μ±σx = \mu \pm \sigma, here 400400 and 600600.

a) f(μ±h)=1σ2πe−(±h)2/(2σ2)=1σ2πe−h2/(2σ2)f(\mu \pm h) = \frac{1}{\sigma\sqrt{2\pi}}e^{-(\pm h)^2/(2\sigma^2)} = \frac{1}{\sigma\sqrt{2\pi}}e^{-h^2/(2\sigma^2)}, the same for +h+h and −h-h: the bell is symmetric about x=μx = \mu. The substitution x=2μ−tx = 2\mu - t turns ∫−∞μf(x) dx\int_{-\infty}^{\mu}f(x)\,dx into ∫μ∞f(t) dt\int_{\mu}^{\infty}f(t)\,dt, so the two halves of the total area 11 are equal and each is 12\frac12. Hence P(X≤500)=12P(X \le 500) = \frac12, and the median is 500500, the centre of symmetry. Nothing here needed a value of the integral, only the fact that the total is 11.

b) The strip [400,600][400, 600] carries pp, so the two tails carry 1−p1 - p together, and by symmetry each carries half: P(X≥600)=1−p2P(X \ge 600) = \frac{1 - p}{2}. The strip itself is symmetric about 500500, so P(500≤X≤600)=p2P(500 \le X \le 600) = \frac{p}{2}, the shaded area of the figure. Both tails together: P(X≤400 or X≥600)=1−pP(X \le 400 \text{ or } X \ge 600) = 1 - p. Finally P(X≤600)=12+p2=1+p2P(X \le 600) = \frac12 + \frac{p}{2} = \frac{1 + p}{2}, or equivalently 1−1−p21 - \frac{1 - p}{2}. The frequent error is P(X≥600)=1−pP(X \ge 600) = 1 - p, which forgets that the complement of the strip is made of TWO tails.

c) u=x−500100u = \frac{x - 500}{100} gives du=dx100du = \frac{dx}{100}; the bounds x=400x = 400 and x=600x = 600 become u=−1u = -1 and u=1u = 1. Then 11002πe−(x−500)2/(2⋅1002) dx=11002πe−u2/2⋅100 du=12πe−u2/2 du\frac{1}{100\sqrt{2\pi}}e^{-(x - 500)^2/(2 \cdot 100^2)}\,dx = \frac{1}{100\sqrt{2\pi}}e^{-u^2/2} \cdot 100\,du = \frac{1}{\sqrt{2\pi}}e^{-u^2/2}\,du, and P(400≤X≤600)=∫−1112πe−u2/2 duP(400 \le X \le 600) = \int_{-1}^{1}\frac{1}{\sqrt{2\pi}}e^{-u^2/2}\,du. The same computation for any μ\mu and σ\sigma sends [μ−σ,μ+σ][\mu - \sigma, \mu + \sigma] to [−1,1][-1, 1] and cancels σ\sigma in the same way. So the probability of falling within one standard deviation of the mean is the SAME number pp for every normal density; it is a constant of the standard bell, found in tables, and it is never computed by hand in this course.

d) The substitution w=(x−μ)22σ2w = \frac{(x - \mu)^2}{2\sigma^2}, dw=x−μσ2 dxdw = \frac{x - \mu}{\sigma^2}\,dx, gives the antiderivative ∫(x−μ)e−(x−μ)2/(2σ2) dx=−σ2e−(x−μ)2/(2σ2)+C\int (x - \mu)e^{-(x - \mu)^2/(2\sigma^2)}\,dx = -\sigma^2 e^{-(x - \mu)^2/(2\sigma^2)} + C; differentiate to check. So ∫μt(x−μ)f(x) dx=1σ2π[−σ2e−(x−μ)2/(2σ2)]μt→σ2σ2π=σ2π\int_\mu^t (x - \mu)f(x)\,dx = \frac{1}{\sigma\sqrt{2\pi}}\left[-\sigma^2 e^{-(x - \mu)^2/(2\sigma^2)}\right]_\mu^t \to \frac{\sigma^2}{\sigma\sqrt{2\pi}} = \frac{\sigma}{\sqrt{2\pi}} as t→∞t \to \infty. The right half CONVERGES. Since (x−μ)f(x)(x - \mu)f(x) is odd about μ\mu, the left half converges to −σ2π-\frac{\sigma}{\sqrt{2\pi}}, and the whole integral is 00. Then ∫−∞∞xf(x) dx=∫−∞∞(x−μ)f(x) dx+μ∫−∞∞f(x) dx=0+μ\int_{-\infty}^\infty x f(x)\,dx = \int_{-\infty}^\infty (x - \mu)f(x)\,dx + \mu\int_{-\infty}^\infty f(x)\,dx = 0 + \mu. Compare with the Cauchy density of exercise 2: there each half was infinite, and the same symmetry argument proved nothing. The order matters: convergence first, symmetry second.

e) By the chain rule, f′(x)=−x−μσ2f(x)f'(x) = -\frac{x - \mu}{\sigma^2}f(x). By the product rule, f′′(x)=−1σ2f(x)+(x−μ)2σ4f(x)=f(x)σ4[(x−μ)2−σ2]f''(x) = -\frac{1}{\sigma^2}f(x) + \frac{(x - \mu)^2}{\sigma^4}f(x) = \frac{f(x)}{\sigma^4}\left[(x - \mu)^2 - \sigma^2\right]. Since f(x)>0f(x) > 0, the sign of f′′f'' is that of (x−μ)2−σ2(x - \mu)^2 - \sigma^2: negative for ∣x−μ∣<σ|x - \mu| < \sigma, positive for ∣x−μ∣>σ|x - \mu| > \sigma. The concavity changes exactly at x=μ±σx = \mu \pm \sigma, here 400400 and 600600. That is the geometric meaning of σ\sigma: the distance from the peak to the points where the bell stops curving down and starts to flatten into its tails.

Exercise 7: Heavy tails: a density whose mean is infinite

Densities of the form fp(x)=cxpf_p(x) = \frac{c}{x^p} on [1,∞)[1, \infty), and 00 elsewhere, model waiting times with rare but very long values: the time a caller spends on hold when a few calls get stuck in the system, or the lifetime of a batch of components among which a few last far longer than the rest. Two improper integrals decide everything: one for the total area, one for the mean.

The figure compares the two tails of parts a) and b).

1234560.511.52y = 2/x³y = 1/x²
  • a) For f(x)=cx3f(x) = \frac{c}{x^3} on [1,∞)[1, \infty): find cc, P(X>3)P(X > 3), the mean and the median.
  • b) For g(x)=1x2g(x) = \frac{1}{x^2} on [1,∞)[1, \infty): check that gg is a density, find its median, and show that the integral defining its mean diverges.
  • c) For which p>0p > 0 does some c>0c > 0 make cxp\frac{c}{x^p} a density on [1,∞)[1, \infty)? Give cc in terms of pp. For which of these pp is the mean finite?
  • d) For the density gg of part b), find the number bb with P(X>b)=11000P(X > b) = \frac{1}{1000}, and show that the part of the mean integral beyond bb is still infinite. What does this say about the mean as a summary of the values?
  • e) For p>2p > 2, find the mean and the median of p−1xp\frac{p - 1}{x^p} on [1,∞)[1, \infty) in terms of pp, check both formulas against part a), and describe what happens to each as pp decreases to 22.
Show the solution

Answers

  • a) c=2c = 2; P(X>3)=19P(X > 3) = \frac19; μ=2\mu = 2; m=2m = \sqrt2.
  • b) ∫1∞x−2 dx=1\int_1^\infty x^{-2}\,dx = 1; m=2m = 2; ∫1tdxx=ln⁡t→∞\int_1^t \frac{dx}{x} = \ln t \to \infty, no finite mean.
  • c) A density iff p>1p > 1, with c=p−1c = p - 1; finite mean iff p>2p > 2.
  • d) b=1000b = 1000; ∫1000tdxx=ln⁡t1000→∞\int_{1000}^t \frac{dx}{x} = \ln\frac{t}{1000} \to \infty.
  • e) μ=p−1p−2\mu = \frac{p - 1}{p - 2}, m=21/(p−1)m = 2^{1/(p - 1)}; at p=3p = 3: 22 and 2\sqrt2. As p→2+p \to 2^+, μ→∞\mu \to \infty while m→2m \to 2.

a) Normalize: ∫1tx−3 dx=[−12x2]1t=12−12t2→12\int_1^t x^{-3}\,dx = \left[-\frac{1}{2x^2}\right]_1^t = \frac12 - \frac{1}{2t^2} \to \frac12, so c=2c = 2. The cumulative distribution function is F(x)=∫1x2t−3 dt=1−1x2F(x) = \int_1^x 2t^{-3}\,dt = 1 - \frac{1}{x^2} for x≥1x \ge 1, hence P(X>3)=19P(X > 3) = \frac19. Mean: ∫1tx⋅2x3 dx=[−2x]1t=2−2t→2\int_1^t x \cdot \frac{2}{x^3}\,dx = \left[-\frac2x\right]_1^t = 2 - \frac2t \to 2, so μ=2\mu = 2. Median: 1−1m2=121 - \frac{1}{m^2} = \frac12 gives m2=2m^2 = 2 and m=2m = \sqrt2. As in exercise 5, the tail is on the right and the mean lies above the median.

b) ∫1tx−2 dx=1−1t→1\int_1^t x^{-2}\,dx = 1 - \frac1t \to 1 and g>0g > 0: a density, with F(x)=1−1xF(x) = 1 - \frac1x. The median solves 1−1m=121 - \frac1m = \frac12, so m=2m = 2. For the mean, ∫1tx⋅1x2 dx=∫1tdxx=ln⁡t→∞\int_1^t x \cdot \frac{1}{x^2}\,dx = \int_1^t \frac{dx}{x} = \ln t \to \infty: the integral diverges, and XX has no finite mean. The median, on the other hand, ALWAYS exists, because FF climbs continuously from 00 to 11 and must cross 12\frac12. The figure shows why the two cases differ: the tail of 1x2\frac{1}{x^2} lies above that of 2x3\frac{2}{x^3} from x=2x = 2 on, and multiplying by xx in the mean turns it into 1x\frac1x, whose area is infinite.

c) For p≠1p \ne 1: ∫1tx−p dx=1−t1−pp−1\int_1^t x^{-p}\,dx = \frac{1 - t^{1 - p}}{p - 1}, which tends to 1p−1\frac{1}{p - 1} when p>1p > 1 and to ∞\infty when p<1p < 1; for p=1p = 1 it is ln⁡t→∞\ln t \to \infty. So a finite positive area exists exactly when p>1p > 1, and then c=p−1c = p - 1. The mean involves x⋅x−p=x−(p−1)x \cdot x^{-p} = x^{-(p - 1)}, whose integral on [1,∞)[1, \infty) converges exactly when p−1>1p - 1 > 1, that is p>2p > 2. For 1<p≤21 < p \le 2 we get a genuine density with no finite mean; p=2p = 2 is part b). These are the pp-integrals, used here to answer a probability question.

d) P(X>b)=1−F(b)=1bP(X > b) = 1 - F(b) = \frac1b, so b=1000b = 1000. The part of the mean beyond bb is ∫1000tx⋅1x2 dx=ln⁡t−ln⁡1000→∞\int_{1000}^t x \cdot \frac{1}{x^2}\,dx = \ln t - \ln 1000 \to \infty. So a region carrying only one thousandth of the probability contributes an INFINITE amount to the mean, and the same holds beyond any bb, however large. The mean is not where most values are: it is a balance point, and a thin tail that is long enough outweighs everything. That is why a median, which ignores how far the extreme values go, is the summary to report for such waiting times.

e) With c=p−1c = p - 1: μ=∫1∞x⋅p−1xp dx=(p−1)lim⁡t→∞1−t2−pp−2=p−1p−2\mu = \int_1^\infty x \cdot \frac{p - 1}{x^p}\,dx = (p - 1)\lim_{t \to \infty}\frac{1 - t^{2 - p}}{p - 2} = \frac{p - 1}{p - 2} for p>2p > 2. The cumulative distribution function is F(x)=1−x1−pF(x) = 1 - x^{1 - p}, so F(m)=12F(m) = \frac12 gives m1−p=12m^{1 - p} = \frac12, mp−1=2m^{p - 1} = 2 and m=21/(p−1)m = 2^{1/(p - 1)}. At p=3p = 3: μ=21=2\mu = \frac21 = 2 and m=21/2=2m = 2^{1/2} = \sqrt2, as in part a). As pp decreases to 22, μ=p−1p−2→∞\mu = \frac{p - 1}{p - 2} \to \infty while m→21=2m \to 2^1 = 2, the median of part b). The median moves smoothly; the mean blows up. A heavier tail barely changes where half of the values fall, and changes the balance point without limit.

Exercise 8: Five statements to correct

Each statement below comes from a MATH 141 paper on probability density functions. Say whether it is true or false. When it is false, name the error, correct it, and back the correction with a computation or a counterexample; when it is true, prove it in a few lines.

  • a) The density of XX satisfies f(2)=1.5f(2) = 1.5, so P(X=2)=1.5P(X = 2) = 1.5, which is impossible: ff cannot be a density.
  • b) For every density, the cumulative distribution function is F(x)=∫0xf(t) dtF(x) = \int_0^x f(t)\,dt.
  • c) The median of a density that is 00 outside [0,4][0, 4] is 22.
  • d) The waiting time at a counter is exponential with mean 1010 minutes, so half of the customers wait more than 1010 minutes.
  • e) If ff is a continuous density that is 00 outside [a,b][a, b], then its mean lies in [a,b][a, b].
Show the solution

Answers

  • a) False: P(X=2)=0P(X = 2) = 0; f(2)f(2) is a height, e.g. f=32f = \frac32 on [0,23][0, \frac23] is a density.
  • b) False: F(x)=∫−∞xf(t) dtF(x) = \int_{-\infty}^x f(t)\,dt; for the Cauchy density F(0)=12F(0) = \frac12, not 00.
  • c) False: for f(x)=x8f(x) = \frac{x}{8} on [0,4][0, 4], m=22m = 2\sqrt2.
  • d) False: P(T>10)=e−1≈0.37P(T > 10) = e^{-1} \approx 0.37; the median is 10ln⁡2≈6.910\ln 2 \approx 6.9 minutes.
  • e) True: af(x)≤xf(x)≤bf(x)a f(x) \le x f(x) \le b f(x) on [a,b][a, b], then integrate: a≤μ≤ba \le \mu \le b.

a) False, and twice. First, P(X=2)=∫22f(x) dx=0P(X = 2) = \int_2^2 f(x)\,dx = 0 for every density, whatever the height f(2)f(2). Second, a height above 11 is perfectly legal: f(x)=32f(x) = \frac32 on [0,23][0, \frac23], and 00 elsewhere, is non-negative with area 32⋅23=1\frac32 \cdot \frac23 = 1, so it is a density with f=1.5f = 1.5 everywhere on its interval. What can never exceed 11 is an area. The statement confuses a probability per unit length with a probability.

b) False. The cumulative distribution function accumulates area from −∞-\infty: F(x)=∫−∞xf(t) dtF(x) = \int_{-\infty}^x f(t)\,dt. The formula with lower bound 00 agrees with it only when f=0f = 0 on (−∞,0)(-\infty, 0). Counterexample: the Cauchy density 1π(1+x2)\frac{1}{\pi(1 + x^2)} of exercise 2 is symmetric about 00, so F(0)=12F(0) = \frac12, while the formula gives 00; for x<0x < 0 it even gives a NEGATIVE number, impossible for a probability. Same mechanism as the piecewise trap of exercise 3: FF never restarts at the beginning of an interval.

c) False. The median solves an area equation, and the midpoint of the interval solves it only for a density symmetric about 22. Counterexample: f(x)=x8f(x) = \frac{x}{8} on [0,4][0, 4] is non-negative with area 18⋅162=1\frac18 \cdot \frac{16}{2} = 1; its cumulative distribution function is F(x)=x216F(x) = \frac{x^2}{16}, and F(m)=12F(m) = \frac12 gives m2=8m^2 = 8, m=22m = 2\sqrt2. Check: F(2)=14F(2) = \frac14, so only a quarter of the probability lies below 22.

d) False. With mean 1010, F(t)=1−e−t/10F(t) = 1 - e^{-t/10}, so P(T>10)=e−1≈0.37P(T > 10) = e^{-1} \approx 0.37: only about 3737 percent of customers wait longer than the mean. The time that half of them exceed is the median, 1−e−m/10=121 - e^{-m/10} = \frac12, that is m=10ln⁡2≈6.9m = 10\ln 2 \approx 6.9 minutes. On an exponential density, mean and median are different numbers: the mean is pulled up by the long right tail.

e) True. On [a,b][a, b] we have a≤x≤ba \le x \le b and f(x)≥0f(x) \ge 0, so af(x)≤xf(x)≤bf(x)a f(x) \le x f(x) \le b f(x). Integrating over [a,b][a, b], where all the area lies, gives a∫abf≤∫abxf(x) dx≤b∫abfa\int_a^b f \le \int_a^b x f(x)\,dx \le b\int_a^b f, that is a≤μ≤ba \le \mu \le b since ∫abf=1\int_a^b f = 1. It is the comparison property of integrals, and it gives a free check on every answer: a mean outside the support of the density is a computation error. One statement out of five was true; saying false everywhere by reflex costs the marks of the proof.

Exercise 9: Lifetime of a pump: which model predicts more failures under warranty?

A manufacturer compares two models for the lifetime TT, in years, of a pump. Model A is exponential with mean 44 years: fA(t)=14e−t/4f_A(t) = \frac14 e^{-t/4}. Model B takes wear into account: fB(t)=t4e−t/2f_B(t) = \frac{t}{4}e^{-t/2}. Both densities are 00 for t<0t < 0. The warranty covers every failure during the first 22 years.

The figure draws both densities and the end of the warranty. No calculator: use 2.7<e<2.722.7 < e < 2.72 where a comparison needs a value of ee.

246810120.050.10.150.20.250.3ABwarranty endst (years)
  • a) Show that fBf_B is a density: name the integration by parts and the limit that closes it.
  • b) Show that the mean lifetime under model B is also 44 years.
  • c) Compute the probability of a warranty claim, P(T≤2)P(T \le 2), under each model exactly, and show that it is below 3030 percent under model B.
  • d) Decide without a calculator which model predicts MORE claims, by reducing the comparison to one between ee and 44.
  • e) Find the most likely lifetime under model B (the maximum of fBf_B), and explain from the shapes of the two curves why two models with the same mean disagree about the warranty.
Show the solution

Answers

  • a) ∫0st4e−t/2 dt=1−(1+s2)e−s/2→1\int_0^s \frac{t}{4}e^{-t/2}\,dt = 1 - \left(1 + \frac s2\right)e^{-s/2} \to 1.
  • b) ∫0∞t24e−t/2 dt=164=4\int_0^\infty \frac{t^2}{4}e^{-t/2}\,dt = \frac{16}{4} = 4 years.
  • c) PA=1−e−1/2≈0.39P_A = 1 - e^{-1/2} \approx 0.39; PB=1−2e≈0.26<0.3P_B = 1 - \frac2e \approx 0.26 < 0.3 since e<207e < \frac{20}{7}.
  • d) PA>PB  ⟺  e−1/2<2e  ⟺  e<2  ⟺  e<4P_A > P_B \iff e^{-1/2} < \frac2e \iff \sqrt e < 2 \iff e < 4: model A predicts more claims.
  • e) fB′(t)=14e−t/2(1−t2)=0f_B'(t) = \frac14 e^{-t/2}\left(1 - \frac t2\right) = 0 at t=2t = 2 years; fAf_A is largest at t=0t = 0, fB(0)=0f_B(0) = 0.

a) fB≥0f_B \ge 0 for t≥0t \ge 0. For the area, integrate by parts with u=tu = t and dv=e−t/2 dtdv = e^{-t/2}\,dt, so du=dtdu = dt and v=−2e−t/2v = -2e^{-t/2}: ∫te−t/2 dt=−2te−t/2+2∫e−t/2 dt=−2te−t/2−4e−t/2+C\int t e^{-t/2}\,dt = -2te^{-t/2} + 2\int e^{-t/2}\,dt = -2te^{-t/2} - 4e^{-t/2} + C. Check by differentiating: −2e−t/2+te−t/2+2e−t/2=te−t/2-2e^{-t/2} + te^{-t/2} + 2e^{-t/2} = te^{-t/2}. Then ∫0st4e−t/2 dt=14[−2te−t/2−4e−t/2]0s=1−(1+s2)e−s/2\int_0^s \frac t4 e^{-t/2}\,dt = \frac14\left[-2te^{-t/2} - 4e^{-t/2}\right]_0^s = 1 - \left(1 + \frac s2\right)e^{-s/2}. As s→∞s \to \infty, se−s/2=ses/2→0se^{-s/2} = \frac{s}{e^{s/2}} \to 0 by L'Hôpital's rule, so the area tends to 11. The same computation gives FB(t)=1−(1+t2)e−t/2F_B(t) = 1 - \left(1 + \frac t2\right)e^{-t/2}.

b) μB=14∫0∞t2e−t/2 dt\mu_B = \frac14\int_0^\infty t^2 e^{-t/2}\,dt. Two integrations by parts, the tabular method being the quickest: derivatives t2,2t,2,0t^2, 2t, 2, 0 against antiderivatives −2e−t/2,4e−t/2,−8e−t/2-2e^{-t/2}, 4e^{-t/2}, -8e^{-t/2}, with alternating signs, give ∫t2e−t/2 dt=−e−t/2(2t2+8t+16)+C\int t^2 e^{-t/2}\,dt = -e^{-t/2}\left(2t^2 + 8t + 16\right) + C. Between 00 and ss this is 16−e−s/2(2s2+8s+16)16 - e^{-s/2}\left(2s^2 + 8s + 16\right), and s2es/2→0\frac{s^2}{e^{s/2}} \to 0 by L'Hôpital's rule applied twice. So the integral is 1616 and μB=164=4\mu_B = \frac{16}{4} = 4 years: exactly the mean of model A. The comparison that follows is therefore between two models that agree on the average lifetime.

c) Model A: P(T≤2)=FA(2)=1−e−2/4=1−e−1/2P(T \le 2) = F_A(2) = 1 - e^{-2/4} = 1 - e^{-1/2}, about 1−0.61=0.391 - 0.61 = 0.39. Model B: P(T≤2)=FB(2)=1−(1+1)e−1=1−2eP(T \le 2) = F_B(2) = 1 - (1 + 1)e^{-1} = 1 - \frac2e, about 1−0.74=0.261 - 0.74 = 0.26. To PROVE the bound without a decimal: 1−2e<310  ⟺  2e>710  ⟺  e<2071 - \frac2e < \frac{3}{10} \iff \frac2e > \frac{7}{10} \iff e < \frac{20}{7}, and 207>2.85>2.72>e\frac{20}{7} > 2.85 > 2.72 > e. So fewer than 3030 percent of the pumps fail under warranty according to model B.

d) Model A predicts more claims when 1−e−1/2>1−2e−11 - e^{-1/2} > 1 - 2e^{-1}, that is e−1/2<2e−1e^{-1/2} < 2e^{-1}. Multiplying by e>0e > 0 gives e1/2<2e^{1/2} < 2, and squaring positive numbers gives e<4e < 4, which is true. So model A predicts MORE claims under warranty: about 3939 percent against 2626 percent. Each step of the chain is an equivalence between positive quantities, which is what makes the conclusion a proof; stating the two decimals alone would not be one on a paper without a calculator.

e) fB′(t)=14e−t/2−t8e−t/2=14e−t/2(1−t2)f_B'(t) = \frac14 e^{-t/2} - \frac{t}{8}e^{-t/2} = \frac14 e^{-t/2}\left(1 - \frac t2\right), positive for t<2t < 2 and negative after: the maximum is at t=2t = 2 years, with fB(2)=12ef_B(2) = \frac{1}{2e}. The figure explains the disagreement. fAf_A is LARGEST at t=0t = 0: under the exponential model a brand new pump is as likely to fail in its first month as at any later time, and the early years carry the most probability. fBf_B starts at 00: new pumps almost never fail, failures come with wear and peak around 22 years. Same mean, different shapes, and the warranty only sees the area over [0,2][0, 2]. A pump that wears out is precisely what the memoryless exponential model of exercise 5 cannot describe.

Exercise 10: A final exam question: waiting time at a call centre

At a call centre, the time TT in minutes before a caller reaches an agent has the density f(t)=ktf(t) = kt for 0≤t≤20 \le t \le 2, f(t)=2k e2−tf(t) = 2k\,e^{2 - t} for t>2t > 2, and f(t)=0f(t) = 0 for t<0t < 0. The first piece models the automated menu, which nobody can skip; after it, the caller waits in an exponential queue.

The figure shows the shape of ff, without its vertical scale. No calculator: use 2.7<e<2.722.7 < e < 2.72 where a value of ee is needed.

246tmenu: ktqueue: 2k e^(2 − t)
  • a) Check that the two formulas agree at t=2t = 2 whatever kk is, then find kk.
  • b) Find the cumulative distribution function F(t)F(t) on each interval.
  • c) Show that the median waiting time is exactly 22 minutes, and compute P(1≤T≤3)P(1 \le T \le 3).
  • d) Compute the mean waiting time and compare it with the median.
  • e) The manager promises that at most one caller in ten waits more than 44 minutes. Is the promise kept?
Show the solution

Answers

  • a) k⋅2=2k e0k \cdot 2 = 2k\,e^{0}; the two pieces each have area 2k2k, so k=14k = \frac14.
  • b) F=0F = 0 for t<0t < 0; F=t28F = \frac{t^2}{8} on [0,2][0, 2]; F=1−12e2−tF = 1 - \frac12 e^{2 - t} for t≥2t \ge 2.
  • c) F(2)=12F(2) = \frac12, so m=2m = 2; P(1≤T≤3)=78−12e≈0.69P(1 \le T \le 3) = \frac78 - \frac{1}{2e} \approx 0.69.
  • d) μ=23+32=136≈2.17\mu = \frac23 + \frac32 = \frac{13}{6} \approx 2.17 minutes, above the median 22.
  • e) P(T>4)=12e2<110P(T > 4) = \frac{1}{2e^2} < \frac{1}{10} since e2>7.29>5e^2 > 7.29 > 5: the promise is kept.

a) At t=2t = 2 the first formula gives 2k2k and the second 2k e0=2k2k\,e^{0} = 2k: the density is continuous whatever kk is, which is why the tail was written with the factor 2k2k. Area of the first piece: ∫02kt dt=2k\int_0^2 kt\,dt = 2k, a triangle. Area of the tail: ∫2s2k e2−t dt=2k[−e2−t]2s=2k(1−e2−s)→2k\int_2^s 2k\,e^{2 - t}\,dt = 2k\left[-e^{2 - t}\right]_2^s = 2k\left(1 - e^{2 - s}\right) \to 2k. The total is 4k=14k = 1, so k=14k = \frac14. The sign condition holds since k>0k > 0.

b) For t<0t < 0: F(t)=0F(t) = 0. For 0≤t≤20 \le t \le 2: F(t)=∫0ts4 ds=t28F(t) = \int_0^t \frac s4\,ds = \frac{t^2}{8}. For t≥2t \ge 2 the area of the menu phase is carried, exactly as in exercise 3: F(t)=F(2)+∫2t12e2−s ds=12+12(1−e2−t)=1−12e2−tF(t) = F(2) + \int_2^t \frac12 e^{2 - s}\,ds = \frac12 + \frac12\left(1 - e^{2 - t}\right) = 1 - \frac12 e^{2 - t}. Checks: both formulas give 12\frac12 at t=2t = 2, and F(t)→1F(t) \to 1 as t→∞t \to \infty.

c) F(2)=48=12F(2) = \frac{4}{8} = \frac12, and FF is strictly increasing on (0,∞)(0, \infty) because f>0f > 0 there, so 22 is the ONLY solution of F(m)=12F(m) = \frac12: the median is exactly 22 minutes. Half of the callers are still in the menu phase when the other half reaches the queue. Then P(1≤T≤3)=F(3)−F(1)=(1−12e−1)−18=78−12eP(1 \le T \le 3) = F(3) - F(1) = \left(1 - \frac12 e^{-1}\right) - \frac18 = \frac78 - \frac{1}{2e}, about 0.875−0.18=0.690.875 - 0.18 = 0.69. Using the formula of the wrong piece for F(3)F(3) or F(1)F(1) is the trap: each value of FF is read from the piece that contains its argument.

d) The mean splits along the pieces. Menu: ∫02t⋅t4 dt=14⋅83=23\int_0^2 t \cdot \frac t4\,dt = \frac14 \cdot \frac83 = \frac23. Queue: ∫2∞t⋅12e2−t dt\int_2^\infty t \cdot \frac12 e^{2 - t}\,dt, by parts with u=tu = t, dv=12e2−t dtdv = \frac12 e^{2 - t}\,dt, v=−12e2−tv = -\frac12 e^{2 - t}: [−t2e2−t]2s+12∫2se2−t dt→(0+1)+12=32\left[-\frac t2 e^{2 - t}\right]_2^s + \frac12\int_2^s e^{2 - t}\,dt \to (0 + 1) + \frac12 = \frac32, the limit ses−2→0\frac{s}{e^{s - 2}} \to 0 coming from L'Hôpital's rule. So μ=23+32=136≈2.17\mu = \frac23 + \frac32 = \frac{13}{6} \approx 2.17 minutes. The mean exceeds the median 22: the exponential tail on the right pulls the balance point past the half-area cut, the rule met in exercises 4 and 5.

e) P(T>4)=1−F(4)=12e−2=12e2P(T > 4) = 1 - F(4) = \frac12 e^{-2} = \frac{1}{2e^2}. The promise holds when 12e2≤110\frac{1}{2e^2} \le \frac{1}{10}, that is e2≥5e^2 \ge 5. Since e>2.7e > 2.7, e2>7.29>5e^2 > 7.29 > 5: the promise is kept, with room to spare, since 12e2<114.58\frac{1}{2e^2} < \frac{1}{14.58}, about one caller in fifteen. Once again the proof is a chain of inequalities between exact numbers, and the decimal is only the reader's sanity check.

See also

Struggling with MATH 141?

I tutor first-year calculus at McGill and Concordia, in English or in French, in Montreal or online. Get in touch for a first session.

Site by Studio Squalli