You are on page 1of 9

1

Mean of a Random Variable

INSE 6320 -- Week 3

Risk Analysis for Information and Systems Engineering

Descriptive Statistics
Discrete Probability Distributions
Continuous Probability Distributions
Stochastic Processes
The relationship for determining the Mean or Expected Value is the same as the
Dr. A. Ben Hamza

Concordia University

Random Variables and Probability Density Functions


A random variable is a quantity whose value is not known exactly but its probability distribution is known. The
value of the random variable will vary from trial to trial as the experiment is repeated. The variables
probability density function (PDF) describes how these values are distributed (i.e. it gives the probability that
the variable value falls within a particular interval).
Continuous PDFs
f(x)

relationship for finding centroid of a geometric shape. According to this similarity,


graphical methods used to determine centroid could be used to find the Mean
Value for some simple density functions.

f(x)

All values between 0


and 1 are equally likely

0
1
Uniform distribution
(e.g. soil texture)

0
Exponential distribution
(e.g. event rainfall)
0.3

f (x)
A Discrete PDF

0.2

Probability that x = 2

0.25
0.15
0.1

0
1
2
3
4
x
Discrete distribution
(e.g. number of severe storms)

Only discrete
values (integers)
are possible

Variance of a Random Variable


The (population) variance of random variable (RV) gives an idea of how
widely spread the values of the RV are likely to be. It is the second moment of
the distribution, indicating how closely concentrated around the expected
value of the distribution is. The variance is defined by

Var ( X ) E ( X 2 ) ( E ( X )) 2 2

Smallest values
are most likely

The variance is a measure of risk. The variance examines the differences


between each outcome and the expected value.
x

Var ( X ) is referred to as the standard deviation

Poisson Probability Distribution

The normal probability distribution is the

The Poisson distribution is

e
f ( x)
x!

x 0,1, 2,...

Where the parameter >0 is the mean number of successes in the interval.
The mean and variance of the Poisson distribution are

and

Normal Probability Distribution


most important distribution for describing
a continuous random variable.
It has been used in a wide variety of
applications:
Heights and weights of people
Test scores
Scientific measurements
Amounts of rainfall
It is widely used in statistical inference

The normal distribution is


f ( x)

( x ) 2
2 2

with mean and variance

x
2

The normal distribution is: X N ( , 2 )


The visual appearance of the normal
distribution is a symmetric, unimodal or
bell-shaped curve as shown in the figure.

Poisson Distribution: Example

Calculating Normal Probabilities

The number of typographical errors in new editions of textbooks varies


considerably from book to book. After some analysis an instructor concludes
that the number of errors is Poisson distributed with a mean of 1.5 per 100
pages. The instructor randomly selects 100 pages of a new book. What is the
probability that there are no typos?

We can use the following function to convert any normal random variable to a
standard normal random variable

That is, what is P(X=0) when

= 1.5?
0

f (0) P( X 0)

e x e 1.51.50

0.2231
x!
0!
Some advice: always
draw a picture!

There is about a 22% chance of finding zero errors

Calculating Normal Probabilities


P(45 < X < 60) ?

11

Lognormal Distribution Probability Density Function


mean of 50 minutes and a
standard deviation of 10 minutes

A random variable X is said to have the Lognormal Distribution with


parameters and , where > 0 and > 0, if the probability density
function of X is:
1
2
2 ln x
2
, for x >0

f ( x)

f(x)

for x

10

12

Lognormal Distribution - Probability Distribution Function


Examples:

If

X ~ LN(,),

(0.76) 0.776373
(1.3) ?

then

Y= ln (X) ~ N(,)

( 3) 1 (3) ?
(3.86) ?

ln x
F(x) P( X x) F


where F(z) is the cumulative probability distribution function of N(0,1)

13

Lognormal Distribution
Mean or Expected Value of X

Lognormal Distribution Example Solution


(a)

1
2
2
X E( X ) e
Median of X

X E( X ) e

2 2 2
e 1
X e

2
2

e 5.005
149.16

median e

Standard Deviation of X

15

Lognormal Distribution - Example


