Probability and Statistics 201-SN1-RE • CEGEP, Montreal

Corrected exercises: discrete and continuous random variables (201-SN1-RE)

These are ten corrected exercises on discrete and continuous random variables, at the level of Probability and Statistics 201-SN1-RE in the CEGEP Science program: probability distribution, cumulative distribution function, expected value, variance and standard deviation, properties of E(aX+b)E(aX+b) and V(aX+b)V(aX+b), probability density function and normalizing constant, median and quartiles, continuous uniform distribution.

What the set covers, the traps it targets

The integral calculus of 201-SN3-RE is put to real use: substitution, integration by parts and improper integrals.

By the end of the set, you can build a distribution from data and draw its cumulative distribution function (exercise 1), prove V(X)=E(X2)−E(X)2V(X)=E(X^{2})-E(X)^{2} and V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X) (exercise 2), normalize a density and compute a probability by integration (exercise 3), derive the median and a quartile from it (exercise 4), compute expected value and variance by integration (exercises 5 and 7) and prove the formulas of the uniform distribution (exercise 6). The situations come from the natural sciences: tree swallow nests, mutations in a cloned gene, hailstones from a storm, seed germination, a lake echo sounder, the dispersal of yellow birch seeds. Exercise 9 is a full study, from field counts to the recommended buffer zone, and exercise 10 shows how a once-a-day observation turns a continuous duration into a discrete variable.

The pitfalls covered in detail: confusing P(X<a)P(X<a) and P(X≤a)P(X\le a) for a discrete variable (exercises 1 and 8), writing V(−X)=−V(X)V(-X)=-V(X) or V(2.5X+1)=2.5 V(X)+1V(2.5X+1)=2.5\,V(X)+1 (exercises 2 and 8), reading a density value as a probability (exercises 3, 6 and 8), taking the expected value for the most probable value or for the median (exercises 5, 7 and 8), correcting a bias while believing the spread is reduced (exercise 6), forgetting the class width in a histogram (exercise 9) and publishing a mean biased by the observation protocol (exercise 10).

The thread of the set: discrete or continuous, a variable is read from its distribution. In the discrete case, a probability is the height of a bar, and you add; in the continuous case, it is an area under the density, and you integrate. A density is therefore never a probability, and the expected value, a weighted average, is never to be confused with the most probable value. The binomial and normal distributions have their own set, linked at the bottom of the page. Work each exercise through before opening the solution.

  • 11 corrected exercises • 110 points • 180 minutes
  • Self-checking, 118 answers
  • Calculator
Start exercise 0.1 The chapter sheet

Course recap

  • • DISCRETE VARIABLE: its distribution gives P(X=xi)=piP(X=x_{i})=p_{i}, with pi≥0p_{i}\ge 0 and ∑pi=1\sum p_{i}=1. A probability is the HEIGHT of a bar; P(X<a)P(X<a) and P(X≤a)P(X\le a) differ by the bar P(X=a)P(X=a).
  • • DISCRETE EXPECTED VALUE AND VARIANCE: E(X)=∑xipiE(X)=\sum x_{i}p_{i}; V(X)=E((X−μ)2)=E(X2)−E(X)2V(X)=E\big((X-\mu)^{2}\big)=E(X^{2})-E(X)^{2}; σ(X)=V(X)\sigma(X)=\sqrt{V(X)}.
  • • LINEAR TRANSFORMATION: E(aX+b)=aE(X)+bE(aX+b)=aE(X)+b, V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X), σ(aX+b)=∣a∣ σ(X)\sigma(aX+b)=|a|\,\sigma(X). A shift moves the distribution without spreading it.
  • • DENSITY: f(x)≥0f(x)\ge 0 and ∫−∞+∞f(x) dx=1\int_{-\infty}^{+\infty}f(x)\,dx=1. 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. A value f(x)f(x) is a probability per unit: it can exceed 11.
  • • CUMULATIVE DISTRIBUTION FUNCTION: F(x)=P(X≤x)F(x)=P(X\le x), increasing from 00 to 11. In the discrete case, a staircase whose every jump is a P(X=xi)P(X=x_{i}); in the continuous case, F(x)=∫−∞xf(t) dtF(x)=\int_{-\infty}^{x}f(t)\,dt, continuous, and F′=fF'=f. The median solves F(m)=0.5F(m)=0.5.
  • • CONTINUOUS EXPECTED VALUE AND VARIANCE: E(X)=∫x f(x) dxE(X)=\int x\,f(x)\,dx, E(X2)=∫x2f(x) dxE(X^{2})=\int x^{2}f(x)\,dx, V(X)=E(X2)−E(X)2V(X)=E(X^{2})-E(X)^{2}. On [0,+∞)[0, +\infty), the integral is improper: integrate up to AA, then let A→+∞A\to+\infty.
  • • UNIFORM DISTRIBUTION on [a,b][a, b]: f(x)=1b−af(x)=\frac{1}{b-a}, E(X)=a+b2E(X)=\frac{a+b}{2}, V(X)=(b−a)212V(X)=\frac{(b-a)^{2}}{12}.
  • • MODE, MEDIAN, EXPECTED VALUE: three different numbers. For a density skewed to the right, mode << median << expected value, and P(X>E(X))<0.5P(X>E(X))<0.5.

Calculations: expected values, variances, densities and integrals

Exercise 0.1: Computing an expected value, a variance, a constant and an integral: eleven direct calculations

14 answers to check

For each line, compute the requested value, without justifying the model. Lines a) to f) are about the discrete variable XX that takes the values 00, 11, 22, 33 with probabilities 0.10.1, 0.30.3, 0.40.4, 0.20.2 (except line e). Lines g) to k) are about a continuous variable with density ff, equal to zero outside the given interval. Give exact values when they come out evenly, otherwise round to two decimal places.

Two moves for the whole list. In the discrete case, you SUM: E(X)=∑xi piE(X)=\sum x_{i}\,p_{i} and E(X2)=∑xi2 piE(X^{2})=\sum x_{i}^{2}\,p_{i}, then V(X)=E(X2)−E(X)2V(X)=E(X^{2})-E(X)^{2}. In the continuous case, you INTEGRATE the density: P(a≤X≤b)=∫abf(x) dxP(a\le X\le b)=\int_{a}^{b}f(x)\,dx, E(X)=∫x f(x) dxE(X)=\int x\,f(x)\,dx, and an unknown constant is found by writing that the total integral equals 11.

  • a) Compute E(X)E(X).
  • b) Compute V(X)V(X).
  • c) Compute the standard deviation σ(X)\sigma(X).
  • d) Let Y=3X−2Y=3X-2. Compute E(Y)E(Y) and V(Y)V(Y).
  • e) A variable takes the values 11, 22, 33, 44 with probabilities 0.20.2, 0.350.35, pp, 0.150.15. Compute pp.
  • f) Compute P(X≤1)P(X\le 1) and P(X<1)P(X<1).
  • g) f(x)=kx2f(x)=kx^{2} on [0,3][0, 3]: compute the constant kk.
  • h) f(x)=38x2f(x)=\frac{3}{8}x^{2} on [0,2][0, 2]: compute P(1≤X≤2)P(1\le X\le 2).
  • i) f(x)=2xf(x)=2x on [0,1][0, 1]: compute E(X)E(X).
  • j) Uniform distribution on [2,8][2, 8]: compute E(X)E(X) and V(X)V(X).
  • k) The cumulative distribution function is F(x)=x327F(x)=\frac{x^{3}}{27} on [0,3][0, 3]: compute the median mm.

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
k)
Show the solution

Answers

  • a) E(X)=1.7E(X)=1.7
  • b) E(X2)=3.7E(X^{2})=3.7; V(X)=0.81V(X)=0.81
  • c) σ(X)=0.9\sigma(X)=0.9
  • d) E(Y)=3.1E(Y)=3.1; V(Y)=7.29V(Y)=7.29
  • e) p=0.3p=0.3
  • f) P(X≤1)=0.4P(X\le 1)=0.4; P(X<1)=0.1P(X<1)=0.1
  • g) k=19k=\frac{1}{9}
  • h) P(1≤X≤2)=78=0.875P(1\le X\le 2)=\frac{7}{8}=0.875
  • i) E(X)=23E(X)=\frac{2}{3}
  • j) E(X)=5E(X)=5; V(X)=3V(X)=3
  • k) m=323≈2.38m=\frac{3}{\sqrt[3]{2}}\approx 2.38

The move that decides everything: in the discrete case you add point probabilities, in the continuous case you integrate a density. A density is never a probability; only its integral is one.

a)

E(X)=0×0.1+1×0.3+2×0.4+3×0.2=0.3+0.8+0.6=1.7E(X)=0\times 0.1+1\times 0.3+2\times 0.4+3\times 0.2=0.3+0.8+0.6=1.7.

b)

E(X2)=0×0.1+1×0.3+4×0.4+9×0.2=3.7E(X^{2})=0\times 0.1+1\times 0.3+4\times 0.4+9\times 0.2=3.7.

V(X)=E(X2)−E(X)2=3.7−2.89=0.81V(X)=E(X^{2})-E(X)^{2}=3.7-2.89=0.81.

Pitfall: squaring the probabilities instead of the values.

c)

σ(X)=0.81=0.9\sigma(X)=\sqrt{0.81}=0.9, in the unit of XX.

d)

E(Y)=3E(X)−2=3×1.7−2=3.1E(Y)=3E(X)-2=3\times 1.7-2=3.1.

V(Y)=32V(X)=9×0.81=7.29V(Y)=3^{2}V(X)=9\times 0.81=7.29: a shift does not change the spread, a factor 33 multiplies it by 99.

e)

The probabilities of a distribution add up to 11: 0.2+0.35+p+0.15=10.2+0.35+p+0.15=1, so p=0.3p=0.3, which is indeed positive.

f)

P(X≤1)=0.1+0.3=0.4P(X\le 1)=0.1+0.3=0.4 and P(X<1)=P(X=0)=0.1P(X<1)=P(X=0)=0.1.

In the discrete case, ≤\le and << do not give the same number: the difference is the bar P(X=1)=0.3P(X=1)=0.3.

g)

∫03kx2 dx=k[x33]03=9k=1\int_{0}^{3}kx^{2}\,dx=k\left[\frac{x^{3}}{3}\right]_{0}^{3}=9k=1, so k=19k=\frac{1}{9}. The density is positive on [0,3][0, 3]: it is indeed a density.

h)

