Chapter 5e

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

CHAPTER-FIVE
5. One-dimensional Random Variables
5.1 Random variable: definition and distribution function
Definitions:
 Variable: is any characteristic or attribute that can assume different values.
 A random variable (r.v): is a variable whose values are determined by chance.
Definition: A random variable is a numerical description of the outcomes of an experiment or a
numerical valued function defined on sample space, usually denoted by capital letters.
If X is a random variable, then it is a function from the elements of the sample space to the set of
real numbers. I.e. X is a function X: S → R
 Discrete variables: are variables whose values are determined by counting.
 Continuous Variables: are variables whose values are determined by measuring rather than
counting.
A probability distribution is a description of the value a random variable can assume and the
corresponding probabilities of the values. It is often displayed in a graph, table, or formula.
Notation:
 Random Variables are usually denoted by X or Y.
 The probability a random variable 𝑋 takes on a value 𝑥𝑖 is:
𝑃𝑋 (𝑋 = 𝑥𝑖 ) = 𝑃(𝑋 = 𝑥𝑖 ) = 𝑃(𝑥𝑖 ) 𝑓𝑜𝑟 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟. 𝑣 𝑎𝑛𝑑 𝑓𝑋 (𝑥) = 𝑓(𝑥) 𝑓𝑜𝑟 𝑐𝑜𝑛𝑡𝑖𝑛𝑜𝑢𝑠 𝑟. 𝑣.
 A Probability Distribution, then, is a specification of 𝑃(𝑥𝑖 ) for each 𝑥𝑖 that is an outcome of
a procedure. As mentioned before, this could be done in a graph, table, or formula.
5.2 Discrete random variables
Definition: Let 𝑋 be a r.v. If the number of possible values of 𝑋 is finit or countably infinit, we
call 𝑿 a discrete r.v. That is, the possible values of 𝑋 may be listed as 𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛 , … in the
finite case the list terminates and in the countably infinite case the list continues indefinitely.
5.2.1 Probability Mass Function (Discrete Probability Distribution):
Definition: If 𝑋 is a discrete 𝑟. 𝑣 with distinct values 𝑥1 , 𝑥2 , … , 𝑥𝑛 , …, then the function
𝑝(𝑥)defined as:
𝑃(𝑋 = 𝑥𝑖 ) = 𝑝𝑖 , 𝑖𝑓 𝑥 = 𝑥𝑖
𝑝𝑋 (𝑥) = {
0 , 𝑖𝑓 𝑥 ≠ 𝑥𝑖 ; 𝑖 = 1,2,3, …

is called the probability mass function (pmf) of 𝑟. 𝑣. 𝑋.

Lecture Notes Page 1


MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

The set of ordered pairs {𝑥𝑖 , 𝑝𝑖 ; 𝑖 = 1,2, … , 𝑛, … } 𝑜𝑟 {(𝑥1 , 𝑝1 ), (𝑥2 , 𝑝2 ), … , (𝑥𝑛 , 𝑝𝑛 ), … },


specifies the probability distribution of the 𝑟. 𝑣. 𝑋.

Remarks: The numbers 𝑝(𝑥𝑖 ) ; 𝑖 = 1, 2, … must satisfy the following conditions:


1. 0 ≤ 𝑝(𝑥𝑖 ) ≤ 1, ∀𝑖 𝑎𝑛𝑑 2. ∑ 𝑝(𝑥𝑖 ) = 1.


𝑖=1
Note: If X is discrete random variable then
𝑷(𝒂 < 𝑿 < 𝒃) = ∑𝒃−𝟏
𝒙=𝒂+𝟏 𝑷(𝒙) ; 𝑷(𝒂 ≤ 𝑿 < 𝒃) = ∑𝒃−𝟏
𝒙=𝒂 𝑷(𝒙),

𝑷(𝒂 < 𝑿 ≤ 𝒃) = ∑𝒃𝒙=𝒂+𝟏 𝑷(𝒙) ; 𝑷(𝒂 ≤ 𝑿 ≤ 𝒃) = ∑𝒃𝒙=𝒂 𝑷(𝒙).


Example: Consider an experiment of "flipping a fair coin 3 times". List the elements of the
sample space and let 𝑋 be the number of heads in three tosses. Then find the possible values of
𝑋 and calculate the probability of each possible distinct value of 𝑋.
Solution: 𝑋 𝑖𝑠 𝑎 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟. 𝑣. Since 𝑋 = the number of heads observed, the results are shown
in the following table:
𝑆 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝑇𝐻𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇}.
Elements of sample space Probability X
HHH 1/8 3
HHT 1/8 2
HTH 1/8 2
HTT 1/8 1
THH 1/8 2
THT 1/8 1
TTH 1/8 1
TTT 1/8 0

