QM1a
Assignment Solution
1. A person can subscribe to at most 5 different credit cards. Find the total number of ways in
which a person can subscribe to 1 or more of the credit cards. Given that a person has subscribed
to 1 or more cards what is the probability that the person subscribes to exactly 2 credit cards.
Solution
As person can subscribe to at most 5 different credit cards, the number of ways in which a person
can subscribe to 1 or more of the credit card means “to select” 1 or more of the credit card is
equal to
FIRST PART
= 𝒄𝟓𝟏 + 𝒄𝟓𝟐 + 𝒄𝟓𝟑 + 𝒄𝟓𝟒 + 𝒄𝟓𝟓
× ! × × ! × × ! × !
= + + + +1
!× ! !× ! !× ! !
= 5 + 10 + 10 + 5 + 1
= 31
SECOND PART
P = person subscribe to a credit card
(1-P) = person doesn’t subscribe to a credit card and n= 5
x= number of credit card person subscribe
P(X≥1) = person has subscribed to 1 or more cards (CONDITIONAL STATEMENT)
P(X=2) = person can subscribed to exactly 2 cards
( )∩( )
P (X=2|X≥1) =
( )
( )
=
( )
(we can’t directly multiply as per the formula because they are not independent event.)
∗ ( ) ( )
= ∑ )
∗ ∗(
( 𝐵𝑦 𝑡ℎ𝑒 𝑐𝑜𝑛𝑐𝑒𝑝𝑡 𝑜𝑓 𝑃𝐷𝐹 [𝑃(𝑋 = 𝑥 ) = ∑ C ∗ P ∗ (1 − P) )]
∗( ) ( )
= ) ) ) )
∗ ∗( ∗ ∗( ∗ ∗( ∗ ∗( ∗
∗( . ) ( . )
= ∗ . ∗( . ) ∗ . ∗( . ) ∗ . ∗( . ) ∗ . ∗( . ) ∗ .
(If we take probability of whether to take card or not p= 0.3)
= 0.37106
2. A six-faced die has 2 faces numbered 1, 2 faces numbered 2, and the other two faces are
numbered 3 and 4. Assume that all faces are equally likely to occur. If the die is thrown once
write down the sample space. Are the outcomes equally likely? If the die is thrown twice write
down the sample space and find the probability that the sum of the faces is 4.
Solution:
Six faces on the die are 1,1,2,2,3,4.
a) If the die is thrown once, the sample space {1,2 3,4}
b) The outcomes are not equally likely as the numbers 1 and 2 are repeated.
c) If the die is thrown twice, the sample space would be: {(1,1), (1,2), (1,3), (1,4), (2,1), (2,2), (2,3),
(2,4), (3,1), (3,2), (3,3), (3,4), (4,1), (4,2), (4,3), (4,4)}
d) If the die is thrown twice, the probability of sum of the faces being 4 is : (1,3)
Prob. of getting 1 is 2/6=1/3 and Prob. Of getting 3 is 1/6
So joint prob of getting (1,3) is 1/3*1/6= 1/18
Similarly, (3,1): Prob. Of getting 3 is 1/6 and Prob. Of getting 1 is 2/6=1/3
So joint prob. Of getting (3,1) is 1/6*1/3 = 1/18
Now, (2,2): Prob. Of getting 2 is 2/6=1/3 and again prob. Of getting 2 is 2/6=1/3
So, Joint prob of getting (2,2) is 1/3*1/3=1/9
Hence the probability of sum of the faces being 4 is 1/18+1/18+1/9 = 2/9
3. In a factory, there are three machines 1, 2, 3, producing 50%, 30%, 20% respectively of the total
output. Out of the items produced by machine 2, four percent are defectives. The corresponding
figure for machine 3 is 6%. The following is known:
“If an item is drawn at random from the production line and found to be defective then the
conditional probability for this item to be produced by machine 1 is 0.50”.
What is the proportion of defective items among those produced by machine 1?
Solution:
Let M1 be the event that item is produced by Machine 1, P(M1) = 0.5
Let M2 be the event that item is produced by Machine 2, P(M2) = 0.3
Let M3 be the event that item is produced by Machine 3, P(M3) = 0.2
P(Item produced by machine 2 is defective) = P(D | M2) = 0.04
P(Item produced by machine 3 is defective) = P(D| M3) = 0.06
P(Item produced by machine 1 is defective) = P(D| M1) = x (unknown)
P(Item selected at random is defective)= P(D) = P(D|M1) *P(M1)+
P(D|M2)*P(M2)+P(D|M3)*P(M3)
= 0.5*x + 0.3*0.04 + 0.2*0.06
= 0.024 + 0.5x
P(Randomly selected defective item is produced by Machine 1) = P(M1 | D) = 0.5 (Given)
Using Bayes theorem, P(M1|D) = ( P(D| M1) * P(M1) ) / P(D)
0.5 = 0.5*x / (0.024 + 0.5x)
Evaluating the equation we get,
X = 0.048
Answer: 4.8% of items produced by Machine 1 are defectives.
4. An anti-aircraft gun can fire up to a maximum of four shots at an enemy plane moving away
from it. If the probabilities of hitting the plane at the first, second, third and fourth shots are 0.4,
0.3, 0.2 and 0.1 respectively, what is the probability that the gun is able to hit the plane? Given
that the plane is hit, what is the conditional probability that at least three shots are needed for this
purpose?
Solution
Let M be the event of missing the shot and H be the event of hitting the shot
P(H1) = 0.4
P(H2) = 0.3
P(H3) = 0.2
P(H4) = 0.1
There can be following possibilities:
1. H1
2. MH2
3. MMH3
4. MMMH4
P(Gun is able to hit the target) = P(H1) + (MH2) + P(MMH3) + P(MMMH4)
= 0.4 + (0.6*0.3) + (0.6*0.7*0.2) + (0.6*0.7*0.8*0.1)
= 0.6976
P(Three or four shots required | Hit the target) = (0.0336+0.084)/0.6976
= 0.16857
Answer. There is 16.85% that atleast three shots are needed to hit the plane.
5. A manufacturer makes shafts for electric motors. The external diameter is normally
distributed with mean 1 inch and SD .001 inch. The manufacturer purchases
bushings which the shaft passes through. The internal diameter of the hole in the
bushing is normally distributed with mean 1.002 inch and sd .001. When the shaft is
put in the bushing the clearance is defined as the diameter of the hole in the bushing
minus the diameter of the shaft. Negative clearance means the shaft does not fit.
a. For a shaft and bushing selected at random, what is the probability that the shaft
does not fit?
b. To operate properly the clearance should be between .0016 and .0048 inch. What
fraction of the assembled units will be in this range?
c. Suppose the expected diameter of the shaft can be altered by a suitable machine
adjustment. What should be the expected diameter of the shaft so that the
probability of clearance being in the desired range is maximized?
Solution:
Let external diameter of shaft be X and internal diameter of the hole be X
Thus,
X ~ N (1 , (0.001)2 )
Y ~ N (1.002, (0.001)2 )
The clearance is defined as the diameter of the hole in the bushing minus the diameter
of the shaft, thus clearance is X – Y and let C = X – Y
C ~ N( 0.002, 2×10-6)
a. P(shaft doesn’t fit) = P(C ≤ 0 )
=P ≤0
.
=P 𝑧≤
√ ×
.
=P 𝑧≤
.
= P(𝑧 ≤ −1.428 )
= 0.0789
b. P(Clearance is between 0.0016 and 0.0048 inch) = P(0.0016 < C < 0.0048)
. .
∴ P(0.0016 < C < 0.0048) = P( ≤ ≤ )
. . . .
= P( ≤𝑍≤ )
√ × √ ×
= P( -0.2828 ≤ Z ≤ 1.979)
= P(Z≤1.979) – P(Z≤ - 0.2828)
= 0.9756 – 0.3892
= 0.5859
c. Expected diameter of the shaft can be altered by a suitable machine
adjustment – k
X ~ N (1 + k , (0.001)2 ) and thus
C ~ N( 0.002 – k , 2×10-6)
0.0016 0.0032 0.0048
Equating, we get, 0.0032 = 0.002 – k
Thus, k = -0.0012
Thus E( X ) = 1 + (-0.0012) = 0.9988
6. The number of years a radio functions is exponentially distributed with mean = 8
years.
a. What is the probability that it will still be working after 8 years.
b. A person bought this radio who has been using it for the past 10 years, in which
time it has never failed. What is the probability that it will not fail for 8 more years?
Solution
a. Probability that the radio will be working after 8 years :
∞
1
𝑃(𝑋 > 8) = 𝑒 𝑑𝑥
8
∞
1 1
= 𝑒
8 −1
8
= [0 − 𝑒 ]
1
=
𝑒
b. Probability that the radio will not fail for 8 more years:
( ∩
𝑃(𝑋 > 8 + 10|𝑋 > 10) = ( )
𝑃(𝑥 > 8 + 10)
=
𝑃(𝑥 > 10)
= 𝑃(𝑥 > 8)
∞
1
= 𝑒 𝑑𝑥
8
= [0 − 𝑒 ]
1
=
𝑒
7. In a survey, probability that a person responds to a questionnaire is 0.4. Assume that responding
behaviour of each person is independent of others.
a. What is the probability that out of 20 questionnaires at least 12 will be returned?
b. How many questionnaires need to be mailed if we want to ensure that there is a 95%
probability that at least 100 will be returned?
Solution:
a. Probability that at least 12 out of 20 questionnaires will be returned:
P(X>=12) = 1 – P(X < 12) = 1 – [P(X = 0) + … + P(X = 11)] = 1 – 0.97897 = 0.0565
b. Probability
X ~ Bin(n, 0.4)
X ~ N(np, npq) (in approximating the binomial using normal distribution)
X ~ N(0.04n, 0.24n)
P(X ≥ 99.5) = 0.95
. . .
P( ≥ ) = 0.95
√ . √ .
Equating we get,
. .
= -1.6448
√ .
0.16n2 – 80.24933n + 9900.25 = 0
Solving the above equation we get, n = 282.616
∴ n ≈ 283
Hence, if we want to ensure that there is a 95% probability that at least 100 will be returned we
have to mail 283 questionnaires.
8. A coin is tossed 3 times in a row independently. Let us assume that probability of heads = p and
probability of tails=1-p and that these probabilities do not change from one toss to another toss.
a. Write down the sample space for the experiment and the probabilities for each outcome.
b. Write down the values taken by X and Y for each outcome in the sample space.
c. Write down the joint distribution of X and Y.
d. Write down the marginal distributions of X and Y.
e. If p=.5, what is Covariance (X,Y)?
f. If p=.5, are X and Y independent?
Solution
a) Write down the sample space for the experiment and the probabilities for each
outcome.
We define the following random variables:
X= Number of heads minus number of tails.
Y= Minimum (number of heads, number of tails).
P(H) = 𝑝 , P(H) = Probability that head comes up in a toss.
P(T) = (1- 𝑝), P(T) = Probability that tail comes up in to toss.
Sample Space = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇}
It is given that tosses are independent. Hence, the probabilities for each outcomes are as below,
Out Comes Probability
P(HHH) p
P(HTH) p (1- p)
P(HHT) p (1- p)
P(THH) p (1- p)
P(HTT) p (1 − p)
P(THT) p (1 − p)
P(TTH) p (1 − p)
P(TTT) (1 − p)
b) Write down the values taken by X and Y for each outcome in the sample space.
We defined the following random variables:-
X = Number of heads minus number of tails.
Y = Minimum (Number of heads, number of tails).
Out Comes No of No of X Y Probability
Heads Tails
P(HHH) 3 0 3 0 p
P(HTH) 2 1 1 1 p (1- p)
P(HHT) 2 1 1 1 p (1- p)
P(THH) 2 1 1 1 p (1- p)
P(HTT) 1 2 -1 1 p (1 − p)
P(THT) 1 2 -1 1 p (1 − p)
P(TTH) 1 2 -1 1 p (1 − p)
P(TTT) 0 3 -3 0 (1 − p)
c) Write down the joint distribution of X and Y.
Based on answer to 1b, X can take values in {−3, −1,1,3 } and Y can take values in {0,1}
Joint distribution of (X,Y) is given by specifying P(X=k, Y=r) where k can be any value in
{−3, −1,1,3 } and r can be any value in {0,1} . Now,
P(X= -3, Y=0) = P(TTT) = (1 − p)
P(X= -3, Y=1)= 0
P(X= -1, Y=0) = 0
P(X= -1,Y=1) = P(HTT)+P(THT)+P(TTH) = 3p(1 − p)
P(X= 1,Y=0) = 0
P(X= 1,Y=1) = P(HTH)+P(HHT)+P(THH) = 3p (1- p)
P(X= 3,Y=0) = P(HHH) = p
P(X= 3, Y=1) = 0
The joint distribution of X & Y can be summarized as in the table below
X=k
-3 -1 1 3
Y=r 0 (1 − p) 0 0 p
1 0 3p(1 − p) 3p (1- p) 0
d) Write down the marginal distributions of X and Y.
Let marginal distribution of X is,
X=k P(X=k)
-3 (1 − p)
-1 3p(1 − p)
1 3p (1- p)
3 p
Marginal distribution of Y is,
Y=r P(Y=r)
0 (1 − p) + p
1 3p(1 − p) + 3p (1 − p)
e) If p=.5, what is Covariance (X,Y)?
Cov (X, Y) = E X − E(X) (Y − E(Y)
= E(XY) – E(X)E(Y)……..(1)
For p = 0.5, the joint distribution (obtained in 1c) becomes:
X=k
-3 -1 1 3
0 0.125 0 0 0.125
1 0 0.375 0.375 0
So now,
E (X) = (using 1d) = (-3) * .125 + (-1)*.375 + (1)*.375 +3*.125 =0
This also implies E(X)*E(Y)=0
To compute E(XY), the Distribution of XY is as follows.
XY takes value 0 when Y=0, hence has probability =.125+.125= .250
XY takes value -3 when X=-3, Y=1, probability =0
XY takes value -1 when X=-1, Y=1, probability =.375
XY takes value 1 when X=1, Y=1, probability =.375
XY takes value -3 when X=3, Y=1, probability =0
Hence E(XY) = 0*.250 + (-3)*0 + (-1)*.375 +1*.375 + 3* 0 = 0
Cov (X, Y) = E(XY) – E(X)E(Y) = 0
f) If p=.5, are X and Y independent?
Cov (X,Y) = 0 does not imply independence
If X,Y are independent, then P(X=k ,Y =r) = P(X=k)*P(Y=r) must hold for all values of k and r.
Note that P(X=-3, Y=1) = 0, but P(X=-3) = 0.125 and P(Y = 1) = 0.75
So, P(X=-3, Y= ) ≠ P(X=-3)* P(Y = 1)
So, X & Y are not independent
9. A company aims to sell as many CDs as possible over the next 30 days. There are two types of
CDs, viz (i) classical music and (ii) rock music. The company found from the past data that on a
randomly chosen day, the probability distribution of the number of music CDs sold of each type
is as shown below. The sales of CDs across different days and types are independent.
Number of Classical
Music CDs sold in a
day 0 500 1000
Probability 0.1 0.2 0.7
Number of Rock
Music CDs sold in a
day 0 1000 2000
Probability 0.2 0.3 0.5
a. Find the probability distribution of the total number of music CDs (i.e. classical + rock) sold on a
randomly chosen day.
b. What is the expected value and standard deviation of the total number of CDs that will be sold in the next
30 days?
c. Using Central Limit Theorem, find the probability that the company will be able to sell at least
70000 CDs in the next 30 days?
Solution
a. Let X is a Random Variable denotes number of Classical Music CD’s Sold.
Let Y is a Random Variable denotes number of Classical Music CD’s Sold.
Classical
0 500 1000 Rock
Music (x) 0 1000 2000
Music (y)
Probability
0.1 0.2 0.7 Probability
P(X=x) 0.2 0.3 0.5
P(Y=y)
Let z = x+y is a Random Variable denotes total number of Classical + Rock Music CD’s Sold.
Sales of CDs across different days and types are independent,
So P(X=x, Y=y) =P(X=x)*P(Y=y)
P(Z=X+Y) = P(X=x,
X Y
Y=y)
0 0 0.02
0 1000 0.03
0 2000 0.05
500 0 0.04
500 1000 0.06
500 2000 0.1
1000 0 0.14
1000 1000 0.21
1000 2000 0.35
Summarizing the above table we get,
z 0 500 1000 1500 2000 2500 3000
P(Z=z) 0.02 0.04 0.17 0.06 0.26 0.1 0.35
b. What is the expected value and standard deviation of the total number of CDs that will be
sold in the next 30 days?
Solution
From part (a) we know the probability distribution of a single day sales, we can compute Mean
and SD from Part (a).
E (z) = ∑(𝑧) ∗ 𝑃(𝑍 = 𝑧) = 2100
Variance (z) = E (z2) - (E (z)) 2
(z)2 0 250000 1000000 2250000 4000000 6250000 9000000
P(Z=z )2 0.02 0.04 0.17 0.06 0.26 0.1 0.35
E (z) 2 = 5130000, (E(z))2= 4410000 => Var(z) = (5130000)-(4410000) = 720000
SD (z) = 𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒 (𝑧) = √720000= 848.5281
Let t = total sale for next 30 days,
E [t] = 30 * 2100 = 63,000; Var [t] = (30)*Var[z] = 21600000
SD (T) = √21600000 = 4647.58
c. Using Central Limit Theorem, find the probability that the company will be able to sell at
least 70000 CDs in the next 30 days?
Solution
Need to find P(t >=70,000). On observing the data, we know that t can only be a multiple of
500. So, applying a correction factor, we need.
[ ] ,
= 𝑃( ≥ )
[ ] .
,
= 𝑃(𝑍 ≥ )
.
By CLT, Z~N(0,1)
= 𝑃(𝑍 ≥ 1.4523) = 1- 𝑃(𝑍 ≤ 1.4523)
=0.0732
If you did not apply correction factor, you would compute
70,000 − 63000
𝑃(𝑍 ≥ )
4647.58
10. A 6-faced die is independently thrown 10 times. Each throw leads to one of the outcomes viz. 1,
2, 3, 4, 5 or 6, depending on the face that shows up. In each throw, the occurrence of face 2 is
twice as likely as face 1, occurrence of face 3 is thrice as likely as face 1, and in general
occurrence of face i is i-times as likely as face 1, for i=2,3,4,5,6. Define the following random
variables:
X1 = value of the face that shows up in the first throw.
(For example, if face 2 shows up in the first throw, then X1=2. If face 6 shows up in the first
throw, then X1=6). Similarly, X2 = value of the face that shows up in the second throw. In
general, let Xj = value of the face that shows up in the jth throw, for j=1,2,…, 10. Let X= the sum
of the outcomes from the 10 independent throws of the die.
i.e., X= X1+ X2+ … +X10
a. Write down the p.m.f. for the random variable Xj.
b. What is E[Xj] and variance[Xj]
c. What is E[X] and Variance[X]?
d. What is P(X=10)?
Solution
a) Write down the p.m.f. for the random variable Xj.
𝑿 = Value of face that comes up in jth throw of die. It’s pmf is given by:
𝑿𝒋 = k 𝑷(𝑿𝒋 = k)
1 𝟏
𝟐𝟏
2 𝟐
𝟐𝟏
3 𝟑
𝟐𝟏
4 𝟒
𝟐𝟏
5 𝟓
𝟐𝟏
6 𝟔
𝟐𝟏
b) What is E[Xj] and variance[Xj]
E X =∑ X P(X = k)
= 1* + 2* + 3* + 4* + 5* +6*
=
=
EX = 4.33
Now,
Variance X =E (X ) –(E X )
(X = k) P(X = k)
1 1
21
4 2
21
9 3
21
16 4
21
25 5
21
36 6
21
E (X ) = 1* + 4* + 9* + 16* + 25* + 36*.
=
=
E (X ) = 21
So, Now…
Variance X = E (X ) –(E X )
= 21- (4.33)
= 21- 18.74
Variance X = 2.251
c) What is E[X] and Variance[X]?
X = X + X + …+ X = Sum of outcomes from 10 throw of the die
E(X) = E(X ) + E(X ) + …+ E(X )
We know…E (X ) = for j = 1,2,…,10
So, E(X) = 10* E (X )
= 10 *
=
= 43.33
All the throws are independent.
So, Cov (X , X ) = 0 where i≠j
Since all the covariance terms become zero.
Var (X) = Var (X ) + Var (X ) + . . . + Var (X )
Var (X ) = 2.237 When j = 1,2,…,10
Var (X) =10 Var (X )
= 10 * 2.251
= 22.51
d) What is P(X=10)?
For X = 10
Each throw can take a minimum value of 1. Hence the event {X=1} is same as {𝑋 =1,
𝑋 =1,…, 𝑋 =1}
Further, since tosses are independent, P (X=10) = P (𝑋 =1) * P (𝑋 =1) * …..* P (𝑋 =1)
= * *….* (10 times)
=( )