A theoretical justification based on a certain material failure mechanism
underlies the assumption that ductile strength X of a material has a
lognormal distribution.
If the parameters are =5 and =0.1 ,
Find:
(a) x and x
(b) P(X >120)
(c) P(110 X 130)
(d) The median ductile strength
(e) The expected number having strength at least 120, if ten different
samples of an alloy steel of this type were subjected to a strength test.
(f) The minimum acceptable strength, If the smallest 5% of strength
values were unacceptable.

X e 2 (e 1)

1
2

223
14.933
14

Lognormal Distribution Example Solution


(b)

P ( X 120) 1 P ( X 120)
ln 120 5.0
)
0. 1
1 F (2.13)
1 P( Z

1 0.0166
0.9834

16

Lognormal Distribution Example Solution


(C)

17

Lognormal Distribution Example Solution


Y ~ B (10,0.983)

ln 110 5.0
ln 130 5.0
P (110 X 130) P (
Z
)
0 .1
0 .1

E (Y ) np 10 0.983
9.83

P( 2.99 Z 1.32)
F (1.32) F ( 2.99)

f) The value of x, say xms, for which P ( X x ms ) 0.05 is


determined as follows:

0.0934 0.0014
0.092
(d)

X 0.5 median e e 5 148.41

ln xms 5.0
) 0.05 ,
0.1
,
P ( Z 1.64) 0.05

and

P (Z

so that

ln xms 5.0
1.64
0.1
xms 125.964

therefore

Lognormal Distribution Example Solution


(e) Let Y=number of items tested that have strength of at
least 120
y=0,1,2,,10

p P ( X 120)
1 P ( X 120)
ln 120 5.0
)
0.1
1 F ( 2.12)
1 P(Z

19

18

20

Exponential Distribution
A random variable X is defined to be exponential random variable (or
say X is exponentially distributed) with positive parameter if its
probability density function is given by:
e x
f ( x)
0

Note:

if x 0, 0
if x 0

f ( x) dx e x dx e x

Thus, f(x) is a probability density function.


The cumulative distribution function:
x

F ( x) P( X x) f (t ) dt 0

1 0.0170

For

x 0, F ( x) 0 dt 0

0.983

For

x 0, F ( x) et dt et 1 e x

1 e x
F (x)
0

if x 0
if x 0

21

Exponential Distribution

A continuous random variable X is said to have a

Expectation:

E[ X ] xf ( x )dx

x e x dx

E[ X ] xe x

( e x ) dx
0

e x

1
1

x
e

( )

1
dx e x

f ( x; , )
0

( e x )2 x dx 2 xe dx

x e dx

2 1
2

2

Var [ X ] E [ X 2 ] ( E[ X ]) 2

2 1
1
2
2

22

Exponential Distribution: Example

x 0,

where >0 and >0


The Standard Gamma Distribution has = 1
The parameter is called the scale parameter because values other than
1 either stretch or compress the probability density function.
Important applications in waiting time and reliability analysis. Special cases
include exponential and chi-square distributions

x 2 e x dx x 2 de x

Integration by part:
E[ X 2 ] x 2e x

for

Otherwise

Variance:
E [ X 2 ] x 2 f ( x) dx

Gamma Distribution, if

the probability density function of X is

x de x

Integration by part:

23

Gamma Distribution

The lifetime of an alkaline battery (measured in hours) is exponentially


distributed with = 0.05. Find the probability a battery will last between 10 & 15

24

Gamma Function
Definition
For 0

, the Gamma Function ( ) is defined by

hours

( )
P (10 X 15)
F (15) F (10)
P(10 X 15)

e (0.05)(10) e (0.05)(15)
e 0.5 e 0.75
0.1341

There is about a 13%


chance a battery will only
last 10 to 15 hours

1 x

e dx

Properties of the gamma function:


(1)

For any

1, ( ) ( 1) ( 1)

(2) For any positive integer,


(3)

1

2

n, ( n) ( n 1)!

25

Gamma Density Functions


f ( x; , )

1
2, 0.5

A stochastic process is a family of time indexed random variables X t


where t belongs to an index set. Formal notation, X t : t I where I is
an index set that is a subset of R.

Examples of index sets:


1) I = (-, ) or I = [0, ]. In this case Xt is a continuous time
stochastic process.
2) I = {0, 1, 2, .} or I = {0, 1, 2, }. In this case X t is a discrete
time stochastic process.

We use uppercase letter {Xt } to describe the process. A time series,


