0% found this document useful (0 votes)
15 views17 pages

5-Discrete Random Variable

discrete random variable
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views17 pages

5-Discrete Random Variable

discrete random variable
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Discrete Random

Variable
Dr. Mahmoud Abd
El-Raouf
Random Variable
A random variable is a numerical quantity that is generated by a random experiment.
We will denote random variables by capital letters, such as X or Z, and the actual values that they can
take by lowercase letters, such as x and z.
Experiment Random variable X Possible Values of X
Roll two fair dice Sum of the number of dots on the top faces 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Flip a fair coin repeatedly Number of tosses until the coin lands heads 1, 2, 3,4, …
Measure the voltage at an
electrical outlet Voltage measured 118 ≤ x ≤ 122

Operate a light bulb until it Time until the bulb burns out 0≤x<∞
burns out

Types of Random Variable

A random variable is called discrete if it has either a finite or a countable number of possible values.

A random variable is called continuous if its possible values contain a whole interval of numbers.
Discrete Random Variable
A random variable is called discrete if it has either a finite or a countable number of possible values.
For example : A fair coin is thrown two times. The random variable is the number of heads
obtained
is the number of heads obtained

{ }
𝐻𝐻 𝟐
𝑆=
𝐻𝑇 𝟏 The probability of each item n the sample space is = 0.25
𝑇𝐻 𝟏
𝑇𝑇 𝟎
The probability distribution of a discrete random variable X is a list of each possible value
of X together with the probability that X takes that value in the experiment.

The probability distribution table of


X 0 1 2
0.25 0.5 0.25 SUM = 1
Discrete Random Variable
(1) Probability Mass Function (p. m. f)
If A fair coin is tossed three times. Let X be the number of heads that are observed.

{ }
𝐻 𝐻𝐻 𝟑
𝐻 𝐻𝑇 𝟐 the probability distribution of X
𝐻 𝑇𝐻 𝟐
𝟏 X 0 1 2 3
𝑆= 𝐻𝑇𝑇
𝑇𝐻𝐻 𝟐 f(x)
𝑇𝐻𝑇 𝟏
𝑇𝑇𝐻 𝟏
𝑇𝑇𝑇 𝟎 then
The probability mass function (pmf) of a random variable X must satisfy the following two
conditions:
• Each probability P(x) must be between 0 and 1: 𝟎 ≤ 𝒇 ( 𝒙 ) ≤𝟏 ∀ 𝒙

• The sum of all the probabilities is 1: ∑ 𝒇 ( 𝒙 𝒊 ) =𝟏


𝒂 𝒍𝒍 𝒙 𝒊
Discrete Random Variable
(1) Probability Mass Function (p. m. f)
Example 1: For each of the following, determine whether the given function can serve as the
probability mass function of a r.v. with the given range.
a. , for ;
1 2  1 is not p.m.f for
At x 1  f (1)   0
5 5
b. , for

x 0 1 2 3 4 sum is p.m.f. for


f(x) 0 1/30 4/30 9/30 16/30 1

c. , for

x 0 1 2 3 4 5 sum
is not p.m.f. for
f(x) 1/5 1/5 1/5 1/5 1/5 1/5 6/5
Discrete Random Variable
(2) Cumulative Distribution Function (C. D. F)

The cumulative distribution function (CDF) of a random variable is another method to


describe the distribution of random variables.
The cumulative distribution function of R. V. is defined for any real by:

The cumulative distribution function (CDF) of a random variable X must satisfy the following
conditions:


𝑭 ( 𝒙 𝒏 ) =𝟏
Discrete Random Variable
(2) Cumulative Distribution Function (C. D. F)
Example 2: If a fair coin toss three time, find the p. m. f and the C.D.F of the number of heads.
Solution: X 0 1 2 3
f(x)

The C. D. F is then given by:

