CalcPath
ProgressProblem setsFeedback
← Question sheet

Probability · Solutions

Continuous Random Variables

12 questions · about 105 minutes

Work this sheet on paper, showing every step — the method is what is being tested, and the solutions are written so you can check your route rather than just your answer. Name every result you use (“by memorylessness”, “by the inverse transform theorem”, “by the computational formula for the variance”) and check its hypotheses, especially independence. No calculator is needed anywhere: leave answers in exact form such as e−2 or ln2, and the few values of Φ a question needs are printed with it. Full worked solutions are on a separate page; each question also has its own reveal, so you can check one answer without seeing the rest.

  1. 1.Computation

    Let f(x)=cx(2−x) for 0≤x≤2 and f(x)=0 otherwise, where c is a constant, and let X have density f.

    1. (a)Find c, and verify that both conditions in the definition of a density then hold.
    2. (b)Find the distribution function F(x) for every real x, and check that F′(x)=f(x) on (0,2).
    3. (c)Compute P(X>23​) and P(21​≤X≤23​) by subtraction from F, and explain why the second answer is unchanged if either ≤ is replaced by <.
    4. (d)Compute f(1) and P(X=1). They are different numbers; say in one sentence what each of them measures.

    Solution

    (a) Impose total area one. The density vanishes outside [0,2], so

    ∫02​cx(2−x)dx=c∫02​(2x−x2)dx=c[x2−3x3​]02​=c(4−38​)=34c​=1,

    giving c=43​. Non-negativity: on [0,2] both factors x and 2−x are ≥0, so f(x)≥0 there, and f=0 elsewhere. Both conditions hold, so f(x)=43​x(2−x) is a genuine density.

    (b) Integrate from the left. For x<0 nothing has accumulated, so F(x)=0. For 0≤x≤2,

    F(x)=∫0x​43​(2t−t2)dt=43​(x2−3x3​)=43x2−x3​.

    For x>2 all the mass is to the left, so F(x)=1; as a check, F(2)=412−8​=1, so the pieces join continuously. Differentiating on (0,2): F′(x)=46x−3x2​=43​x(2−x)=f(x), as the theorem that density and distribution determine each other requires.

    (c) Subtract. First the two values of F:

    F(23​)=43⋅49​−827​​=4427​−827​​=427/8​=3227​,F(21​)=443​−81​​=45/8​=325​.

    Hence P(X>23​)=1−F(23​)=325​ and P(21​≤X≤23​)=F(23​)−F(21​)=3222​=1611​.

    The endpoints do not matter because F is continuous, so by the theorem Point probabilities vanish P(X=21​)=P(X=23​)=0; moving an endpoint in or out of the interval adds or removes an event of probability zero.

    Sanity check: f is symmetric about x=1, so P(X<21​) should equal P(X>23​). Indeed F(21​)=325​, and 325​+1611​+325​=1. ✓

    (d) Height against area. f(1)=43​⋅1⋅1=43​, while P(X=1)=0 by the theorem Point probabilities vanish.

    The number f(1) is a rate, probability per unit length near 1: for a short interval of length h centred at 1, P(1−2h​≤X≤1+2h​)≈43​h. The number P(X=1) is the probability of the single point {1}, which has no length and therefore no area under the curve.

  2. 2.Proof

    Let X have a density f that is even, f(−x)=f(x) for every real x, and let F be its distribution function.

    1. (a)Prove that F(−x)=1−F(x) for every real x.
    2. (b)Deduce that 0 is a median of X, and that P(∣X∣≤a)=2F(a)−1 for every a≥0.
    3. (c)Exhibit an even density for which the statement “E[X]=0 by symmetry” is false, and say precisely what goes wrong.

    Solution

    (a) Substitute in the defining integral. By definition F(−x)=∫−∞−x​f(t)dt. Put t=−s, so dt=−ds; as t runs from −∞ up to −x, s runs from +∞ down to x. Hence

    F(−x)=∫∞x​f(−s)(−ds)=∫x∞​f(−s)ds=∫x∞​f(s)ds,

    the last step because f is even. Finally the total area is one, so ∫x∞​f(s)ds=1−∫−∞x​f(s)ds=1−F(x). ■

    (b) Two specialisations. Put x=0 in (a): F(0)=1−F(0), so F(0)=21​, which is exactly the statement that 0 is a median.

    For a≥0, property (4) of a distribution function gives P(−a<X≤a)=F(a)−F(−a), and the left endpoint may be included because P(X=−a)=0 for a continuous distribution function (the theorem Point probabilities vanish). Therefore

    P(∣X∣≤a)=P(−a≤X≤a)=F(a)−F(−a)=F(a)−(1−F(a))=2F(a)−1.

    With f=φ these are precisely the symmetry identities for the standard normal; the proof shows they have nothing to do with the exponential in φ, only with its evenness.

    (c) The Cauchy density. Take f(x)=π(1+x2)1​, which is even, positive, and integrates to π1​[arctanx]−∞∞​=1. The symmetry argument for E[X]=0 says: xf(x) is odd, so its integral over the line is zero. But the definition of E[X] first requires ∫∣x∣f(x)dx<∞, and here

    ∫−∞∞​∣x∣f(x)dx=π2​∫0∞​1+x2x​dx=π1​[ln(1+x2)]0∞​=∞.

    So E[X] does not exist at all, and “0 by symmetry” is an integral that was never defined. Note that (b) is untouched: the median of the Cauchy distribution is 0, because a median needs only F and never a moment.

  3. 3.Computation

    Let X have the density f(x)=21​e−∣x∣ for all real x.

    1. (a)Verify that f is a density.
    2. (b)Show that E[X] exists and find it. Then find Var(X).
    3. (c)Find F(x) separately for x<0 and for x≥0, and hence find the quartiles x1/4​ and x3/4​ exactly.
    4. (d)Compute E[eX/2], and explain why E[eX] does not exist.

    Solution

    (a) Non-negative with total area one. Clearly f>0. By the evenness of ∣x∣,

    ∫−∞∞​21​e−∣x∣dx=2∫0∞​21​e−xdx=[−e−x]0∞​=1.

    (b) Check absolute convergence first. Integrating by parts with u=x, dv=e−xdx,

    ∫−∞∞​∣x∣f(x)dx=∫0∞​xe−xdx=[−xe−x]0∞​+∫0∞​e−xdx=0+1=1<∞,

    so E[X] exists. Now xf(x) is an odd function, so E[X]=0 (legitimate precisely because the integral converges absolutely).

    For the variance use the computational formula. Since E[X]=0, Var(X)=E[X2], and by evenness and one more integration by parts (u=x2, dv=e−xdx),

    E[X2]=∫0∞​x2e−xdx=[−x2e−x]0∞​+2∫0∞​xe−xdx=0+2⋅1=2.

    So Var(X)=2 and σ=2​.

    (c) Integrate from the left in two regimes. For x<0 the density is 21​et on (−∞,x], so

    F(x)=∫−∞x​21​etdt=21​ex.

    For x≥0, the left half contributes F(0)=21​ and the rest is

    F(x)=21​+∫0x​21​e−tdt=21​+21​(1−e−x)=1−21​e−x.

    The lower quartile satisfies F(x)=41​<21​, so it lies in the x<0 branch: 21​ex=41​ gives x1/4​=−ln2. The upper quartile lies in the x≥0 branch: 1−21​e−x=43​ gives e−x=21​, so x3/4​=ln2. They are mirror images, as they must be for an even density.

    (d) Law of the unconscious statistician. Split at 0 so that ∣x∣ can be removed:

    E[eX/2]=21​∫−∞0​ex/2exdx+21​∫0∞​ex/2e−xdx=21​∫−∞0​e3x/2dx+21​∫0∞​e−x/2dx=21​⋅32​+21​⋅2=34​.

    For E[eX] the right-hand integrand is 21​exe−x=21​, a constant, and ∫0∞​21​dx diverges. The expectation is +∞: the density's tail e−x decays exactly as fast as ex grows, so nothing is left to make the integral converge.

  4. 4.Computation

    Let X∼U(−1,3) and, independently, U∼U(0,1).

    1. (a)Write down the density of X, find F(x) on the whole real line, and compute E[X] and Var(X).
    2. (b)Compute P(X2<1) and P(∣X−1∣>1).
    3. (c)Use the inverse transform theorem to write X as a function of U, and confirm its mean and variance by the linearity and scaling rules.
    4. (d)Use the inverse transform theorem to write, as a function of U, a random variable W with density 3w2 on [0,1]. Verify directly that P(W≤21​) comes out the same whether computed from W's density or from U.

    Solution

    (a) Constant density, linear cdf. The interval has length 4, so f(x)=41​ for −1≤x≤3 and 0 otherwise. Then F(x)=0 for x<−1, F(x)=4x+1​ for −1≤x≤3, and F(x)=1 for x>3. By the uniform formulas,

    E[X]=2−1+3​=1,Var(X)=12(3−(−1))2​=1216​=34​.

    (b) Turn each event into an interval. X2<1 means −1<X<1, so

    P(X2<1)=F(1)−F(−1)=42​−0=21​.

    ∣X−1∣>1 means X<0 or X>2, two disjoint events:

    P(∣X−1∣>1)=F(0)+(1−F(2))=41​+(1−43​)=21​.

    Both answers are also visible as lengths: each event occupies half of the width-4 interval.

    (c) Invert the cdf. Solving F(x)=u, that is 4x+1​=u, gives x=4u−1, so by the inverse transform theorem X=4U−1 has distribution function F. Check: E[4U−1]=4⋅21​−1=1 and Var(4U−1)=16⋅121​=34​, agreeing with (a).

    (d) A non-linear inverse. The density 3w2 on [0,1] has cdf FW​(w)=∫0w​3t2dt=w3, which is continuous and strictly increasing on [0,1], so the theorem applies. Solving w3=u gives FW−1​(u)=u1/3, hence

    W=U1/3.

    From the density: P(W≤21​)=FW​(21​)=81​. From U: P(U1/3≤21​)=P(U≤81​)=81​, since P(U≤u)=u. They agree. Note the cube root pushes uniform draws upward — only one draw in eight lands below 21​ — which is what a density that grows like 3w2 towards w=1 requires.

  5. 5.Sketch

    Let fσ​ denote the density of N(0,σ2), so f1​=φ. A drawing with no calculations beside it earns nothing here: every feature you mark must be justified.

    1. (a)For a general N(μ,σ2) density f, compute f′(x) and f′′(x). Hence show the maximum is at x=μ with height σ2π​1​, and that the inflection points are at x=μ±σ.
    2. (b)Find exactly the two values of x at which the curves y=f1​(x) and y=f2​(x) cross, and say which curve is higher between them.
    3. (c)Sketch f1​ and f2​ on the same axes for −5≤x≤5, marking both peak heights, all four inflection points and the crossing points from (b). Shade, under each curve, the region over [−1,1]. Express each shaded area in terms of Φ, say which is larger, and explain why the total areas under the two curves are nevertheless equal.

    Solution

    (a) Differentiate the exponential. Write f(x)=Cexp(−2σ2(x−μ)2​) with C=σ2π​1​. By the chain rule,

    f′(x)=−σ2x−μ​f(x).

    Since f(x)>0 everywhere, f′ has the sign of −(x−μ): positive for x<μ, zero at x=μ, negative for x>μ. So f rises to a single maximum at x=μ, where the exponential is e0=1 and the height is C=σ2π​1​.

    Differentiating again with the product rule,

    f′′(x)=−σ21​f(x)−σ2x−μ​f′(x)=−σ21​f(x)+σ4(x−μ)2​f(x)=σ4(x−μ)2−σ2​f(x).

    This vanishes exactly at x=μ±σ, is negative between them (concave, the cap of the bell) and positive outside (convex, the tails). The sign changes, so these are genuine inflection points, at height f(μ±σ)=σ2π​e−1/2​.

    (b) Set the densities equal. With μ=0,

    2π​1​e−x2/2=22π​1​e−x2/8⟺e−x2/2+x2/8=21​⟺e−3x2/8=21​.

    Taking logarithms, 83x2​=ln2, so the crossings are at

    x=±38ln2​​≈±1.36.

    At x=0 the narrow curve is higher (f1​(0)≈0.399 against f2​(0)≈0.199), so f1​ is above f2​ between the crossings and below it outside them: the narrow bell wins in the middle and the wide bell wins in both tails.

    (c) The drawing. Both curves are symmetric about x=0, where each has its peak: f1​(0)=2π​1​≈0.399 and f2​(0)=22π​1​≈0.199, exactly half. By (a), f1​ has inflection points at x=±1 (height ≈0.242) and f2​ at x=±2 (height ≈0.121). Mark the crossings at x≈±1.36, where both curves have height ≈0.158. The tails: at x=±3, f1​≈0.004 is already invisible while f2​≈0.065 is still clearly off the axis, and at x=±5 both are negligible.

    Shaded areas. Under f1​ the region over [−1,1] has area P(∣Z∣≤1)=2Φ(1)−1≈0.683. Under f2​, the variable is X=2Z, so the same region has area P(∣2Z∣≤1)=P(∣Z∣≤21​)=2Φ(21​)−1≈0.383. The narrow curve's shaded area is larger, as the picture shows: it is taller over the whole of [−1,1].

    Yet both total areas are 1. The wide curve is half as tall but twice as wide: f2​(x)=21​f1​(x/2), so substituting x=2t gives ∫f2​(x)dx=∫21​f1​(t)⋅2dt=∫f1​(t)dt=1. What f2​ loses over [−1,1] it recovers in the tails beyond the crossing points.

  6. 6.Computation

    Two machines fill bags of flour. Bags from machine A have weight X∼N(50,32) and bags from machine B have weight Y∼N(44,42), measured in grams above a nominal weight; all bags are independent. You may use Φ(1)=0.8413, Φ(1.2)=0.8849, Φ(1.25)=0.8944 and Φ(1.5)=0.9332, and nothing else from the table.

    1. (a)Find P(X>53) and P(38≤Y≤50).
    2. (b)Find the weight w such that exactly 10.56% of machine-A bags weigh less than w.
    3. (c)One bag is taken from each machine. Find the probability that the A bag is lighter than the B bag.
    4. (d)Four B bags are packed together. Find the probability that their total weight exceeds 188. Then find how many B bags must be averaged for the standard deviation of the average to equal 1.

    Solution

    (a) Standardise, then read left tails. For X: z=353−50​=1, so

    P(X>53)=1−Φ(1)=1−0.8413=0.1587.

    For Y the endpoints standardise to z=438−44​=−1.5 and z=450−44​=1.5, a symmetric band, so by the symmetry identity

    P(38≤Y≤50)=2Φ(1.5)−1=2(0.9332)−1=0.8664.

    Sanity check: a ±1.5σ band should hold more than the ±1σ band (0.683) and less than the ±2σ band (0.954). ✓

    (b) The inverse problem. We need z with Φ(z)=0.1056. That is below 21​, so z<0, and Φ(−z)=1−0.1056=0.8944=Φ(1.25), giving z=−1.25. Untransform with the standard deviation, not the variance:

    w=μ+zσ=50−1.25×3=46.25.

    (c) The difference of two independent normals. Let D=X−Y. By the theorem on linear combinations of independent normals, with a=1, b=−1,

    D∼N(50−44, 32+42)=N(6,25),σD​=5.

    The variances add even though the variables are subtracted. The event “A lighter than B” is D<0, so

    P(D<0)=Φ(50−6​)=Φ(−1.2)=1−Φ(1.2)=1−0.8849=0.1151.

    (d) Sums and averages. By the corollary on sums of an independent sample, T=Y1​+⋯+Y4​∼N(4×44, 4×16)=N(176,64), so σT​=8 — not 4×4=16. Then

    P(T>188)=1−Φ(8188−176​)=1−Φ(1.5)=0.0668.

    The average of n bags has standard deviation σ/n​=4/n​; setting this equal to 1 gives n​=4, so n=16. Quadrupling the sample halves the spread, and the spread here must be quartered.

  7. 7.Computation

    Buses pass a stop as a Poisson process at rate λ=3 per hour, and you arrive at a random moment. Let X be your waiting time in hours. Give every answer in exact form.

    1. (a)Write down the density and the survival function of X, and state the mean and the standard deviation of the wait in minutes. Find P(X>31​).
    2. (b)Find the median wait in minutes, and explain why it must lie below the mean.
    3. (c)You have already waited 10 minutes. Find the probability that you wait more than 30 minutes in total, naming the theorem you use.
    4. (d)Find the probability that your wait lies strictly between the median and the mean. Then find the probability that no bus passes in a 40-minute window by using the Poisson count, and check it against the survival function.

    Solution

    (a) The rate is 3, so the mean is 31​. By the theorem Poisson counts and exponential gaps, X∼Exp(3):

    f(x)=3e−3x (x≥0),P(X>x)=e−3x.

    The mean is 1/λ=31​ hour =20 minutes, and the standard deviation equals the mean for an exponential, so it is also 20 minutes. Finally P(X>31​)=e−3⋅31​=e−1: the chance of waiting longer than the average wait is about 0.37, well under a half.

    (b) The median. Solve 1−e−3m=21​: e−3m=21​, so m=3ln2​ hours =20ln2 minutes, a little under 14 minutes.

    It lies below the mean because (a) showed P(X>mean)=e−1<21​: more than half of the probability sits below the mean, so the point that splits the probability in half must be to its left. This is the signature of a right-skewed distribution — most waits are short, and the long ones drag the average up without moving the median.

    (c) Memorylessness. In hours, the question is P(X>21​∣X>61​). By the theorem Memorylessness with s=61​ and t=31​,

    P(X>61​+31​ ​ X>61​)=P(X>31​)=e−1.

    Ten minutes of waiting has bought nothing: the remaining wait is distributed exactly as it was on arrival.

    (d) Two more survival calculations. With m=ln2/3 and mean 31​,

    P(m<X<31​)=P(X>m)−P(X>31​)=e−ln2−e−1=21​−e−1≈0.132.

    For the 40-minute window, t=32​ hour and the count N(32​) is Poisson with mean λt=2, so P(N(32​)=0)=e−2. The survival function gives P(X>32​)=e−3⋅32​=e−2, the same number — as it must be, since “no bus by time t” and “the wait exceeds t” are the same event.

  8. 8.Proof

    Let X∼Exp(λ) and Y∼Exp(μ) be independent. Work from survival functions throughout, and say at each step why a survival function is enough to identify a distribution.

    1. (a)Prove that for any constant c>0, cX∼Exp(λ/c).
    2. (b)Prove that M=min(X,Y)∼Exp(λ+μ), and write down E[M].
    3. (c)The hazard rate of X is h(t)=P(X>t)f(t)​. Show that it is the constant λ, and explain in a sentence or two how a constant hazard is memorylessness in another guise.
    4. (d)Two components have independent lifetimes Exp(1) and Exp(2), in thousands of hours, and a device fails as soon as either does. Find the probability the device is still working after 1000 hours, and its expected lifetime.

    Solution

    Why survival functions suffice. P(X>t)=1−F(t), so the survival function determines the distribution function and hence, by the theorem that density and distribution determine each other, the whole distribution. Showing that a variable has survival function e−νt for t≥0 therefore proves it is Exp(ν).

    (a) Rescaling. For t≥0 and c>0,

    P(cX>t)=P(X>ct​)=e−λt/c=e−(λ/c)t,

    which is the survival function of Exp(λ/c). ■ As a check on the direction, E[cX]=c/λ=1/(λ/c), consistent with the rule that the mean is the reciprocal of the rate: stretching the time scale by c divides the rate by c.

    (b) The minimum of independent exponentials. The minimum exceeds t exactly when both variables do, so {M>t}={X>t}∩{Y>t}. By independence the probabilities multiply:

    P(M>t)=P(X>t)P(Y>t)=e−λte−μt=e−(λ+μ)t,t≥0.

    This is the survival function of Exp(λ+μ), so M∼Exp(λ+μ) and E[M]=λ+μ1​. ■ Note that this is smaller than both 1/λ and 1/μ: waiting for the first of two things is faster than waiting for either alone, and the rates simply add.

    (c) Constant hazard. With f(t)=λe−λt and P(X>t)=e−λt,

    h(t)=e−λtλe−λt​=λfor every t≥0.

    The hazard is the instantaneous failure rate given survival so far: for small δ>0,

    P(t<X≤t+δ∣X>t)=P(X>t)F(t+δ)−F(t)​≈P(X>t)f(t)δ​=h(t)δ.

    A constant hazard says the chance of failing in the next instant does not depend on the age t already reached, which is exactly what memorylessness asserts: indeed the memoryless identity gives P(t<X≤t+δ∣X>t)=1−P(X>δ)=1−e−λδ≈λδ directly. Ageing would show up as a hazard that increases with t.

    (d) Apply (b). The device's lifetime is min(X,Y) with λ=1 and μ=2, so it is Exp(3). Then

    P(working after 1000 h)=P(M>1)=e−3≈0.050,

    and the expected lifetime is 1+21​=31​ thousand hours, about 333 hours — shorter than the 500 hours of the weaker component on its own.

  9. 9.Computation

    Let Z,Z1​,Z2​,Z3​ be independent standard normals. You may quote E[Z2]=1 and E[Z4]=3.

    1. (a)Let V=Z12​+Z22​+Z32​. Name its distribution, state E[V] and Var(V), and compute E[V2] in two ways: from the variance, and by expanding the square.
    2. (b)Let W=∣Z∣. Find the distribution function and density of W, and compute E[W] and Var(W) exactly.
    3. (c)Let V1​=Z2. Express P(V1​≤1) in terms of Φ, and find the median of V1​ in terms of the quantile function Φ−1. Is the median above or below E[V1​]?
    4. (d)For V∼χν2​, find E[V/ν] and Var(V/ν). Say what happens as ν→∞, and why that forces the tν​ distribution towards N(0,1).

    Solution

    (a) A chi-squared with three degrees of freedom. By definition V∼χ32​, so E[V]=3 and Var(V)=2⋅3=6. From the computational formula for the variance,

    E[V2]=Var(V)+(E[V])2=6+9=15.

    Expanding instead, V2=∑i​Zi4​+2∑i<j​Zi2​Zj2​, with three fourth-power terms and three cross terms. Independence gives E[Zi2​Zj2​]=E[Zi2​]E[Zj2​]=1 for i=j, so

    E[V2]=3⋅3+2⋅3⋅1=9+6=15.

    The two routes agree; the cross terms are where independence enters.

    (b) Fold the normal. For w≥0, by the symmetry identities,

    FW​(w)=P(−w≤Z≤w)=2Φ(w)−1,fW​(w)=FW′​(w)=2φ(w)=π2​​e−w2/2,

    and FW​(w)=0 for w<0. Both halves of the bell are folded onto [0,∞), which is why the density doubles. For the mean, the substitution is immediate:

    E[W]=∫0∞​w⋅2π​2​e−w2/2dw=2π​2​[−e−w2/2]0∞​=2π​2​=π2​​.

    Since W2=Z2, E[W2]=E[Z2]=1, and so

    Var(W)=1−π2​≈0.363.

    (c) The square of a standard normal. P(Z2≤1)=P(∣Z∣≤1)=2Φ(1)−1 (about 0.683). For the median m we need P(Z2≤m)=2Φ(m​)−1=21​, so Φ(m​)=43​ and

    m=(Φ−1(43​))2≈0.455.

    This is below E[V1​]=1: the χ12​ density is unbounded at 0 and has a long right tail, so it is strongly right-skewed and the median sits well below the mean.

    (d) The denominator of a t. By linearity and the scaling of variance, with E[V]=ν and Var(V)=2ν,

    E[νV​]=1,Var(νV​)=ν22ν​=ν2​⟶0.

    So V/ν has mean 1 and a standard deviation 2/ν​ that shrinks to zero: it concentrates at 1. In T=Z/V/ν​ the denominator therefore tends to 1 and T behaves like the numerator Z alone, which is N(0,1). For finite ν the denominator still wobbles, and the wobble is what fattens the tails of tν​.

  10. 10.Computation

    A fair coin is tossed 25 times and X is the number of heads. You may use Φ(0.4)=0.6554, Φ(0.8)=0.7881, Φ(1)=0.8413, Φ(1.2)=0.8849 and Φ(2)=0.9772.

    1. (a)Check that the normal approximation is legitimate, and write down the mean and standard deviation of the approximating normal.
    2. (b)Approximate P(X≤15) with and without the continuity correction. The exact value is 0.8852; comment on the two errors.
    3. (c)Approximate P(X=12)+P(X=13) with the continuity correction. The exact value is 0.3100.
    4. (d)Now the coin is tossed n times. Using the normal approximation without the continuity correction, find the smallest n for which the proportion of heads lies within 0.05 of 21​ with probability at least 0.9544.

    Solution

    (a) Both halves of the validity condition. np=25×21​=12.5≥10 and n(1−p)=12.5≥10, so the rule is satisfied. The approximating normal has

    μ=np=12.5,σ=np(1−p)​=25⋅21​⋅21​​=425​​=25​.

    (b) Where the bar for 15 ends. The bars up to and including k=15 end at 15.5, so with the correction

    P(X≤15)≈Φ(2.515.5−12.5​)=Φ(1.2)=0.8849.

    Cutting at 15 instead gives z=2.515−12.5​=1 and Φ(1)=0.8413.

    Against the exact 0.8852, the corrected value is off by 0.0003 and the uncorrected one by 0.044 — more than a hundred times worse. The uncorrected version has thrown away half of the bar at 15, whose area is about 0.097, which accounts for almost the whole of its error. Sanity check: 15 is above the mean, so the answer must exceed 21​. ✓

    (c) Two whole bars. The event {12≤X≤13} is the pair of bars spanning [11.5,13.5], so

    P(12≤X≤13)≈Φ(2.513.5−12.5​)−Φ(2.511.5−12.5​)=Φ(0.4)−Φ(−0.4)=2Φ(0.4)−1=0.3108,

    against the exact 0.3100. Without the correction the “interval” [12,13] would have width one and would cover only half of each bar. Note that the mean 12.5 sits exactly on the boundary between the two bars, so by symmetry P(X=12)=P(X=13) and each is about 0.155.

    (d) The inverse problem. With X∼Binomial(n,21​), μ=2n​ and σ=n/4​=2n​​. The event ​nX​−21​​≤0.05 is ∣X−2n​∣≤0.05n, and standardising,

    P(​nX​−21​​≤0.05)≈P(∣Z∣≤n​/20.05n​)=P(∣Z∣≤0.1n​)=2Φ(0.1n​)−1.

    We need this to be at least 0.9544=2(0.9772)−1=2Φ(2)−1, that is Φ(0.1n​)≥Φ(2). Since Φ is strictly increasing this holds exactly when 0.1n​≥2, i.e. n​≥20, so the smallest n is

    n=400.

    Including the continuity correction would only enlarge the band (to ∣X−2n​∣≤0.05n+21​) and so only raise the probability, so n=400 certainly suffices under either convention. The n​ is the whole story: to halve the tolerance to 0.025 at the same confidence would need n=1600, four times as many tosses.

  11. 11.Critique

    Three arguments follow. Each reaches a false conclusion. For each one: identify the false step, name the definition or rule whose hypothesis it violates, and then give the correct treatment asked for.

    Argument A. “Let Z1​,Z2​ be independent standard normals and V=Z12​+Z22​, so V∼χ22​. Since Z1​∼N(0,1) and V∼χ22​, the ratio T=Z1​/V/2​ has the t-distribution with 2 degrees of freedom.”

    Argument B. “Let Z∼N(0,1). Then E[Z4]=E[(Z2)2]=(E[Z2])2=1, so Var(Z2)=E[Z4]−(E[Z2])2=0, and therefore Z2 is constant.”

    Argument C. “Let Z∼N(0,1) and W=−Z. By the symmetry of φ, W∼N(0,1) as well. So Z2+W2 is a sum of two squared standard normals, hence χ22​, with mean 2 and variance 4.”

    1. (a)For Argument A: show that ∣T∣≤2​ with probability one, and prove that no t-distributed variable can be bounded. Then say how a genuine t2​ variable could be built from Z1​,Z2​ and further independent standard normals.
    2. (b)For Argument B: compute E[Z4] correctly, showing the integration, and hence Var(Z2).
    3. (c)For Argument C: find the actual mean and variance of Z2+W2, and say which of the three quoted facts about it survives.

    Solution

    (a) Argument A ignores the independence hypothesis. The definition of the t-distribution requires the numerator Z and the chi-squared V to be independent. Here V=Z12​+Z22​ is a function of Z1​, so the pair is not independent and the definition simply does not apply. The conclusion is also false, and the cleanest way to see it is that T is bounded:

    T2=(Z12​+Z22​)/2Z12​​=Z12​+Z22​2Z12​​≤2,

    because the numerator is at most the denominator. So ∣T∣≤2​ with probability one.

    No t variable is bounded. Let T′=Z/V/ν​ with Z and V∼χν2​ independent, and fix any c>0. On the event {Z>2c}∩{V<4ν} we have V/ν​<2 and hence T′>2c/2=c. The two events are independent, P(Z>2c)=1−Φ(2c)>0 since Φ<1 everywhere, and P(V<4ν)>0 since V≥0 has mean ν and so cannot exceed 4ν with probability one. Their intersection therefore has positive probability, and P(T′>c)>0 for every c: T′ exceeds any bound. A variable confined to [−2​,2​] cannot be t2​.

    The repair is to use a chi-squared built from other normals: with Z3​,Z4​ independent of Z1​, the variable Z1​/(Z32​+Z42​)/2​ is genuinely t2​, because now the numerator and denominator are independent.

    (b) Argument B swaps expectation and squaring. The step E[(Z2)2]=(E[Z2])2 is false: expectation does not commute with a non-linear function, and E[g(Y)]=g(E[Y]) holds only for linear g. In fact E[Y2]−(E[Y])2=Var(Y)≥0 with equality only for a constant Y, and Y=Z2 is plainly not constant — so the “conclusion” is the very thing that shows the step was wrong.

    Correctly, integrate by parts with u=z3 and dv=ze−z2/2dz, so v=−e−z2/2:

    E[Z4]=2π​1​∫−∞∞​z3⋅ze−z2/2dz=2π​1​([−z3e−z2/2]−∞∞​+3∫−∞∞​z2e−z2/2dz)=0+3E[Z2]=3.

    Hence Var(Z2)=3−1=2, which is the case k=1 of Var(χk2​)=2k.

    (c) Argument C ignores independence in the definition of χ2. The claim W∼N(0,1) is correct: P(−Z≤z)=P(Z≥−z)=1−Φ(−z)=Φ(z) by the symmetry identity. The false step is “hence χ22​”: the definition requires the standard normals being squared to be independent, and W=−Z is a function of Z.

    In fact Z2+W2=Z2+Z2=2Z2. By linearity, E[2Z2]=2, so the quoted mean is right — the mean never needed independence. But by the scaling of variance and (b),

    Var(2Z2)=4Var(Z2)=4⋅2=8,

    not 4. Of the three quoted facts — the distribution, the mean and the variance — only the mean survives. (The distribution is wrong too: P(2Z2≤2)=P(∣Z∣≤1)=2Φ(1)−1, and there is no reason for a χ22​ variable to match that.)

  12. 12.Proof

    Let X be a continuous random variable with P(X≥0)=1, density f, survival function G(t)=P(X>t) and finite mean.

    1. (a)Prove the tail formula E[X]=∫0∞​G(t)dt. (Write x=∫0x​1dt inside the defining integral for E[X], and exchange the order of integration; the integrand is non-negative, so the exchange is permitted.)
    2. (b)Use (a) to recover E[X] for X∼Exp(λ) and for X∼U(0,b).
    3. (c)Let X1​,X2​ be independent Exp(λ). Find the survival functions of M=min(X1​,X2​) and L=max(X1​,X2​), and use (a) to compute E[M] and E[L].
    4. (d)Verify that E[M]+E[L]=E[X1​+X2​], and explain why this identity was guaranteed in advance. Then account for the value of E[L] using memorylessness.

    Solution

    (a) Exchange the order of integration. Since X≥0, the density vanishes on (−∞,0) and

    E[X]=∫0∞​xf(x)dx=∫0∞​(∫0x​1dt)f(x)dx=∬{0≤t≤x}​f(x)dtdx.

    The region {(x,t):0≤t≤x} can be described the other way round as {(x,t):t≥0, x≥t}. The integrand f(x)≥0, so the double integral may be evaluated in either order (Tonelli's theorem), and integrating over x first gives

    E[X]=∫0∞​(∫t∞​f(x)dx)dt=∫0∞​P(X>t)dt=∫0∞​G(t)dt.■

    An alternative is integration by parts with u=x, dv=f(x)dx, v=−G(x), giving E[X]=[−xG(x)]0∞​+∫0∞​G(t)dt; the boundary term vanishes because xG(x)=x∫x∞​f(u)du≤∫x∞​uf(u)du→0, the tail of a convergent integral. That is where the finite mean is used.

    (b) Two checks. For Exp(λ), G(t)=e−λt and

    E[X]=∫0∞​e−λtdt=λ1​,

    with no integration by parts required. For U(0,b), G(t)=1−bt​ on [0,b] and 0 beyond, so

    E[X]=∫0b​(1−bt​)dt=b−2b​=2b​,

    the midpoint, as the uniform formula 2a+b​ says.

    (c) Minimum and maximum. The minimum exceeds t when both do; by independence,

    GM​(t)=P(X1​>t)P(X2​>t)=e−2λt,

    so M∼Exp(2λ) and by (a) E[M]=∫0∞​e−2λtdt=2λ1​.

    The maximum is at most t when both are, so P(L≤t)=(1−e−λt)2 and

    GL​(t)=1−(1−e−λt)2=2e−λt−e−2λt.

    This is not an exponential survival function, but (a) does not care:

    E[L]=∫0∞​(2e−λt−e−2λt)dt=λ2​−2λ1​=2λ3​.

    (d) The identity and its explanation. E[M]+E[L]=2λ1​+2λ3​=λ2​=E[X1​]+E[X2​]. ✓

    It had to hold because for any two numbers the smaller plus the larger is their sum: min(X1​,X2​)+max(X1​,X2​)=X1​+X2​ as random variables, outcome by outcome. Expectation is linear, so the expectations agree — no independence, and no exponential distribution, is needed for that step.

    The value 2λ3​ also has a direct reading. The first of the two variables to finish arrives after M, an Exp(2λ) wait of mean 2λ1​. At that moment the survivor has already lasted M units, but by memorylessness its remaining life is a fresh Exp(λ) with mean λ1​. So E[L]=2λ1​+λ1​=2λ3​, exactly as computed.

← Back to the question sheet

CalcPath·Free university mathematics

SubjectsProblem setsProgressFeedbackAbout