0% found this document useful (0 votes)
22 views12 pages

P2 - Solutions Toledo

stast

Uploaded by

Dat Tran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views12 pages

P2 - Solutions Toledo

stast

Uploaded by

Dat Tran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

P2.

Discrete random variables: solutions


Note: From exercise 10 on, the solutions are written down more briefly. Make sure, that at the exam, you must write down sufficient
intermediate steps such that the reader can understand your way of reasoning. Pay attention during the lectures and practice
sessions on how the solution to an exercise should be written down.

1. Note that X is a discrete random variable.


a. The given equality of probabilities translates into 5a=3a+3b. Moreover, the
sum of all probabilities equals 1, such that 5a+3b=1. Solving the system of
equations leads to a=1/7 and b=2/21.
b. µ=0.(1/7) + 1(1/7)+ … + 4(2/21)=41/21=1.9524.
σ²= (0-1.9524)² (1/7)+… + (4-1.9524)² (2/21)=566/441=1.2834.
Alternatively we can find the same result using the convenience formula
σ²=E(X²)- µ² with E(X²) = 0².(1/7) + 1²(1/7)+ … + 4²(2/21)=107/21. Indeed
107/21-(41/21)²= 566/441.
The standard deviation is the square root of the variance and equals 1.1329.
c. Enter the outcomes in List L1 and the probabilities in list L2, using the list
menu. Determine summary measures using the stat menu – calc – 1-Var Stats
(List: L1, FreqList: L2). From the output, we see that µ=1.9524 (be careful with
the notation) and σ= 1.1329. To determine the variance, you can recall the
standard deviation in the home screen using the menu vars – Statistics, to find
σ²=1.2834.

2.
a. Let Ai be the event that digit i is not equal to 0. Then the requested probability
equals P(A1 and A2 and A3 ). Because the events Ai are independent events, the
probability equals P(A1) P(A2) P(A3)= 0.9³=0.729.
b. The variable Y can take outcomes 0, 1, 2, 3.
 The probability P(Y=0) is determined in a.
 The probability P(Y=3) can be found in the same way to be P(A1C and
A2C and A3C ) =0.1³ = 0.001.
 P(Y=1)=
P((A1C and A2 and A3) or (A1 and A2C and A3) or (A1 and A2 and A3C)).
Using the addition rule for disjoint events we find that P(Y=1) equals
P(A1C and A2 and A3) P(A1 and A2C and A3) P(A1 and A2 and A3C).
Using the rule for independent events again results in 0.1 (0.9)² +
(0.9)(0.1)(0.9) + 0.1 (0.9)²=3*0.1 (0.9)²=0.243.
 In the same way P(Y=2)=3 0.1² 0.9 = 0.027.

Page 1 of 12
The probability distribution of Y now can be summarised as in the following
table:

Note: Once we have discussed binomial distribution, P(Y=k) can be found using binompdf(3, 0.1, k).

c. µY =EY = 0 (0.729) + 1 (0.243) + 2 (0.027) + 3 (0.001). If you would check a


lot of locks, on average the number of '0's on each lock equals 0.3.
Using the convenience formula σ²=E(Y²)- µ² with E(Y²)= 0²(0.729) + 1²(0.243)
+ 2² (0.027) + 3² (0.001)=0.36, the variance becomes 0.36-(0.3)²= 0.27.
The standard deviation σY=sqrt(0.27)=0.5196.

3.
a. Possible outcomes for X are 0, 1, 2, 3, 4, 5 and 6.
13 39
( )( )
For example P(X=1) equals 1
52
5
= 0.3667. In a similar way the other
( )
6
probabilities can be determined :

K 0 1 2 3 4 5 6
P(X=k) 0.1603 0.3677 0.3151 0.1284 0.0260 0.0025 0.0001

b. Hypergeometric distribution: Let a population consist of 𝑁 items, from which


𝑀 < 𝑁 are called successes. A sample of size 𝑛 is taken without replacement.
𝑋 counts the number of successes in the sample, then X~ HG(n, M, N)
𝑀 𝑁−𝑀
( )( )
𝑃(𝑋 = 𝑘) = 𝑘 𝑛−𝑘
𝑁 .
( )
𝑛
In part a., X~ HG(6, 13, 52)

c. In the binomial setting it is assumed that a Bernoulli experiment with


probability p is repeatedly done (n times) in an independent way. In this case,
a card is drawn n=6 times, where it is checked whether it is a club or not. But
these drawls are not independent, since the cards are drawn without
replacement.