{xt } is a realization or sample function from a certain process.

We use information from a time series to estimate parameters and


properties of process {Xt }.

0.8
0.6

1, 1

0.4

2, 2
2, 1

0.2
0
0

x
2

If X~G(, ), then
Mean or Expected Value: E ( X )
Standard Deviation:
26

Stochastic Process - Introduction

Stochastic processes are processes that proceed randomly in time.

Rather than consider fixed random variables X, Y, etc. or even


sequences of i.i.d. random variables, we consider sequences X 0, X 1,
X 2, ., where X t represent some random quantity at time t.

27

Stochastic Process - Definition

28

Probability Distribution of a Process

For any stochastic process with index set I, its probability


distribution function is uniquely determined by its finite dimensional
distributions.

In general, the value X t might depend on the quantity X t-1 at time t-1,
or even the value X s for other times s < t.

The k dimensional distribution function of a process is defined by


FX t

,..., X t k

for any t1 ,..., t k I

Example: simple random walk .

x1 ,..., x k P X t

x1 ,..., X t k x k

and any real numbers x1, , xk .

The distribution function tells us everything we need to know about


the process {X t }.

29

Moments of Stochastic Process

31

The Poisson Process


1st Event 2nd Event 3rd Event
Occurs
Occurs
Occurs

We can describe a stochastic process via its moments, i.e.,

X1

E X t , E X t2 , E X t X s etc. We often use the first two moments.

X4

X3

X2

4 th Event
Occurs

time
1

The mean function of the process is E X t t .

The variance function of the process is Var X t t2 .

X1, X2, represent a sequence of positive independent random variables with

The covariance function between X t , X s is

t=0

S2

Xi

S3

i 1

Xi

S4

i 1

i 1

identical distribution
Xn depicts the time elapsed between the (n-1)th event and nth event occurrences
Sn depicts a random variable for the time at which the nth event occurs
Define N(t) as the number of events that have occurred up to some arbitrary time t.

The correlation function between X t , X s is


X t , X s

Xi
i 1

Cov X t , X s E X t t X s s

S1

Cov X t , X s

t2 s2

The counting process { N(t), t>0 } is called a Poisson process if the interoccurrence times X1, X2, follow the exponential distribution

These moments are often function of time.

30

Counting process

32

The Poisson Process: Example

A stochastic process {N(t) : t 0} is a counting process if N(t) represents


the total number of events that occur by time t.
eg, # of persons entering a store before time t, # of people who were
born by time t, # of goals a soccer player scores by time t.
N(t) should satisfy:
N(t)>0
N(t) is integer valued
If s<t, then N(s)< N (t)
For s<t, N(t)-N(s) equals the number of events that occur in (s, t]

For some reason, you decide everyday at 3:00


PM to go to the bus stop and count the number
of buses that arrive. You record the number of
buses that have passed after 10 minutes

Sunday

N (t=10 min) = 2

1st Bus
Arrival

X1=5 min

2nd Bus
Arrival

X2=4 min

3 rd Bus
Arrival

X3=7 min

4 th Bus
Arrival

X4=2 min

time
t=0

S1 = 5 min

S2 = 9 min

S3 = 16 min

S 4 = 18 min

33

The Poisson Process: Example

35

The Poisson Process: Example

For some reason, you decide everyday at 3:00


PM to go to the bus stop and count the number
of buses that arrive. You record the number of
buses that have passed after 10 minutes

Monday
1 st Bus
Arrival

N (t=10 min) =4

2 nd Bus
Arrival

X1=1 min X2=2 min

3rd Bus
Arrival

X3=4 min

5th Bus
Arrival

4th Bus
Arrival

X4=2 min

X5=6 min

Given that Xi follow an exponential distribution then N(t=10) follows


a Poisson Distribution

time
t=0

S1 = 1 min S2 = 3 min

S 3 = 7 min

S4 = 9 min

S 5 = 15 min

34

The Poisson Process: Example


For some reason, you decide everyday at 3:00
PM to go to the bus stop and count the number
of buses that arrive. You record the number of
buses that have passed after 10 minutes

Tuesday

N (t=10 min) =1
1st Bus
Arrival

X1=10 min

2nd Bus
Arrival

X2=6 min

time
t=0

S 1 = 10 min

S 2 = 16 min

You might also like