∫1238x2 dx=18[x3]12=8−18=78=0.875\int_{1}^{2}\frac{3}{8}x^{2}\,dx=\frac{1}{8}\left[x^{3}\right]_{1}^{2}=\frac{8-1}{8}=\frac{7}{8}=0.875.

i)

E(X)=∫01x⋅2x dx=[2x33]01=23E(X)=\int_{0}^{1}x\cdot 2x\,dx=\left[\frac{2x^{3}}{3}\right]_{0}^{1}=\frac{2}{3}.

The expected value is not the midpoint 0.50.5 of the support: the density weighs more toward 11.

j)

E(X)=2+82=5E(X)=\frac{2+8}{2}=5 and V(X)=(8−2)212=3612=3V(X)=\frac{(8-2)^{2}}{12}=\frac{36}{12}=3.

k)

F(m)=m327=12F(m)=\frac{m^{3}}{27}=\frac{1}{2} gives m3=13.5m^{3}=13.5, so m=13.53=323≈2.38m=\sqrt[3]{13.5}=\frac{3}{\sqrt[3]{2}}\approx 2.38.

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.

Part A: the basics (/50)

Exercise 1: The distribution of a discrete variable: the number of eggs per tree swallow nest

14 answers to check

A team of ornithologists monitors 200200 nest boxes occupied by tree swallows during one breeding season. For each nest, it records the number XX of eggs in the complete clutch. The counts (fictitious but plausible data) are given in the table and shown below.

A nest is chosen at random among the 200200: the probability of each value of XX is its relative frequency. XX is a DISCRETE random variable: its values can be counted, and its distribution is drawn with bars.

Number of eggs xx3344556677
Number of nests10103030707064642626
234567810203040506070801030706426eggs per nestnest boxes
  • a) Set up the probability distribution of XX, then justify that it is indeed a probability distribution. Give P(X=6)P(X=6).
  • b) Compute F(5)=P(X≤5)F(5)=P(X\le 5) and P(X<5)P(X<5).
  • c) Compute P(X≥6)P(X\ge 6) and P(4<X≤6)P(4<X\le 6).
  • d) Compute the expected value E(X)E(X).
  • e) Compute E(X2)E(X^{2}), then the variance V(X)V(X) and the standard deviation σ(X)\sigma(X).
  • f) Sketch the cumulative distribution function FF of XX. Give F(5.5)F(5.5) and the height of the jump of FF at x=6x=6.
  • g) Give the mode and the median of XX. Is the expected value a value that XX can take? Interpret E(X)E(X) for the team.

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
f)
g)
Show the solution

Answers

  • a) 0.050.05; 0.150.15; 0.350.35; 0.320.32; 0.130.13, positive and adding up to 11; P(X=6)=0.32P(X=6)=0.32
  • b) F(5)=0.55F(5)=0.55; P(X<5)=0.20P(X<5)=0.20
  • c) P(X≥6)=0.45P(X\ge 6)=0.45; P(4<X≤6)=0.67P(4<X\le 6)=0.67
  • d) E(X)=5.33E(X)=5.33 eggs
  • e) E(X2)=29.49E(X^{2})=29.49; V(X)≈1.081V(X)\approx 1.081; σ(X)≈1.04\sigma(X)\approx 1.04 egg
  • f) Step function; F(5.5)=0.55F(5.5)=0.55; jump of 0.320.32 at x=6x=6
  • g) Mode 55, median 55; E(X)=5.33E(X)=5.33 is not a possible value: it is the long-run average per nest
a)

Divide each count by 200200:

P(X=3)=0.05P(X=3)=0.05, P(X=4)=0.15P(X=4)=0.15, P(X=5)=0.35P(X=5)=0.35, P(X=6)=0.32P(X=6)=0.32, P(X=7)=0.13P(X=7)=0.13.

These numbers are positive and 0.05+0.15+0.35+0.32+0.13=10.05+0.15+0.35+0.32+0.13=1: both conditions of a probability distribution are met.

In particular P(X=6)=64200=0.32P(X=6)=\frac{64}{200}=0.32.

b)

F(5)=P(X≤5)=0.05+0.15+0.35=0.55F(5)=P(X\le 5)=0.05+0.15+0.35=0.55.

P(X<5)=P(X≤4)=0.05+0.15=0.20P(X<5)=P(X\le 4)=0.05+0.15=0.20.

Pitfall: writing P(X<5)=P(X≤5)P(X<5)=P(X\le 5). For a discrete variable, the value 55 alone carries 0.350.35: the strict inequality removes it. This equality will only hold for a continuous variable (exercise 3).

c)

By the complement: P(X≥6)=1−P(X≤5)=1−0.55=0.45P(X\ge 6)=1-P(X\le 5)=1-0.55=0.45.

P(4<X≤6)=P(X=5)+P(X=6)=0.35+0.32=0.67P(4<X\le 6)=P(X=5)+P(X=6)=0.35+0.32=0.67, or else F(6)−F(4)=0.87−0.20=0.67F(6)-F(4)=0.87-0.20=0.67.

d)

The expected value is the average of the values weighted by their probabilities:

E(X)=3×0.05+4×0.15+5×0.35+6×0.32+7×0.13\displaystyle E(X)=3\times 0.05+4\times 0.15+5\times 0.35+6\times 0.32+7\times 0.13

E(X)=0.15+0.60+1.75+1.92+0.91=5.33E(X)=0.15+0.60+1.75+1.92+0.91=5.33 eggs.

Order-of-magnitude check: the value lies between the mode 55 and the next value 66, on the side of the main mass.

e)
E(X2)=9×0.05+16×0.15+25×0.35+36×0.32+49×0.13\displaystyle E(X^{2})=9\times 0.05+16\times 0.15+25\times 0.35+36\times 0.32+49\times 0.13

E(X2)=0.45+2.40+8.75+11.52+6.37=29.49E(X^{2})=0.45+2.40+8.75+11.52+6.37=29.49.

V(X)=E(X2)−E(X)2=29.49−28.4089=1.0811V(X)=E(X^{2})-E(X)^{2}=29.49-28.4089=1.0811, so V(X)≈1.081V(X)\approx 1.081.

σ(X)=1.0811≈1.04\sigma(X)=\sqrt{1.0811}\approx 1.04 egg: a typical deviation of about one egg around the mean.

Pitfall: rounding E(X)E(X) to 5.35.3 before squaring it gives 29.49−28.09=1.4029.49-28.09=1.40, a 30%30\% error. The formula E(X2)−E(X)2E(X^{2})-E(X)^{2} subtracts two large, close numbers: keep E(X)E(X) exact.

f)

F(x)=P(X≤x)F(x)=P(X\le x) is defined for EVERY real number xx. It equals 00 before 33, then it stays constant between two values and jumps at each value of XX:

F=0.05F=0.05 on [3,4)[3, 4), 0.200.20 on [4,5)[4, 5), 0.550.55 on [5,6)[5, 6), 0.870.87 on [6,7)[6, 7), and 11 from 77 on.

So F(5.5)=F(5)=0.55F(5.5)=F(5)=0.55: no nest has 5.55.5 eggs, but the question “at most 5.55.5” makes sense.

The height of the jump at 66 is 0.87−0.55=0.32=P(X=6)0.87-0.55=0.32=P(X=6): in the discrete case, each jump of FF IS a point probability. The filled dot marks the value taken at x=6x=6, on the right of the jump.

g)

The mode is the most probable value: 55, with 0.350.35.

The median: F(4)=0.20<0.5F(4)=0.20<0.5 and F(5)=0.55≥0.5F(5)=0.55\ge 0.5, so the median is 55.

E(X)=5.33E(X)=5.33 is not a possible number of eggs. It is interpreted in the long run: over a large number of comparable nests, the team can expect about 5.335.33 eggs per nest on average, roughly 10661066 eggs for 200200 nests.

Pitfall: reading the expected value as “the most probable number of eggs”. That is the role of the mode, and the two numbers differ here.

23456780.10.20.30.40.50.60.70.80.911.1jump 0.320.55xF(x)

Exercise 2: Proving the properties of expected value and variance: mutations in a cloned gene

10 answers to check

A laboratory introduces random mutations into a gene of 15001500 base pairs, clones the product and sequences each clone. The number XX of point mutations in a clone follows the distribution below (model drawn from earlier sequencing runs, fictitious values).

In questions a) to c), XX is ANY discrete variable with values x1,…,xnx_{1},\dots,x_{n}, probabilities p1,…,pnp_{1},\dots,p_{n} and expected value μ=E(X)\mu=E(X); aa and bb are two real numbers. Start from the definitions alone: E(X)=∑ixipiE(X)=\sum_{i}x_{i}p_{i} and V(X)=E((X−μ)2)=∑i(xi−μ)2piV(X)=E\big((X-\mu)^{2}\big)=\sum_{i}(x_{i}-\mu)^{2}p_{i}.

kk00112233
P(X=k)P(X=k)0.300.300.400.400.200.200.100.10
01230.30.40.20.1P(X = k)
  • a) Prove that E(aX+b)=aE(X)+bE(aX+b)=aE(X)+b.
  • b) Prove that V(X)=E(X2)−E(X)2V(X)=E(X^{2})-E(X)^{2}.
  • c) Prove that V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X), then that σ(aX+b)=∣a∣ σ(X)\sigma(aX+b)=|a|\,\sigma(X).
  • d) For the gene under study, compute E(X)E(X), E(X2)E(X^{2}) and V(X)V(X).
  • e) Let Y=1500−XY=1500-X be the number of intact base pairs in a clone. Use c) to deduce E(Y)E(Y), V(Y)V(Y) and σ(Y)\sigma(Y).
  • f) Repairing a clone takes 2.52.5 hours per mutation, plus 11 hour of control sequencing, done in every case. Express the duration TT in terms of XX, then compute E(T)E(T), V(T)V(T) and σ(T)\sigma(T).
  • g) A student claims that E(X2)=E(X)2E(X^{2})=E(X)^{2} for every variable. Refute the claim with this gene, then use b) to justify that E(X2)≥E(X)2E(X^{2})\ge E(X)^{2} in every case.

Type your answers, the page tells you right or wrong 0/10

d)
e)
f)
g)
Show the solution

