Lecture Note-TKD-2
Lecture Note-TKD-2
T K Datta
1 2 3
Red 8 10 7
Ball White 4 6 5
Black 8 6 6
A box is selected at random and a ball is drawn from it. Compute the probability that the ball
drawn is white.
Solution: E1: Box 1 is selected, E2: Box 2 is selected, E3: Box 3 is selected and W: a white ball
is drawn.
P(W) = P(E1) P(W/E1) + P(E2) P(W/E2) + P(E3) P(W/E3)
= 1/3* 4/20 + 1/3*6/22 + 1/3*5/18 = 0.2502.
Example 1: The probability is 2% that an electrical connector that is kept dry fails during the
warranty period of a portable computer. If the connector is wet, then the probability of failure
1
Applied Statistics -Notes-2 Dr. T K Datta
during warranty period is 6%. The 90% of the connector are kept dry and the remaining 10%
are wet. A randomly selected connector fails during the warranty period.
a) What is the probability that it was dry?
b) What is the probability that it was wet?
Solution: : Define: E1 – connector is kept dry; E2 – the connector is wet; F – the connector
fails.
To find P(F).
Given: P(E1) = 0.9, P(E2) = 0.1, P(F/E1) = 0.02 and P(F/E2) = 0.06.
P(F) = P(E1) P(F/E1) + P(E2) P(F/E2) = 0.9*0.02 + 0.1*0.06 = 0.024.
𝑃(𝐸1 )𝑃(𝐹/𝐸1 ) 𝑃(𝐸1 )𝑃(𝐹/𝐸1 )
a) By Bayes’ theorem, P(E1/F) = = 𝑃(𝐸 )𝑃(𝐹/𝐸
𝑃(𝐹) 1 1 )+𝑃(𝐸2 )𝑃(𝐹/𝐸2 )
0.018
= 0.024 = 0.75.
𝑃(𝐸2 )𝑃(𝐹/𝐸2 ) 𝑃(𝐸2 )𝑃(𝐹/𝐸2 )
b) By Bayes’ theorem, P(E2/F) = = 𝑃(𝐸
𝑃(𝐹) 1 )𝑃(𝐹/𝐸1 )+𝑃(𝐸2 )𝑃(𝐹/𝐸2 )
0.006
= 0.024 = 0.25.
Example 2: There are three identical boxes - Box1, Box 2 and Box 3. Each box contains red,
white and black balls. The details are given below:
BOX
1 2 3
Red 8 10 7
Ball White 4 6 5
Black 8 6 6
A box is selected at random and a ball is drawn from it. If the ball drawn is black, compute the
probability that the ball belongs to Box 3.
Solution: E1: Box 1 is selected, E2: Box 2 is selected, E3: Box 3 is selected and B: a black ball
is drawn.
P(B) = P(E1) P(B/E1) + P(E2) P(B/E2) + P(E3) P(B/E3)
= 1/3* 8/20 + 1/3*6/22 + 1/3*6/18 = 0.33535.
By Bayes’ theorem,
𝑃(𝐸3 )𝑃(𝐵/𝐸3 ) 𝑃(𝐸3 )𝑃(𝐵/𝐸3 )
P(E3/B) = 𝑃(𝐸 )𝑃(𝐵/𝐸 )+𝑃(𝐸
=
1 1 2 )𝑃(𝐵/𝐸2 )+𝑃(𝐸3 )𝑃(𝐵/𝐸3 ) 𝑃(𝐵)
= (1/3*6/18)/0.33535 = 0.3313.
2
Applied Statistics -Notes-2 Dr. T K Datta
3
Applied Statistics -Notes-2 Dr. T K Datta
Properties of f(x): Let the discrete random variable X takes on values x1, x2,…,xn, then
1. f(xk) ≥ 0, k = 1, 2, …., n.
2. ∑𝑛𝑖=1 𝑓(𝑥𝑖 ) = 1.
3. 𝑃(𝑥𝑘 ) = 𝑃(𝑋 = 𝑥𝑘 ), k = 1, 2, …., n.
Discrete Probability Distribution: All values of a discrete random variable X with
corresponding probabilities constitutes the probability distribution of that discrete random
variable X. This is the list consisting of all possible X values with corresponding probabilities.
It can be represented by a table consisting of two rows showing the X values and corresponding
probabilities. Sometimes we can represent it by a function of x.
Example 1: Let X is a discrete random variable which can take on values 0, 1, 2, 3 with
corresponding probabilities 0.4, 0.1, 0.2 and 0.3, respectively. We can represent it in tabular
form as:
x 0 1 2 3
f(x) 0.4 0.1 0.2 0.3
This table defines the probability distribution of the discrete random variable x.
𝑥2
Example 2: f(x) = , x = 1, 3, 5.
35
Problem 1(3-15): Verify that the following function f(x) is a probability mass function. Also,
find the requested probabilities.
x -2 -1 0 1 2
f(x) 1/8 2/8 2/8 2/8 1/8
a) 𝑃(𝑋 ≤ 2); b) 𝑃(𝑋 > −2); c) 𝑃(−1 ≤ 𝑋 ≤ 1); d) 𝑃(𝑋 ≤ −1 𝑜𝑟 𝑋 = 2); e) 𝑃(𝑋 <
1 𝑎𝑛𝑑 𝑋 > −1)
Problem 2: Find the value of m for which the following function f(x) defines a probability mass
function.
x 0 1.5 4 4.8 5
f(x) 0.10 0.25 2m 0.41 m
Problem 3 (3-22): An optical inspection system is to distinguish among different part types.
The probability of a correct classification of any part is 0.95. Suppose that three parts are
4
Applied Statistics -Notes-2 Dr. T K Datta
inspected and that the classifications are independent. Let the random variable X denote the
number of parts that are correctly classified. Determine the probability mass function of X.
Solution: Let us define the events:
C: correct part specification
I: incorrect part specification
S = {CCC, CCI, CIC, CII, ICC, ICI, IIC, III}.
The possible values of X are 0, 1, 2, 3.
P(C) = 0.95 and P(I) = 1-0.95 = 0.05.
If f(x) defines the probability mass function of X, then
f(0) = 0.053 = 0.000125, f(1) = 3*0.95*0.052 = 0.007125,
f(2) = 3*0.952*0.05 = 0.135375, f(3) = 0.953 = 0.857375.
x 0 1 2 3
f(x) 0.000125 0.007125 0.135375 0.857375
This can also be defined by
𝑓(𝑥) = 𝐶𝑟3 × 0.95𝑟 × 0.053−𝑟 , 𝑟 = 0, 1, 2, 3.
Problem 4 (3-32): The distribution of the time until change (in days) of a Web site is
approximately in the following table.
Let the random variable X denote the days until change. Determine the pmf of the days until
change.
5
Applied Statistics -Notes-2 Dr. T K Datta
6
Applied Statistics -Notes-2 Dr. T K Datta
[Ans:
a) x: 10 11 12 13 14 15 CDF table
f(x): 0.08 0.23 0.53 0.73 0.93 1
b) E(X) = 10*0.08 + 11*0.15+ 12*0.30 +13*0.20 +14*0.20 +15*0.07
= 0.8+1.65+3.6+2.6+2.8+1.05 = 12.5.
Var(X) = E(X2) – {E(X)}2