0% found this document useful (0 votes)
19 views6 pages

Understanding Random Variables and PDFs

The document discusses random variables, which are measurements that can vary and are represented by capital letters. It explains the concept of probability distribution functions (pdf) that describe the likelihood of different outcomes for random variables, providing examples such as tossing coins and throwing dice. Additionally, it covers the properties of pdfs, how to calculate probabilities, and the expected value of a random variable.

Uploaded by

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

Understanding Random Variables and PDFs

The document discusses random variables, which are measurements that can vary and are represented by capital letters. It explains the concept of probability distribution functions (pdf) that describe the likelihood of different outcomes for random variables, providing examples such as tossing coins and throwing dice. Additionally, it covers the properties of pdfs, how to calculate probabilities, and the expected value of a random variable.

Uploaded by

ireshaperera337
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2G RANDOM VARIABLE

Everyday we are using number of measurements. When we buy food items we measure their weight, volume
or their value (price). If we cannot afford them we are not going to buy. When we are doing different activities
we measure the time that we are spending for them. Thus we cannot think of a life without measurements.

Most of these measurements are varying with time, from object to object or from place to place. Price of an
apple varies with its size as well as with the place from where we buy it. Such measurements are called
variables and we use English capital letters to indicate them.
For an example
X – Weight of an apple
Y – Marks obtained for statistics by a student
Z – Number of telephone calls answered by a receptionist during an hour

Variables will assume different values for different objects. Therefore we normally use a suffix with the
variable to indicate to which object it is referring.
Yi - Marks obtained by the ith student

We cannot predict in advance, the values, the different variables will assume,. We cannot identify any pattern
of such values. Therefore, we call such variables as Random Variables. But in statistics we have a more
formal definition for a random variable.

A random variable is a function which will assume a numerical value for each outcome in the sample space.

Since the variables can assume many different values it is interesting to know, how these variables will behave.
That is, if X is used to measure the performance level of the students at a particular examination, we would like
to know the chance or the possibility that a particular student will get a merit pass at this examination, what
percentage of them will fail the examination and so on. This behavior of random variables is discussed by their
probability distribution functions.

2H PROBABILITY DISTRIBUTION FUNCTION

The probability distribution function (pdf) of a random variable X, is a function which express the possibility
that the random variable will assume different values. Thus the probability distribution function can be defined
as
𝑓𝑋 𝑥 = 𝑃 𝑋 = 𝑥
We will discuss few examples to get an understanding of how to obtain the probability distribution functions.

Eg 19 : Consider the experiment of tossing a fair coin


Sample space = { H, T}

Define random variable X = Number of heads


If the head occurs then X = 1 and if the tail occurs then X = 0. Thus the random variable X will assume the two
values either 0 or 1.
That is X={0,1}

51
Then Pr (X = 1) = Pr (getting head) = ½
Pr (X = 0) = Pr (Getting no heads) = Pr (getting tail) = ½
Since fX(x) = Pr(X = x) , then
fX(0) = Pr(X = 0) = ½
fX(1) = Pr(X = 1) = ½
fX(2) = Pr( X=2 ) = 0 (in tossing a coin we cannot get two heads)
We can summarize this result as
fX(x) = ½ for X = 0,1
= 0 elsewhere
This is the probability distribution function for the above random variable defined over the above experiment.

Eg 20 : Consider the experiment of tossing two fair coins


Sample space = { HH, HT, TH, TT}
Define random variable X = Number of heads
= { 0 , 1, 2 }
Then fX(0) = Pr (X = 0) = Pr (getting no heads) = Pr (TT) = ¼
fX(1) = Pr (X = 1) = Pr (getting one head) = Pr (HT or TH) = 2/4 = ½
fX(2) = Pr (X = 2) = Pr (getting two heads) = Pr (HH) = ¼
Thus the probability distribution function
fX(x) = ¼ for X = 0,2
= ½ for X = 1
= 0 elsewhere

Eg 21 : Consider the experiment of tossing three coins