Answers

  • a) E(aX+b)=a∑xipi+b∑pi=aE(X)+bE(aX+b)=a\sum x_{i}p_{i}+b\sum p_{i}=aE(X)+b
  • b) Expand (xi−μ)2(x_{i}-\mu)^{2}: V(X)=E(X2)−2μ2+μ2=E(X2)−μ2V(X)=E(X^{2})-2\mu^{2}+\mu^{2}=E(X^{2})-\mu^{2}
  • c) (aX+b)−(aμ+b)=a(X−μ)(aX+b)-(a\mu+b)=a(X-\mu), hence V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X) and σ(aX+b)=∣a∣σ(X)\sigma(aX+b)=|a|\sigma(X)
  • d) E(X)=1.1E(X)=1.1; E(X2)=2.1E(X^{2})=2.1; V(X)=0.89V(X)=0.89
  • e) E(Y)=1498.9E(Y)=1498.9; V(Y)=0.89V(Y)=0.89; σ(Y)≈0.94\sigma(Y)\approx 0.94
  • f) T=2.5X+1T=2.5X+1; E(T)=3.75E(T)=3.75 h; V(T)=5.5625V(T)=5.5625 h²; σ(T)≈2.36\sigma(T)\approx 2.36 h
  • g) Here 2.1≠1.212.1\ne 1.21; E(X2)−E(X)2=V(X)≥0E(X^{2})-E(X)^{2}=V(X)\ge 0, with equality only if XX is constant
a)

By definition, using ∑ipi=1\sum_{i}p_{i}=1:

E(aX+b)=∑i(axi+b)pi=a∑ixipi+b∑ipi=aE(X)+b\begin{aligned}E(aX+b)&=\sum_{i}(ax_{i}+b)p_{i}\\&=a\sum_{i}x_{i}p_{i}+b\sum_{i}p_{i}\\&=aE(X)+b\end{aligned}

The key step is ∑ipi=1\sum_{i}p_{i}=1: it is what turns b∑pib\sum p_{i} into bb. Without citing it, the proof is incomplete.

b)

Expand the square in the definition:

V(X)=∑i(xi2−2μxi+μ2)pi=∑ixi2pi−2μ∑ixipi+μ2∑ipi=E(X2)−2μ⋅μ+μ2=E(X2)−μ2\begin{aligned}V(X)&=\sum_{i}(x_{i}^{2}-2\mu x_{i}+\mu^{2})p_{i}\\&=\sum_{i}x_{i}^{2}p_{i}-2\mu\sum_{i}x_{i}p_{i}+\mu^{2}\sum_{i}p_{i}\\&=E(X^{2})-2\mu\cdot\mu+\mu^{2}\\&=E(X^{2})-\mu^{2}\end{aligned}

μ\mu is a fixed NUMBER: it comes out of the sums. This is the computational formula; the definition is still the mean of the squared deviations.

c)

By a), E(aX+b)=aμ+bE(aX+b)=a\mu+b, so the deviation of aX+baX+b from its mean is (axi+b)−(aμ+b)=a(xi−μ)(ax_{i}+b)-(a\mu+b)=a(x_{i}-\mu).

V(aX+b)=∑ia2(xi−μ)2pi=a2V(X)V(aX+b)=\sum_{i}a^{2}(x_{i}-\mu)^{2}p_{i}=a^{2}V(X).

Finally σ(aX+b)=a2V(X)=∣a∣ σ(X)\sigma(aX+b)=\sqrt{a^{2}V(X)}=|a|\,\sigma(X), since a2=∣a∣\sqrt{a^{2}}=|a|.

Interpretation: adding bb moves the whole distribution without spreading it; multiplying by aa stretches the deviations by a factor ∣a∣|a|, hence their squares by a factor a2a^{2}.

d)

E(X)=0×0.3+1×0.4+2×0.2+3×0.1=1.1E(X)=0\times 0.3+1\times 0.4+2\times 0.2+3\times 0.1=1.1 mutations.

E(X2)=0+1×0.4+4×0.2+9×0.1=2.1E(X^{2})=0+1\times 0.4+4\times 0.2+9\times 0.1=2.1.

V(X)=2.1−1.12=2.1−1.21=0.89V(X)=2.1-1.1^{2}=2.1-1.21=0.89.

e)

Y=−X+1500Y=-X+1500, with a=−1a=-1 and b=1500b=1500.

E(Y)=−1.1+1500=1498.9E(Y)=-1.1+1500=1498.9 intact pairs on average.

V(Y)=(−1)2×0.89=0.89V(Y)=(-1)^{2}\times 0.89=0.89 and σ(Y)=∣−1∣0.89≈0.94\sigma(Y)=|-1|\sqrt{0.89}\approx 0.94.

Pitfall: writing V(Y)=−0.89V(Y)=-0.89. Counting intact bases or mutated bases carries the same uncertainty: a variance is a mean of squares, it is never negative.

f)

T=2.5X+1T=2.5X+1 hours.

E(T)=2.5×1.1+1=3.75E(T)=2.5\times 1.1+1=3.75 h.

V(T)=2.52×0.89=6.25×0.89=5.5625V(T)=2.5^{2}\times 0.89=6.25\times 0.89=5.5625 h² and σ(T)=2.5×0.89≈2.36\sigma(T)=2.5\times\sqrt{0.89}\approx 2.36 h.

Pitfall: V(T)=2.5×0.89+1=3.225V(T)=2.5\times 0.89+1=3.225. The constant 11 shifts every duration by the same hour without changing their spread, and the factor 2.52.5 acts squared. The figure of the solution shows it: same bar heights, gaps multiplied by 2.52.5.

g)

Here E(X2)=2.1E(X^{2})=2.1 and E(X)2=1.21E(X)^{2}=1.21: the claim is false.

In general, b) gives E(X2)−E(X)2=V(X)E(X^{2})-E(X)^{2}=V(X), and V(X)=∑(xi−μ)2piV(X)=\sum(x_{i}-\mu)^{2}p_{i} is a sum of non-negative terms: E(X2)≥E(X)2E(X^{2})\ge E(X)^{2}.

Equality requires every term to be zero, that is xi=μx_{i}=\mu for every value of non-zero probability: XX is constant. A truly random variable always has E(X2)>E(X)2E(X^{2})>E(X)^{2}.

012345678901234567890.30.40.20.10.30.40.20.1X: number of mutationsT = 2.5X + 1 (hours)

Exercise 3: Density, conditions and normalizing constant: the diameter of hailstones in a storm

7 answers to check

After a storm, a meteorology team collects hail impacts on polystyrene plates and measures the diameter DD, in centimetres, of each hailstone. For this storm, it adopts the following model: DD is a CONTINUOUS random variable with density

f(x)=k(4−x)2f(x)=k(4-x)^{2} for 0≤x≤40\le x\le 4, and f(x)=0f(x)=0 elsewhere, where kk is a constant.

The figure shows the function x↦(4−x)2x\mapsto(4-x)^{2}, that is ff up to the factor kk, and shades the region that corresponds to the event D≥2D\ge 2.

0.511.522.533.544.524681012141618D ≥ 2diameter x (cm)(4 − x)²
  • a) Show that k=364k=\frac{3}{64}.
  • b) Check that ff satisfies the non-negativity condition. Compute f(0)f(0), then explain why this number is not a probability.
  • c) Compute P(D≥2)P(D\ge 2).
  • d) Compute P(1≤D≤3)P(1\le D\le 3).
  • e) Compute P(D=2)P(D=2), then P(1<D<3)P(1<D<3). Compare with exercise 1, question b.
  • f) The team collected 320320 hailstones. How many does it expect with a diameter of at least 22 cm? A colleague claimed that “half of the hailstones exceed 22 cm, since 22 is the midpoint of [0,4][0, 4]”. Correct the claim.

Type your answers, the page tells you right or wrong 0/7

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) ∫04(4−x)2 dx=643\int_{0}^{4}(4-x)^{2}\,dx=\frac{64}{3}, so k=364k=\frac{3}{64}
  • b) f≥0f\ge 0 everywhere; f(0)=0.75 cm−1f(0)=0.75\ \mathrm{cm^{-1}} is a density (probability per centimetre), not a probability
  • c) P(D≥2)=18=0.125P(D\ge 2)=\frac{1}{8}=0.125
  • d) P(1≤D≤3)=1332≈0.4063P(1\le D\le 3)=\frac{13}{32}\approx 0.4063
  • e) P(D=2)=0P(D=2)=0; P(1<D<3)=1332P(1<D<3)=\frac{13}{32}, as in d), whereas in the discrete case << and ≤\le differed
  • f) 4040 hailstones; half are not above 22 cm: the density decreases, only 12.5%12.5\% are there
a)

The total area under a density equals 11. With the substitution u=4−xu=4-x (or a direct antiderivative):

∫04(4−x)2 dx=[−(4−x)33]04=0+643=643\int_{0}^{4}(4-x)^{2}\,dx=\left[-\frac{(4-x)^{3}}{3}\right]_{0}^{4}=0+\frac{64}{3}=\frac{64}{3}.

The condition k⋅643=1k\cdot\frac{64}{3}=1 gives k=364k=\frac{3}{64}.

Pitfall: forgetting the minus sign in the antiderivative of (4−x)2(4-x)^{2} and finding a negative area, hence a negative kk. The area under a positive curve is positive: a negative sign at this step signals the error.

b)

On [0,4][0, 4], k>0k>0 and (4−x)2≥0(4-x)^{2}\ge 0, so f(x)≥0f(x)\ge 0; elsewhere f(x)=0f(x)=0. Both conditions of a density hold: f≥0f\ge 0 and ∫−∞+∞f(x) dx=1\int_{-\infty}^{+\infty}f(x)\,dx=1.

f(0)=364×16=34=0.75f(0)=\frac{3}{64}\times 16=\frac{3}{4}=0.75.

This number is a DENSITY, in cm−1\mathrm{cm^{-1}}: a probability per centimetre of diameter. It says that small diameters are the most concentrated, and over a small width, P(0≤D≤0.1)P(0\le D\le 0.1) is roughly 0.75×0.1=0.0750.75\times 0.1=0.075 (exactly 0.07310.0731). A density can even exceed 11 (exercise 6).

c)

P(D≥2)=∫24364(4−x)2 dx=364[−(4−x)33]24=364×83=18=0.125P(D\ge 2)=\int_{2}^{4}\frac{3}{64}(4-x)^{2}\,dx=\frac{3}{64}\left[-\frac{(4-x)^{3}}{3}\right]_{2}^{4}=\frac{3}{64}\times\frac{8}{3}=\frac{1}{8}=0.125.

On the figure, it is the orange area, relative to the total area 643\frac{64}{3}: 8/364/3=18\frac{8/3}{64/3}=\frac{1}{8}.

d)

P(1≤D≤3)=364[−(4−x)33]13=164(27−1)=2664=1332≈0.4063P(1\le D\le 3)=\frac{3}{64}\left[-\frac{(4-x)^{3}}{3}\right]_{1}^{3}=\frac{1}{64}\left(27-1\right)=\frac{26}{64}=\frac{13}{32}\approx 0.4063.