≫ Thus, we can write 𝑋(𝐻𝐻𝐻) = 3 ; 𝑋(𝐻𝐻𝑇) = 𝑋(𝐻𝑇𝐻) = 𝑋(𝑇𝐻𝐻) = 2,


𝑋(𝐻𝑇𝑇) = 𝑋(𝑇𝐻𝑇) = 𝑋(𝑇𝑇𝐻) = 1 ; 𝑋(𝑇𝑇𝑇) = 0.
and P(X = 3) = 1/8, P(X = 2) = 3/8, P(X = 1) = 3/8, P(X = 0) = 1/8.
𝐍𝐨𝐭𝐞 𝐭𝐡𝐚𝐭: The possible values of X are: 𝑥𝑖 = {0, 1, 2, 3}.
𝑥
; 𝑥 = 1,2,3,4,5.
Example: If, 𝑝(𝑥) = { 15
0 ; 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
a) Is 𝑝(𝑥) is pmf? b) Find 𝑃(𝑋 = 1 𝑜𝑟 2), 𝑃(𝑋 > 2), 𝑃(1 < 𝑋 ≤ 4).
1 2 3 4 5 15
Solution: a) 𝑌𝑒𝑠 𝑏𝑒𝑐𝑎𝑢𝑠𝑒 ∑5𝑖=1 𝑝(𝑥𝑖 ) = 1. 𝑖. 𝑒. + + + + = = 1.
15 15 15 15 15 15
1 2 3 1
b) 𝑃(𝑋 = 1 𝑜𝑟 2) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) = 15 + 15 = 15 = 5.

Lecture Notes Page 2


MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

3 4 5 12 4
𝑃(𝑋 > 2) = 𝑃(𝑋 = 3) + 𝑃(𝑋 = 4) + 𝑃(𝑋 = 5) = 15 + 15 + 15 = 15 = 5.
2 3 4 9 3
𝑃(1 < 𝑋 ≤ 4) = 𝑃(𝑋 = 2) + 𝑃(𝑋 = 3) + 𝑃(𝑋 = 4) = 15 + 15 + 15 = 15 = 5.

Exercise: A random variable X has the following probability function.

Values of X, x: 0 1 2 3 4 5 6 7
𝒑(𝒙) 0 k 2k 2k 3k k2 2k2 7k2+k

a). Find the value of 𝑘. b). Evaluate 𝑃(𝑋 < 6), 𝑃(𝑋 ≥ 6) 𝑎𝑛𝑑 𝑃(0 <
𝑋 < 5).
𝑨𝒏𝒔: 𝑎) 𝑘 = 1/10 𝑏) 𝑃(𝑋 < 6) = 81/100, 𝑃(𝑋 ≥ 6) = 19/100 𝑎𝑛𝑑 𝑃(0 < 𝑋 <
5) = 4/5.
5.3 Continuous random variables
A random variable X is said to be continuous if it can take all possible values (integral as well as
fractional) between a certain limits. Continuous random variable is a random variable that can be
measured to any desired degree of accuracy. For instance, the life length of an electric bulb, the
speed of a car, weights, heights, and the like are continuous.
In such cases, probabilities are associated with intervals or regions of a continuous
random variable, and not with individual points.
5.3.1 Probability Density Function (pdf)
Consider the small interval (𝑥, 𝑥 + 𝑑𝑥) of length 𝑑𝑥 round the point 𝑥 . Let 𝑓(𝑥) be any
continuous function of 𝑥 so that 𝑓(𝑥)𝑑𝑥 represents the probability that 𝑋 falls in the infinitesimal
interval(𝑥, 𝑥 + 𝑑𝑥). Sybollically, 𝑃(𝑥 ≤ 𝑋 ≤ 𝑥 + 𝑑𝑥) = 𝑓(𝑥)𝑑𝑥.

𝑓(𝑥)𝑑𝑥
𝑦 = 𝑓(𝑥)

