Discrete Random Variables Explained
Discrete Random Variables Explained
Chapter 3
(a) The chance a person has 8 epileptic seizures is p(8) = (circle one)
(i) 0.11 (ii) 0.16 (iii) 0.17 (iv) 0.21.
(b) The chance a person has at most 4 seizures is
(i) 0.17 (ii) 0.21 (iii) 0.56 (iv) 0.67.
55
56Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
(c) P (Y ≤ 4) = (circle one) (i) 0.17 (ii) 0.21 (iii) 0.56 (iv) 0.67.
(d) p(2) = (circle one) (i) 0.17 (ii) 0.21 (iii) 0.56 (iv) 0.67.
(e) p(2.1) = (circle one) (i) 0 (ii) 0.21 (iii) 0.56 (iv) 0.67.
(f) P (Y > 2.1) = (circle one) (i) 0.21 (ii) 0.38 (iii) 0.56 (iv) 0.62.
P10
(g) y=0 p(y) = P (Y = 0) + P (Y = 2) + · · · + P (Y = 10) =
(i) 0.97 (ii) 0.98 (iii) 0.99 (iv) 1.
(h) Graph of distribution. Consider the graphs in Figure ??. Which of the
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
three graphs in Figure ??, describe the probability distribution of the num-
ber of seizures? Choose one or more.
(i) (a) (ii) (b) (iii) (c).
(i) Function of distribution. Which one of the following functions describes
the probability distribution of the number of seizures?
i. Function (a).
0.17, if y = 0
P (Y = y) =
0.21, if y = 2
ii. Function (b).
0.18, if y = 4
P (Y = y) =
0.11, if y = 6
iii. Function (c).
0.17, if y =0
0.21, if y =2
0.18, if y =4
P (Y = y) =
0.11, if y =6
0.16, if y =8
0.17, if y = 10
Section 2. The Probability Distribution for a Discrete Random Variable (ATTENDANCE 4)57
2. Flipping a coin. The number of heads, Y , in one flip of a coin, is given by the
following probability function,
4. Flipping until a head comes up. A (weighted) coin has a probability of p = 0.7
of coming up heads (and so a probability of q = 1 − p = 0.3 of coming up tails).
Let Y be the number of flips until a head comes up or until a total of 4 flips
are made.
(a) Head may come up on first flip, p(1) = P {H} = (circle one)
(i) 0.3 (ii) 0.7 (iii) 0.3(0.7) (iv) 0.32 (0.7).
(b) Head may come up on second flip, p(2) = P {T H} = (circle one)
(i) 0.3 (ii) 0.7 (iii) 0.3(0.7) (iv) 0.32 (0.7).
(c) p(3) = P {T T H} = (circle one)
(i) 0.3 (ii) 0.7 (iii) 0.3(0.7) (iv) 0.32 (0.7).
(d) p(4) = P {T T T T, T T T H} = 1 − p(1) − p(2) − p(3) =
(i) 0.027 (ii) 0.063 (iii) 0.210 (iv) 0.700.
(e) The probability distribution of Y is
y 1 2 3 4
p(y) 0.700 0.210 0.063 0.027
(i) True (ii) False
5. Sampling red marbles from an urn. Two marbles are taken, one at a time,
without replacement, from an urn which has 6 red and 10 blue marbles. We
win $2 for each red marble chosen and lose $1 for each blue marble chosen. Let
Y be the winnings.
y -$2 $1 $4
P (Y = y) 0.375 0.500 0.125
(i) True (ii) False
The expected value of a function g of the random variable Y , E[g(Y )], is given by
X
E[g(Y )] = g(y)p(y).
y
The variance, V (Y ), is
1. Expected value: seizures. The probability function for the number of seizures,
Y , of a typical epileptic person in any given year is given in the following table.
y 0 2 4 6 8 10
p(y) 0.17 0.21 0.18 0.11 0.16 0.17
1
The expected value is also called the mean, µ; in other words, E(Y ) = µ. It is, roughly, a
weighted average of the probability distribution.
60Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
(a) Calculating the expected value. The expected value (mean) number of
seizures is given by2
X
E(Y ) = yp(y) = 0(0.17)+2(0.21)+4(0.18)+6(0.11)+8(0.16)+10(0.17) =
y
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
If the expected value is like a fulcrum point which balances the “weight”
of the probability distribution, then the expected value is most likely close
to the point of the fulcrum given in which of the three graphs above?
(i) (a) 9 (ii) (b) 5 (iii) (c) 1.
(c) Expected value is population average, not sample average.
If p(y) is a good representation of population frequency distribution, then
expected value is equal to population mean parameter E(Y ) = µ = 4.78.
(i) True (ii) False
2. Functions of expected value: seizures. The probability mass function for the
number of seizures, Y , of a typical epileptic person in any given year is given
in the following table.
y 0 2 4 6 8 10
p(y) 0.17 0.21 0.18 0.11 0.16 0.17
(a) If the medical costs for each seizure, Y , is $200; in other words, function
g(y) = 200y, the probability distribution for g(y) is:
2
Use your calculator: STAT ENTER; type y, 0, 2, 4, 6 and 8, into L1 and p(y), 0.17, . . . , 0.17,
into L2 ; then STAT CALC ENTER 2nd L1 , L2 ENTER; then read x̄ = 4.78. The x̄ = 4.78 is not the
sample average in this case, but the population average. The calculator has calculated a “weighted”
average using probabilities as weights and, by doing so, weighted average becomes population average
(expected value).
Section 3. The Expected Value of a Random Variable or a Function of a Random Variable (ATTENDANCE
y 0 2 4 6 8 10
g(y) = 200y 200(0) = 0 200(2) = 400 800 1200 1600 2000
p(g(y)) 0.17 0.21 0.18 0.11 0.16 0.17
The expected value (mean) cost of seizures is then given by3
X
E[g(Y )] = E[200Y ] = (200y)p(y) = [0](0.17)+[400](0.21)+· · ·+[2000](0.17) =
y
E[g(Y )] = E[200Y 2 + Y − 5]
= E[200Y 2 ] + E[Y ] − E[5]
= 200E[Y 2 ] + E[Y ] − E[5]
= 200(34.92) + 4.78 − 5 =
3. More functions of expected value: flipping until a head comes up. A (weighted)
coin has a probability of p = 0.7 of coming up heads (and so a probability of
1 − p = 0.3 of coming up tails). This coin is flipped until a head comes up or
until a total of 4 flips are made. Let Y be the number of flips. Recall,
3
Use your calculator: STAT ENTER; type y, 0, 2, 4, 6 and 8, into L1 define g(y) = 200y by
L2 = 200 × L1 , and type p(y), 0.17, . . . , 0.17, into L3 ; then STAT CALC ENTER 2nd L2 , L3
ENTER; then read x̄ = 956.
4
Use your calculator: Define g(y) = y 2 by L2 = L21 then STAT CALC ENTER 2nd L2 , L3
ENTER. There is no ”short–cut” to this calculation, in contrast to the first example involving
g(y) = 200y where E[200Y ] = 200E[Y ].
62Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
y 1 2 3 4
p(y) 0.700 0.210 0.063 0.027
4. Variance and standard deviation: seizures. The probability function for the
number of seizures, Y , of a typical epileptic person in any given year is given
in the following table,
y 0 2 4 6 8 10
p(y) 0.17 0.21 0.18 0.11 0.16 0.17
(circle one) (i) 3.47 (ii) 4.11 (iii) 5.07 (iv) 6.25.
In other words, we expect to see about µ ± σ = 4.78 ± 3.47 seizures
according to the probability distribution given here.
(c) Understanding standard deviation: “dispersion”.
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
(a) seizure distribution (b) another distribution (c) and another distribution
5. Variance and standard deviation: rolling a pair of dice. If the dice are fair, the
distribution of Y (the sum of two rolls of a pair of dice) is
y 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 5 4 3 2 1
P (Y = y) 36 36 36 36 36 36 36 36 36 36 36
6 √
VARS Statistics ENTER σx ENTER 2nd . ENTER; read 3.47.
64Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
σ 2 = V [Y ] = E (Y − µ)2 = E Y 2 − µ2 = 54.83 − 72 ≈
Its expected value (mean), variance and standard deviation are given by,
√
µ = E(Y ) = np, σ 2 = V (Y ) = npq, σ = npq.
(a) If n = 10,
p =0.65 (and so q = 1 − p = 1 − 0.65 = 0.35), y = 4, then
10
p(4) = 0.654 0.356 = (circle one)
4
(i) 0.025 (ii) 0.050 (iii) 0.069 (iv) 0.119.
(2nd DISTR
0:binompdf(10,0.65,4)
ENTER)
10
p(7) = 0.657 0.353 = (circle one)
7
(i) 0.125 (ii) 0.252 (iii) 0.369 (iv) 0.419.
(2nd DISTR 0:binompdf(10,0.65,7) ENTER)
µ = E(Y ) = np = (10)(0.65) =(circle one)
(i) 5.5 (ii) 6.5 (iii) 7.5 (iv) 8.5.
σ 2 = V (Y ) = npq = (10)(0.65)(0.35) =(circle one)
(i) 1.555 (ii) 2.275 (iii)
p 3.565 (iv) 4.575.
p √
σ = V (Y ) = npq = (10)(0.65)(0.35) ≈(circle one)
(i) 1.51 (ii) 2.27 (iii) 3.55 (iv) 4.57.
(b) If n = 11,
p =0.25 (and so q = 1 − p = 1 − 0.25 = 0.75), y = 3, then
11
p(3) = 0.253 0.758 = (circle one)
3
(i) 0.151 (ii) 0.231 (iii) 0.258 (iv) 0.319.
(2nd DISTR 0:binompdf(11,0.25,3) ENTER)
µ = E(Y ) = np = (11)(0.25) =(circle one)
(i) 1.55 (ii) 2.05 (iii) 2.75 (iv) 3.555.
66Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
4. Lawyer. A lawyer estimates she wins 40% (p = 0.4) of her cases. Assume
each trial is independent of one another and, in general, this problem obeys
the conditions of a binomial experiment. The lawyer presently represents 10
(n = 10) defendants.
(a) The tabular form of this distribution is given by,
r 0 1 2 3 4 5 6 7 8 9 10
P (R = r) 0.006 0.040 0.121 0.215 0.251 0.201 0.111 0.043 0.011 0.002 0.000
68Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
p(y)
0.40
0.30
0.20
0.10
0 1 2 3 4 5 6 7 8 9 10
number of cases won, y
10
Use your calculator to construct the entire distribution table: STAT EDIT ENTER; type 0,1,
. . . ,10 into L1 ; define L2 = 2nd DISTR 0:binompdf(10, 0.4, L1 ) ENTER.
11
Use your calculator to draw the distribution: STAT EDIT ENTER; type 0,1, . . . ,10 into L1 ;
define L2 = 2nd DISTR 0:binompdf(10, 0.4, L1 ) ENTER; set up window: WINDOW 0 10 1 -0.1 0.3
0.1 1; pick histogram: 2nd STAT PLOT ENTER pick histogram, make Xlist L1 and Freq L2 ; then
GRAPH TRACE.
Section 5. The Geometric Probability Distribution (ATTENDANCE 4) 69
Match the four items that describe the lawyer example with the four con-
ditions of a binomial experiment.
(d) The chance the first bull’s eye occurs on the eleventh try, y = 11, is
p(11) = q y−1 p = (0.85)11−1 0.15 ≈ (circle one)
(i) 0.01 (ii) 0.02 (iii) 0.03 (iv) 0.04.
(2nd DISTR D:geometpdf(0.15,11) ENTER.)
(e) Expectation. The expected number of attempts until first bull’s eye is
µ = E(Y ) = 1p = 0.15
1
≈ (circle one)
(i) 5.4 (ii) 6.2 (iii) 6.7 (iv) 7.7.
(f) Variance. The variance in the number of attempts until first bull’s eye is
σ 2 = V (X) = pq2 = 1−0.15
0.152
≈ (choose one)
(i) 22.4 (ii) 25.7 (iii) 37.8 (iv) 43.8.
2. More Geometric: Shooting Hoops. There is a 35% (p = 0.35) chance of making
a basket on a free throw. Throws are independent of one another.
(a) The chance that the first basket occurs on the third try is
p(3) = q 2 p = (0.65)20.35 ≈ (circle one)
(i) 0.078 (ii) 0.148 (iii) 0.198 (iv) 0.238.
(b) Chance the first
P basket occurs at most on the third try is
P (Y ≤ 3) = 3y=1 q y−1 p = [(0.65)0 + (0.65)1 + (0.65)2]0.35 ≈ (circle one)
(i) 0.425 (ii) 0.525 (iii) 0.625 (iv) 0.725.
(2nd DISTR D:geometcdf(0.35,3) ENTER.)
(c) Chance the first basket occurs at least on the third try is
P (Y ≥ 3) = 1 − P (Y ≤ 2) = 1 − [(0.65)0 + (0.65)1 ]0.35 ≈ (circle one)
(i) 0.123 (ii) 0.248 (iii) 0.325 (iv) 0.423.
(Subtract 2nd DISTR D:geometcdf(0.35,2) ENTER from one (1).)
Section 6. The Geometric Probability Distribution (ATTENDANCE 4) 71
and its expected value (mean), variance and standard deviation are,
r
r 2 rq rq
µ = E(Y ) = , σ = V (Y ) = 2 , σ = .
p p p2
(a) The chance the second bull’s eye will occur on the first try is, of course,
0%. The chance the second bull’s eye occurs on the second try is equal to
the chance a hit occurs on the first and second try,
p(2) = (0.15)0.15 = (i) 0.0225 (ii) 0.1275 (iii) 0.1385 (iv) 0.1665.
(b) The chance the second, r = 2, bull’s eye occurs on the third, y = 3, try
equals the chance of either a miss and a hit, in that order, or a hit and a
miss, in that order, and then a bull’s eye on the third try, and so (circle
one or more)
i. p(3) = (0.85)(0.15)0.15 + (0.15)(0.85)0.15
ii. p(3) = 2(0.15)20.85 = 0.03825
2
iii. p(3) = (0.15)2 (0.85)1
1
y−1
iv. p(y) = pr q y−r , y = 3, r = 2, p = 0.15
r−1
(c) The chance14 that the second, r = 2, bull’s eye will occur on the fourth,
y = 4, try equals the chance of either a (hit,miss,miss), (miss,hit,miss)
or (miss,miss,hit), and then a bull’s eye occurs on the fourth try, and so
(circle one or more)
i. p(4) = (0.15)(0.85)(0.85)0.15+
+(0.85)(0.15)(0.85)0.15 + (0.85)(0.85)(0.15)0.15
ii. p(4) = 3(0.15)2(0.85)2 = 0.04876875
3
iii. p(4) = (0.15)2 (0.85)2
1
y−1
iv. p(y) = pr q y−r , y = 4, r = 2, p = 0.15
r−1
(d) The chance15 the second, r = 2, bull’s eye occurs on the fifth, y = 5, try is
(circle one or more)
y−1
i. p(y) = pr q y−r , y = 5, r = 2, p = 0.15
r−1
4
ii. p(5) = (0.15)2 (0.85)3
1
iii. p(5) = 4(0.15)2(0.85)3
iv. 0.05527125
14
PRGM NGBINPMF ENTER ENTER (again!) 4 ENTER 2 ENTER 0.15 ENTER.)
15
PRGM NGBINPMF ENTER ENTER (again!) 5 ENTER 2 ENTER 0.15 ENTER.
Section 6. The Geometric Probability Distribution (ATTENDANCE 4) 73
(e) The chance16 the third, r = 3, bull’s eye occurs on the sixth, y = 6, try is
(circle one or more)
y−1
i. p(y) = pr q y−r , y = 6, r = 3, p = 0.15
r−1
5
ii. p(6) = (0.15)3 (0.85)3
2
iii. p(6) = 10(0.15)3(0.85)3
iv. 0.0207267188
(f) The chance17 the fifth, r = 5, bull’s eye occurs on the eleventh, y = 11,
try is (circle one or more)
y−1
i. p(y) = pr q y−r , y = 11, r = 5, p = 0.15
r−1
10
ii. p(11) = (0.15)5 (0.85)6
4
iii. p(11) = 210(0.15)5(0.85)6
iv. 0.0060143562
(g) The chance the 19th bull’s eye occurs on the 31st try is (circle one)
y−1
i. p(y) = pr q y−r , y = 19, r = 31, p = 0.15
r−1
y−1
ii. p(y) = pr q y−r , y = 25, r = 19, p = 0.15
r−1
y−1
iii. p(y) = pr q y−r , y = 31, r = 19, p = 0.85
r−1
y−1
iv. p(y) = pr q y−r , y = 31, r = 19, p = 0.15
r−1
(h) Expectation. The expected number of attempts until the third bull’s eye
3
is µ = E(Y ) = pr = 0.15 ≈ (circle one)
(i) 20 (ii) 26.7 (iii) 33.3 (iv) 37.2.
(i) More expectation. The expected number of attempts until the fourth bull’s
4
eye is µ = E(Y ) = pr = 0.15 ≈ (circle one)
(i) 20 (ii) 26.7 (iii) 33.3 (iv) 37.2.
(j) And yet more expectation. The expected number of attempts until the fifth
5
bull’s eye is µ = E(Y ) = pr = 0.15 ≈ (circle one) (i) 20 (ii) 26.7 (iii)
33.3 (iv) 37.2.
16
PRGM NGBINPMF ENTER ENTER (again!) 6 ENTER 3 ENTER 0.15 ENTER.
17
PRGM NGBINPMF ENTER ENTER (again!) 11 ENTER 5 ENTER 0.15 ENTER.
74Chapter 3. Discrete Random Variables and Their Probability Distributions (ATTENDANCE 4)
(k) Variance. The variance in the number of attempts until third bull’s eye is
σ 2 = V (X) = prq2 = 3(1−0.15)
0.152
≈
(i) 2.4 (ii) 5.7 (iii) 113.3 (iv) 137.2.
(l) More variance. The variance in number of attempts until fourth bull’s eye
σ 2 = V (X) = prq2 = 4(1−0.15)
0.152
≈
(i) 2.4 (ii) 5.7 (iii) 151.1 (iv) 167.2.
(a) The chance the third, r = 3, basket occurs on the second, y = 2, try is
p(2) ≈ (circle one) (i) 0 (ii) 0.148 (iii) 0.198 (iv) 0.223.
(b) The chance the 15th, r = 15, basket occurs on the 50th, y = 50, try is
(circle one)
y−1
i. p(y) = pr q y−r , y = 50, r = 15, p = 0.65
r−1
y−1
ii. p(y) = pr q y−r , y = 25, r = 19, p = 0.15
r−1
y−1
iii. p(y) = pr q y−r , y = 50, r = 15, p = 0.35
r−1
y−1
iv. p(y) = pr q y−r , y = 31, r = 19, p = 0.15
r−1
18
(c) The chance
the7th, r = 7, basket occurs on the 50th, y = 50, try is
50 − 1
p(7) = 0.357 (1 − 0.35)50−7 =
7−1
(i) 0 (ii) 0.00005117 (iii) 0.00006117 (iv) 0.00008117.
(d) Expectation. The expected number of attempts until a second basket is
2
µ = E(Y ) = pr = 0.35 ≈ (circle one)
(i) 5.7 (ii) 6.2 (iii) 6.8 (iv) 7.8.
(e) Variance. The variance in number of attempts until a second basket is
σ 2 = V (X) = prq2 = 2(1−0.35)
0.352
≈ (circle one)
(i) 0.4 (ii) 1.8 (iii) 2.2 (iv) 10.6.
(a) In the “shooting hoops” problem, we have assumed that each attempt is
independent of every other throw and chance of a basket remains constant,
p = 0.35, on every throw.
(i) True (ii) False
18
PRGM NGBINPMF ENTER ENTER (again!) 50 ENTER 7 ENTER 0.35 ENTER.
Section 6. The Geometric Probability Distribution (ATTENDANCE 4) 75