e)

P(D=2)=∫22f(x) dx=0P(D=2)=\int_{2}^{2}f(x)\,dx=0: an integral over an interval of zero length is zero.

Consequently P(1<D<3)=P(1≤D≤3)−P(D=1)−P(D=3)=1332P(1<D<3)=P(1\le D\le 3)-P(D=1)-P(D=3)=\frac{13}{32}.

This is the opposite of the discrete case: in exercise 1, removing the value 55 removed a bar of 0.350.35. Here, no single value carries any probability; only intervals do.

Pitfall: concluding that a 22 cm hailstone “does not exist”. P(D=2)=0P(D=2)=0 says that a diameter of EXACTLY 2.000…2.000\ldots cm has probability zero; a diameter between 1.951.95 and 2.052.05 cm, on the other hand, has a positive probability.

f)

The team expects 320×18=40320\times\frac{1}{8}=40 hailstones of at least 22 cm.

The colleague's reasoning assumes a constant density, that of the uniform distribution. Here the density decreases from 0.750.75 to 00: the area to the right of 22 is only 18\frac{1}{8} of the total area, not half. The midpoint of the support is the median only for a symmetric density; the median is computed in exercise 4.

Exercise 4: Cumulative distribution function, median and quartile by integration: back to the hailstones

8 answers to check

We return to the diameter DD, in centimetres, of the hailstones of exercise 3, with density f(x)=364(4−x)2f(x)=\frac{3}{64}(4-x)^{2} on [0,4][0, 4] and zero elsewhere.

The CUMULATIVE DISTRIBUTION FUNCTION of DD is F(x)=P(D≤x)=∫−∞xf(t) dtF(x)=P(D\le x)=\int_{-\infty}^{x}f(t)\,dt: the area accumulated under the density up to the abscissa xx.

  • a) Show that F(x)=1−(4−x)364F(x)=1-\frac{(4-x)^{3}}{64} for 0≤x≤40\le x\le 4. Give F(x)F(x) for x<0x<0 and for x>4x>4, then compute F(1)F(1).
  • b) Check that F′(x)=f(x)F'(x)=f(x) on (0,4)(0, 4) and that FF is continuous at 00 and at 44.
  • c) Using FF, compute P(D≤1.5)P(D\le 1.5) and P(0.5≤D≤1.5)P(0.5\le D\le 1.5).
  • d) Find the median mm of DD, as an exact value and then to two decimal places.
  • e) Find the third quartile Q3Q_{3}, to two decimal places. Interpret it for the hailstones.
  • f) Compute the expected value E(D)E(D) by an integral, using the substitution u=4−xu=4-x. Compare it with the median and say what the gap reveals about the distribution.

Type your answers, the page tells you right or wrong 0/8

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) F(x)=0F(x)=0 if x<0x<0, 1−(4−x)3641-\frac{(4-x)^{3}}{64} on [0,4][0, 4], 11 if x>4x>4; F(1)=3764≈0.5781F(1)=\frac{37}{64}\approx 0.5781
  • b) F′(x)=3(4−x)264=f(x)F'(x)=\frac{3(4-x)^{2}}{64}=f(x); F(0)=0F(0)=0 and F(4)=1F(4)=1 join the pieces
  • c) P(D≤1.5)≈0.7559P(D\le 1.5)\approx 0.7559; P(0.5≤D≤1.5)≈0.4258P(0.5\le D\le 1.5)\approx 0.4258
  • d) m=4−323=4−243≈0.83m=4-\sqrt[3]{32}=4-2\sqrt[3]{4}\approx 0.83 cm
  • e) Q3=4−163≈1.48Q_{3}=4-\sqrt[3]{16}\approx 1.48 cm: three quarters of the hailstones have a diameter of at most 1.481.48 cm
  • f) E(D)=1E(D)=1 cm >m≈0.83>m\approx 0.83 cm: tail stretched toward large diameters
a)

For 0≤x≤40\le x\le 4: F(x)=∫0x364(4−t)2 dt=364[−(4−t)33]0x=164(64−(4−x)3)=1−(4−x)364F(x)=\int_{0}^{x}\frac{3}{64}(4-t)^{2}\,dt=\frac{3}{64}\left[-\frac{(4-t)^{3}}{3}\right]_{0}^{x}=\frac{1}{64}\left(64-(4-x)^{3}\right)=1-\frac{(4-x)^{3}}{64}.

For x<0x<0, no area has accumulated yet: F(x)=0F(x)=0. For x>4x>4, all of it has: F(x)=1F(x)=1.

F(1)=1−2764=3764≈0.5781F(1)=1-\frac{27}{64}=\frac{37}{64}\approx 0.5781.

Pitfall: writing F(x)=1−(4−x)364F(x)=1-\frac{(4-x)^{3}}{64} for EVERY real xx. For x=5x=5 this formula gives 1.01561.0156, a probability greater than 11: a cumulative distribution function is given piecewise.

b)

F′(x)=−3(4−x)2×(−1)64=364(4−x)2=f(x)F'(x)=-\frac{3(4-x)^{2}\times(-1)}{64}=\frac{3}{64}(4-x)^{2}=f(x): this is the fundamental theorem of calculus, the cumulative distribution function is an antiderivative of the density.

At 00: 1−6464=01-\frac{64}{64}=0, equal to the value on the left. At 44: 1−0=11-0=1, equal to the value on the right. FF is continuous everywhere, without any jump: this is the signature of a continuous variable, in contrast with the staircase of exercise 1.

c)

P(D≤1.5)=F(1.5)=1−2.5364=1−15.62564≈0.7559P(D\le 1.5)=F(1.5)=1-\frac{2.5^{3}}{64}=1-\frac{15.625}{64}\approx 0.7559.

P(0.5≤D≤1.5)=F(1.5)−F(0.5)=3.53−2.5364=27.2564≈0.4258P(0.5\le D\le 1.5)=F(1.5)-F(0.5)=\frac{3.5^{3}-2.5^{3}}{64}=\frac{27.25}{64}\approx 0.4258.

A single subtraction replaces an integral: that is the whole point of FF.

d)

The median satisfies F(m)=12F(m)=\frac{1}{2}: (4−m)364=12\frac{(4-m)^{3}}{64}=\frac{1}{2}, so (4−m)3=32(4-m)^{3}=32.

4−m=323=2434-m=\sqrt[3]{32}=2\sqrt[3]{4}, hence m=4−243≈0.83m=4-2\sqrt[3]{4}\approx 0.83 cm, which does belong to [0,4][0, 4].

Check: F(0.83)≈1−3.17364≈0.502F(0.83)\approx 1-\frac{3.17^{3}}{64}\approx 0.502. Half of the hailstones have a diameter below 8.38.3 mm.

e)

F(Q3)=34F(Q_{3})=\frac{3}{4} gives (4−Q3)3=16(4-Q_{3})^{3}=16, so Q3=4−163≈1.48Q_{3}=4-\sqrt[3]{16}\approx 1.48 cm.

Three hailstones out of four have a diameter of at most 1.481.48 cm, and one in four exceeds it. The figure of the solution reads both quantiles off the graph of FF: start from the height 0.50.5 or 0.750.75 and go down to the axis.

f)

E(D)=∫04x⋅364(4−x)2 dxE(D)=\int_{0}^{4}x\cdot\frac{3}{64}(4-x)^{2}\,dx. With u=4−xu=4-x, du=−dxdu=-dx, and the bounds 00 and 44 swap:

E(D)=364∫04(4−u)u2 du=364[4u33−u44]04=364(2563−64)=364×643=1\begin{aligned}E(D)&=\frac{3}{64}\int_{0}^{4}(4-u)u^{2}\,du\\&=\frac{3}{64}\left[\frac{4u^{3}}{3}-\frac{u^{4}}{4}\right]_{0}^{4}\\&=\frac{3}{64}\left(\frac{256}{3}-64\right)=\frac{3}{64}\times\frac{64}{3}=1\end{aligned}

E(D)=1E(D)=1 cm, larger than the median 0.830.83 cm: a few large hailstones pull the mean up, whereas the median only looks at rank. The distribution is stretched toward large diameters (skewed to the right).

Pitfall: taking the midpoint of the support, 22 cm, or the “centre” of the figure, as the expected value. It is computed by integrating x f(x)x\,f(x).

0.511.522.533.544.50.10.20.30.40.50.60.70.80.911.1m ≈ 0.83Q₃ ≈ 1.48F(x) = 1 − (4 − x)³/64x (cm)F(x)

Exercise 5: Expected value and variance by integration: the germination time of a meadow seed

11 answers to check

In a growth chamber, seeds of a meadow plant are sown at time t=0t=0. Let TT be the germination time of a seed, in days. A model fitted to earlier trials gives TT the density

f(t)=k(t−1)(7−t)2f(t)=k(t-1)(7-t)^{2} for 1≤t≤71\le t\le 7, and f(t)=0f(t)=0 elsewhere.

In this model, no seed germinates before one day or after seven days. You may set u=t−1u=t-1, which turns ff into k u(6−u)2k\,u(6-u)^{2} on [0,6][0, 6], and you may use without proof that the cumulative distribution function is F(t)=1108(18u2−4u3+u44)F(t)=\frac{1}{108}\left(18u^{2}-4u^{3}+\frac{u^{4}}{4}\right) for 1≤t≤71\le t\le 7, with u=t−1u=t-1.

123456780.050.10.150.20.250.30.35t (days)f(t)
  • a) Show that k=1108k=\frac{1}{108}.
  • b) Find the mode of TT, that is the abscissa of the maximum of ff, by differentiation. Compute f(3)f(3) to two decimal places.
  • c) Compute the expected value E(T)E(T) by an integral.
  • d) Compute E(T2)E(T^{2}), then the variance V(T)V(T) and the standard deviation σ(T)\sigma(T).
  • e) Compute F(3.3)F(3.3) and F(3.4)F(3.4). Deduce an interval that contains the median of TT.
  • f) Compute P(T>E(T))P(T>E(T)). Order the mode, the median and the expected value, and explain why more than half of the seeds germinate before the mean time.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) ∫17(t−1)(7−t)2 dt=108\int_{1}^{7}(t-1)(7-t)^{2}\,dt=108, so k=1108k=\frac{1}{108}
  • b) f′(t)=(7−t)(9−3t)108f'(t)=\frac{(7-t)(9-3t)}{108} vanishes at t=3t=3: mode 33 days; f(3)=827≈0.30f(3)=\frac{8}{27}\approx 0.30
  • c) E(T)=3.4E(T)=3.4 days
  • d) E(T2)=13E(T^{2})=13; V(T)=1.44V(T)=1.44; σ(T)=1.2\sigma(T)=1.2 days
  • e) F(3.3)≈0.4958<0.5<F(3.4)≈0.5248F(3.3)\approx 0.4958<0.5<F(3.4)\approx 0.5248: median in [3.3,3.4][3.3, 3.4]
  • f) P(T>3.4)≈0.4752P(T>3.4)\approx 0.4752; mode 33 << median ≈3.31\approx 3.31 << E(T)=3.4E(T)=3.4: tail stretched toward long germination times