𝑥 𝑥 + 𝑑𝑥
In the figure, 𝑓(𝑥)𝑑𝑥 represents the area bounded by the curve 𝑦 = 𝑓(𝑥), 𝑥-axis and ordinates
at the points 𝑥 and 𝑥 + 𝑑𝑥. The function 𝑓𝑋 (𝑥) = 𝑓(𝑥) so defined is known as probability
density function (pdf) of random variable X. The expression , 𝑓(𝑥)𝑑𝑥, usually written as 𝑑𝐹(𝑥),
is known as probability differential and the curve 𝑦 = 𝑓(𝑥) is known as the probability density
curve.

Lecture Notes Page 3


MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

Definition: The probability density function (pdf) 𝑓𝑋 (𝑥) = 𝑓(𝑥) of the 𝑟. 𝑣. 𝑋 is


defined as:

𝑃(𝑥 ≤ 𝑋 ≤ 𝑥 + 𝛿𝑥)
𝑓𝑋 (𝑥) = 𝑓(𝑥) = lim
𝛿𝑥→0 𝛿𝑥
The probability for a variate value to lie in the interval 𝑑𝑥 𝑖𝑠 𝑓(𝑥)𝑑𝑥 and hence the probability
for a variate value to fall in the finite interval [𝑎, 𝑏] is:
𝑏
𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = ∫𝑎 𝑓(𝑥)𝑑𝑥 ,
Which represents area between the curve 𝑦 = 𝑓(𝑥), 𝑥- axis and the ordinates at 𝑥 = 𝑎 𝑎𝑛𝑑 𝑥 =
𝑏.
𝑏
 Further, since the total probability is unity, we have ∫𝑎 𝑓(𝑥)𝑑𝑥 = 1, where [𝑎, 𝑏] the
range of the random variable is𝑋. The range of the variable may be finite or infinite.
The probability density function (p.d.f.) of a random variable X , usually denoted by
𝑓𝑋 (𝑥) 𝑜𝑟 𝑠𝑖𝑚𝑝𝑙𝑦 𝑏𝑦 𝑓(𝑥) has the following obvious properties:

1. 𝑓(𝑥) ≥ 0, 2. ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1.
Important remarks: In the case of discrete random variable, the probability at a point,
i.e., 𝑃(𝑋 = 𝑐) is not zero for some fixed c. However, in case of continuous random
variables the probability at a point is always zero, 𝑖. 𝑒., 𝑃(𝑋 = 𝑐) = 𝑃(𝑐 ≤ 𝑋 ≤ 𝑐) =
𝑐
∫𝑐 𝑓(𝑥)𝑑𝑥 = 0, ∀ 𝑐.
This property of continuous 𝑟. 𝑣. , 𝑣𝑖𝑧., 𝑃(𝑋 = 𝑐) = 0, ∀ 𝑐 leads us to the following important
result:
𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = 𝑃(𝑎 ≤ 𝑋 < 𝑏) = 𝑃(𝑎 < 𝑋 ≤ 𝑏) = 𝑃(𝑎 < 𝑋 < 𝑏).
𝑖. 𝑒., in case of continuous 𝑟. 𝑣., it does not matter whether we include the end points of
interval from 𝑎 𝑡𝑜 𝑏. However, this result is, in general, not true for discrete random
variables.
Example: The diameter of an electric cable, say 𝑋, is assumed to be a continuous
𝑟. 𝑣. 𝑤𝑖𝑡ℎ 𝑝𝑑𝑓:
𝑓(𝑥) = 6𝑥 (1 − 𝑥) , 0 ≤ 𝑥 ≤ 1.
a). Check that 𝑓(𝑥) is 𝑝𝑑𝑓. b). Compute 𝑃(𝑋 < 1/2).

Lecture Notes Page 4


MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

Solution: a). Obviously, for 0 ≤ 𝑥 ≤ 1, 𝑓(𝑥) ≥ 0. Now


