Sei sulla pagina 1di 17

Chapter 2

Random Variable
Week 2
L1- Discrete random variable
L2- Continuous random variable

DISCRETE RANDOM VARIABLES


Learning Objectives:
At the end of the lecture, you will be able to :

- describe types of random variables


- calculate their probability distribution and their
cumulative distribution

Jan 2012

Random Variable:

A numerical variable whose measured value can change from is one outcome of
random experiment.

An uppercase letter ( say X ) is used to denote a random variable.


After the experiment is conducted, the measured value is denoted by a lowercase
letter, say x = 10.
Probability distribution / distribution of a random variable X:
-description of the set of probabilities associated with the possible values of X.
Probability mass function:
describe the probability distribution of a discrete random variable
Probability density function:
describe the probability distribution of a continuous random variable

Jan 2012

Examples of random variables:


The number of scratches on a surface. Integer values ranging from
zero to about 5 are possible values.
X = { 0, 1, 2, 3, 4,5}
The time taken to complete an examination. Possible values are 15
minutes to over 3 hours.
X = { 15 x 180 }

Jan 2012

DISCRETE RANDOM VARIABLE


X is a discrete random variable if:
The set x of values of X is finite or countable.

The Probability Mass Function (pmf) of X is a set of

probability values pi assigned to each of the values


of xi
1. f ( xi ) P( X xi ) , 0 P( x) 1 for each value of x
2. p( x) P( X x) 1
Jan 2012

Example 1: The sample space for a machine


breakdown problem is
S = { electrical, mechanical, misuse }
and each of these failures is associated with a repair
cost of about RM200, RM350 and RM50 respectively.
Let say that P(cost=50)= 0.3, P(cost = 200) = 0.2 and
P(cost = 350) = 0.5. The probability mass function is
given either in tabular or graphical form.

Jan 2012

X=x

50

f(x) = P(X= x) 0.3

200 350
0.2

0.5

tabular form
P( x )

0.5
0.3
0.2
50

200
cost

350

line graph
Jan 2012

CUMULATIVE DISTRIBUTION FUNCTION


The cumulative distribution F(x) of a discrete random
variable X with probability mass function f(x) is

F ( x) = P( X x)

f (x )

xi x

The cumulative distribution of F(x) is an increasing step


function with steps at the values taken by the random
variable.
The height of the steps are probabilities of taking these
values.
Jan 2012

From Example 1 ( machine breakdowns) : The


probability distribution is
X=x

50

f(x) = P(X= x) 0.3

200 350
0.2

0.5

The following cumulative distribution is obtained


x 50 F ( x) P(cost x ) 0
50 x 200 F ( x) P(cost x ) 0.3
200 x 350 F ( x) P(cost x ) 0.3 0.2 0.5
350 x F ( x) P(cost x ) 0.3 0.2 0.5 1.0
Jan 2012

F( x )
1.0
Graph of F(x)
0.5
0.3
50

200
350
Cost ( RM )

0
0.3

F(x) = P(X x)
0.5

1
Jan 2012

for x 50
for 50 x 200
for 200 x 350
for x 350
10

MEAN AND VARIANCE :- Discrete R.V


We can summarize probability distribution by its mean
and variance.
Mean or expected value is
n

E ( X ) xi f ( xi )
i 1

Variance of X is given as
n

2 V ( X ) E ( X ) 2 xi2 f ( xi ) 2
i 1

Standard deviation of X is .
Jan 2012

11

Example 2:
Given the probability distribution:

0
x

0.1 0.2

2
k

0.2 0.3 0.1

Find,

the value of k that result in a valid probability distribution.


the expected value of x.
the variance and the standard deviation of x.
the probability that x greater than or equal to 1?
the CDF of x .
Jan 2012

12

The value of k that result in a valid probability distribution is:

P( X x ) 0.1 0.2 k 0.2 0.3 0.1 1


i

xi

0.9 k 1 k 0.1
The expected value of X is:
n

E ( X ) xi P( X xi )
i 1

0(0.1) 1(0.2) 2(0.1) 3(0.2) 4(0.3) 5(0.1) 2.7

the variance and the standard deviation of x.

Jan 2012

13

The variance and the standard deviation of X are:


n

V ( X ) E ( X ) xi2 P( X xi ) 2
2

i 1

[0 2 (0.1) 12 (0.2) 2 2 (0.1) 32 (0.2) 4 2 (0.3) 52 (0.1)] (2.7) 2


2 [9.7] - 7.29 2.41
and 1.55
The probability that X greater than or equal to 1 is:

P( X 1) 1 P( X 0) 1 0.1 0.9
Jan 2012

14

The CDF of X :

F ( x) P( X x) 0
For 0 x 1, F ( x) P( X 0) P( x 0) 0.1

For x < 0,

For 1 x 2, F ( x) P( X 1) P( x 0) P( x 1)
0.1 0.2 0.3

For 2 x 3, F ( x) P( X 2) P( x 0) P( x 1) P( x 2)
0.1 0.2 0.1 0.4

For 3 x 4,
F ( x) P( X 3) P( x 0) P( x 1) P( x 2) P( x 3)
0.1 0.2 0.1 0.2 0.6
For 4 x 5,
F ( x) P( X 4) P( x 0) P( x 1) P( x 2)
P( x 3) P( x 4)
0.1 0.2 0.1 0.2 0.3 0.9
Jan 2012

15

For x 5,
F ( x) P( X 5) P( x 0) P( x 1) P( x 2)
P( x 3) P( x 4) P( x 5)
0.1 0.2 0.1 0.2 0.3 0.1) 1
So the CDF of X is

,x 0
,0 x 1
,1 x 2
,2 x 3
,3 x 4
,4 x 5
,x 5

0
0.1

0.3

F ( x ) 0.4
0.6

0.9
1

Jan 2012

16

Exercise 1:

Let X denote the number of bars of service on your cell


phone whenever you are at an intersection with the
following probabilities:
x

0.05

0.15

0.20

0.35

0.15

0.1

Determine the following:


(i) F(x)
(ii) Mean and variance
(iii) P(X < 2)
(iv) P(X >2.5)
Jan 2012

17

Potrebbero piacerti anche