d. Now we can use the binomial distribution for Y, the number of club cards out
of 6 cards. Using Y~Bin(n=6, p=1/4), P(Y=k)=binompdf(6,0.25, k).

k 0 1 2 3 4 5 6
P(Y=k) 0.1780 0.3560 0.2966 0.1318 0.0330 0.0044 0.0002

e. The probability distributions are similar.

Page 2 of 12
More general: If the number of successes 𝑀 and the number of failures 𝑁 − 𝑀
in a population of size 𝑁 are both large compared to the sample size 𝒏, then
the number of successes 𝑋 in the sample taken with replacement (𝑋 ∼
ℬ(𝑛, 𝑝 = 𝑀⁄𝑁 )) and the number of successes 𝑌 in the sample taken without
replacement (𝑌 ∼ ℋ𝒢(𝑛, 𝑀, 𝑁)) have almost the same probability
distribution. So for sampling out of a large population, often the binomial
distribution is used.

4. Let X represent the daily demand.


a. mode: outcome 1 occurs the most
b. Based on the cumulative probabilities, we can find Q(p) as the smallest
outcome x, such that P(X≤x) ≥ p

We find min=0, Q1=0, Q2=Med(X)=1, Q3=2, max=4.

Note : The graphical calculator uses another definition


 Enter probability distribution in GC using two lists and immediately read that mode is 1
 Descriptive statistics through 1-var stats and read quartiles.

Page 3 of 12
c. One can manually set up the boxplot.

Note: When using the command Statplot in the GC, the other definition for quartiles is used.

d. E(X) =μ = 0 (0.25) + 1 (0.3) + 2 (0.2) + 3 (0.15) + 4 (0.1) = 1.55


e. First we determine the variance Var(X)= σ²
alternative 1: definition Var(X)=E((X-EX)²)
Var(X) = (0-1.55)² (0.25) + (1-1.55)² (0.3) + … + (4-1.55)² (0.1)=1.6475
alternative 2: convenience formula Var(X)=E(X²)-(EX)²
E(X²) = 0² (0.25) + 1² (0.3) + 2² (0.2) + 3² (0.15) + 4² (0.1) = 4.05
Var(X) = 4.05 -1.55² = 1.6475
Then the standard deviation is the square root of the variance = 1.2835.
f. Enter the outcomes in list L1 and the
Probabilities in list L2 in the GC

Summary measures can be found using the


Stat menu – calc - 1-Var Stats (List: L1, FreqList: L2).
and read the expectation and the standard deviation
(be careful, the sample notation is used for the mean
whereas the population mean is determined)

5. Let X be the return of the portfolio (in percent). Possible outcomes are 9%, -12%,
18%. Each of the outcomes occurs with probability 1/3.
EX = 9 (1/3) -12 (1/3) + 18 (1/3) = 5. On average there is a 5% increase in value.

Page 4 of 12
6.
a. Let Y be the number of boys out of 3. Y ~ Bin(3,0.51).
P(Y=2) = binompdf(3, 0.51, 2) = 0.3823. The function binompdf can be
retrieved in the GC by using DISTR  DISTR.
b. Random experiment: select a random couple with 3 kids and check the gender.
Sample space: {BBB, BBG, BGB, BGG, GBB, GBG, GGB, GGG}
3
Event A: subset of 3 kids with 2 boys {BBG, BGB, GBB }; #A=( ).
2
Using the addition rule for disjoint events results in the probability
P(BBG)+P(BGB)+P(GBB). Each of the three probabilities equals (0.51²)(0.49).
Such that the total probability equals 3(0.51²)(0.49)=0.3823.
8
c. The set of outcomes consists of 28=256 options of which ( ) = 56 with 3 boys.
3
It would be easier to use X, the number of boys out of 8, with X ~ Bin(8,0.51).
P(X=3) = binompdf(8, 0.51,3)= 0.2098.

7. The random variable is 𝑋 ∼ ℬ𝑖𝑛(𝑛 = 100, 𝑝 = 0.2).


a. E[𝑋] = 𝑛𝑝 = 100 × 0.2 = 20 and
Var[𝑋] = 𝑛𝑝(1 − 𝑝) = 100 × 0.2 × 0.8 = 16
Alternatively, the probability distribution for the binomial distribution can be
put in the GC. Summary measures can be found using the STAT – Calc – 1-Var
Stats menu.

b. P[𝑋 = 20] = binompdf(100, 0.2, 20) ≅ 0.09930


