0% found this document useful (0 votes)
25 views16 pages

Chapter 2 - Random Variable - L1 - Jan 2024

Uploaded by

afiqmaniyamin
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)
25 views16 pages

Chapter 2 - Random Variable - L1 - Jan 2024

Uploaded by

afiqmaniyamin
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
You are on page 1/ 16

Chapter 2

Random Variable

L1- Discrete random variable


L2- Continuous random variable
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

2
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:


n describe the probability distribution of a discrete random variable

Probability density function:


ndescribe the probability distribution of a continuous random variable

3
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 }

4
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
5
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.
Identify the random variable giving reasons for your
answer.
Example 2: The analysis of the surface of semi
conductor wafer records the number of particles of
contamination that exceed a certain size. Identify
the possible random variable and its values.

6
Probability mass function may typically be given in
tabular or graphical form
If from Example 1 that P(cost Misuse =50)=0.3, P(cost
Electrical = 200) = 0.2 and P(cost Mechanical = 350) = 0.5.

The probability mass function is given either


f( x )
0.5
X=x 50 200 350
0.3
f(x) = P(X= x) 0.3 0.2 0.5 0.2

50 200 350
tabular form cost

line graph 7
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  E( X 2 )  (E( X ))2
i1

Standard deviation of X is  .
8
From Example 1 that P(cost Misuse =50)=0.3, P(cost
Electrical = 200) = 0.2 and P(cost Mechanical = 350) = 0.5.

The probability mass function is given either


X=x 50 200 350

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


Find
i. the mean of X;
ii. The variance and standard deviation of X.
iii. Probability X greater than 200.

9
Find
i. the mean of X;
ii. the variance and standard deviation of X;
iii. probability X greater than 200.
X=x 50 200 350 Total
f(x) = P(X=x) 0.3 0.2 0.5 1
Xf(x) 15 40 175 230
X2f(x) 750 8000 61250 70000

i. The mean of X = E(X) = Xf ( X ) = 230.

ii. The variance of X = E (X2) – (E(X))2 = 70,000-52,900 = 17,100

and standard deviation of X = sqrt (var (X)) =130.77

iii. Probability X greater than 200 = P(X>200) = 0.5

10
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
i

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.
11
From Example 1 ( machine breakdowns) : The
probability distribution is
X=x 50 200 350

f(x) = P(X= x) 0.3 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

12
F( x )
1.0
Graph of F(x)

0.5
0.3

50 200 350
Cost ( RM )

0 for x  50
0.3 for 50  x  200

F(x) = P(X  x)  
0.5 for 200  x  350

1 for x  350
13
Example 2:

Given the pmf :

X=x 0 1 2 3

0.15 0.25 k 0.35

Find,

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


ii. the expected value of X.
iii. the variance and the standard deviation of X.
iv. the probability that X greater than or equal to 1?
v. the CDF of X .

14
X 0 1 2 3 Total
P(X=x) 0.15 0.25 0.25 0.35 1
X.P(X=x) 0 0.25 0.5 1.05 1.8

X2.P(X=x) 0 0.25 1 3.15 4.4

Var(x) 1.16
sd(x) 1.077033

0 for x  0
0.15 for 0  x  1


F(x) = P(X  x)  0.4 for 1  x  2
0.65 for 2  x  3

1
 for x  3
15
Exercise :

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 1 2 3 4 5
0.05 0.15 0.20 k 0.15 0.1

Determine the following:


(i) the value of k,
(ii) Mean and variance,
(iii) P(X < 2)
(iv) P(X >2.5)
(v) cumulative distribution function, F(x) .
16

You might also like