a)

With u=t−1u=t-1, du=dtdu=dt and 7−t=6−u7-t=6-u:

∫17(t−1)(7−t)2 dt=∫06(36u−12u2+u3) du=[18u2−4u3+u44]06=648−864+324=108\begin{aligned}\int_{1}^{7}(t-1)(7-t)^{2}\,dt&=\int_{0}^{6}(36u-12u^{2}+u^{3})\,du\\&=\left[18u^{2}-4u^{3}+\frac{u^{4}}{4}\right]_{0}^{6}\\&=648-864+324=108\end{aligned}

The total-area condition 108k=1108k=1 gives k=1108k=\frac{1}{108}. And f≥0f\ge 0 on [1,7][1, 7], because t−1≥0t-1\ge 0 and (7−t)2≥0(7-t)^{2}\ge 0: ff is indeed a density.

The antiderivative found here, divided by 108108, is exactly the cumulative distribution function FF given in the statement.

b)

By the product rule:

f′(t)=1108[(7−t)2−2(t−1)(7−t)]=(7−t)(9−3t)108f'(t)=\frac{1}{108}\left[(7-t)^{2}-2(t-1)(7-t)\right]=\frac{(7-t)(9-3t)}{108}.

On (1,7)(1, 7), 7−t>07-t>0, so f′f' has the sign of 9−3t9-3t: positive before 33, negative after. The maximum is reached at t=3t=3: the mode is 33 days.

f(3)=2×16108=827≈0.30f(3)=\frac{2\times 16}{108}=\frac{8}{27}\approx 0.30 per day. This is not the probability of germinating “on day 3”: it is a density (see exercise 8).

c)

E(T)=∫17t f(t) dtE(T)=\int_{1}^{7}t\,f(t)\,dt. The shortest route goes through U=T−1U=T-1: E(T)=E(U)+1E(T)=E(U)+1 (exercise 2, same property in the continuous case).

E(U)=1108∫06(36u2−12u3+u4) du=1108[12u3−3u4+u55]06=2592−3888+1555.2108=259.2108=2.4\begin{aligned}E(U)&=\frac{1}{108}\int_{0}^{6}(36u^{2}-12u^{3}+u^{4})\,du\\&=\frac{1}{108}\left[12u^{3}-3u^{4}+\frac{u^{5}}{5}\right]_{0}^{6}\\&=\frac{2592-3888+1555.2}{108}=\frac{259.2}{108}=2.4\end{aligned}

So E(T)=2.4+1=3.4E(T)=2.4+1=3.4 days.

Pitfall: computing ∫t f(t) dt\int t\,f(t)\,dt on [0,6][0, 6] after the substitution without changing tt into u+1u+1. Either integrate t f(t)t\,f(t) on [1,7][1, 7], or u fu\,f on [0,6][0, 6] and then add 11.

d)

E(U2)=1108∫06(36u3−12u4+u5) du=11 664−18 662.4+7776108=777.6108=7.2E(U^{2})=\frac{1}{108}\int_{0}^{6}(36u^{3}-12u^{4}+u^{5})\,du=\frac{11\,664-18\,662.4+7776}{108}=\frac{777.6}{108}=7.2.

V(T)=V(U)=E(U2)−E(U)2=7.2−5.76=1.44V(T)=V(U)=E(U^{2})-E(U)^{2}=7.2-5.76=1.44, since a shift does not change the variance.

E(T2)=V(T)+E(T)2=1.44+11.56=13E(T^{2})=V(T)+E(T)^{2}=1.44+11.56=13, and σ(T)=1.44=1.2\sigma(T)=\sqrt{1.44}=1.2 days.

Order-of-magnitude check: a uniform distribution on a 66-day support would have a standard deviation of 612≈1.73\frac{6}{\sqrt{12}}\approx 1.73 days; our density, more concentrated around its peak, logically has a smaller one.

e)

For t=3.3t=3.3, u=2.3u=2.3: F(3.3)=95.22−48.668+6.996108≈0.4958F(3.3)=\frac{95.22-48.668+6.996}{108}\approx 0.4958.

For t=3.4t=3.4, u=2.4u=2.4: F(3.4)=103.68−55.296+8.2944108≈0.5248F(3.4)=\frac{103.68-55.296+8.2944}{108}\approx 0.5248.

FF is continuous and increasing, and 0.4958<0.5<0.52480.4958<0.5<0.5248: the median lies between 3.33.3 and 3.43.4 days (it is about 3.313.31).

f)

P(T>E(T))=1−F(3.4)≈1−0.5248=0.4752P(T>E(T))=1-F(3.4)\approx 1-0.5248=0.4752.

In order: mode 33 << median ≈3.31\approx 3.31 << expected value 3.43.4. The density rises quickly then falls slowly toward 77: a few late seeds lengthen the mean without moving the median much.

So 52.5%52.5\% of the seeds germinate before the mean time. “The mean time” is neither the most frequent time nor the time that splits the seeds into two halves.

Pitfall: believing that P(T>E(T))=0.5P(T>E(T))=0.5 for every variable. It is true for a symmetric density, false as soon as the density is skewed.

123456780.050.10.150.20.250.30.35mode 3median ≈ 3.31E(T) = 3.4t (days)f(t)

Part B: problems and reasoning (/50)

Exercise 6: The continuous uniform distribution proved: the hidden bias of an echo sounder that truncates

10 answers to check

A limnology team's boat maps the bottom of a lake. Its echo sounder displays the depth TRUNCATED to the decimetre below: the display 12.312.3 m means that the true depth is in [12.3,12.4)[12.3, 12.4), as the figure shows.

Let ε\varepsilon, in metres, be the display error: true depth minus displayed depth. With no other information, ε\varepsilon is modelled by the UNIFORM distribution on [0,0.1][0, 0.1]: every centimetre beyond the display is equally plausible.

12.212.312.412.5displayed: 12.3 mtrue depth
  • a) Let UU be a variable with a uniform distribution on [a,b][a, b], where a<ba<b. Give its density and check that it is a density. Prove with integrals that E(U)=a+b2E(U)=\frac{a+b}{2} and V(U)=(b−a)212V(U)=\frac{(b-a)^{2}}{12}.
  • b) Give the density of the error ε\varepsilon on [0,0.1][0, 0.1]. Its value exceeds 11: is this a contradiction? Justify.
  • c) Compute the expected value E(ε)E(\varepsilon) and the standard deviation σ(ε)\sigma(\varepsilon), in metres.
  • d) Compute P(ε>0.08)P(\varepsilon>0.08) and P(ε=0.05)P(\varepsilon=0.05).
  • e) To correct the bias, the team adds 0.050.05 m to each displayed depth. The error becomes ε′=ε−0.05\varepsilon'=\varepsilon-0.05. Give the distribution of ε′\varepsilon', then E(ε′)E(\varepsilon') and σ(ε′)\sigma(\varepsilon').
  • f) Compute P(∣ε′∣>0.04)P(|\varepsilon'|>0.04). Has the correction reduced the spread of the errors? Justify with a property from exercise 2.

Type your answers, the page tells you right or wrong 0/10

b)
c)
d)
e)
f)
Show the solution

Answers

  • a) f(x)=1b−af(x)=\frac{1}{b-a} on [a,b][a, b]; E(U)=a+b2E(U)=\frac{a+b}{2}; E(U2)=a2+ab+b23E(U^{2})=\frac{a^{2}+ab+b^{2}}{3}; V(U)=(b−a)212V(U)=\frac{(b-a)^{2}}{12}
  • b) f(x)=10 m−1f(x)=10\ \mathrm{m^{-1}} on [0,0.1][0, 0.1]; no: the area is 10×0.1=110\times 0.1=1
  • c) E(ε)=0.05E(\varepsilon)=0.05 m; σ(ε)=0.112≈0.0289\sigma(\varepsilon)=\frac{0.1}{\sqrt{12}}\approx 0.0289 m
  • d) P(ε>0.08)=0.2P(\varepsilon>0.08)=0.2; P(ε=0.05)=0P(\varepsilon=0.05)=0
  • e) ε′\varepsilon' uniform on [−0.05,0.05][-0.05, 0.05]; E(ε′)=0E(\varepsilon')=0; σ(ε′)≈0.0289\sigma(\varepsilon')\approx 0.0289 m
  • f) P(∣ε′∣>0.04)=0.2P(|\varepsilon'|>0.04)=0.2; no: the correction removes the bias, not the spread
a)

The density is constant on [a,b][a, b] and zero elsewhere; the total area c(b−a)=1c(b-a)=1 forces c=1b−ac=\frac{1}{b-a}. It is positive with integral 11: it is a density.

E(U)=∫abxb−a dx=b2−a22(b−a)=(b−a)(b+a)2(b−a)=a+b2E(U)=\int_{a}^{b}\frac{x}{b-a}\,dx=\frac{b^{2}-a^{2}}{2(b-a)}=\frac{(b-a)(b+a)}{2(b-a)}=\frac{a+b}{2}.

E(U2)=∫abx2b−a dx=b3−a33(b−a)=a2+ab+b23E(U^{2})=\int_{a}^{b}\frac{x^{2}}{b-a}\,dx=\frac{b^{3}-a^{3}}{3(b-a)}=\frac{a^{2}+ab+b^{2}}{3}, by b3−a3=(b−a)(a2+ab+b2)b^{3}-a^{3}=(b-a)(a^{2}+ab+b^{2}).

V(U)=E(U2)−E(U)2=4a2+4ab+4b2−3a2−6ab−3b212=a2−2ab+b212=(b−a)212V(U)=E(U^{2})-E(U)^{2}=\frac{4a^{2}+4ab+4b^{2}-3a^{2}-6ab-3b^{2}}{12}=\frac{a^{2}-2ab+b^{2}}{12}=\frac{(b-a)^{2}}{12}.