c. P[𝑋 ≥ 20] = 1 − P[𝑋 ≤ 19]
= 1 − binomcdf(100, 0.2, 19)
≅ 0.5398;
d. P[𝑋 ≤ 25|𝑋 ≥ 15] = P[15 ≤ 𝑋 ≤ 25]⁄P[𝑋 ≥ 15]
= P[14 < 𝑋 ≤ 25]⁄P[𝑋 > 14]
= (P[𝑋 ≤ 25] − P[𝑋 ≤ 14])⁄(1 − P[𝑋 ≤ 14])
≅ 0.9049;
The functions binompdf and binomcdf are retrieved by using the menu – DISTR.
e. Minimum = 0, Q1 [𝑋] = 17, Q2 [𝑋] = 20, Q3 [𝑋] = 23, and maximum = 100.
For discrete variables, the percentile Q(p) can be found as the smallest
outcome x, for which P(X≤x) ≥ p. To this end we set up a table with cumulative
probabilities in the GC. Enter the function Y=binomcdf(100, 0.2, X) and set up
the table for all outcomes for X, starting at 0.

Page 5 of 12
Quartiles for a binomial distribution can also be obtained with the function
invBinom in the menu DISTR.
Note: In this case, the definition for quartiles as used in the menu STAT- Calc- 1-Var Stats, also provides us with
the same result for the quartiles (note that this is not always the case).

8.
a. The binomial conditions are met:
 Independent trials: In a random sample, whether or not one 18-20 year
old has consumed alcohol does not depend on whether another one has.
 Fixed number of trials: n = 10.
 Only two outcomes at each trial: Bernoulli experiment with outcomes
Consumed (1) or did not consume alcohol (0)
 Probability of success (1) is the same for each trial: p = 0.697.
b. P(X=6) = binompdf(10,0.697, 6) = 0.2029.
c. In the group of 10, the statement “4 are not drinking alcohol” is equivalent to
“6 are drinking alcohol”. The requested probability is thus again
P(X=6)=0.2029.
d. Now, let X be the number people that have consumed alcohol in a group of 5
18-20 year olds. X~Bin(5, 0.697). P(X≤2) = binomcdf(5,0.679,2) = 0.1671.
e. Again X~Bin(5, 0.697). P(X≥1) = 1- P(X≤0) = 1 - binomcdf(5,0.679,0) = 0.9974.
f. Now, let X be the number people that have consumed alcohol in a group of 50
18-20 year olds. X~Bin(50, 0.697).
µ=EX= n p = (50)(0.679) = 34.85
σ²= n p (1-p) = (50)(0.679)(1-0.679) = 10.5596
σ =sqrt(σ²)= 3.2495

Page 6 of 12
9.
a. The binomial conditions are met:
 Independent trials: In a random sample, whether or not an adult has had
chickenpox does not depend on whether another had chickenpox
 Fixed number of trials: n = 100.
 Only two outcomes at each trial: Bernoulli experiment with outcomes had
chickenpox (1) or did not have chickenpox (0)
 Probability of success (1) is the same for each trial: p = 0.9.
b. Let X=number of adults out of 100 that had chickenpox. X ~ Bin(100,0.9).
P(X =97) = binompdf(100,0.9, 97) = 0.0059.
c. In the group of 100, the statement “3 did not have chickenpox” is equivalent to
“97 did have chickenpox”. The requested probability is thus again
P(X =97)=0.0059.
d. Let Y=number of adults out of 10 that had chickenpox. Y ~ Bin(10,0.9)
P(Y ≥ 1)=1- P(Y =0)=1- E-10 ≈ 1.
e. Let V=number of adults out of 10 that did not have chickenpox. V ~
Bin(10,0.1); P(V ≤ 3) = binomcdf (10, 0.1,3) =0.987.
f. Let W=number of adults out of 120 that had chickenpox. W ~ Bin(120,0.9).
µ=EW= n p = (120)(0.9) = 108
σ² = Var(W) = n p (1-p) = (120)(0.9)(1-0.9) = 10.8
σ =sqrt(σ²)= 3.2863

10. 𝑎 = 0.1.

𝑥 10 11 12 13 14 15
P[𝑋 = 𝑥] 0.1 0.1 0.2 0.3 0.2 0.1

a. The mode of 𝑋 is 13.


b. E[𝑋] = 12.7 ; E[𝑋 2 ] = 163.3; Var[𝑋] = 2.01.
c. A sketch of the following graph should be provided.