Sample space = { HHH, HHT, HTH,H TT, THH, THT, TTH,T TT }
Define random variable X = Number of heads
= { 0 , 1, 2, 3 }
Then fX(0) = Pr (X = 0) = Pr (getting no heads) = Pr (TTT) =⅛
fX(1) = Pr (X = 1) = Pr (getting one head) = Pr (HTT, THT, TTH) = ⅜
fX(2) = Pr (X = 2) = Pr (getting two heads) = Pr (HHT, HTH, THH) = ⅜
fX(3) = Pr (X = 3) = Pr (getting three heads) = Pr (HHH) =⅛

Thus the probability distribution function


fX(x) = ⅛ for X = 0,3
= ⅜ for X = 1,2
= 0 elsewhere

Eg22 : Consider the experiment of throwing two dies


Sample space = { (1,1), (1,2), (1,3), (1,4), (1,5), (1,6),
(2,1), (2,2), (2,3), (2,4), (2,5), (2,6)
(3,1), (3,2), (3,3), (3,4), (3,5), (3,6),
(4,1), (4,2), (4,3), (4,4), (4,5), (4,6)
(5,1), (5,2), (5,3), (5,4), (5,5), (5,6),
(6,1), (6,2), (6,3), (6,4), (6,5), (6,6)}

52
Define random variable X = Sum of the two dies
X = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }

Then fX(2) = Pr (X = 2) = Pr {(1, 1)} = 1/36


fX(3) = Pr (X = 3) = Pr {(1, 2), (2,1)} = 2/36
fX(4) = Pr (X = 4) = Pr {(1, 3), (2,2), (3,1)} = 3/36
fX(5) = Pr (X = 5) = Pr {(1, 4), (2,3), (3,2), (4,1)} = 4/36
fX(6) = Pr (X = 6) = Pr {(1, 5), (2,4), (3,3), (4,2), (5,1)} = 5/36
fX(7) = Pr (X = 7) = Pr {(1, 6), (2,5), (3,4), (4,3), (5,2), (6,1)} = 6/36
fX(8) = Pr (X = 8) = Pr {(2,6), (3,5), (4,4), (5,3), (6,2)} = 5/36
fX(9) = Pr (X = 9) = Pr {(3,6), (4,5), (5,4), (6,3)} = 4/36
fX(10) = Pr (X = 10) = Pr {(4,6), (5,5), (6,4)} = 3/36
fX(11) = Pr (X = 11) = Pr {(5,6), (6,5)} = 2/36
fX(12) = Pr (X = 12) = Pr {(6,6)} = 1/36

Thus the probability distribution function


1
fX(x) = /36 for X = 2,12
2
= /36 for X = 3,11
3
= /36 for X = 4, 10
4
= /36 for X = 5,9
5
= /36 for X = 6,8
6
= /36 for X = 7
= 0 elsewhere

Eg 23 : Consider the same experiment of throwing two dies

Define random variable X = Difference between the two dies


X = { 0, 1, 2, 3, 4, 5 }

Then fX(0) = Pr (X = 0) = Pr {(1, 1), (2,2), (3,3), (4,4), (5,5), (6,6)} = 6/36
10
fX(1) = Pr (X = 1) = Pr {(1, 2), (2,1), (2,3), (3,2), (3,4), (4,3),(4, 5), (5, 4), (5,6), (6,5)} = /36
fX(2) = Pr (X = 2) = Pr {(1, 3), (3,1), (2,4), (4,2), (3,5), (5,3), (6,4), (4,6)} = 8/36
fX(3) = Pr (X = 3) = Pr {(1, 4), (4,1), (2,5), (5,2), (3,6), (6,3) } = 6/36
fX(4) = Pr (X = 4) = Pr {(1, 5), (5,1), (2,6), (6,2) } = 4/36
fX(5) = Pr (X = 5) = Pr {(1, 6), (6,1) } = 2/36

Then the probability distribution function


10
fX(x) = /36 for X = 1
8
= /36 for X = 2
6
= /36 for X = 0, 3
4
= /36 for X = 4
2
= /36 for X = 5
= 0 elsewhere

53
PROPERTIES OF PROBABILITY DISTRIBUTION FUNCTIONS :

