Chapter 2 Pattern
Chapter 2 Pattern
Any subset of the sample space S is known as an event and denoted by E. In last example,
if, E = {(H,H), (H,T)}
Which also implies that P(F|E) = P(F). That is, E and F are independent if F has occurred
does not affect the probability that E occurs. Two events E and F that are not independent
are said to be dependent.
Sample-Point HH HT TH TT
X 2 1 1 0
Discrite Random variable: If the random variables took on either a finite or a countable
number of possible values. Such random variables are called discrete. The example of
discrete random variable are dead/alive, dice, counts, etc. The discrete random variable
is described by the distribution function.
Continuous variable: There also exist random variables that take on a continuum of
possible values. These are known as continuous random variables. The example of
continuous random variable are blood pressure, weight, the speed of a car, the real
numbers from 1 to 6. The continuous variable is described by the probability density
function.
For a discrete random variable X, we define the Probability mass function p(a) of X by
p(a) = P{X=a}
The probability mass function p(a) is positive for at most a countable number of values
of a. A discrete example of rolling a die with the probability mass function (PMF) is
given bellow;
F(b) denotes the probability that the random variable X takes on a value that is less
than or equal to b. Some properties of the cumulative distribution function (cdf) F are
given bellow;
1. F(b) is a non-decreasing function of b
2. Limb -> ∞ F(b) = F(∞) = 1
3. Limb -> -∞ F(b) = F(-∞) = 0
Another probability function is Joint distribution function. If the first feature has the
value x and the second feature has the value of y, then the joint distribution function
of the joint random variable (x, y) is the probability P(x, y) that both x and y occur.
[Collected] Suppose we toss two fair dice. Let E1 denote the event that the sum of the
dice is six and F denote the event that the first die equals four. Is E1 independent of F?
What will happen if E2 be the event that the sum of the dice equals seven?
Solution: Here, for the first question E1 is not independent of F. Because,
P(E1 F) = P({4,2}) = 1/36
And, P(E1) P(F) = 5/36 x 6/36 = 5/216
P(E1 F) ≠ P(E1) P(F)
Again for the second question the answer is Yes!!! E2 is not independent of F. Because,
P(E2 F) = P({4,3}) = 1/36
And, P(E2) P(F) = 6/36 x 6/36 = 1/36
P(E2 F) = P(E2) P(F)
[Ex-2: addition and multiplication rule] Suppose we toss two fair dice. What is the
probability of the event that the sum of the dice is three?
Solution: Having two ways
P(1 and 2) or P(3 and 2)
= P(1) P(2) + P(2) P(1)
= (1/6 x 1/6) + (1/6 x 1/6)
= 1/36 + 1/36
= 1/18
[Ex-3] Suppose a company wants to run two new techniques/events for company’s
improvement which are independent. One is E, the explosion to fracture the strata within
100 meters and other is R, the brine to recover the oil at rate of 50 barrel per day.
Assume that probability of explosion to fracture the strata successfully is 0.8. If explosion
occurred then the probability of R occurring is 0.9 and if explosion is not occurred
successfully then the probability of occurring R is 0.3.
a. What is the probability that explosion and brine are both successful or
both fail?
b. What is the probability of E, given the constraint that only one of two
test was successful?
c. What is the probability of E given that R was successful?
d. If one or more of the test was successful, what is the probability that the
other one was successful?
Solution: Given that,
P(E) = 0.8
P(R|E) = 0.9
P(R|e) = 0.3
The joint events are;
P(ER) = P(E)P(R|E) = 0.8 x 0.9 = 0.72
P(Er) = P(E)P(r|E) = 0.8 x 0.1 = 0.08
P(eR) = P(e)P(R|e) = 0.2 x 0.3 = 0.06
P(er) = P(e)P(r|e) = 0.2 x 0.7 = 0.14
Now, P(R) = P(ER) + P(eR) = 0.72 + 0.06 = 0.78
P(r) = 0.22
[Collected] Letting X denote the random variable that is defined as the sum of two fair
dice; what is the probability mass function?
Solution: Here, X = 2, 3, 4, …,11, 12
P{X=2} = P{(1,1)} = 1/36
P{X=3} = P{(1,2), (2,1)} = 2/36
……………………………………………………………
P{X=11} = P{(5,6), (6,5)} = 2/36
P{X=12} = P{(6,6)} = 1/36
[Collected] The number of patients seen in the hospital in any given hour is a random
variable represented by X. The probability distribution for x is:
x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1
[Collected] Suppose that our experiment consists of tossing 2 fair coins.. Show the
probability mass function and also show the cumulative distribution function for the
number of heads appearing.
Solution: Letting Y denote the number of heads appearing, then Y is a random variable
taking on one of the values 0, 1, 2 with respective probabilities.
P{Y=0} = P{(T,T)} = ¼
P{Y=1} = P{(T,H),(H,T)} = 2/4 = ½
P{Y=2} = P{(H,H)} = ¼
Of course, P{Y=0} + P{Y=1} + P{Y=2} = 1.
0 𝑥<0
1
4
0 ≤𝑥<1
𝑓(𝑥) = 3
1 ≤𝑥<2
4
{1 2 ≤𝑥
[Collected] In a taste test of Pepsi vs Coke, suppose 25% of tasters can correctly identify
which cola they are drinking. If 12 tasters participate in a test by drinking from 2 cups
in which 1 cup contains Coke and the other cup contains Pepsi, what is the probability
that exactly 5 tasters will correctly identify the colas?
Solution: Here x = 5 is a binomial random variable with parameters (n = 12, p = 0.25).
P{x = 5} = (12
5
) (0.25 )5 (1 – 0.25)12-5
P(x = 5) = 0.10324
[Collected] It is known that any item produced by a certain machine will be defective
with probability 0.1, independently of any other item. What is the probability that in a
sample of three items, at most one will be defective?
Solution: If X is the number of defective items in the sample, then X is a binomial
random variable with parameters (3, 0.1). Hence, the desired probability is given by
P{x ≤ 1} = P{x = 0} + P{x = 1}
= (30) (0.1)0 (1 − .1)3-0 + (31) (0.1)1 (1 − .1)3-1
= 1.1.(0.729) + 3.(0.1).(0.81) = 0.972
[Collected] If you toss a coin 5 times, what’s the probability to get exactly 3 heads?
Solution: The Binomial random variable x = 3 with parameters (n = 5, p = 0.5).
P{x = 5} = (53) (0.5 )3 (1 – 0.5)5-3
P(x = 5) = 5/16
[Collected] A coin is tossed 20 times, what’s the probability of getting 2 or fewer heads?
Solution: The Binomial random variable x = 3 with parameters (n = 20, p = 0.5).
P{x ≤ 2} = P{x = 0} + P{x = 1} + P{x = 2}
= (20
0
) (0.5 )0 (1 – 0.5)20 + (20
1
) (0.5 )1 (1 – 0.5)19 + (20
2
) (0.5 )2 (1 – 0.5)18
= 1.8 x 10-4
[Collected] Suppose that the number of typographical errors on a single page of this
Book has a Poisson distribution with parameter λ = 1. Calculate the probability that
there is at least one error on this page?
Solution: First we have to determine the probability that there is no error on this page.
That is;
10
p(x = 0) = 𝑒 −1 = 0.3678
0!
Now the probability that there is at least one error on this page;
p(x ≥ 1) = 1 – p(x = 0)
p(x ≥ 1) = 1 - 0.3678 = 0.632
Solution: The number of α-particles given off will be a Poisson random variable with
parameter λ = 3.2. Hence the desired probability is;
3.20 3.21 3.22
p(x ≤ 2) = 𝑒 −3.2 + 𝑒 −3.2 + 𝑒 −3.2
0! 1! 2!
p(x ≤ 2) = 0.04076 + 0.1304 + 0.2087
p(x ≤ 2) = 0.37988 = 0.38
[Collected] Find the PDF and CDF for uniform random variable.
Solution: We know that a random variable is said to be uniformly distributed over the
interval (0,1) if its probability density function is given by;
1 0<𝑥<1
𝑓(𝑥) = {
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
In general, we say that X is a uniform random variable on the interval (α, β) if its
probability density function is given by;
1
𝛼<𝑥<𝛽
𝑓(𝑥) = {𝛽− 𝛼
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
The cumulative distribution function is easy to compute either by integration of the pdf
or by finding the area of rectangles.
0 𝑥 ≤ 𝛼
𝑥− 𝛼
𝑓(𝑎) = {𝛽− 𝛼 𝛼<𝑥<𝛽
1 𝑥 ≥ 𝛽
[Ex-6] If X is uniformly distributed over (0, 10), calculate the probability that
a. X < 3,
b. X > 7,
c. 0.2 < X < 0.7.
Solution:
3
∫0 𝑑𝑥 3−0
a. P(x < 3) = = = 3/10
10−0 10−0
10
∫7 𝑑𝑥 10−7
b. P(x > 7) = = = 3/10
10−0 10−0
.7
∫.2 𝑑𝑥 .7−.2
c. P(0.2 < x < 0.7) = = = .5/10 = .05
10−0 10−0
[Ex-7] Suppose that the lifetime of a particular type of radioactive atom in years has an
exponential density with B (beta) = 0.01. What is the probability that the atom will decay
within 50 years after 0 years.
Solution: Here,
50
P(0 ≤ x ≤ 50) = ∫0 𝐵𝑒 −𝐵𝑥
= |50
0 −0.01𝑒
−0.01𝑥
[Ex-8] Consider an electrical circuit in which the voltage is normally distributed with
mean 120 and standard deviation 3. What is the probability that the next reading will
be between 119 and 121.
Solution: We know from the standardizing transformation of normal density,
z = (x – u)/σ
So, P(119 ≤ x ≤ 121) = C[(121 -120)/3] – C[(119-120)/3]
= C(0.333) – C(-0.333)
= 0.631 – (1-0.631)
= 0.262
The value 0.631 was obtained by linear interpolation between C(0.33) and C(0.34).
[Ex-9] Suppose that we flip coin A and if the outcome is Head having probability 0.6 we
flip coin B. but is the result of the first coin is tail, we flip the first coin A again. What
are the joint probabilities if the probability of coin B appearing head is 0.3?
Solution: Here,
P(H) = 0.6 and P(T) for coin A.
P(h) = 0.3 and P(t) for coin B.
The joint probability:
P(H,h) = 0.6 x 0.3 = 0.18
P(H,t) = 0.6 x 0.7 = 0.42
P(t,H) = 0.4 x 0.6 = 0.24
P(t,t) = 0.4 x 0.4 = 0.16
[Ex-10] Find the joint probability for the event J, 0.2 ≤ x ≤ 0.3 and 0.4 ≤ y ≤ 0.5 having
the probability density function;
𝟔(𝟏 − 𝒙 − 𝒚) 𝒊𝒇 ≤ 𝒙, 𝟎 ≤ 𝒚 𝒂𝒏𝒅 𝒙 + 𝒚 ≤ 𝟏
𝑷(𝒙, 𝒚) = {
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
Solution: Here,
0.3 0.5
P(J) = ∫0.2 [ ∫0.4 6(1 − 𝑥 − 𝑦)𝑑𝑦] dx
P(J) = 0.018
[Ex-11] Suppose that our experiment consists of tossing two fair coins. Letting Y denote
the number of heads appearing. What is the expected value?
Solution: Here, y denote the random variable with 0, 1, 2
P{Y=0} = ¼, P{Y=1} = ½, P{Y=2} = ¼
E(x) = ∑𝑎𝑙𝑙 𝑥 𝑥𝑖 𝑝(𝑥𝑖 )
E(x) = (0 x ¼ ) + (1 x ½ ) + (2 x ¼ ) = 1
[Collected] Find expected value E[X] where X is the outcome when we roll a fair die.
Solution: Here;
P(1) = p(2) = p(3) = p(4) = p(5) = p(6) = 1/6
E(x) = (1 + 2 + 3 + 4 + 5 + 6)1/6
E(x) = 7/2
[Collected] Consider the following probability distribution and find the expected value
for discrete case.
x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1
Integrating by parts uv
[Ex-15] Suppose that our experiment consists of tossing two fair coins. Letting Y denote
the number of heads appearing. Find the variance?
Solution: Here, y denote the random variable with 0, 1, 2
P{Y=0} = ¼, P{Y=1} = ½, P{Y=2} = ¼
E(x) = ∑𝑎𝑙𝑙 𝑥 𝑥𝑖 𝑝(𝑥𝑖 )
E(x) = (0 x ¼ ) + (1 x ½ ) + (2 x ¼ ) = 1
E(x2) = (0 x ¼ ) + (1 x ½ ) + (4 x ¼ ) = 1.5
Var(x) = E(x2) – [E(x)]2 = 1.5 – 1 = ½
E(x3) = ∫0 𝑥 3
1 1
𝑑𝑥
1−0
E(x3) = ∫0 𝑥 3 𝑑𝑥
1
𝑥4 1
E(x3) = |
4 0
E(x3) = ¼
[Collected] Calculate Var(X) when X represents the outcome when a fair die is rolled.
Solution: Here;
P(1) = p(2) = p(3) = p(4) = p(5) = p(6) = 1/6
E(x) = ∑𝑎𝑙𝑙 𝑥 𝑥𝑖 𝑝(𝑥𝑖 )
E(x) = (1 + 2 + 3 + 4 + 5 + 6)1/6
E(x) = 7/2
E[x2] = (1 + 4 + 9 + 16 + 25 + 36)1/6
E[x2] = 91/6
Now; Var[x] = E[X2] − (E[X])2 [for normal random variable]
Var[x] = 91/6 – (7/2)2
Var[x] = 35/12
Another way, here the value of x are 1, 2, 3, 4, 5, 6 and the mean u = (3+4) = 3.5
Var(x) = ∑𝑎𝑙𝑙 𝑥(𝑥𝑖 − 𝑢)2 𝑝(𝑥𝑖 )
= [ (1-3.5)2 + (2-3.5)2 + (3-3.5)2 + (4-3.5)2 + (5-3.5)2 + (6-3.5)2 ] 1/6
= 35/12
From the definition of expected value and Poisson random variable we have;
𝜆𝑘
Where, the identity ∑∞
𝑘0 = 𝑒𝜆
𝑘!
[Ex-14] Find the variance of uniform random variable with range a and b.
Solution:
[Ex-17] Find the mean and variance for the standard normal distribution.
[Ex-18] Find the mean and variance for the normal distribution.
[Ex-19] Estimate the range of uniform density for the sample value x = 2,3,5,6,8,9,11,12.
[Ex-22/23] Find the maximum likelihood estimated for u and σ2 in normal distribution.
End