Chapter 6 Random Variable and Probability Distribution 115728
Chapter 6 Random Variable and Probability Distribution 115728
CHAPTER SIX
Random Variable and Probability Distribution
The purpose of this chapter is to introduce you with the
concept of random variable and their probability
distributions.
In a probability distribution, the variables are distributed
according to some definite probability function.
After completing this unit you will be able to:
• define the term random variable
• understand discrete and continuous random variables
• define the term probability distribution
• differentiate between discrete and continuous
probability distributions
• compute the expectedCompile
value of a random variable
By: Bacha E., ASTU, 1
⟹X (HHH) =3
X (HHT) =X (HTH) =X (THH) =2
X (HTT) =X (THT) =X (TTH) =1
X (TTT) =0, the possible values of X are 0,1,2 and 3.
X assumes a specific number of values with some
probabilities.
Random variables are usually denoted with capital
letter X, Y, Z etc, while the values taken by them
are denoted by lower case letters x, y, z etc.
Thus, P (x1 X x2) is the probability that the
random variable X takes values between x1 and x2,
both inclusive Compile By: Bacha E., ASTU, 3
Probability Distribution
Probability distribution is a complete list of all possible
of values of a random variable and their corresponding
probabilities
It describes how the probabilities are distributed over
all possible values.
i) Discrete Probability Distribution (Probability Mass
function (pmf))
If X is a discrete random variable taking at most a
countably infinite number of values x1, x2, …, then P
(xi) = P(X = xi): i= 1, 2 …is called the probability mass
function of random variable X.
The set of ordered pairs {xi, P (xi)} i= 1, 2 … gives the
probability distribution of the random variable X.
Compile By: Bacha E., ASTU, 6
= 𝑓(𝑥) 𝑑𝑥
𝑎
Compile By: Bacha E., ASTU, 8
𝑏
3. P 𝑥 < 𝑏 = 𝑃 𝑥 ≤ 𝑏 = ;∞
𝑓 𝑥 𝑑𝑥
4. The probability that X assumes a value that lies
between a and b is equal to the area under the curve
a and b.
𝑏
That is, P 𝑎 < 𝑥 < 𝑏 =P 𝑎 ≤ 𝑥 ≤ 𝑏 = 𝑎
𝑓 𝑥 𝑑𝑥
5. P 𝑥 = 𝑎 = 0.
𝑓 𝑥 𝑑𝑥 = 𝑓 𝑥 𝑑𝑥 = 2𝑥𝑑𝑥 = 1.
;∞ 0 0
Therefore, 𝑓 𝑥 is a pdf.
0.5 0.5
ii) 𝑃 𝑋 < 0.5 = 0
𝑓 𝑥 𝑑𝑥 = 0
2𝑥𝑑𝑥 = 0.25
iii) Exercise
2. Suppose that X is a continuous random variable
with Pdf
1
𝑓 𝑥 = 6 𝑥 + 𝑘 𝑖𝑓 0 ≤ 𝑥 ≤ 3
0 𝑂𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
a) Find the value of k (Ans. k = 1/12)
b) Find 𝑃(1 ≤ 𝑋 ≤ 2) (Ans. = 1/3)
𝐸 𝑋 =𝜇= 𝑥𝑖 𝑃(𝑥𝑖 )
𝑖<1
Compile By: Bacha E., ASTU, 13
𝐸 𝑋 = 𝑥𝑓(𝑥) 𝑑𝑥
;∞
Some Properties of Expectation
• If X and Y are random variables and k is constants
then:
1. 𝐸(𝑘) = 𝑘, where k is any constant
2. 𝐸 𝑘𝑋 = 𝑘 𝐸(𝑋), where k is any constant
3. 𝐸 𝑋 + 𝑘 = 𝐸(𝑋) + 𝑘
4. 𝐸(𝑋 + 𝑌) = 𝐸(𝑋) + 𝐸(𝑌)
5. 𝐸(𝑋𝑌) = 𝐸(𝑋)𝐸(𝑌), if X, Y are independent random
variables
Compile By: Bacha E., ASTU, 14
Properties of Variances
• For any random variable X and constant k, it can be
shown that
1. 𝑉𝑎𝑟 𝑘𝑋 = 𝑘2𝑉𝑎𝑟 𝑋
2. 𝑉𝑎𝑟(𝑋 ± 𝑘) = 𝑉𝑎𝑟(𝑋) + 0 = 𝑉𝑎𝑟(𝑋)
3. If X and Y are independent random variables, then
𝑉𝑎𝑟(𝑋 ± 𝑌) = 𝑉𝑎𝑟(𝑋) + 𝑉𝑎𝑟(𝑌)
More generally if 𝑋1, 𝑋2 … … , 𝑋𝑘 are independent
random variables, then
Examples:
1. Two fair coins are tossed. Determine the mean and
variance of X, where X is the number of heads that
appear.
Solution: 𝑃 𝑋 = 0 = 𝑃 𝑋 𝑇𝑇 = 14,
𝑃 𝑋 = 1 = 𝑃 𝑋 𝐻𝑇 + 𝑃 𝑋 𝑇𝐻 = 14:14 < 24<0.5
𝑃 𝑋 = 2 = 𝑃 𝑋 𝐻𝐻 = 14
X 0 1 2
P(X) 1 2 1
4 4 4
𝐸 𝑋 = 𝑥𝑃 𝑥 = 0 × 14:1×24:2×14 = 1
1 2 1 6 3
𝐸 𝑋2 = 𝑥 2 𝑃 𝑥 = 02 × + 12 × + 22 × = =
4 4 4 4 2
Compile By: Bacha E., ASTU, 17
3 1
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 2 − 𝐸 𝑋 2
= 2 − 12 = 2
1
𝑆. 𝑑 = 𝑆𝑥 = 𝑉𝑎𝑟(𝑋) = 2
ii) V X = 𝐸 𝑋 2 − 𝐸(𝑋) 2
3
𝐸 𝑋2 = 𝑥 2 𝑓 𝑥 𝑑𝑥
0
3
2 1 35 − 05 𝟐𝟕
= 𝑥 2 𝑥9 𝑑𝑥 = ( =
9 5 𝟓
27 9 2
V X = − 4
= 𝟎. 𝟑𝟒
5
n x n x
P ( x) p q
x
Example: Yes/no outcomes (dead/alive, treated/untreated,
smoker/non-smoker, sick/well, etc.)
Compile By: Bacha E., ASTU, 22
Poisson Distribution
It is a discrete probability distribution which is used in the area of
rare events.
The Poisson distribution counts the number of success in a fixed
interval of time or within a specified region or the number of rare
successes in a very large number of trials
Examples of random variables that usually obey the Poisson
distribution are: the number of car accidents in a day, Arrival of
telephone calls over interval of times, Natural disasters like earth
earthquake, etc.
To apply the Poisson distribution, two conditions must be met:
• The number of success that occurs in any interval is independent of
those that occur in other non-overlapping intervals.
• The probability of a success in an interval is proportional to the size of
the interval.
Compile By: Bacha E., ASTU, 25
Solution:
There are 0.2 accidents per day.
Let X be the random variable, the number of
accidents per day
𝑋~𝑝𝑜𝑖𝑠𝑠 𝜆 = 0.2 , 𝑋 = 0,1,2, …
0.22 𝑒 −0.2
a) 𝑃 𝑋 = 2!
= 𝟎. 𝟎𝟏𝟔𝟒
b) 𝑃 𝑋 ≥ 3 = P(X = 3) + P(X = 4) + P(X = 5) +...
= 1− *P(X = 0) + P(X = 1) + P(X = 2)+
= 1 − [0.8187 + 0.1637 + 0.0164]
= 𝟎. 𝟎𝟎𝟏𝟐
c) The Variance of X is ____________.
Compile By: Bacha E., ASTU, 27
Normal Distribution
• The most important continuous probability
distribution in the entire field of statistics is the
normal distribution.
• It is widely used in statistical inference.
• The graph of a normal distribution is called the
normal curve.
Normal curve
x
Compile By: Bacha E., ASTU, 30
Normal distribution…
The probability density function (pdf) of normally
distributed random variable X is:
1 1 (𝑥;𝜇) 2
𝑓 𝑥 = 𝑒; for −∞ < 𝑥 < ∞,
2𝜋𝜎 2 2 𝜎2
−∞ < 𝜇 < ∞, 𝜎 > 0, 𝑒 = 2.7183, 𝜋 = 3.1416
Where 𝐸 𝑋 = 𝜇 & 𝑉𝑎𝑟 𝑋 = 𝜎 2
𝜇 & 𝜎 2 are parameters of the normal distribution
If 𝑋 has a Normal distribution with mean μ and
variance 𝜎 2 , write 𝑋 ∼ 𝑁 𝜇, 𝜎 2 .
The shape and location of the normal curve
changes as the mean and standard deviation
change.
Compile By: Bacha E., ASTU, 31
Normal distribution…
Before looking at the process for finding the probabilities
under the normal curve, it is somewhat useful to look at
the Empirical Rule that gives approximate values for
these areas.
The Empirical Rule for any normal distribution:
0, s1
0.50
0.50
1, s1
2, s1
0.40
0.40
3, s1
0.30
0.30
1, s1
0.20
0.20
0.10
0.10
0.00
0.00
-5.0
-5.0 -4.0
-4.0 -3.0
-3.0 -2.0 -1.0 0.0 1.0
1.0 2.0
2.0 3.0
3.0 4.0
4.0 5.0
5.0 6.0
6.0
Note 7 of 5E
𝑖𝑖𝑖) 𝑃(𝑧 < 1.96) = 𝑃(𝑧 < 0) + 𝑃(0 < 𝑧 < 1.96)
= .5 + .4750 = .9750
𝑖𝑣) 𝑃(𝑧 < −1.96) = 𝑃(𝑧 > 1.96) = 0.5 − .4750
= .0250
𝑣) 𝑃(−1.96 < 𝑧 < 1.96) = 𝑃(𝑧 < 1.96) − 𝑃(𝑧
< −1.96)
= .9750 − .0250 = .9500
Compile By: Bacha E., ASTU, 40
• To find the area to the left of z, find the area that corresponds to
z in the Standard Normal Table.
z
0 1.23
• 𝑃 𝑍 < 1.23 = 𝑃 𝑍 < 0 + 𝑃 0 < 𝑍 < 1.23
= 0.5 + 0.3907 = 𝟎. 𝟖𝟗𝟎𝟕
• Find the area under the standard normal distribution which lies
i) Between 0 & 0.96
Solution:
𝑨𝒓𝒆𝒂 = 𝑷 𝟎 < 𝒁 < 𝟎. 𝟗𝟔 = 𝟎. 𝟑𝟑𝟏𝟓
Cont…
v) Between -0.67 and 0.75
Solution:
𝑃 −0.67 < 𝑍 < 0.75
= 𝑃 −0.67 < 𝑍 < 0 + 𝑃 0 < 𝑍 < 0.75
= 0.2486 + 0.2734 = 𝟎. 𝟓𝟐𝟐𝟎
vi) Between 0.25 and 1.25
Solution:
𝑃 0.25 < 𝑍 < 1.25
= 𝑃 0 < 𝑍 < 1.25 − 𝑃 0 < 𝑍 < 0.25
= 0.3944 − 0.0987 = 𝟎. 𝟐𝟗𝟓𝟕
Compile By: Bacha E., ASTU, 44
𝑋;𝜇 76.4;𝜇
b) 𝑃 𝑋 > 76.4 = 𝑃 >
𝜎 𝜎
76.4 − 80
=𝑃 𝑍> = 𝑃 𝑍 > −0.75
4.8
= 𝑃 𝑍 > 0 + 𝑃 0 < 𝑍 < 0.75
= 0.50 + 0.2734 = 𝟎𝟕𝟕𝟑𝟒
81.2;𝜇 𝑋;𝜇 86.0;𝜇
c) 𝑃 81.2 < 𝑋 < 86.0 = 𝑃 < <
𝜎 𝜎 𝜎
81.2 − 80 86.0 − 80
=𝑃 <𝑍<
4.8 4.8
= 𝑃 0.25 < 𝑍 < 1.25
= 𝑃 0 < 𝑍 < 1.25 − 𝑃 0 < 𝑍 < 0.25
= 0.3934 − 0.0987 = 𝟎. 𝟐𝟗𝟓𝟕
Compile By: Bacha E., ASTU, 47