When we examine the above probability distribution functions it can be clearly seen that all the values assumed
by any probability distribution function are positive and all of them sum up to 1. That is
𝑓𝑥 𝑥 ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥
and 𝑓𝑥 x = 1
In example 23,
𝑓𝑥 𝑥 = 𝑓𝑥 0 + 𝑓𝑥 1 + 𝑓𝑥 2 + 𝑓𝑥 3 + 𝑓𝑥 4 + 𝑓𝑥 5
= 6/36 + 10/36 +8/36 +6/36 +4/36 + 2/36 = 36/36 = 1

Sometimes, we do not know the exact probability distribution function, but only know the pattern of that. Then
we can use the above properties to get the exact probability distribution function.

Eg 24 : Let fX(x) = kX2 for X = 0, 1, 2, 3, 4, 5


= 0 elsewhere
Find the value of k
Answers :
𝑓𝑥 x = 1
𝑓𝑥 0 + 𝑓𝑥 1 + 𝑓𝑥 2 + 𝑓𝑥 3 + 𝑓𝑥 4 + 𝑓𝑥 5 = 1
0 + k + 4k + 9k + 16k + 25k = 1
55k = 1
1
K = 55
1
Then 𝑓𝑥 𝑥 = 55
X2 for X = 0, 1, 2, 3, 4, 5
= 0 elsewhere

When we know the probability distribution function of a random variable, we can use it to calculate different
probabilities when the random variable will assume different values.

Eg 25 : Consider the probability distribution function given by


X
fX(x) = /36 for X =0, 1,2,3,4,5,6,7,8
= 0 elsewhere
Find (a) Pr(X  3)
(b) Pr (X ≥ 5)
(c) Pr (2  X  7)

Answers :
(a) Pr(X  3) = Pr(X=0) + Pr(X=1) + Pr(X=2) + Pr(X=3)
= 𝑓𝑥 0 + 𝑓𝑥 1 + 𝑓𝑥 2 + 𝑓𝑥 3
= 0/36 + 1/36 +2/36 +3/36 = 6/36 = 1/6

(b) Pr(X ≥ 5) = Pr(X=5) + Pr(X=6) + Pr(X=7) + Pr(X=8) + 0 for all other values
= 𝑓𝑥 5 + 𝑓𝑥 6 + 𝑓𝑥 7 + 𝑓𝑥 8
= 5/36 + 6/36 +7/36 +8/36 = 26/36 = 13/18

54
(c) Pr(2  X  7) = Pr(X=2) + Pr(X=3) + Pr(X=4) + Pr(X=5) + Pr(X=6) + Pr(X=7)
= 𝑓𝑥 2 + 𝑓𝑥 3 + 𝑓𝑥 4 + 𝑓𝑥 5 + 𝑓𝑥 6 + 𝑓𝑥 7 + 𝑓𝑥 8
2
= /36 + 3/36 +4/36 +5/36 + 6/36 +7/36 = 27/36 = 3/4

2I EXPECTED VALUE OF A RANDOM VARIABLE :

As the random variable can assume many different values, in general, we would like to find out the value of the
random variable most likely to occur. For an example we may like to know the expected performance level of a
student participated for a particular program. This value is named as the expected value of the random variable
and defined as
𝐸 𝑋 = 𝑋. 𝑓𝑥 X
In example 24,
1 12 22 32 42 52
𝐸 𝑋 = 𝑋𝑓𝑥 𝑋 = 𝑋 55 𝑋 2 = 0 + 1. 55 + 2. 55 + 3. 55 + 4. 55 + 5. 55
1 8 27 64 125 225 45
=0+ 55
+ 55
+ 55
+ 55
+ 55
= 55
= 11

It can also be shown that the expected value of a random variable is also the mean value of the random variable.

When X is a random variable, any function of X, either ‘aX + b’ or ‘X2’ are also random variables and their
expected values are defined as

𝐸 𝑎𝑋 + 𝑏 = 𝑎𝑋 + 𝑏 𝑓𝑥 𝑋

𝐸 𝑋2 = 𝑋 2 𝑓𝑥 𝑋