The formula V=E(X2)−E(X)2V=E(X^{2})-E(X)^{2} proved in the discrete case in exercise 2 is proved the same way in the continuous case, by replacing the sum with the integral.

b)

f(x)=10.1−0=10 m−1f(x)=\frac{1}{0.1-0}=10\ \mathrm{m^{-1}} for 0≤x≤0.10\le x\le 0.1, and 00 elsewhere.

This is not a contradiction: 1010 is a density, a probability PER METRE. The only constraint is on the area, and 10×0.1=110\times 0.1=1. A density exceeds 11 as soon as the support is shorter than one unit.

Pitfall: rejecting this model because “a probability cannot exceed 11”. No probability equals 1010 here.

c)

By a) with a=0a=0, b=0.1b=0.1: E(ε)=0.05E(\varepsilon)=0.05 m and V(ε)=0.0112V(\varepsilon)=\frac{0.01}{12}, so σ(ε)=0.112≈0.0289\sigma(\varepsilon)=\frac{0.1}{\sqrt{12}}\approx 0.0289 m.

Interpretation: the device underestimates the depth by 55 cm on average. Truncation is not rounding: its errors are all positive, they never cancel out.

d)

P(ε>0.08)=∫0.080.110 dx=10×0.02=0.2P(\varepsilon>0.08)=\int_{0.08}^{0.1}10\,dx=10\times 0.02=0.2: the area of a rectangle, that of the dark band in the figure of the solution.

P(ε=0.05)=0P(\varepsilon=0.05)=0: continuous variable, no isolated value carries any probability.

e)

If ε\varepsilon is uniform on [0,0.1][0, 0.1], then ε−0.05\varepsilon-0.05 takes its values in [−0.05,0.05][-0.05, 0.05] with a density that is still constant: ε′\varepsilon' is uniform on [−0.05,0.05][-0.05, 0.05], dashed in orange on the figure.

E(ε′)=E(ε)−0.05=0E(\varepsilon')=E(\varepsilon)-0.05=0: the bias is gone.

σ(ε′)=σ(ε)≈0.0289\sigma(\varepsilon')=\sigma(\varepsilon)\approx 0.0289 m, by σ(X+b)=σ(X)\sigma(X+b)=\sigma(X).

f)

P(∣ε′∣>0.04)=P(ε′<−0.04)+P(ε′>0.04)=10×0.01+10×0.01=0.2P(|\varepsilon'|>0.04)=P(\varepsilon'<-0.04)+P(\varepsilon'>0.04)=10\times 0.01+10\times 0.01=0.2.

The spread has not decreased: V(ε−0.05)=V(ε)V(\varepsilon-0.05)=V(\varepsilon), the property V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X) with a=1a=1 (exercise 2). The correction recentres the errors around zero; only a finer device, for instance to the centimetre, would reduce σ\sigma.

Pitfall: confusing accuracy and precision. Correcting the bias makes the measurement accurate on average; the precision, measured by σ\sigma, has stayed the same.

−0.1−0.050.050.10.1524681012εε′ = ε − 0.050.2error (m)density (m⁻¹)

Exercise 7: Integration by parts and improper integrals: the dispersal distance of yellow birch seeds

10 answers to check

An isolated yellow birch in the middle of a logging cut disperses its seeds by wind. Let XX be the distance, in metres, between the trunk and the point where a seed lands. A forest ecology team adopts the density model

f(x)=c x e−x/5f(x)=c\,x\,e^{-x/5} for x≥0x\ge 0, and f(x)=0f(x)=0 for x<0x<0.

The factor xx reflects the fact that few seeds fall right below the trunk, since the wind carries them away; the exponential, that very long distances are rare. You may use without proof that lim⁡A→+∞Ane−A/5=0\lim_{A\to+\infty}A^{n}e^{-A/5}=0 for every integer n≥0n\ge 0. The figure shows ff with the value of cc found in a).

5101520253035400.010.020.030.040.050.060.070.08X > 20x (m)f(x)
  • a) Using integration by parts, show that ∫0Ax e−x/5 dx=25−(5A+25) e−A/5\int_{0}^{A}x\,e^{-x/5}\,dx=25-(5A+25)\,e^{-A/5} for every A>0A>0. Deduce that c=125c=\frac{1}{25}.
  • b) Find by differentiation the most probable distance, that is the mode of XX.
  • c) Deduce from a) that F(x)=1−(1+x5)e−x/5F(x)=1-\left(1+\frac{x}{5}\right)e^{-x/5} for x≥0x\ge 0. Compute P(X≤5)P(X\le 5) and P(X>20)P(X>20).
  • d) With a second integration by parts, show that ∫0+∞x2e−x/5 dx=250\int_{0}^{+\infty}x^{2}e^{-x/5}\,dx=250. Deduce the expected value E(X)E(X).
  • e) You may use without proof that ∫0+∞x3e−x/5 dx=3750\int_{0}^{+\infty}x^{3}e^{-x/5}\,dx=3750. Compute V(X)V(X) and σ(X)\sigma(X).
  • f) Compute F(8)F(8) and F(9)F(9), then F(8.3)F(8.3) and F(8.4)F(8.4). Give the median to one decimal place and order the mode, the median and the expected value.

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) ∫0Ax e−x/5 dx=25−(5A+25)e−A/5→25\int_{0}^{A}x\,e^{-x/5}\,dx=25-(5A+25)e^{-A/5}\to 25, so c=125c=\frac{1}{25}
  • b) f′(x)=125(1−x5)e−x/5f'(x)=\frac{1}{25}\left(1-\frac{x}{5}\right)e^{-x/5} vanishes at x=5x=5: mode 55 m
  • c) P(X≤5)=1−2e−1≈0.2642P(X\le 5)=1-2e^{-1}\approx 0.2642; P(X>20)=5e−4≈0.0916P(X>20)=5e^{-4}\approx 0.0916
  • d) ∫0+∞x2e−x/5 dx=10×25=250\int_{0}^{+\infty}x^{2}e^{-x/5}\,dx=10\times 25=250; E(X)=10E(X)=10 m
  • e) E(X2)=150E(X^{2})=150; V(X)=50V(X)=50 m²; σ(X)≈7.07\sigma(X)\approx 7.07 m
  • f) F(8)≈0.4751F(8)\approx 0.4751; F(9)≈0.5372F(9)\approx 0.5372; median ≈8.4\approx 8.4 m; mode 55 << median 8.48.4 << E(X)=10E(X)=10
a)

Let u=xu=x and v′=e−x/5v'=e^{-x/5}, so u′=1u'=1 and v=−5e−x/5v=-5e^{-x/5}:

∫0Ax e−x/5 dx=[−5x e−x/5]0A+5∫0Ae−x/5 dx=−5A e−A/5+25(1−e−A/5)=25−(5A+25) e−A/5\begin{aligned}\int_{0}^{A}x\,e^{-x/5}\,dx&=\left[-5x\,e^{-x/5}\right]_{0}^{A}+5\int_{0}^{A}e^{-x/5}\,dx\\&=-5A\,e^{-A/5}+25\left(1-e^{-A/5}\right)\\&=25-(5A+25)\,e^{-A/5}\end{aligned}

As A→+∞A\to+\infty, A e−A/5→0A\,e^{-A/5}\to 0 and e−A/5→0e^{-A/5}\to 0: the improper integral ∫0+∞x e−x/5 dx\int_{0}^{+\infty}x\,e^{-x/5}\,dx converges and equals 2525.

f≥0f\ge 0, and the condition 25c=125c=1 gives c=125=0.04c=\frac{1}{25}=0.04.

Pitfall: integrating straight “to infinity” by replacing AA with ∞\infty. An improper integral is a LIMIT: compute on [0,A][0, A], then let AA tend to +∞+\infty, citing the given limit.

b)

f′(x)=125(e−x/5−x5e−x/5)=125(1−x5)e−x/5f'(x)=\frac{1}{25}\left(e^{-x/5}-\frac{x}{5}e^{-x/5}\right)=\frac{1}{25}\left(1-\frac{x}{5}\right)e^{-x/5}.

The exponential is strictly positive: f′f' has the sign of 1−x51-\frac{x}{5}, positive before 55, negative after. The maximum is at x=5x=5: the most probable distance is 55 m.

f(5)=525e−1≈0.0736 m−1f(5)=\frac{5}{25}e^{-1}\approx 0.0736\ \mathrm{m^{-1}}, the peak of the figure.

c)

By a) with A=xA=x: F(x)=125(25−(5x+25)e−x/5)=1−(1+x5)e−x/5F(x)=\frac{1}{25}\left(25-(5x+25)e^{-x/5}\right)=1-\left(1+\frac{x}{5}\right)e^{-x/5}.

P(X≤5)=F(5)=1−2e−1≈0.2642P(X\le 5)=F(5)=1-2e^{-1}\approx 0.2642: barely more than one seed in four lands within 55 m.

P(X>20)=1−F(20)=5e−4≈0.0916P(X>20)=1-F(20)=5e^{-4}\approx 0.0916: about 9%9\% of the seeds travel beyond 2020 m, the orange area of the figure.

Check: F(0)=1−1=0F(0)=1-1=0 and F(x)→1F(x)\to 1 as x→+∞x\to+\infty, like every cumulative distribution function.

d)

Let u=x2u=x^{2}, v′=e−x/5v'=e^{-x/5}, so u′=2xu'=2x, v=−5e−x/5v=-5e^{-x/5}:

∫0Ax2e−x/5 dx=−5A2e−A/5+10∫0Ax e−x/5 dx\int_{0}^{A}x^{2}e^{-x/5}\,dx=-5A^{2}e^{-A/5}+10\int_{0}^{A}x\,e^{-x/5}\,dx.

As A→+∞A\to+\infty, A2e−A/5→0A^{2}e^{-A/5}\to 0 and the last integral tends to 2525: ∫0+∞x2e−x/5 dx=10×25=250\int_{0}^{+\infty}x^{2}e^{-x/5}\,dx=10\times 25=250.

E(X)=∫0+∞x f(x) dx=125∫0+∞x2e−x/5 dx=25025=10E(X)=\int_{0}^{+\infty}x\,f(x)\,dx=\frac{1}{25}\int_{0}^{+\infty}x^{2}e^{-x/5}\,dx=\frac{250}{25}=10 m.

e)

E(X2)=125∫0+∞x3e−x/5 dx=375025=150E(X^{2})=\frac{1}{25}\int_{0}^{+\infty}x^{3}e^{-x/5}\,dx=\frac{3750}{25}=150.

V(X)=E(X2)−E(X)2=150−100=50V(X)=E(X^{2})-E(X)^{2}=150-100=50 m² and σ(X)=50≈7.07\sigma(X)=\sqrt{50}\approx 7.07 m.