Page 7 of 12
d. min=10, Q1 [𝑋] = 12, Q2 [𝑋] = 13, Q3 [𝑋] = 14, and max = 15.
A sketch of the following graph should be provided.

e. P[12 ≤ 𝑋 ≤ 14] = 0.7.


f. We first calculate the conditional probabilities
𝑥 12 13 14 15
P[𝑋 = 𝑥|𝑋 ≥ 12] 0.25 0.375 0.25 0.125
E[𝑋|𝑋 ≥ 12]& = 12(0.25) + 13(0.375) + 14(0.25) + 15(0.125) = 13.25
g. The probability distribution of 𝑋 is given by:
𝑥 10 11 12 13 14 15
P[𝑋 = 𝑥] 6𝑎 10𝑎 12𝑎 12𝑎 10𝑎 6𝑎

As an alternative for the manual calculations as in a-f, part g can largely be


solved with the calculator. For this, start by entering the probability table into
your calculator with STAT  EDIT  Edit. Summary measures are obtained
with STAT  CALC  1-Var Stats.

We see that the mode equals 12 and 13, EX=12.5 and Var(X)=1.5²=2.25.
The cumulative probabilities can be found with LIST  OPS  CumSum With
some extra effort, the theoretical distribution can even be drawn (the inequality
≥ can be found with TEST).

Page 8 of 12
From the table based on the cumulative frequencies,
we read that Q1=11, Q2=12, Q3=14. Note that the GC
uses another definition for the quartiles and finds
Q2=12.5 instead. This value is also used in the boxplot
drawn by using STAT PLOT.

Based on the probabilities defined in list L2, we can find that P(12 ≤X≤14)=0.6071
and that P(X≥12)=0.7143. The latter can be used to rescale the probability
distribution for the variable X|X≥12 in list L4. Summary measures are obtained
with STAT  CALC  1-Var Stats, to find that E(X|X≥12)=13.25.

11. If the random variable 𝑋 represents the number of pupils before Harry is
chosen, then the possible values of 𝑋 are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

𝑥 0 1 2 3 4 5 6 7 8 9
P[𝑋 = 𝑥] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
Indeed 𝑋 is uniformly distributed on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. For example, the
probability that 5 pupils are chosen before Harry is chosen is
P[𝑋 = 5] = P[𝐻1𝐶 𝑎𝑛𝑑 𝐻2𝐶 𝑎𝑛𝑑 𝐻3𝐶 𝑎𝑛𝑑 𝐻4𝐶 𝑎𝑛𝑑 𝐻5𝐶 𝑎𝑛𝑑 𝐻6 ]
9 8 7 6 5 1 1
= × × × × × = .
10 9 8 7 6 5 10
Hence, 𝜇 = E[𝑋] = 4.5 and 𝜎 = √Var[𝑋] = √8.25 ≅ 2.8723.

Page 9 of 12
12. Random experiment: select 10 invoices as described.
Random variable X: number of invoices out of 10 without mistakes.
a. Possible outcomes for X: {0, 1, 2, 3}.
𝑥 0 1 2 3
P[𝑋 = 𝑥] 1/6 1/2 3/10 1/30
Note: This is the probability distribution of a hypergeometric distribution : e.g.
4 6
( )( )
P(X=1)= 10 =4(15)/120
1 2
= 0.5
( )
3
Since the selection of the 10 invoices is done without replacement we can not
rely on the binomial distribution.

b. E(X)= =1.2.
E(X²) = 2.
Var(X) = 0.56 and σX=sqrt(0.56)=0.7483.

13.
a. {1, 2, 3, … }.
b. • P(X =1)=0.1 ,
 P(X = 2)= 0.09
 P(X = 3)= 0.081.
c. P(X=x)=0.9x-1 0.1 for x=1, 2, 3, … .
d. P(X≤20) = 1- P(X>20) = 0.8784.
14. The number of correct answers out of 40 is 𝑋 ∼ ℬ𝑖𝑛(40, 1⁄3).
a. P[𝑋 = 15] ≅ 0.1110;
b. P[𝑋 ≤ 24] ≅ 0.9998;
c. P[5 < 𝑋 < 10] = P[5 < 𝑋 ≤ 9] = P[𝑋 ≤ 9] − P[𝑋 ≤ 5] ≅ 0.09406.

15. Random experiment: play games three times.


Random variables:
 X: number out of 3 games which you win, with outcomes {0, 1, 2, 3}
 Y: total amount ($) won, with possible outcomes {-3, -1, 1, 3}.