1
1 1 1 2 𝑥2 𝑥3
∫0 𝑓(𝑥)𝑑𝑥 = 6 ∫0 𝑥 (1 − 𝑥)𝑑𝑥 = 6 ∫0 (𝑥 − 𝑥 )𝑑𝑥 = 6 | 2 − 3 | . = 1.
0
Hence 𝑓(𝑥) is 𝑝𝑑𝑓.
1/2
1/2 1/2 𝑥2 𝑥3
b) 𝑃(𝑋 < 1/2) = 𝑃(0 < 𝑋 < 1/2) = ∫0 𝑓(𝑥)𝑑𝑥 = ∫0 6𝑥 (1 − 𝑥)𝑑𝑥 = 6 | 2 − | . =
3
0
0.5.
Exercise: Let 𝑋 be a continuous random variable with 𝑝𝑑𝑓:
𝑎𝑥 , 0≤𝑥<1
𝑎 , 1≤𝑥<2
𝑓(𝑥) = {−𝑎𝑥 + 3𝑎 , 2≤𝑥<3
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
a). Determine the constant 𝑎. b). Compute 𝑃(𝑋 ≤ 1.5).
Ans: a) . 𝑎 = 1/2. b). 𝑃(𝑋 ≤ 1.5) = 1/2.
5.4 Cumulative distribution function (cdf) and its properties
Definition: Let 𝑋 be a random variable. The function 𝐹 defined for all 𝑟𝑒𝑎𝑙 𝑥 by
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) , − ∞ < 𝑥 < ∞,
is called the cumulative distribution function (cdf) of the random variable 𝑋.
∑𝑖:𝑥𝑖 ≤𝑥 𝑝𝑖 → 𝐼𝑓 𝑋 𝑖𝑠 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒.
Thus, 𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = { 𝑥
∫−∞ 𝑓(𝑡)𝑑𝑡 → 𝐼𝑓 𝑋 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠.
Properties of cumulative distribution function
1. If 𝐹 is the 𝑐𝑑𝑓 of one-dimensional r.v. X, then (𝑖). 0 ≤ 𝐹(𝑥) ≤ 1 ; (𝑖𝑖). 𝐹(𝑥) ≤
𝐹(𝑦) 𝑖𝑓 𝑥 < 𝑦.
In other words, all distribution functions are monotonically non-decreasing and lie between 0
and 1.
2. If 𝐹 is the 𝑐𝑑𝑓 of one-dimensional 𝑟. 𝑣. 𝑋, then
𝐹(−∞) = lim 𝐹(𝑥) = 0 𝑎𝑛𝑑 𝐹(∞) = lim 𝐹(𝑥) = 1.
𝑥→−∞ 𝑥→∞

3. 𝐼𝑓 𝐹 𝑖𝑠 𝑡ℎ𝑒 𝑐𝑑𝑓 𝑜𝑓 𝑡ℎ𝑒 𝑟. 𝑣. 𝑋 𝑎𝑛𝑑 𝑖𝑓 𝑎 ≤ 𝑏, then 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = 𝐹(𝑏) − 𝐹(𝑎).


Remark: When 𝑃(𝑋 = 𝑎) = 0 𝑎𝑛𝑑 𝑃(𝑋 = 𝑏) = 0, 𝑎𝑙𝑙 𝑓𝑜𝑢𝑟 𝑒𝑣𝑒𝑛𝑡𝑠 𝑎 ≤ 𝑋 ≤ 𝑏, 𝑎 ≤
𝑋 < 𝑏, 𝑎 < 𝑋 ≤ 𝑏 𝑎𝑛𝑑 𝑎 < 𝑋 < 𝑏 have the same probability 𝐹(𝑏) − 𝐹(𝑎).
𝑑𝐹(𝑥)
Note that: 𝐹 ′ (𝑥) = = 𝑓(𝑥). 𝑎𝑛𝑑 𝑝(𝑥𝑖 ) = 𝑃(𝑋 = 𝑥𝑖 ) = 𝐹(𝑥𝑖 ) −
𝑑𝑥

𝐹(𝑥𝑖−1 ).

Lecture Notes Page 5


MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

Graphs of the discrete and continuous distribution function for the random variable X.

F(x) F(x)

x x

1 2 3 4 5 6 7

Example: Let 𝑋 be a discrete random variable with 𝑝𝑚𝑓:


𝑥
; 𝑥 = 1,2,3,4,5.
𝑝(𝑥) = { 15
0 ; 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
a) Determine 𝐹(𝑥), the cumulative distribution function (cdf) of X.

Solution: 𝐹𝑜𝑟 𝑥 = 0, 𝐹(0) = 𝑃(𝑋 ≤ 0) = ∑𝑖:𝑥𝑖 ≤0 𝑝𝑖 = 0.


𝐹𝑜𝑟 𝑥 = 1, 𝐹(1) = 𝑃(𝑋 ≤ 1) = ∑𝑖:𝑥𝑖 ≤1 𝑝𝑖 = 𝑝1 = 1/15.
𝐹𝑜𝑟 𝑥 = 2, 𝐹(2) = 𝑃(𝑋 ≤ 2) = ∑𝑖:𝑥𝑖 ≤2 𝑝𝑖 = 𝑝1 + 𝑝2 = 1/15 + 2/15 = 3/15.
𝐹𝑜𝑟 𝑥 = 3, 𝐹(3) = 𝑃(𝑋 ≤ 3) = ∑𝑖:𝑥𝑖 ≤3 𝑝𝑖 = 𝑝1 + 𝑝2 + 𝑝3 = 1/15 + 2/15 + 3/15 = 6/15.
𝐹𝑜𝑟 𝑥 = 4, 𝐹(4) = 𝑃(𝑋 ≤ 4) = ∑𝑖:𝑥𝑖 ≤4 𝑝𝑖 = 𝑝1 + 𝑝2 + 𝑝3 + 𝑝4 = 1/15 + 2/15 + 3/15 +
4/15 = 10/15. 𝐹𝑜𝑟 𝑥 = 5, 𝐹(4) = 𝑃(𝑋 ≤ 5) = ∑𝑖:𝑥𝑖 ≤5 𝑝𝑖 = 𝑝1 + 𝑝2 + 𝑝3 + 𝑝4 + 𝑝5
= 1/15 + 2/15 + 3/15 + 4/15 + 5/15 = 15/15 = 1.
Hence the cumulative distribution function 𝐹(x) is given by:
0 for − ∞ ≤ x < 1
1/15 for 1 ≤ x < 2
3/15 for 2 ≤ x < 3
𝐹(x) =
6/15 for 3 ≤ x < 4
10/15 for 4 ≤ x < 5
{ 1 for 5 ≤ x < ∞

Example 2: Let 𝑋 be a continuous random variable with 𝑝𝑑𝑓:


(1/2) 𝑥 , 0≤𝑥<1
1/2 , 1≤𝑥<2
𝑓(𝑥) = 1 3
(− 2) 𝑥 + 2 , 2≤𝑥<3
{ 0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
a) Determine 𝐹(𝑥), the cumulative distribution function (cdf) of X.

Lecture Notes Page 6


MTU Stat Dep’t Probability and Statistics for Engineer's Chapter - 5

𝑥 𝑥
Solution: For any x such that −∞ ≤ x < 0; 𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫−∞ 𝑓(𝑡)𝑑𝑡 = ∫−∞ 0. 𝑑𝑡 =
0.
0 𝑥
For any x, where 0 ≤ 𝑥 < 1; 𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫−∞ 0. 𝑑𝑡 + ∫0 𝑡/2𝑑𝑡 = x 2 /4.
0 1 𝑡𝑑𝑡 𝑥 1𝑑𝑡 2x−1
For x, 1 ≤ 𝑥 < 2; 𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫−∞ 0. 𝑑𝑡 + ∫0 + ∫1 = .
2 2 4
0 1 𝑡 2 1 𝑥 −𝑡 3
For x, 2 ≤ 𝑥 < 3; 𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫−∞ 0. 𝑑𝑡 + ∫0 𝑑𝑡 + ∫1 𝑑𝑡 + ∫2 ( 2 + 2) 𝑑𝑡
2 2

1 1 𝑥 2 3𝑥 𝑥 2 3𝑥 5
= + (1 − ) + (− + − 2) = − + − .
4 2 4 2 4 2 4
0 1 𝑡 2 1 3 −𝑡 3
For x, 3 ≤ 𝑥 < ∞; 𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫−∞ 0. 𝑑𝑡 + ∫0 𝑑𝑡 + ∫1 𝑑𝑡 + ∫2 ( 2 + 2) 𝑑𝑡 +
2 2
𝑥
∫3 0. 𝑑𝑡
1 1 9 9
= + (1 − ) + (− + + 1 − 3) = 1.
4 2 4 2
Hence the cumulative distribution function 𝐹(x) is given by:
0 𝑓𝑜𝑟 − ∞ ≤ 𝑥 < 0
x2
𝑓𝑜𝑟 0 ≤ 𝑥 < 1
4
𝐹(𝑥) = 2x −1
𝑓𝑜𝑟 1 ≤ 𝑥 < 2
4
𝑥 2 3𝑥 5
− 4 + 2 −4 𝑓𝑜𝑟 2 ≤ 𝑥 < 3
{ 1 𝑓𝑜𝑟 3 ≤ 𝑥 < ∞

Lecture Notes Page 7

You might also like