The standard deviation is of the same order as the mean: seed dispersal is very spread out, as the long tail of the figure suggested.

f)

F(8)=1−2.6 e−1.6≈0.4751F(8)=1-2.6\,e^{-1.6}\approx 0.4751 and F(9)=1−2.8 e−1.8≈0.5372F(9)=1-2.8\,e^{-1.8}\approx 0.5372: the median lies between 88 and 99 m.

F(8.3)=1−2.66 e−1.66≈0.4942F(8.3)=1-2.66\,e^{-1.66}\approx 0.4942 and F(8.4)=1−2.68 e−1.68≈0.5005F(8.4)=1-2.68\,e^{-1.68}\approx 0.5005: the median lies between 8.38.3 and 8.48.4, very close to 8.48.4. To one decimal place, m≈8.4m\approx 8.4 m (more precisely 8.398.39 m).

The equation F(m)=0.5F(m)=0.5 has no algebraic solution: it is bracketed, as here, by the intermediate value theorem (FF is continuous and increasing).

In order: mode 55 m << median ≈8.4\approx 8.4 m << expected value 1010 m. The right tail pulls the expected value beyond the median, as for the hailstones of exercise 4.

5101520253035400.10.20.30.40.50.60.70.80.911.11.2median ≈ 8.4F(5) ≈ 0.264P(X > 20) ≈ 0.092x (m)F(x)

Exercise 8: Five claims to correct

10 answers to check

Each of the following five claims was found in a student's paper. Each one is FALSE. Say why, give the correct statement, and support the correction with a calculation taken from the previous exercises.

  • a) “For the seeds of exercise 5, f(3)≈0.30f(3)\approx 0.30: so 30%30\% of the seeds germinate exactly three days after sowing.”
  • b) “A probability density can never exceed 11.”
  • c) “The expected value of a random variable is its most probable value.”
  • d) “V(−X)=−V(X)V(-X)=-V(X), and V(2.5X+1)=2.5 V(X)+1V(2.5X+1)=2.5\,V(X)+1.”
  • e) “For every random variable, P(X<a)=P(X≤a)P(X<a)=P(X\le a).”

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) P(T=3)=0P(T=3)=0; f(3)f(3) is a density: P(2.95≤T≤3.05)≈0.0296≈f(3)×0.1P(2.95\le T\le 3.05)\approx 0.0296\approx f(3)\times 0.1
  • b) False: the sounder's density is 10 m−110\ \mathrm{m^{-1}}; only the total area equals 11
  • c) False: distances, mode 55 m but E(X)=10E(X)=10 m; eggs, E(X)=5.33E(X)=5.33 is not even a possible value
  • d) V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X): V(1500−X)=0.89V(1500-X)=0.89 and V(2.5X+1)=5.5625V(2.5X+1)=5.5625
  • e) True only in the continuous case; eggs: P(X<5)=0.20≠P(X≤5)=0.55P(X<5)=0.20\ne P(X\le 5)=0.55
a)

False. f(3)f(3) is a DENSITY, in probability per day, not a probability. For a continuous variable, P(T=3)=0P(T=3)=0.

What makes sense is the probability of an interval: P(2.95≤T≤3.05)=F(3.05)−F(2.95)≈0.0296P(2.95\le T\le 3.05)=F(3.05)-F(2.95)\approx 0.0296.

This is roughly f(3)×0.1=0.0296f(3)\times 0.1=0.0296: over a small width hh, P(t≤T≤t+h)≈f(t) hP(t\le T\le t+h)\approx f(t)\,h. Correct statement: “about 3%3\% of the seeds germinate within the tenth of a day centred on the third day”.

b)

False. The error of the sounder in exercise 6 has a density equal to 10 m−110\ \mathrm{m^{-1}} on [0,0.1][0, 0.1], and it is a genuine density: positive, with area 10×0.1=110\times 0.1=1.

Correct statement: a density is non-negative with a total integral equal to 11; its VALUE has no ceiling. It is the probabilities, hence the areas, that cannot exceed 11.

c)

False. The most probable value is the MODE. For the dispersal distances of exercise 7, the mode is 55 m and the expected value 1010 m: twice as much.

For the eggs of exercise 1, E(X)=5.33E(X)=5.33 is not a possible number of eggs; its probability is zero.

Correct statement: the expected value is the weighted average of the values, the average value over a large number of repetitions; it coincides with the mode only in special cases, for example a symmetric density with a single peak.

d)

False twice. The property proved in exercise 2 is V(aX+b)=a2V(X)V(aX+b)=a^{2}V(X).

V(−X)=(−1)2V(X)=V(X)V(-X)=(-1)^{2}V(X)=V(X): for the mutations, V(1500−X)=0.89V(1500-X)=0.89, not −0.89-0.89. A variance is a mean of squares: it is never negative.

V(2.5X+1)=6.25×0.89=5.5625V(2.5X+1)=6.25\times 0.89=5.5625, not 2.5×0.89+1=3.2252.5\times 0.89+1=3.225: the constant spreads nothing, the factor acts squared.

e)

False in general. For the eggs of exercise 1, P(X<5)=0.20P(X<5)=0.20 whereas P(X≤5)=0.55P(X\le 5)=0.55: the difference is the bar P(X=5)=0.35P(X=5)=0.35.

Correct statement: P(X<a)=P(X≤a)P(X<a)=P(X\le a) for a CONTINUOUS variable, because P(X=a)=0P(X=a)=0 (exercise 3, question e); for a discrete variable, the equality fails as soon as aa is a value of XX.

Exercise 9: Full study: the dispersal model against field data, and the buffer zone to protect

13 answers to check

The following summer, the team of exercise 7 counts 400400 yellow birch seedlings around the same isolated tree and measures the distance from each one to the trunk. Assume that every seedling comes from a seed of this tree. The counts by distance class are given below (fictitious data).

The goal is to find out whether the density model f(x)=x25e−x/5f(x)=\frac{x}{25}e^{-x/5}, with cumulative distribution function F(x)=1−(1+x5)e−x/5F(x)=1-\left(1+\frac{x}{5}\right)e^{-x/5} for x≥0x\ge 0, describes these data, then to set the width of a buffer zone around the seed trees. The figure shows the model, cut along the classes of the table.

Distance (m)[0,5)[0, 5)[5,10)[5, 10)[10,15)[10, 15)[15,20)[15, 20)[20,30)[20, 30)3030 or more
Observed count10310312812886864444313188
Model probability0.26420.2642?0.20690.20690.10760.1076?0.01740.0174
Expected count105.7105.7?82.782.743.043.0?6.96.9
51015202530350.010.020.030.040.050.060.070.08x (m)f(x)
  • a) Using FF, compute the two missing probabilities of the model, P(5≤X<10)P(5\le X<10) and P(20≤X<30)P(20\le X<30).
  • b) Compute the two missing expected counts out of 400400 seedlings, then check that the row of expected counts adds up to 400400, up to rounding.
  • c) To compare the data with the density, draw the histogram of frequency densities: count divided by 400400 and by the class width. Compute the height of the classes [5,10)[5, 10) and [20,30)[20, 30), and explain why we divide by the width.
  • d) Find the largest gap, in absolute value, between an observed count and the corresponding expected count. Is the model consistent with the data?
  • e) The management plan calls for a buffer zone of radius dd around each seed tree, receiving 95%95\% of the seeds according to the model. Compute F(23)F(23) and F(24)F(24), then find dd to the nearest tenth of a metre.
  • f) Beyond the minimum of the course framework. Another common model is the exponential distribution with the same mean of 1010 m, for which P(X>x)=e−x/10P(X>x)=e^{-x/10}. Compute the expected count in the class [0,5)[0, 5) and the radius d′d' that receives 95%95\% of the seeds under this model.
  • g) Write the conclusion of the study in three sentences: the model adopted and why, the recommended buffer zone, the limitation of the approach.

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) P(5≤X<10)=2e−1−3e−2≈0.3298P(5\le X<10)=2e^{-1}-3e^{-2}\approx 0.3298; P(20≤X<30)=5e−4−7e−6≈0.0742P(20\le X<30)=5e^{-4}-7e^{-6}\approx 0.0742
  • b) 131.9131.9 and 29.729.7; total 399.9≈400399.9\approx 400
  • c) 128400×5=0.064\frac{128}{400\times 5}=0.064 and 31400×10≈0.0078\frac{31}{400\times 10}\approx 0.0078: the AREA of a rectangle must be the frequency
  • d) 3.93.9 seedlings, class [5,10)[5, 10) (less than 3%3\% of the expected count): consistent
  • e) F(23)≈0.9437F(23)\approx 0.9437; F(24)≈0.9523F(24)\approx 0.9523; d≈23.7d\approx 23.7 m
  • f) 157.4157.4 seedlings expected against 103103 observed; d′=10ln⁡20≈30.0d'=10\ln 20\approx 30.0 m
  • g) Model x25e−x/5\frac{x}{25}e^{-x/5} adopted (gaps of a few seedlings, the exponential predicts 5454 too many near the trunk); buffer zone of about 2424 m; limitation: one tree, one season, comparison without a formal test
a)

P(5≤X<10)=F(10)−F(5)=(1−3e−2)−(1−2e−1)=2e−1−3e−2≈0.3298P(5\le X<10)=F(10)-F(5)=(1-3e^{-2})-(1-2e^{-1})=2e^{-1}-3e^{-2}\approx 0.3298.

P(20≤X<30)=F(30)−F(20)=5e−4−7e−6≈0.0742P(20\le X<30)=F(30)-F(20)=5e^{-4}-7e^{-6}\approx 0.0742.

Whether << or ≤\le is used at an endpoint changes nothing: the model's variable is continuous.

b)

400×0.3298≈131.9400\times 0.3298\approx 131.9 and 400×0.0742≈29.7400\times 0.0742\approx 29.7 (computed with the unrounded probabilities).

Total: 105.7+131.9+82.7+43.0+29.7+6.9=399.9105.7+131.9+82.7+43.0+29.7+6.9=399.9, that is 400400 up to rounding. The six probabilities do add up to 11, since the classes cover [0,+∞)[0, +\infty).

c)

[5,10)[5, 10): 128400×5=0.064 m−1\frac{128}{400\times 5}=0.064\ \mathrm{m^{-1}}. [20,30)[20, 30): 31400×10=0.00775≈0.0078 m−1\frac{31}{400\times 10}=0.00775\approx 0.0078\ \mathrm{m^{-1}}.

