Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 5

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

SU Stat Dept Probability and Statistics (Stat2171) Chapter -5

CHAPTER-5

5. One-dimensional Random Variables

5.1. Random variable: definition and distribution function


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: Discrete random variables: are variables that can assume only a specific number of values.
They have values that can be counted. Let 𝑋 be an r.v If the number of possible values of 𝑋 is finite
or countably infinite, 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.
Example of a discrete random variable

➢ Toss coin n times and count the number of heads.


➢ The number of children in a family.
➢ The number of car accidents per week.
➢ Number of defective items in a given company

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 𝑟. 𝑣. 𝑋.
The set of ordered pairs {𝑥𝑖 , 𝑝𝑖 ; 𝑖 = 1,2, … , 𝑛, … } 𝑜𝑟 {(𝑥1 , 𝑝1 ), (𝑥2 , 𝑝2 ), … , (𝑥𝑛 , 𝑝𝑛 ), … },
specifies the probability distribution of the 𝑟. 𝑣. 𝑋.

By Hussein M. Lecture Notes Page 1


SU Stat Dept Probability and Statistics (Stat2171) Chapter -5

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


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


𝑖=1
Note: If X is a discrete random variable, then

𝑃(𝑎 < 𝑋 < 𝑏) = ∑𝑏−1 𝑏−1


𝑥=𝑎+1 𝑃(𝑥) , 𝑃(𝑎 ≤ 𝑋 < 𝑏) = ∑𝑥=𝑎 𝑃(𝑥),
𝑃(𝑎 < 𝑋 ≤ 𝑏) = ∑𝑏𝑥=𝑎+1 𝑃(𝑥), 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = ∑𝑏𝑥=𝑎 𝑃(𝑥).

5.3. Continuous random variables


Continuous random variables: are variables that can assume all values between any two given
values.
A random variable X is said to be continuous if it can take all possible values (integral as well as
fractional) between a certain limit. The 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.
Example of a continuous random variable
➢ Height of students at certain colleges.
➢ Mark of a student.
➢ The lifetime of light bulbs.
➢ Length of time required to complete a given training.

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(𝑥,
𝑥 + 𝑑𝑥). Symbolically, 𝑃(𝑥 ≤ 𝑋 ≤ 𝑥 + 𝑑𝑥) = 𝑓(𝑥)𝑑𝑥.

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

𝑥 𝑥 + 𝑑𝑥

By Hussein M. Lecture Notes Page 2


SU Stat Dept Probability and Statistics (Stat2171) Chapter -5

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.
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 the 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 (pdf) of a random variable X, usually denoted by
𝑓𝑋 (𝑥) 𝑜𝑟 𝑠𝑖𝑚𝑝𝑙𝑦 𝑏𝑦 𝑓(𝑥) has the following obvious properties:

1. 𝑓(𝑥) ≥ 0, 2. ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1.
Important remarks: In the case of a discrete random variable, the probability at a point, i.e., 𝑃(𝑋 = 𝑐)
is not zero for some fixed c. However, in the 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 the case of continuous 𝑟. 𝑣., it does not matter whether we include the endpoints 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).
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. Hence 𝑓(𝑥) is 𝑝𝑑𝑓.
0
1
1 1
1 1 𝑥2 𝑥3 2
b. 𝑃 (𝑋 < 2) = 𝑃 (0 < 𝑋 < 2) = ∫0 𝑓(𝑥)𝑑𝑥 = ∫0 6𝑥 (1 − 𝑥)𝑑𝑥 = 6 | 2 −
2 2 | = 0.5.
3 .
0
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.
By Hussein M. Lecture Notes Page 3
SU Stat Dept Probability and Statistics (Stat2171) Chapter -5

5.4. Cumulative distribution function 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 a 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 ).
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:For x = 0, F(0) = P(X ≤ 0) = ∑i:xi≤0 pi = 0.
1
For x = 1, F(1) = P(X ≤ 1) = ∑i:xi≤1 pi = p1 = 15.
1 2 3
For x = 2, F(2) = P(X ≤ 2) = ∑i:xi≤2 pi = p1 + p2 = 15 + 15 = 15.
1 2 3 6
For x = 3, F(3) = P(X ≤ 3) = ∑i:xi≤3 pi = p1 + p2 + p3 = 15 + 15 + 15 = 15.
1 2 3 4 10
For x = 4, F(4) = P(X ≤ 4) = ∑i:xi≤4 pi = p1 + p2 + p3 + p4 = 15 + 15 + 15 + 15 = 15.
1 2 3 4 5 15
For x = 5, F(5) = P(X ≤ 5) = ∑ pi = p1 + p2 + p3 + p4 + p5 = + + + + = = 1.
15 15 15 15 15 15
i:xi ≤5

By Hussein M. Lecture Notes Page 4


SU Stat Dept Probability and Statistics (Stat2171) Chapter -5

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

By Hussein M. Lecture Notes Page 5

You might also like