{ {
𝒇 𝒐𝒓 𝒙 <𝟎

𝟎
𝟎 𝒇𝒐𝒓 𝒙 <𝟎
𝒇 ( 𝟎) 𝒇𝒐𝒓 𝟎 ≤ 𝒙 <𝟏 𝟏

𝑭 ( 𝒙 )=
𝒇𝒐𝒓 𝟎 ≤ 𝒙 < 𝟏
𝟖
𝒇 ( 𝟎 ) + 𝒇 (𝟏 ) 𝒇𝒐𝒓 𝟏 ≤ 𝒙<𝟐 𝟒
( )
𝑭 𝒙 = 𝒇𝒐𝒓 𝟏 ≤ 𝒙 < 𝟐

¿¿
𝒇 ( 𝟎 ) + 𝒇 (𝟏 ) +𝒇 (𝟐) 𝒇𝒐𝒓 𝟐 ≤ 𝒙<𝟑 𝟖
𝟕
𝒇 ( 𝟎 ) + 𝒇 (𝟏 ) +𝒇 ( 𝟐 ) + 𝒇 (𝟑) 𝒇𝒐𝒓 𝒙 ≥𝟑 𝒇𝒐𝒓 𝟐 ≤ 𝒙 <𝟑
𝟖
𝟏 𝒇𝒐𝒓 𝒙 ≥ 𝟑
Discrete Random Variable
(2) Cumulative Distribution Function (C. D. F)
Example 3: If the discrete R.V X has the following C. D. F.:

{
𝟎 𝒇𝒐𝒓 𝒙 <− 𝟏
𝟏
𝒇𝒐𝒓 − 𝟏 ≤ 𝒙 < 𝟏
𝟐
𝟒
𝑭 ( 𝒙 )= 𝒇𝒐𝒓 𝟏 ≤ 𝒙 < 𝟑
𝟔
𝟓
𝒇𝒐𝒓 𝟑 ≤ 𝒙 <𝟓
𝟔
𝟏 𝒇𝒐𝒓 𝒙 ≥ 𝟓
Find:
𝑷 ( 𝑿 =𝟓 )
The p.m. f. of X
𝑷 ( − 𝟎 .𝟓< 𝑿 <𝟐 . 𝟒 )
Discrete Random Variable
Example 3:
𝟓 𝟏
𝒂¿ 𝑷 ( 𝑿=𝟓¿) 𝑭 ( 𝟓 ) − 𝑭 ( 𝟑 )¿ 𝟏 − 𝟔 ¿ 𝟔

b) The p.m. f. of X X -1 1 3 5

f(x)

{
𝟎 𝒇𝒐𝒓 𝒙 <− 𝟏
𝟏
𝒇𝒐𝒓 − 𝟏 ≤ 𝒙 < 𝟏 f ¿ 𝑭 ( 𝟓) − 𝑭 ( 𝟑 )
𝟐
𝑭 ( 𝒙 )=
𝟒
𝒇𝒐𝒓 𝟏 ≤ 𝒙 < 𝟑 f ¿ 𝑭 ( 𝟑) − 𝑭 ( 𝟏 )
𝟔
𝟓 f ¿ 𝑭 ( 𝟏) − 𝑭 ( − 𝟏)
𝒇𝒐𝒓 𝟑 ≤ 𝒙 <𝟓
𝟔 f ¿ 𝑭 ( −𝟏 )
𝟏 𝒇𝒐𝒓 𝒙 ≥ 𝟓

𝟏 𝟏
𝒄¿ 𝑷 ( )
−𝟎.𝟓< 𝑿<𝟐.𝟒¿ 𝒇 ( −𝟎 . 𝟓 ) + 𝒇 (𝟏 ) +𝒇 ( 𝟐 . 𝟒¿) 𝟎+ 𝟔 +𝟎¿ 𝟔
Discrete Random Variable
(3) Expectation:

Mathematical expectation of R. V. refers to the expected value or the mean value of the
random variable and it is defined as:
𝝁=𝑬 ( 𝑿 )=∑ 𝒙𝒊 𝒇 ( 𝒙𝒊 )
𝒊
The mean of a random variable may be interpreted as the average of the values assumed by
the random variable in repeated trials of the experiment
Properties of Expectations:

𝑬 ( 𝒄 )=𝒄
𝑬 ( 𝒄𝑿 )=𝒄 𝑬 ( 𝑿 )
𝑬 ( 𝒂𝑿 + 𝒃 )=𝒂 𝑬 ( 𝑿 ) +𝒃
Discrete Random Variable
(4) variance: The variance of R. V. Distribution is Deonte by and it is defined as:

𝝈 =𝒗𝒂𝒓 ( 𝑿 ) =𝑬 ( ( 𝑿 − 𝝁 ) ) =𝑬 ( 𝑿 ) −𝝁
𝟐 𝟐 𝟐 𝟐

𝝈 =∑ 𝒙 𝒇 ( 𝒙 𝒊) − 𝝁
𝟐 𝟐 𝟐
𝒊
𝒊
The variance and standard deviation of a discrete random variable X may be interpreted as
measures of the variability of the values assumed by the random variable in repeated trials of
the experiment. The units on the standard deviation match those of X.
The square root of the variance is called the standard deviation and is denote by
roperties of Variance:
𝒗𝒂𝒓 ( 𝒄 )=𝒛𝒆𝒓𝒐
𝟐
𝒗𝒂𝒓 ( 𝒄𝑿 )=𝒄 𝒗𝒂𝒓 ( 𝑿 )
𝟐 𝟐
𝒗𝒂𝒓 ( 𝒂𝑿 +𝒃 )= 𝒂 𝝈
Discrete Random Variable
Example 4: A lot of 12 television sets includes 2 defective. If 3 of the sets are chosen at
random for shipment to a hotel, how many sets defective can be shipper expect to send to
the hotel?
Solution: Let W represents TV set with defective and B represents TV set non- defective.
If The random variable X represent that the number of sets defective in a shipment consists
of 3 sets

{ }
Then
𝑩𝑩𝑩 ,
𝟏𝟎 𝟗 𝟖 𝟔
𝑾 𝑩𝑩 , At ¿ ∗ ∗ ¿
𝟏𝟐 𝟏𝟏 𝟏𝟎 𝟏𝟏
𝑩𝑾 𝑩 ,
𝑺= 𝑩𝑩 𝑾 ,
𝑩 𝑾𝑾 ,
At ¿𝟑 (𝟐 𝟏𝟎 𝟗 𝟗
∗ ∗ ¿
𝟏𝟐 𝟏𝟏 𝟏𝟎 𝟐𝟐 )
𝑾 𝑩𝑾 , 𝟏
𝑾𝑾 𝑩 At ¿𝟑
𝟐
(

𝟏 𝟏𝟎¿

𝟏𝟐 𝟏𝟏 𝟏𝟎 ) 𝟐𝟐
Discrete Random Variable
Example 4:
 The p.m.f. of this random variable is as follow:
X 0 1 2

f(x)

𝑬 ( 𝑿 )=∑ 𝒙𝒊 𝒇 ( 𝒙 𝒊)¿ (𝟎 ∗ 𝟔
)(
+ 𝟏∗
𝟗
+ 𝟐∗ )(
𝟏
=
𝟏𝟏 𝟏
= )
𝒊 𝟏𝟏 𝟐𝟐 𝟐𝟐 𝟐𝟐 𝟐

{(
¿ 𝟎∗
𝟔
𝟏𝟏
+ 𝟏∗ )(
𝟗
𝟐𝟐
+ 𝟒∗
𝟏
𝟐𝟐
− ¿)(
𝟏 𝟏𝟓
𝟒 𝟒𝟒 )}
𝑺. 𝑫.=𝝈=
𝟏𝟓
𝟒𝟒 √
Discrete Random Variable
Example 5: Complete the following table of the R.V. distribution with expected value

X 0 1 a 3 4

f(x) b

Solution: As the total probability is equal to one then we get the value of b by:
𝟐 𝟑 𝟔 𝟒 𝟗
+ + + 𝒃+ =𝟏 𝒃=
𝟐𝟒 𝟐𝟒 𝟐𝟒 𝟐𝟒 𝟐𝟒
b) The value of a can be calculated using the value of the expectation:
𝟓𝟖
𝑬 ( 𝑿 )=∑ 𝒙 𝒊 𝒇 ( 𝒙 𝒊) =
𝒊 𝟐𝟒

(
𝑬 ( 𝑿 )= 𝟎 ∗
𝟐
𝟐𝟒 )(
+ 𝟏∗
𝟑
𝟐𝟒
+ 𝒂∗
𝟔
𝟐𝟒)(
+ 𝟑∗
𝟗
𝟐𝟒
+ 𝟒∗
𝟒
)(
=
𝟐𝟒 𝟐𝟒
𝟓𝟖
)( ) 𝒂=𝟐
Discrete Random Variable
Example 6 if a discrete r.v X has the p.m.f
x -3 -2 -1 0 1 2 3 Total
f(x) 1/25 2/25 4/25 11/25 4/25 a 1/25 1
x.f(x) -3/25 -4/25 -4/25 0 4/25 4/25 3/25 0
x 2 f ( x) 9/25 8/25 4/25 0 4/25 8/25 9/25 42/25
Find: a. The value of a

b.

c.
Discrete Random Variable
Example 6: d. the CDF of ,
1
F ( 3)  f ( 3) 
25
 0 x3
F ( 2)  f ( 3)  f ( 2)  
1 2

3  1 / 25  3  x   2
25 25 25 
F ( 1)  f ( 3)  f ( 2)  f ( 1)   
1 2 4

7  3 / 25  2  x   1
25 25 25 25 
 7 / 25  1 x  0
1 2 4 11 18 F ( x) 
F (0)  f ( 3)  f ( 2)  f ( 1)  f (0)     
18 / 25 0 x  1
25 25 25 25 25
22 / 25 1 x  2
1 2 4 11 4 22
F (1)  f ( 3)  f ( 2)  f ( 1)  f (0)  f (1)      

25 25 25 25 25 25 24 / 25 2 x  3
 1 x 3
1 2 4 11 4 2 24 
F (2)  f ( 3)  f ( 2)  f ( 1)  f (0)  f (1)  f (2)       
25 25 25 25 25 25 25
1 2 4 11 4 2 1
F (3)  f ( 3)  f ( 2)  f ( 1)  f (0)  f (1)  f (2)  f (3)        1
25 25 25 25 25 25 25
Good luck
Dr. Mahmoud Abd
El-Raouf

You might also like