Probability and Statistics in Engineering
3rd Assignment
Name
Student ID
Lecturer/TA : Prof. Zheng Zheng/Ms. Jingyi Wang
Problem 3.1
A pair of fair dice is rolled 10 times. Find the probability that “seven” will show at least once!
Answer:
The space of the single roll of two dice consists of the 36 elements 𝑓𝑚 𝑓𝑛 , where 𝑚, 𝑛 =
1,2, … , 6.
The event 𝑋 = {𝑠𝑒𝑣𝑒𝑛} consists of the six elements:
𝑓1 𝑓6 ; 𝑓2 𝑓5 ; 𝑓3 𝑓4 ; 𝑓4 𝑓3 ; 𝑓5 𝑓2 ; 𝑓6 𝑓1
6 1 5
Clearly, we get 𝑃(𝑋) = 36 = 6 and 𝑃(𝑋̅) = 6
Now, we refer to the “Bernoulli Trials” for this problem. As we know that there are three
Assumptions of Bernoulli Trials:
1. Each trial results in one of two possible outcomes, denoted success (S) or failure (F).
2. The probability of S remains constant from trial-to-trial and is denoted by 𝒑. Write 𝒒 =
𝟏 − 𝒑 for the constant probability of F.
3. The trials are independent.
Let 𝑋 denote the total number of successes in the 𝑛 trials. The probability distribution of 𝑋 that
called as binomial probability distribution is given by the following equation:
𝑛!
𝑃(𝑋 = 𝑥) = (𝑝)𝑥 (1 − 𝑝)𝑛−𝑥 , for 𝑥 = 1,2, … , 𝑛
(𝑛 − 𝑥)! 𝑥!
Because we want to obtain the probability that “seven” will show at least once, first we will
start by looking for the probability that “seven” will not show at all as the S outcomes. That
will give us the easier way to get our result.
̅ will occur 10 times equals:
So, if the dice are tossed 𝑛 = 10 times, then the probability that X
10! 5 10 1 0 5 10
𝑃10 (0) = {X occurs 0 times in any order} = ( ) ( ) =( )
(10 − 0)! 0! 6 6 6
Hence, we will get the probability that “seven” will show at least once equals:
5 10
1−( )
6
Problem 3.2
A coin with 𝑃(ℎ) = 𝑝 = 1 − 𝑞 is tossed 𝑛 times. Show that the probability that the number of
heads is even equals 0.5[1 + (𝑞 − 𝑝)𝑛 ]!
Answer:
Let 𝑃(𝑛) be the probability that there is an even number of heads after 𝑛 tossed. So, 1 − 𝑃(𝑛)
is the probability of an odd number of heads after 𝑛 tossed.
The probability of an even number of heads after 𝑛 tossed is 𝑞 times the probability of an even
number of heads after 𝑛 − 1 tossed plus 𝑝 times the probability of an odd number of heads
after 𝑛 − 1 tossed.
So, 𝑃(𝑛) = 𝑞. 𝑃(𝑛 − 1) + 𝑝[1 − 𝑃(𝑛 − 1)]
𝑃(𝑛) = 𝑃(𝑛 − 1)(𝑞 − 𝑝) + 𝑝
𝑃(𝑛) = [𝑃(𝑛 − 2)(𝑞 − 𝑝) + 𝑝](𝑞 − 𝑝) + 𝑝
𝑃(𝑛) = 𝑃(𝑛 − 2). (𝑞 − 𝑝)2 + 𝑝(𝑞 − 𝑝) + 𝑝
𝑃(𝑛) = [𝑃(𝑛 − 3)(𝑞 − 𝑝) + 𝑝](𝑞 − 𝑝)2 + 𝑝(𝑞 − 𝑝) + 𝑝
𝑃(𝑛) = 𝑃(𝑛 − 3)(𝑞 − 𝑝)3 + 𝑝(𝑞 − 𝑝)2 + 𝑝
..
..
..
𝑃(𝑛) = 𝑃(0). (𝑞 − 𝑝)𝑛 + 𝑝[(𝑞 − 𝑝)𝑛−1 + (𝑞 − 𝑝)𝑛−2 + ⋯ + 1]
𝑛
1 − (𝑞 − 𝑝)𝑛
(𝑞
𝑃(𝑛) = 𝑃(0). − 𝑝) + 𝑝 [ ]
1 − (𝑞 − 𝑝)
1 − (𝑞 − 𝑝)𝑛
𝑃(𝑛) = 𝑃(0). (𝑞 − 𝑝)𝑛 + 𝑝 [ ]
(𝑝 + 𝑞) − (𝑞 − 𝑝)
1
𝑃(𝑛) = 𝑃(0). (𝑞 − 𝑝)𝑛 + [1 − (𝑞 − 𝑝)𝑛 ]
2
Because 𝑃(0) = 1, so this reduce to:
1 1 1 1
𝑃(𝑛) = (𝑞 − 𝑝)𝑛 + − (𝑞 − 𝑝)𝑛 = + (𝑞 − 𝑝)𝑛
2 2 2 2
𝟏
𝑷(𝒏) = 𝟐 [𝟏 + (𝒒 − 𝒑)𝒏 ] as required.
Problem 3.4
A fair coin is tossed 900 times. Find the probability that the number of heads is between 420
and 465!
Answer:
As we know, Asymptotic approximation for the binomial random variable:
𝑘2 𝑘2
𝑛
𝑃{𝑘1 ≤ 𝑥 ≤ 𝑘2 } = ∑ 𝑃𝑛 (𝑘) = ∑ ( ) 𝑝𝑘 𝑞 𝑛−𝑘 (∗)
𝑘
𝑘=𝑘1 𝑘=𝑘1
We refer this problem to the Normal Approximation or it is known as “DeMoivre-Laplace
Theorem”.
(𝑘−𝑛𝑝) 2
𝑛 1 −
( ) 𝑝𝑛 𝑞 𝑛−𝑘 ≈ 𝑒 2𝑛𝑝𝑞 ; 𝑝 + 𝑞 = 1 (∗∗)
𝑘 √2𝜋𝑛𝑝𝑞
The ratio of the two sides tends to 1 as 𝑛 → ∞. Thus, if 𝑘1 and 𝑘2 are within or around the
neighbourhood of the interval (𝑛𝑝 − √𝑛𝑝𝑞 , 𝑛𝑝 + √𝑛𝑝𝑞). we can approximate the summation
in (∗) by an integration of the normal density function. In that case, (∗) reduces to:
𝑘2 𝑥2
1 (𝑘−𝑛𝑝)2 1 𝑦2
−
𝑃{𝑘1 ≤ 𝑥 ≤ 𝑘2 } = ∫ 𝑒 2𝑛𝑝𝑞 𝑑𝑥 = ∫ 𝑒 − 2 𝑑𝑦 = 𝐺(𝑥2 ) − 𝐺(𝑥1 )
√2𝜋𝑛𝑝𝑞 √2𝜋
𝑘1 𝑥1
Where 𝐺(𝑥) is defined as Gaussian function.
So, our problem can be solved as follows:
𝑛 = 900 ; 𝑝 = 𝑞 = 0.5 obviously, we get: 𝑛𝑝 = 450 ; √𝑛𝑝𝑞 = 15
𝑘1 = 420 and 𝑘2 = 465
𝑘2
𝑛 𝑘2 − 𝑛𝑝 𝑘1 − 𝑛𝑝
∑ ( ) 𝑝𝑘 𝑞 𝑛−𝑘 = 𝐺 ( )−𝐺( ) = 𝐺(1) − 𝐺(−2)
𝑘 √𝑛𝑝𝑞 √𝑛𝑝𝑞
𝑘=𝑘1
And we have 𝐺(−𝑥) = 1 − 𝐺(𝑥)
Also, the error of Gaussian function:
𝑥
1 𝑦2 1
𝑒𝑟𝑓 𝑥 = ∫ 𝑒 − 2 𝑑𝑦 = 𝐺(𝑥) −
√2𝜋 2
0
Hence,
𝑃{420 ≤ 𝑘 ≤ 465} = 𝐺(1) − (1 − 𝐺(2)) = 𝐺(1) + 𝐺(2) − 1
1 1
𝑃{420 ≤ 𝑘 ≤ 465} = (𝑒𝑟𝑓1 + ) + (𝑒𝑟𝑓2 + ) − 1 = 0.34134 + 0.47726 = 𝟎. 𝟖𝟏𝟖𝟔
2 2
Problem 3.6
If 𝑃(𝐴) = 0.6 and 𝑘 is the number of successes of 𝐴 in 𝑛 trials:
(𝑎) show that 𝑃{550 ≤ 𝑘 ≤ 650} = 0.999 for 𝑛 = 1000
(𝑏) Find 𝑛 such that 𝑃{0.59𝑛 ≤ 𝑘 ≤ 0.61𝑛} = 0.95
Answer:
By using the same method as the previous problem (3.4) above, it will be easy for us to get the
answers as follow:
(𝑎) We have, 𝑛 = 1000 ; 𝑃(𝐴) = 0.6 → 𝑛𝑝 = 600 ; 𝑛𝑝𝑞 = 240
𝑘2 − 𝑛𝑝 𝑘1 − 𝑛𝑝 650 − 600 550 − 600
𝑃{550 ≤ 𝑘 ≤ 650} = 𝐺 ( )−𝐺( )=𝐺( )−𝐺( )
√𝑛𝑝𝑞 √𝑛𝑝𝑞 √240 √240
1
= 𝐺(3) − 𝐺(−3) = 𝐺(3) − (1 − 𝐺(3)) = 2𝐺(3) − 1 = 2 (0.49865 + ) − 1 = 𝟎. 𝟗𝟗𝟕𝟑
2
(𝑏) this problem is related to “The Law of Large Numbers”. According to the relative
frequency interpretation of probability, if an event A with 𝑃(𝐴) = 𝑝 occurs 𝑘 times in 𝑛 trials.
then 𝑘 ≈ 𝑛𝑝. In the following, we rephrase this heuristic statement as a limit theorem.
𝑘1 ≅ 𝑛(𝑝 − 𝜀) ; 𝑘2 ≅ 𝑛(𝑝 − 𝜀)
𝑘 − 𝑛𝑝
≅ 𝜀√𝑛⁄𝑝𝑞
√𝑛𝑝𝑞
By applying that law, we obtain:
𝑝 = 0.6 → 𝑞 = 0.4
0.01𝑛 0.01𝑛 0.01𝑛
𝑃{0.59𝑛 ≤ 𝑘 ≤ 0.61𝑛} = 𝐺 ( ) + 𝐺 (− ) = 2𝐺 ( )−1
√0.24𝑛 √0.24𝑛 √0.24𝑛
𝜀 = 0.01 is obtained from:
0.59𝑛 ≤ 𝑘 ≤ 0.61𝑛 = (𝑘1 ≅ 𝑛(0.6 − 𝜀)) ≤ 𝑘 ≤ (𝑘1 ≅ 𝑛(0.6 + 𝜀))
Hence,
𝑛 𝑛 1
𝑃{0.59𝑛 ≤ 𝑘 ≤ 0.61𝑛} = 2𝐺 (√ ) − 1 = 2 [𝑒𝑟𝑓 (√ ) + ] − 1 = 0.95
2400 2400 2
𝑛
𝑒𝑟𝑓 (√ ) = 0.475 = 𝑒𝑟𝑓 𝑥
2400
From the table above (problem 3.4), we get 𝑥 roughly to 1.96, therefore:
𝑛
√ ≈ 1.96 → 𝑛 = 9219.84 ≈ 𝟗𝟐𝟐𝟎
2400
Problem 3.17
We place at random 200 points in the interval (0,100). Find the probability that in the interval
(0,2) there will be one and only one point (𝑎) exactly (𝑏) using Poisson approximation.
Answer:
Probability 𝑃 that a particular point is in the interval (0,2) obviously equals 0.02.
(𝑎) probability that in the interval (0,2) there will be one and only one point out of 200 points
exactly:
𝑛
𝑃𝑛 (𝑘) = ( ) 𝑝𝑘 𝑞 𝑛−𝑘
𝑘
200 (0.02)1 (0.98)199
𝑃200 (1) = ( ) ≈ 0.0712
1
(𝑏) probability that in the interval (0,2) there will be one and only one point out of 200 points
using Poisson approximation:
𝑛𝑝 = 200(0.02) = 4
𝑛 (𝑛𝑝)𝑘 41
( ) 𝑝𝑘 𝑞 𝑛−𝑘 ≈ 𝑒 −𝑛𝑝 = 𝑒 −4 = 4. 𝑒 −4 ≈ 0.073
𝑘 𝑘! 1!