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 where improper integrals and integration by parts start answering questions about waiting times and lifetimes: the definition of a probability density function, the normalizing constant k, the cumulative distribution function, the mean and the median, the exponential density, the normal density and heavy-tailed densities whose mean is infinite.
What the set covers, the traps it targets
It is where improper integrals and integration by parts start answering questions about waiting times and lifetimes: the definition of a probability density function, the normalizing constant k, the cumulative distribution function, the mean and the median, the exponential density, the normal density and heavy-tailed densities whose mean is infinite.
Every answer is exact, as on the calculator-free exam: e−2, 4ln2, 613, and when an order of magnitude helps it is derived from e≈2.72 and ln2≈0.69.
By the end of the set you can decide whether a function is a density (Exercise 1), find k and compute a probability as an area (Exercise 2), build the cumulative distribution function piece by piece and differentiate it back (Exercise 3), compute a mean and a median and say which is larger from the shape of the graph (Exercise 4), and work with the exponential density of a waiting time, its median μln2 and its memoryless property (Exercise 5). Part B handles the normal density by symmetry and substitution alone (Exercise 6), the densities xpc whose mean diverges (Exercise 7), the Cauchy density as the standard counterexample (Exercises 2 and 8), two lifetime models for a pump under warranty (Exercise 9) and a call centre whose waiting time has two phases (Exercise 10).
The thread running through the whole set: a probability is an AREA under the density, never a HEIGHT of it. The constant k is fixed by the total area 1; P(a≤X≤b) is the area over [a,b]; the cumulative distribution function is the area accumulated from −∞; 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) is a probability per unit length, which may exceed 1, and P(X=a)=0 whatever 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 k, plugging ∞ into a bracket instead of writing a limit, restarting F at 0 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.
•f is a density when f(x)≥0 for all x AND ∫−∞∞f(x)dx=1. Then P(a≤X≤b)=∫abf(x)dx, and P(X=a)=0.
•Cumulative distribution function: F(x)=∫−∞xf(t)dt; P(a≤X≤b)=F(b)−F(a) and F′=f where f is continuous.
•Mean: μ=∫−∞∞xf(x)dx, when this improper integral converges. Median: the number m with F(m)=21.
•Exponential density with mean μ: f(t)=μ1e−t/μ for t≥0; F(t)=1−e−t/μ; median μln2.
•Normal density: f(x)=σ2π1e−(x−μ)2/(2σ2), symmetric about its mean μ, inflection points at μ±σ; no elementary antiderivative.
•∫1∞xpdx converges exactly when p>1, with value p−11.
Part A: the basics (/50)
Exercise 1: Is it a density? Two conditions, and a height of 3 that is allowed
6 answers to check
A function f is a probability density function of a random variable X when f(x)≥0 for every x AND ∫−∞∞f(x)dx=1. Then P(a≤X≤b)=∫abf(x)dx: a probability is an AREA under the graph of f. Nothing in the definition bounds the HEIGHT of f.
Each function below is 0 outside the interval where it is given. The figure shows the first one.
a) f(x)=3x2 on [0,1]. Show that f is a density even though f(1)=3, then compute P(X≤21) and P(X≥21).
b) g(x)=x on [−1,3]. Compute ∫−13g(x)dx. Is g a density?
c) h(x)=(1+x)32 on [0,∞). Show that h is a density, writing the improper integral as a limit, and compute P(X>1).
d) q(x)=x1 on [1,∞). Explain why no constant c makes cq(x) a density.
e) A student writes: since f(1)=3 in part a), f cannot be a density, because a probability never exceeds 1. Correct the reasoning and say what the number f(1)=3 does mean.
Show the solution
Answers
a)f≥0 and ∫013x2dx=1: a density. P(X≤21)=81, P(X≥21)=87.
b)∫−13xdx=1, but g<0 on [−1,0): NOT a density.
c)limt→∞(1−(1+t)21)=1: a density. P(X>1)=41.
d)∫1txdx=lnt→∞: the area is infinite for c>0, negative or zero otherwise.
e)f(1) is a probability PER UNIT LENGTH: P(1−Δx≤X≤1)≈3Δx, and P(X=1)=0.
a)
Two conditions, checked one at a time. Sign: 3x2≥0 on [0,1] and f=0 elsewhere, so f≥0 everywhere. Area: ∫−∞∞f(x)dx=∫013x2dx=[x3]01=1. Both hold, so f is a density, and the value f(1)=3 plays no role in either condition. Then P(X≤21)=∫01/23x2dx=[x3]01/2=81, the shaded area of the figure, and P(X≥21)=1−81=87. Half of the interval carries only one eighth of the probability: the mass sits near 1, where the curve is high. That is how the height of f matters: it says WHERE the probability is concentrated, not how large a probability is.
b)
∫−13xdx=[2x2]−13=23−21=1. The area condition holds, and it is a trap: the integral is a SIGNED area, and the negative part over [−1,0) has been cancelled by extra positive area on the right. Since g(x)=x<0 for −1≤x<0, the sign condition fails and g is NOT a density. Used as one, it would give P(−1≤X≤0)=∫−10xdx=−21, a negative probability. Checking only that the total is 1 is the classic half-answer, and it costs the whole question.
c)
Sign: (1+x)3>0 for x≥0, so h>0 there. Area: the interval is infinite, so the integral is improper and is written as a limit. An antiderivative of 2(1+x)−3 is −(1+x)−2; check by differentiating: dxd[−(1+x)−2]=2(1+x)−3. So ∫0th(x)dx=[−(1+x)21]0t=1−(1+t)21, which tends to 1 as t→∞. h is a density. Then P(X>1)=limt→∞∫1th(x)dx=limt→∞(41−(1+t)21)=41. Writing [−(1+x)21]1∞ with ∞ plugged in as a number is what markers penalize: the limit is the definition, and it must appear.
d)
The sign condition forces c≥0, and c=0 gives area 0, not 1. For c>0: ∫1txcdx=clnt→∞ as t→∞. The area under x1 on [1,∞) is INFINITE, and no positive multiple of an infinite area equals 1. Normalizing means dividing by the total area, which is only possible when that area is finite and non-zero. Compare with part c): (1+x)32 decreases fast enough for the area to converge, x1 does not.
e)
The student confuses a height with an area. The value 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Δx. With Δx=0.01 this is about 0.03, and the exact value is 1−0.993=0.029701. As Δx→0 the probability tends to 0: P(X=1)=∫11f(x)dx=0, whatever the height f(1) is. So heights can be any non-negative number, including 3 or 1000; what can never exceed 1 is an area.
Points are earned before the solution; after it, you can keep practising.
For you:
Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.
Exercise 2: Finding k: normalize first, then every probability is an area
9 answers to check
When a density is given up to a constant, f(x)=kφ(x), the constant is not a free choice: the condition ∫−∞∞f(x)dx=1 fixes it. Any probability computed with a wrong k is wrong by the same factor, so k 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.
a) f(x)=kx(2−x) on [0,2] and 0 elsewhere. Find k.
b) Compute P(X≤21), then P(21≤X≤23) without a second integral.
c) What is P(X=1)? What is P(X<1), and why is it equal to P(X≤1)?
d) g(x)=1+x2k for every real x. Find k, then P(X>1) and P(∣X∣≤3).
e) The graph of g is symmetric about 0. A student concludes that the mean of X is 0. Test the claim by writing the integral that defines the mean.
Show the solution
Answers
a)∫02x(2−x)dx=34, so k=43.
b)P(X≤21)=325; by symmetry P(21≤X≤23)=1−2⋅325=1611.
c)P(X=1)=0; P(X<1)=P(X≤1)=21.
d)k=π1; P(X>1)=41; P(∣X∣≤3)=32.
e)∫0tπ(1+x2)xdx=2π1ln(1+t2)→∞: the mean does not exist.
a)
Sign first: x(2−x)≥0 on [0,2], so f≥0 forces k≥0. Area: ∫02(2x−x2)dx=[x2−3x3]02=4−38=34. The condition k⋅34=1 gives k=43. The frequent slip is k=34: the constant is the RECIPROCAL of the area, since it has to scale the area down to 1. The quick test is the one you should always run: with k=34 the total area would be 916>1.
b)
With F written as the area from 0: P(X≤21)=43[x2−3x3]01/2=43(41−241)=43⋅245=325. Now f(2−x)=k(2−x)x=f(x): the graph is symmetric about x=1, so the right-hand strip [23,2] has the same area 325. The middle strip is what remains: 1−2⋅325=3222=1611. Direct check: 43[x2−3x3]1/23/2=43(89−245)=43⋅2422=1611. Symmetry is worth a line on an exam only if you STATE the identity f(2−x)=f(x) that justifies it.
c)
P(X=1)=∫11f(x)dx=0, even though f(1)=43 is the maximum of f: a single point has no width, hence no area. Consequently P(X<1)=P(X≤1)−P(X=1)=P(X≤1), and by the symmetry of part b) this is 21. 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 0, each half being a limit: ∫0t1+x2dx=arctant→2π as t→∞, and likewise ∫−t01+x2dx=arctant→2π. The total is π, so k=π1. Then P(X>1)=π1limt→∞(arctant−arctan1)=π1(2π−4π)=41, and P(∣X∣≤3)=π1(arctan3−arctan(−3))=π1⋅32π=32. Every value is exact: arctan1=4π and arctan3=3π are the ones to know.
e)
The mean is μ=∫−∞∞xg(x)dx, an improper integral that exists only if BOTH halves converge. On the right, with u=1+x2: ∫0tπ(1+x2)xdx=2π1ln(1+t2), which tends to ∞. The right half diverges, so the integral that defines the mean diverges and X HAS NO MEAN. The student computed, in effect, limt→∞∫−ttxg(x)dx=0, the symmetric limit: that is not the definition of an integral over (−∞,∞), and here it hides two infinite halves. Symmetry about 0 gives the mean only once the mean is known to exist. This density, called the Cauchy density, is the standard counterexample.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 3: The cumulative distribution function: from f to F, and back
8 answers to check
The cumulative distribution function of X is F(x)=P(X≤x)=∫−∞xf(t)dt: the area accumulated from the far left up to x. It turns every probability into a subtraction, P(a≤X≤b)=F(b)−F(a), and it gives the density back by the Fundamental Theorem, F′(x)=f(x) wherever f is continuous.
The triangular density of the figure is f(x)=x on [0,1], f(x)=2−x on [1,2], and 0 elsewhere.
a) Check that f is a density from the figure alone.
b) Find F(x) on each of the four intervals x<0, 0≤x≤1, 1≤x≤2 and x>2.
c) Use F to compute P(21≤X≤23) and P(X>23), and check the second one with the figure.
d) Another variable Y has FY(y)=0 for y<1 and FY(y)=1−y31 for y≥1. Find its density, P(Y>2), and the number m with P(Y≤m)=21.
e) A student writes, for 1≤x≤2: F(x)=∫1x(2−t)dt=2x−2x2−23. Find what is missing, and give two tests that would have caught it.
Show the solution
Answers
a)f≥0 and the triangle has area 21⋅2⋅1=1.
b)F=0; F=2x2; F=2x−2x2−1; F=1.
c)F(23)−F(21)=87−81=43; P(X>23)=81.
d)fY(y)=y43 for y>1 (0 for y<1); P(Y>2)=81; m=32.
e)The area F(1)=21 already accumulated is missing; F must be continuous and F(2)=1.
a)
The graph is never below the axis, so f≥0. The region under it is a triangle with base 2 and height 1, of area 21⋅2⋅1=1. Both conditions hold: f is a density. Reading an area by geometry is legitimate and fast; it is exactly what the integral would give.
b)
For x<0 no area has accumulated: F(x)=0. For 0≤x≤1: F(x)=∫0xtdt=2x2. For 1≤x≤2 the area accumulated on [0,1] must be CARRIED: F(x)=F(1)+∫1x(2−t)dt=21+[2t−2t2]1x=21+2x−2x2−23=2x−2x2−1. For x>2 all the area is behind: F(x)=1. Checks at the joints: the middle formula gives F(1)=2−21−1=21, as the first one does, and F(2)=4−2−1=1. A cumulative distribution function is continuous, increasing, starts at 0 and ends at 1; the solution figure shows it next to f.
c)
F(23)=3−89−1=87 and F(21)=81, so P(21≤X≤23)=87−81=43. Then P(X>23)=1−F(23)=81. On the figure, the region to the right of x=23 is a small triangle with base 21 and height f(23)=21, of area 21⋅21⋅21=81. The two methods agree, and on an exam the geometric one is a ten-second check of the algebraic one.
d)
Going back from F to f is FTC 1: fY(y)=FY′(y)=y43 for y>1, and fY(y)=0 for y<1. Check: ∫1t3y−4dy=1−t−3→1. Then P(Y>2)=1−FY(2)=81, read directly from F without any integral. The median solves FY(m)=21: 1−m31=21, so m3=2 and m=32. With F in hand, every probability is an evaluation and the median is an equation; this is why the question often asks for F first.
e)
The student started the area at x=1 instead of at −∞: the term F(1)=21, the probability already accumulated on [0,1], is missing, and the formula is too small by exactly 21. Two tests catch it at once. Continuity: the student's formula gives 2−21−23=0 at x=1, while the first piece gives 21; a cumulative distribution function never jumps when X has a density. The end value: at x=2 the student's formula gives 4−2−23=21, but F(2) must equal 1 since all the area is behind. The correct formula is 2x−2x2−1.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 4: Mean and median: the balance point and the half-area point
6 answers to check
The mean of X is μ=∫−∞∞xf(x)dx. Since the total area under f is 1, it is exactly the x-coordinate of the centroid of the region under the graph: the point where that region would balance. The median is the number m with ∫−∞mf(x)dx=21: 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 0 outside [0,1].
a) For f(x)=2x on [0,1], compute μ and m 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)2 on [0,1], compute μ and m exactly.
d) Show without a calculator that m<μ for g, by comparing (43)3 with 21.
e) A student claims that the median of any density on [0,1] is 21, 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)μ=32, m=22.
b)m2=21>94=μ2, so m>μ: the thin tail is on the left and pulls the mean towards 0.
c)μ=41, m=1−321.
d)(43)3=6427<21, so 321>43 and m<41=μ.
e)The median solves F(m)=21; it is 21 when f is symmetric about 21, for instance f(1−x)=f(x).
a)
μ=∫01x⋅2xdx=[32x3]01=32. For the median, first F(x)=∫0x2tdt=x2 on [0,1], then F(m)=21 gives m2=21, so m=21=22, the positive root since m lies in [0,1]. The mean multiplies by x inside the integral; the median does not, it solves an equation in the upper bound. Mixing the two, for example solving ∫0mxf(x)dx=21, is a frequent slip.
b)
Both numbers are positive, so compare their squares: m2=21=189 and μ2=94=188. Hence m>μ, with m≈0.71 and μ≈0.67. The shape explains it: the density 2x is heavy near 1 and thins out towards 0, 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)2dx=3∫01(x−2x2+x3)dx=3(21−32+41)=3⋅121=41. For F, with the substitution u=1−t: F(x)=∫0x3(1−t)2dt=[−(1−t)3]0x=1−(1−x)3. Then F(m)=21 gives (1−m)3=21, so 1−m=321 and m=1−321. That is the exact answer, and on a MATH 141 paper it is the expected one.
d)
m<41 is equivalent to 1−321<41, that is 321>43. Cubing, a legitimate step between positive numbers since t↦t3 is increasing, it becomes 21>6427, which is true because 21=6432. Hence m<μ=41, with m≈0.21. This time the mass is piled near 0 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)=21, and nothing forces the solution to be the middle of the interval: part a) gives 22 and part c) gives 1−321, neither of which is 21. The student is right when the density is symmetric about 21, that is f(1−x)=f(x), as for the uniform density f=1 or for 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 21 too, and it certainly exists because the interval is bounded.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 5: The exponential density: waiting at a service counter
6 answers to check
The waiting time T, in minutes, of a customer at a service counter is modelled by the exponential density f(t)=41e−t/4 for t≥0, and f(t)=0 for t<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.72 and ln2≈0.69.
a) Show that f is a density, writing the improper integral as a limit, and find F(t) for t≥0.
b) Compute P(T>8) and P(2≤T≤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 2 minutes, which fraction will wait more than 6 minutes in total? Compare with P(T>4) and comment.
Show the solution
Answers
a)∫0t41e−s/4ds=1−e−t/4→1; F(t)=1−e−t/4.
b)P(T>8)=e−2≈0.14; P(2≤T≤4)=e−1/2−e−1≈0.24.
c)μ=4 minutes.
d)m=4ln2≈2.8 minutes; P(T<4)=1−e−1≈0.63.
e)P(T>2)P(T>6)=e−1/2e−3/2=e−1=P(T>4): the time already spent does not change what remains.
a)
f≥0 since an exponential is positive. For the area: ∫0t41e−s/4ds=[−e−s/4]0t=1−e−t/4, and e−t/4→0 as t→∞, so the total area is 1 and f is a density. The same computation IS the cumulative distribution function: F(t)=1−e−t/4 for t≥0, and F(t)=0 for t<0. From now on every probability is a subtraction of values of F, which is the efficient way to work with this density.
b)
P(T>8)=1−F(8)=e−8/4=e−2, the shaded tail of the figure. Order of magnitude: e2≈2.722≈7.4, so e−2≈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−1. With e1≈0.37 and e1≈1.651≈0.61, this is about 0.24. The exact forms e−2 and e−1/2−e−1 are the answers; the decimals only tell the reader that the numbers make sense.
c)
μ=∫0∞t⋅41e−t/4dt=lims→∞∫0s4te−t/4dt. Integration by parts with u=t and dv=41e−t/4dt, so du=dt and v=−e−t/4; the choice puts the power of t in u, where differentiating removes it. Then ∫0s4te−t/4dt=[−te−t/4]0s+∫0se−t/4dt=−se−s/4+4(1−e−s/4). The limit lims→∞se−s/4=lims→∞es/4s is of the form ∞∞; by L'Hôpital's rule it equals lims→∞41es/41=0. Hence μ=4 minutes. In general the exponential density μ1e−t/μ has mean μ, which is why its parameter is written that way.
d)
The median solves F(m)=21: 1−e−m/4=21, so e−m/4=21, −4m=−ln2 and m=4ln2≈2.8 minutes. It is SMALLER than the mean 4. The fraction of customers who wait less than the mean is P(T<4)=F(4)=1−e−1≈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 2 minutes are those with T>2, a proportion P(T>2)=e−1/2 of all customers. Among them, those who wait more than 6 minutes in total form the proportion P(T>6)=e−3/2 of all customers. The fraction asked for is the ratio of the two tail areas: e−1/2e−3/2=e−1. That is exactly P(T>4)=e−1, the probability that a customer who just arrived waits more than 4 minutes. Having already waited 2 minutes changes nothing about the 4 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.
Points are earned before the solution; after it, you can keep practising.
For you:
Part B: problems and reasoning (/50)
Exercise 6: The normal density, handled by symmetry only
12 answers to check
The normal density with mean μ and standard deviation σ>0 is f(x)=σ2π1e−(x−μ)2/(2σ2) for every real x. The function e−x2 has no elementary antiderivative, so no normal probability is ever computed from a primitive. You are given the fact ∫−∞∞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 X on a standardized test are modelled by a normal density with μ=500 and σ=100. You are told that P(400≤X≤600)=p, a number you do not need to know. The figure shows the bell with its central strip [500,600] shaded.
a) Show that f(μ+h)=f(μ−h) for every h, deduce P(X≤500), and give the median of X.
b) Express in terms of p: P(X≥600), P(500≤X≤600), P(X≤400 or X≥600) and P(X≤600).
c) With the substitution u=σx−μ, show that P(400≤X≤600)=∫−112π1e−u2/2du. What does this say about the probability of falling within one standard deviation of the mean, for other values of μ and σ?
d) Prove that the mean of X is μ, by computing ∫μ∞(x−μ)f(x)dx with a substitution BEFORE using any symmetry.
e) Show that the graph of f has its inflection points exactly at x=μ±σ, the two outer dashed lines of the figure.
Show the solution
Answers
a)(±h)2=h2, so f(μ+h)=f(μ−h); P(X≤500)=21; median 500.
b)21−p; 2p; 1−p; 21+p.
c)The σ cancels and the bounds become ±1: the same value p for every normal density.
d)∫μ∞(x−μ)f(x)dx=2πσ, finite; the left half is its opposite, so ∫xf=μ.
e)f′′(x)=σ4f(x)[(x−μ)2−σ2] changes sign exactly at x=μ±σ, here 400 and 600.
a)
f(μ±h)=σ2π1e−(±h)2/(2σ2)=σ2π1e−h2/(2σ2), the same for +h and −h: the bell is symmetric about x=μ. The substitution x=2μ−t turns ∫−∞μf(x)dx into ∫μ∞f(t)dt, so the two halves of the total area 1 are equal and each is 21. Hence P(X≤500)=21, and the median is 500, the centre of symmetry. Nothing here needed a value of the integral, only the fact that the total is 1.
b)
The strip [400,600] carries p, so the two tails carry 1−p together, and by symmetry each carries half: P(X≥600)=21−p. The strip itself is symmetric about 500, so P(500≤X≤600)=2p, the shaded area of the figure. Both tails together: P(X≤400 or X≥600)=1−p. Finally P(X≤600)=21+2p=21+p, or equivalently 1−21−p. The frequent error is P(X≥600)=1−p, which forgets that the complement of the strip is made of TWO tails.
c)
u=100x−500 gives du=100dx; the bounds x=400 and x=600 become u=−1 and u=1. Then 1002π1e−(x−500)2/(2⋅1002)dx=1002π1e−u2/2⋅100du=2π1e−u2/2du, and P(400≤X≤600)=∫−112π1e−u2/2du. The same computation for any μ and σ sends [μ−σ,μ+σ] to [−1,1] and cancels σ in the same way. So the probability of falling within one standard deviation of the mean is the SAME number p 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=2σ2(x−μ)2, dw=σ2x−μdx, gives the antiderivative ∫(x−μ)e−(x−μ)2/(2σ2)dx=−σ2e−(x−μ)2/(2σ2)+C; differentiate to check. So ∫μt(x−μ)f(x)dx=σ2π1[−σ2e−(x−μ)2/(2σ2)]μt→σ2πσ2=2πσ as t→∞. The right half CONVERGES. Since (x−μ)f(x) is odd about μ, the left half converges to −2πσ, and the whole integral is 0. Then ∫−∞∞xf(x)dx=∫−∞∞(x−μ)f(x)dx+μ∫−∞∞f(x)dx=0+μ. 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)=−σ2x−μf(x). By the product rule, f′′(x)=−σ21f(x)+σ4(x−μ)2f(x)=σ4f(x)[(x−μ)2−σ2]. Since f(x)>0, the sign of f′′ is that of (x−μ)2−σ2: negative for ∣x−μ∣<σ, positive for ∣x−μ∣>σ. The concavity changes exactly at x=μ±σ, here 400 and 600. That is the geometric meaning of σ: the distance from the peak to the points where the bell stops curving down and starts to flatten into its tails.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 7: Heavy tails: a density whose mean is infinite
11 answers to check
Densities of the form fp(x)=xpc on [1,∞), and 0 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).
a) For f(x)=x3c on [1,∞): find c, P(X>3), the mean and the median.
b) For g(x)=x21 on [1,∞): check that g is a density, find its median, and show that the integral defining its mean diverges.
c) For which p>0 does some c>0 make xpc a density on [1,∞)? Give c in terms of p. For which of these p is the mean finite?
d) For the density g of part b), find the number b with P(X>b)=10001, and show that the part of the mean integral beyond b is still infinite. What does this say about the mean as a summary of the values?
e) For p>2, find the mean and the median of xpp−1 on [1,∞) in terms of p, check both formulas against part a), and describe what happens to each as p decreases to 2.
Show the solution
Answers
a)c=2; P(X>3)=91; μ=2; m=2.
b)∫1∞x−2dx=1; m=2; ∫1txdx=lnt→∞, no finite mean.
c)A density iff p>1, with c=p−1; finite mean iff p>2.
d)b=1000; ∫1000txdx=ln1000t→∞.
e)μ=p−2p−1, m=21/(p−1); at p=3: 2 and 2. As p→2+, μ→∞ while m→2.
a)
Normalize: ∫1tx−3dx=[−2x21]1t=21−2t21→21, so c=2. The cumulative distribution function is F(x)=∫1x2t−3dt=1−x21 for x≥1, hence P(X>3)=91. Mean: ∫1tx⋅x32dx=[−x2]1t=2−t2→2, so μ=2. Median: 1−m21=21 gives m2=2 and m=2. As in exercise 5, the tail is on the right and the mean lies above the median.
b)
∫1tx−2dx=1−t1→1 and g>0: a density, with F(x)=1−x1. The median solves 1−m1=21, so m=2. For the mean, ∫1tx⋅x21dx=∫1txdx=lnt→∞: the integral diverges, and X has no finite mean. The median, on the other hand, ALWAYS exists, because F climbs continuously from 0 to 1 and must cross 21. The figure shows why the two cases differ: the tail of x21 lies above that of x32 from x=2 on, and multiplying by x in the mean turns it into x1, whose area is infinite.
c)
For p=1: ∫1tx−pdx=p−11−t1−p, which tends to p−11 when p>1 and to ∞ when p<1; for p=1 it is lnt→∞. So a finite positive area exists exactly when p>1, and then c=p−1. The mean involves x⋅x−p=x−(p−1), whose integral on [1,∞) converges exactly when p−1>1, that is p>2. For 1<p≤2 we get a genuine density with no finite mean; p=2 is part b). These are the p-integrals, used here to answer a probability question.
d)
P(X>b)=1−F(b)=b1, so b=1000. The part of the mean beyond b is ∫1000tx⋅x21dx=lnt−ln1000→∞. So a region carrying only one thousandth of the probability contributes an INFINITE amount to the mean, and the same holds beyond any b, 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−1: μ=∫1∞x⋅xpp−1dx=(p−1)limt→∞p−21−t2−p=p−2p−1 for p>2. The cumulative distribution function is F(x)=1−x1−p, so F(m)=21 gives m1−p=21, mp−1=2 and m=21/(p−1). At p=3: μ=12=2 and m=21/2=2, as in part a). As p decreases to 2, μ=p−2p−1→∞ while m→21=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.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 8: Five statements to correct
10 answers to check
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 X satisfies f(2)=1.5, so P(X=2)=1.5, which is impossible: f cannot be a density.
b) For every density, the cumulative distribution function is F(x)=∫0xf(t)dt.
c) The median of a density that is 0 outside [0,4] is 2.
d) The waiting time at a counter is exponential with mean 10 minutes, so half of the customers wait more than 10 minutes.
e) If f is a continuous density that is 0 outside [a,b], then its mean lies in [a,b].
Show the solution
Answers
a)False: P(X=2)=0; f(2) is a height, e.g. f=23 on [0,32] is a density.
b)False: F(x)=∫−∞xf(t)dt; for the Cauchy density F(0)=21, not 0.
c)False: for f(x)=8x on [0,4], m=22.
d)False: P(T>10)=e−1≈0.37; the median is 10ln2≈6.9 minutes.
e)True: af(x)≤xf(x)≤bf(x) on [a,b], then integrate: a≤μ≤b.
a)
False, and twice. First, P(X=2)=∫22f(x)dx=0 for every density, whatever the height f(2). Second, a height above 1 is perfectly legal: f(x)=23 on [0,32], and 0 elsewhere, is non-negative with area 23⋅32=1, so it is a density with f=1.5 everywhere on its interval. What can never exceed 1 is an area. The statement confuses a probability per unit length with a probability.
b)
False. The cumulative distribution function accumulates area from −∞: F(x)=∫−∞xf(t)dt. The formula with lower bound 0 agrees with it only when f=0 on (−∞,0). Counterexample: the Cauchy density π(1+x2)1 of exercise 2 is symmetric about 0, so F(0)=21, while the formula gives 0; for x<0 it even gives a NEGATIVE number, impossible for a probability. Same mechanism as the piecewise trap of exercise 3: F 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 2. Counterexample: f(x)=8x on [0,4] is non-negative with area 81⋅216=1; its cumulative distribution function is F(x)=16x2, and F(m)=21 gives m2=8, m=22. Check: F(2)=41, so only a quarter of the probability lies below 2.
d)
False. With mean 10, F(t)=1−e−t/10, so P(T>10)=e−1≈0.37: only about 37 percent of customers wait longer than the mean. The time that half of them exceed is the median, 1−e−m/10=21, that is m=10ln2≈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] we have a≤x≤b and f(x)≥0, so af(x)≤xf(x)≤bf(x). Integrating over [a,b], where all the area lies, gives a∫abf≤∫abxf(x)dx≤b∫abf, that is a≤μ≤b since ∫abf=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.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 9: Lifetime of a pump: which model predicts more failures under warranty?
5 answers to check
A manufacturer compares two models for the lifetime T, in years, of a pump. Model A is exponential with mean 4 years: fA(t)=41e−t/4. Model B takes wear into account: fB(t)=4te−t/2. Both densities are 0 for t<0. The warranty covers every failure during the first 2 years.
The figure draws both densities and the end of the warranty. No calculator: use 2.7<e<2.72 where a comparison needs a value of e.
a) Show that fB 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 4 years.
c) Compute the probability of a warranty claim, P(T≤2), under each model exactly, and show that it is below 30 percent under model B.
d) Decide without a calculator which model predicts MORE claims, by reducing the comparison to one between e and 4.
e) Find the most likely lifetime under model B (the maximum of fB), 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)∫0s4te−t/2dt=1−(1+2s)e−s/2→1.
b)∫0∞4t2e−t/2dt=416=4 years.
c)PA=1−e−1/2≈0.39; PB=1−e2≈0.26<0.3 since e<720.
d)PA>PB⟺e−1/2<e2⟺e<2⟺e<4: model A predicts more claims.
e)fB′(t)=41e−t/2(1−2t)=0 at t=2 years; fA is largest at t=0, fB(0)=0.
a)
fB≥0 for t≥0. For the area, integrate by parts with u=t and dv=e−t/2dt, so du=dt and v=−2e−t/2: ∫te−t/2dt=−2te−t/2+2∫e−t/2dt=−2te−t/2−4e−t/2+C. Check by differentiating: −2e−t/2+te−t/2+2e−t/2=te−t/2. Then ∫0s4te−t/2dt=41[−2te−t/2−4e−t/2]0s=1−(1+2s)e−s/2. As s→∞, se−s/2=es/2s→0 by L'Hôpital's rule, so the area tends to 1. The same computation gives FB(t)=1−(1+2t)e−t/2.
b)
μB=41∫0∞t2e−t/2dt. Two integrations by parts, the tabular method being the quickest: derivatives t2,2t,2,0 against antiderivatives −2e−t/2,4e−t/2,−8e−t/2, with alternating signs, give ∫t2e−t/2dt=−e−t/2(2t2+8t+16)+C. Between 0 and s this is 16−e−s/2(2s2+8s+16), and es/2s2→0 by L'Hôpital's rule applied twice. So the integral is 16 and μB=416=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/2, about 1−0.61=0.39. Model B: P(T≤2)=FB(2)=1−(1+1)e−1=1−e2, about 1−0.74=0.26. To PROVE the bound without a decimal: 1−e2<103⟺e2>107⟺e<720, and 720>2.85>2.72>e. So fewer than 30 percent of the pumps fail under warranty according to model B.
d)
Model A predicts more claims when 1−e−1/2>1−2e−1, that is e−1/2<2e−1. Multiplying by e>0 gives e1/2<2, and squaring positive numbers gives e<4, which is true. So model A predicts MORE claims under warranty: about 39 percent against 26 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)=41e−t/2−8te−t/2=41e−t/2(1−2t), positive for t<2 and negative after: the maximum is at t=2 years, with fB(2)=2e1. The figure explains the disagreement. fA is LARGEST at t=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. fB starts at 0: new pumps almost never fail, failures come with wear and peak around 2 years. Same mean, different shapes, and the warranty only sees the area over [0,2]. A pump that wears out is precisely what the memoryless exponential model of exercise 5 cannot describe.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 10: A final exam question: waiting time at a call centre
8 answers to check
At a call centre, the time T in minutes before a caller reaches an agent has the density f(t)=kt for 0≤t≤2, f(t)=2ke2−t for t>2, and f(t)=0 for t<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 f, without its vertical scale. No calculator: use 2.7<e<2.72 where a value of e is needed.
a) Check that the two formulas agree at t=2 whatever k is, then find k.
b) Find the cumulative distribution function F(t) on each interval.
c) Show that the median waiting time is exactly 2 minutes, and compute P(1≤T≤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 4 minutes. Is the promise kept?
Show the solution
Answers
a)k⋅2=2ke0; the two pieces each have area 2k, so k=41.
b)F=0 for t<0; F=8t2 on [0,2]; F=1−21e2−t for t≥2.
c)F(2)=21, so m=2; P(1≤T≤3)=87−2e1≈0.69.
d)μ=32+23=613≈2.17 minutes, above the median 2.
e)P(T>4)=2e21<101 since e2>7.29>5: the promise is kept.
a)
At t=2 the first formula gives 2k and the second 2ke0=2k: the density is continuous whatever k is, which is why the tail was written with the factor 2k. Area of the first piece: ∫02ktdt=2k, a triangle. Area of the tail: ∫2s2ke2−tdt=2k[−e2−t]2s=2k(1−e2−s)→2k. The total is 4k=1, so k=41. The sign condition holds since k>0.
b)
For t<0: F(t)=0. For 0≤t≤2: F(t)=∫0t4sds=8t2. For t≥2 the area of the menu phase is carried, exactly as in exercise 3: F(t)=F(2)+∫2t21e2−sds=21+21(1−e2−t)=1−21e2−t. Checks: both formulas give 21 at t=2, and F(t)→1 as t→∞.
c)
F(2)=84=21, and F is strictly increasing on (0,∞) because f>0 there, so 2 is the ONLY solution of F(m)=21: the median is exactly 2 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−21e−1)−81=87−2e1, about 0.875−0.18=0.69. Using the formula of the wrong piece for F(3) or F(1) is the trap: each value of F is read from the piece that contains its argument.
d)
The mean splits along the pieces. Menu: ∫02t⋅4tdt=41⋅38=32. Queue: ∫2∞t⋅21e2−tdt, by parts with u=t, dv=21e2−tdt, v=−21e2−t: [−2te2−t]2s+21∫2se2−tdt→(0+1)+21=23, the limit es−2s→0 coming from L'Hôpital's rule. So μ=32+23=613≈2.17 minutes. The mean exceeds the median 2: 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)=21e−2=2e21. The promise holds when 2e21≤101, that is e2≥5. Since e>2.7, e2>7.29>5: the promise is kept, with room to spare, since 2e21<14.581, 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.
Points are earned before the solution; after it, you can keep practising.
Something missing from this set?A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.
Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space.
Rather not create an account? Write to me directly.