2J VARIANCE OF A RANDOM VARIABLE :

When the random variable assumes many different values, we would like to know, not only the expected value
of the random variable, but how much it will vary from its center. This variation is termed as the variance of the
random variable and defined as
𝑉 𝑋 = 𝐸 𝑋2 − 𝐸 𝑋 2

In example 24,
1 2
𝐸 𝑋2 = 𝑋 2 𝑓𝑥 𝑋 = 𝑋2 𝑋
55
12 22 32 42 52
= 0 + 12 . + 22 . + 32 . + 42 . + 52 .
55 55 55 55 55
1 16 81 256 625 979
= 0 + 55 + 55 + 55
+ 55
+ 55
= 55

Therefore 𝑉 𝑋 = 𝐸 𝑋2 − 𝐸 𝑋 2

979 225 2 644


= − =
55 55 605

Eg 26 : Consider the probability distribution function given by


X
fX(x) = /15 for X = 1, 2, 3, 4, 5
= 0 elsewhere
Then
1 1 2 3 4 5
𝐸 𝑋 = 𝑋𝑓𝑥 𝑋 = 𝑋 𝑋 = 1. + 2. + 3. + 4. + 5.
15 15 15 15 15 15
1 4 9 16 25 55 11
=0+ 15
+ 15
+ 15
+ 15
+ 15
= 15
= 3
= 3.67

55
1
𝐸 𝑋2 = 𝑋 2 𝑓𝑥 𝑋 = 𝑋2 𝑋
15
1 2 3 4 5
= 12 . + 22 . + 32 . + 42 . + 52
15 15 15 15 15
1 8 27 64 125 225
= 0 + 15 + 15 + 15
+ 15 + 15
= 15
= 15

Therefore 𝑉 𝑋 = 𝐸 𝑋2 − 𝐸 𝑋 2

= 15 – (3.67)2 = 15 – 13.44 = 1.56

Eg 27 : Consider the probability distribution function given by


1
fX(x) = /7 for X = 1, 2, 3
2
= /7 for X = 4 , 5
= 0 elsewhere
Then
1 1 1 2 2
𝐸 𝑋 = 𝑋𝑓𝑥 𝑋 = 1. 7 + 2. 7 + 3. 7 + 4. 7 + 5. 7
1 2 3 8 10 24
= 7
+ 7
+ 7
+ 7
+ 7
= 7
= 3.43

𝐸 𝑋2 = 𝑋 2 𝑓𝑥 𝑋
1 1 1 2 2
= 12 . 7 + 22 . 7 + 32 . 7 + 42 . 7 + 52 7
1 4 9 32 50 96
= +7 + + + = = 13.71
7 7 7 7 7

Therefore 𝑉 𝑋 = 𝐸 𝑋2 − 𝐸 𝑋 2

= 13.71 – (3.43)2 = 13.71 – 11.76 = 1.95

Eg 28 : Consider the probability distribution function given by


x
fX(x) = /36 for X = 1, 2, 3 , 4 , 5 , 6 , 7 , 8
= 0 elsewhere
Then
1 2 3 4 5 6 7 8
𝐸 𝑋 = 𝑋𝑓𝑥 𝑋 = 1. 36 + 2. 36 + 3. 36 + 4. 36 + 5. 36 + 6. 36 + 7. 36 + 8. 36
1 4 9 16 25 36 49 64 204
= 36
+ 36
+ 36
+ 36
+ 36
+ 36
+ 36
+ 36
= 36
= 5.67

𝐸 𝑋2 = 𝑋 2 𝑓𝑥 𝑋
1 2 3 4 5 6 7 8
= 12 . 36 + 22 . 36 + 32 . 36 + 42 . 36 + 52 36 + 62 36 + 72 36 + 82 36
1 8 27 64 125 216 343 512 1296
= 36
+ 36 + 36
+ 36 + 36
+ 36
+ 36
+ 36
= 36
= 36

Therefore 𝑉 𝑋 = 𝐸 𝑋2 − 𝐸 𝑋 2

= 36 – (5.67)2 = 36 – 32.15 = 3.85

56

You might also like