Probabilities for Y can be linked to probabilities for X, whit X ~Bin(3,18/38).
 P(Y=-3) = 0.1458.
 P(Y=-1) = 0.3936.
 P(Y= 1) = 0.3543.
 P(Y= 3) = 0.1063.

Page 10 of 12
16. Let’s denote max{𝑋, 𝑌} by Z and |𝑋 − 𝑌| by W.
a.
𝑧 1 2 3 4 5 6
P[𝑍 = 𝑧] 1⁄36 3⁄36 5⁄36 7⁄36 9⁄36 11⁄36
P[𝑍 ≤ 𝑧] 1/36 4/36 9/36 16/36 25/36 1
Mod[𝑍] = 6, Med[𝑍] = 5 E[𝑍] = 116⁄36 ≅ 4.4722, E[𝑍²] = 791⁄36 and
σ[𝑍] = √Var[𝑍] = √2555⁄1296 ≅ 1.4041.

b.
𝑤 0 1 2 3 4 5
P[𝑊 = 𝑤] 6⁄36 10⁄36 8⁄36 6⁄36 4⁄36 2⁄36
Mod[𝑊] = 1, Med[𝑊] = 2, E[𝑊] = 35⁄18 ≅ 1.944, E[𝑊²] = 210⁄36 and
σ[𝑊] = √Var[𝑊] = √665⁄324 ≅ 1.4326.

17. The number of pregnant cows that will give birth by Caesarean section is 𝑋 ∼
ℬ𝑖𝑛(20, 0.32). E[𝑋] = 20 × 0.32 = 6.4 and Mod[𝑋] = 6 (see calculator):

18. Let 𝑋𝑛 ∼ ℬ𝑖𝑛(𝑛, 𝑝 = 0.9) be the number of undamaged bricks in a random


sample of 𝑛 bricks. The condition is P[𝑋𝑛 ≥ 10000] ≥ 0.99, which is equivalent
to P[𝑋 ≤ 9999] ≤ 0.01.
The solution 𝑛 ≥ 11194 can be found with the table of the calculator:

19. Let X be the number of students that will accept the offer out of 2500 admitted
students. X~Bin(2500, 0.7). P(X>1786) = 0.0551.
20. Let X be the number of responses out of 15000 households. X~ Bin(15000,0.09).
P(X ≥ 1500)= 0.0000133.

Page 11 of 12
21. Let X be the number of teenagers out of 10 suffering from arachnophobia.
X ~ Bin(10,0.07).
a. P(X ≥ 1) = 0.5161.
b. P(X = 2) = 0.1234.
c. P(X ≤ 1) = 0.8483
d. One might argument that the camp counselor cannot be sure enough. In 15.1%
(see c.) of the cases there will be more than one arachnophobic teenager.

22.
a. P(1st child has green eyes AND 2nd child has green eyes) = 0.1094.
b. Let Y be the number of children, out of 2, with green eyes. Y~Bin(2, 0.125).
P(Y=1)= 0.2188.
c. Let X be the number of children, out of 6, with green eyes. X~ Bin(6, 0.125).
P(X=2)= 0.1374.
d. P(X≥1) =0.5512.
e. P(1st child has no green eyes AND 2nd child has no green eyes AND 3rd child has
no green eyes AND 4th child has green eyes) = 0.0837.

23. Let 𝐴 be the event where a random sardine is contaminated and 𝐵 the event
where a random person, who ate this sardine, gets stomach aches. .
a. Let X, be the number of contaminated sardines in a can of 50 random sardines.
𝑋 ∼ ℬ𝑖𝑛(50, 0.2). P[𝑋 ≥ 6] =0.9520.
b. Let Y be the number of friends with a stomach ache in a group of 5 friends that
ate a sardine. 𝑌 ∼ ℬ𝑖𝑛(5, 𝑝).
p= P[𝐴 𝑎𝑛𝑑 𝐵] = 0.14.
P[𝑌 ≥ 1] == 1 − 0.865 ≅ 0.5296.
c. P[𝐴𝐶 |𝐵 𝐶 ] ≅ 0.9302.
Note: the situation can be illustrated using a probability tree.

d. Let 𝑊 ∼ ℬ𝑖𝑛(34, 0.8) be the number of noncontaminated sardines among the


first 34 checked (random) sardines.
P(W=31 AND 35th sardine is not contaminated) = 0.03793.

Page 12 of 12

You might also like