We divide by the width so that the AREA of each rectangle is the frequency of the class, just as the area under ff is a probability. Without this division, the class [20,30)[20, 30), twice as wide, would look twice too tall.

The figure of the solution overlays the histogram and the density: both are read in the same unit, m−1\mathrm{m^{-1}}. The last class, with no right endpoint, is not drawn: its 88 seedlings stay in the table.

d)

Gaps: ∣103−105.7∣=2.7|103-105.7|=2.7; ∣128−131.9∣=3.9|128-131.9|=3.9; ∣86−82.7∣=3.3|86-82.7|=3.3; ∣44−43.0∣=1.0|44-43.0|=1.0; ∣31−29.7∣=1.3|31-29.7|=1.3; ∣8−6.9∣=1.1|8-6.9|=1.1.

The largest is 3.93.9 seedlings, in the class [5,10)[5, 10), less than 3%3\% of the expected count. The gaps change sign from one class to the next, with no trend: these are plausible sampling fluctuations.

The model is consistent with the data. The chi-square goodness-of-fit test, in the chapter on regression and the chi-square test, will make this judgment rigorous; here we conclude without a test, and say so.

e)

F(23)=1−5.6 e−4.6≈0.9437F(23)=1-5.6\,e^{-4.6}\approx 0.9437 and F(24)=1−5.8 e−4.8≈0.9523F(24)=1-5.8\,e^{-4.8}\approx 0.9523: dd lies between 2323 and 2424 m.

Narrowing down, F(23.7)≈0.9498<0.95F(23.7)\approx 0.9498<0.95 and F(23.8)≈0.9507>0.95F(23.8)\approx 0.9507>0.95: d≈23.7d\approx 23.7 m.

For a protection zone, round UP: a radius of 2424 m guarantees at least 95%95\% according to the model. Rounding to 2323 m would cover only 94.4%94.4\%.

f)

Exponential: P(X<5)=1−e−0.5≈0.3935P(X<5)=1-e^{-0.5}\approx 0.3935, that is 400×0.3935≈157.4400\times 0.3935\approx 157.4 seedlings expected near the trunk, against 103103 observed: a gap of 5454 seedlings.

e−d′/10=0.05e^{-d'/10}=0.05 gives d′=10ln⁡20≈30.0d'=10\ln 20\approx 30.0 m.

The two models have the same mean, and yet they differ by 66 m on the buffer zone. The exponential puts its maximum right below the trunk and has a heavier tail; the data contradict the first point. Choosing a model means confronting it with the data, not only with the mean.

g)

The density model x25e−x/5\frac{x}{25}e^{-x/5} describes the observed dispersal well: its expected counts differ by at most 44 seedlings from the observations, whereas the exponential distribution with the same mean predicts 5454 too many near the trunk.

According to this model, a buffer zone of radius 2424 m around each seed tree receives at least 95%95\% of the seeds.

This conclusion rests on a single tree, a single season and seedlings rather than seeds; it needs to be confirmed on other trees and by a goodness-of-fit test.

51015202530350.010.020.030.040.050.060.070.080.090.10.11model of exercise 7exponential with mean 10 mx (m)density (m⁻¹)

Exercise 10: Problem: observing once a day turns a continuous duration into a discrete variable

11 answers to check

We return to the germination time TT, in days, of exercise 5, with density f(t)=1108(t−1)(7−t)2f(t)=\frac{1}{108}(t-1)(7-t)^{2} on [1,7][1, 7], expected value 3.43.4 days and variance 1.441.44.

In the laboratory, the technician does not watch the seeds continuously, but examines them once a day, at the time of sowing. A seed that germinates at time TT is recorded as germinated at the first examination that follows, on day NN, the smallest integer greater than or equal to TT. Thus T=2.4T=2.4 gives N=3N=3. The figure cuts the density of TT day by day, and the table gives the cumulative distribution function FF of TT at whole days.

tt11223344556677
F(t)F(t)000.13190.13190.40740.40740.68750.68750.88890.88890.98380.983811
123456780.050.10.150.20.250.30.35N=2N=3N=4N=5N=6N=7t (days)f(t)
  • a) Explain why NN is a discrete variable, and give the number of its possible values.
  • b) Justify that P(N=k)=F(k)−F(k−1)P(N=k)=F(k)-F(k-1). Compute P(N=3)P(N=3) and P(N=4)P(N=4).
  • c) Set up the complete distribution of NN, check that it is a probability distribution, then compute E(N)E(N).
  • d) Compute V(N)V(N) and compare it with V(T)V(T).
  • e) Compute the gap E(N)−E(T)E(N)-E(T). Explain this gap by relating it to exercise 6, then give the estimate of E(T)E(T) that the technician should publish from E(N)E(N).
  • f) Find the median of NN. Does the daily protocol make it possible to tell whether the median of TT is less than 3.53.5 days?
  • g) The laboratory switches to an examination every 1212 hours. Compute F(3.5)F(3.5) and conclude about the median of TT. Write a two-sentence recommendation.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
f)
g)
Show the solution

Answers

  • a) NN takes only whole values: 22, 33, 44, 55, 66, 77, that is 66 values
  • b) {N=k}={k−1<T≤k}\{N=k\}=\{k-1<T\le k\}; P(N=3)≈0.2755P(N=3)\approx 0.2755; P(N=4)≈0.2801P(N=4)\approx 0.2801
  • c) 0.13190.1319; 0.27550.2755; 0.28010.2801; 0.20140.2014; 0.09490.0949; 0.01620.0162, adding up to 11; E(N)≈3.90E(N)\approx 3.90 days
  • d) V(N)≈1.52>V(T)=1.44V(N)\approx 1.52>V(T)=1.44
  • e) Gap ≈0.50\approx 0.50 day: the observation delay, like the sounder's truncation; estimate E(N)−0.5≈3.40E(N)-0.5\approx 3.40 days
  • f) Median of NN: 44; no, we only know that the median of TT is in (3,4)(3, 4)
  • g) F(3.5)≈0.5534>0.5F(3.5)\approx 0.5534>0.5: median of TT less than 3.53.5 days; examine every 1212 h and correct the bias by half a period
a)

NN is a WHOLE number of days: between two consecutive values, there is no other one. It is a discrete variable, built from a continuous variable.

TT is in (1,7](1, 7] (a seed that would germinate exactly at t=1t=1 has probability zero), so N∈{2,3,4,5,6,7}N\in\{2, 3, 4, 5, 6, 7\}: six values.

b)

By definition of NN, N=kN=k exactly when k−1<T≤kk-1<T\le k. So P(N=k)=P(k−1<T≤k)=F(k)−F(k−1)P(N=k)=P(k-1<T\le k)=F(k)-F(k-1).

P(N=3)=0.4074−0.1319=0.2755P(N=3)=0.4074-0.1319=0.2755 and P(N=4)=0.6875−0.4074=0.2801P(N=4)=0.6875-0.4074=0.2801.

Each bar of NN is an AREA of TT: that of a one-day band on the figure. This is the thread of the set, seen in both directions at once.

c)

P(N=2)=0.1319P(N=2)=0.1319, P(N=3)=0.2755P(N=3)=0.2755, P(N=4)=0.2801P(N=4)=0.2801, P(N=5)=0.2014P(N=5)=0.2014, P(N=6)=0.0949P(N=6)=0.0949, P(N=7)=0.0162P(N=7)=0.0162.

They are all positive and their sum is F(7)−F(1)=1F(7)-F(1)=1: this is a probability distribution.

E(N)=2×0.1319+3×0.2755+4×0.2801+5×0.2014+6×0.0949+7×0.0162≈3.90E(N)=2\times 0.1319+3\times 0.2755+4\times 0.2801+5\times 0.2014+6\times 0.0949+7\times 0.0162\approx 3.90 days.

d)

E(N2)=4×0.1319+9×0.2755+16×0.2801+25×0.2014+36×0.0949+49×0.0162≈16.73E(N^{2})=4\times 0.1319+9\times 0.2755+16\times 0.2801+25\times 0.2014+36\times 0.0949+49\times 0.0162\approx 16.73.

V(N)=E(N2)−E(N)2≈16.734−15.214≈1.52V(N)=E(N^{2})-E(N)^{2}\approx 16.734-15.214\approx 1.52, with E(N)E(N) unrounded.

V(N)V(N) slightly exceeds V(T)=1.44V(T)=1.44: rounding to the whole day adds its own spread, of about 112≈0.08\frac{1}{12}\approx 0.08 day², the variance of a uniform distribution on an interval of length 11 (exercise 6).

e)

E(N)−E(T)≈3.9005−3.4=0.50E(N)-E(T)\approx 3.9005-3.4=0.50 day.

The delay R=N−TR=N-T lies between 00 and 11 day, and is spread roughly uniformly: on average, a seed waits half a day before being seen. This is the same bias as the truncation of the sounder in exercise 6, reversed: there, the display rounded down; here, the observation rounds up.

The corrected estimate is E(N)−0.5≈3.40E(N)-0.5\approx 3.40 days, within 0.00050.0005 day of the true value.

Pitfall: publishing 3.93.9 days as the mean germination time. The number measures the protocol as much as the seeds.

f)

P(N≤3)=0.4074<0.5P(N\le 3)=0.4074<0.5 and P(N≤4)=0.6875≥0.5P(N\le 4)=0.6875\ge 0.5: the median of NN is 44.

For TT, we only know that F(3)<0.5<F(4)F(3)<0.5<F(4): its median is in (3,4)(3, 4). The daily protocol cannot place it relative to 3.53.5 days.

g)

With u=2.5u=2.5 in the formula of exercise 5: F(3.5)=112.5−62.5+9.765625108≈0.5534>0.5F(3.5)=\frac{112.5-62.5+9.765625}{108}\approx 0.5534>0.5.

With an examination at t=3.5t=3.5, the team sees that more than half of the seeds have germinated: the median of TT is less than 3.53.5 days (it is about 3.313.31).

Recommendation: examine the seeds every 1212 hours, which locates the median and halves the observation bias. Then publish the mean time corrected by half a period, not the raw mean of the recorded days.

123456780.050.10.150.20.250.30.35E(T) = 3.4E(N) ≈ 3.90k (days)P(N = k)
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.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

This chapter comes back in

The chapters that build on it, later in the year or in the years that follow.

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-sn1-random-variables. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

Looking for a 201-SN1-RE probability and statistics tutor in Montreal?

Get in touch for a first session. Random variables are the chapter where integral calculus meets probability: marks are lost by reading a density as a probability far more often than by integrating.

Site by Studio Squalli