Docsity

Statistical Models in Simulation - Slide Notes | CS 6910, Study notes of Computer Science

Toggle sidebar
bg1
١
Chapter 5
Statistical Models in
Simulation
Banks, Carson, Nelson & Nicol
Discrete-Event System Simulation
٢
Purpose & Overview
The world the model-builder sees is probabilistic rather
than deterministic.
Some statistical model might well describe the variations.
An appropriate model can be developed by sampling the
phenomenon of interest:
Select a known distribution through educated guesses
Make estimate of the parameter(s)
Test for goodness of fit
In this chapter:
Review several important probability distributions
Present some typical application of these models
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Statistical Models in Simulation - Slide Notes | CS 6910 and more Study notes Computer Science in PDF only on Docsity!

Chapter 5

Statistical Models in

Simulation

Banks, Carson, Nelson & Nicol

Discrete-Event System Simulation

٢

Purpose & Overview

„ The world the model-builder sees is probabilistic rather

than deterministic.

Some statistical model might well describe the variations.

„ An appropriate model can be developed by sampling the

phenomenon of interest:

Select a known distribution through educated guesses

Make estimate of the parameter(s)

Test for goodness of fit

„ In this chapter:

Review several important probability distributions

Present some typical application of these models

٣

Review of Terminology and Concepts

„ In this section, we will review the following

concepts:

Discrete random variables

Continuous random variables

Cumulative distribution function

Expectation

٤

Discrete Random Variables [Probability Review]

„ X is a discrete random variable if the number of possible

values of X is finite, or countably infinite.

„ Example: Consider jobs arriving at a job shop.

„ Let X be the number of jobs arriving each week at a job shop. „ Rx = possible values of X (range space of X ) = {0,1,2,…} „ p(x (^) i) = probability the random variable is xi = P(X = xi)

p(x (^) i), i = 1,2, … must satisfy:

The collection of pairs [x (^) i, p(x (^) i)], i = 1,2,…, is called the probability distribution of X , and p(x (^) i) is called the probability mass function (pmf) of X.

∞ = =

≥

  1. 1 ( ) 1
  2. ( ) 0 ,forall

i i

i px

px i

٧

Cumulative Distribution Function [Probability Review]

„ Cumulative Distribution Function (cdf) is denoted by F(x) , where F(x) = P(X <= x)

If X is discrete, then

If X is continuous, then

„ Properties

„ All probability question about X can be answered in terms of the cdf, e.g.:

≤

= x x

i i

F x px all

() ( )

x F ( x ) f ( t ) dt

3.lim () 0

2.lim () 1

  1. isnondecreasingfunction.If ,then () ()

=

=

≤

→−∞

→∞ F x

Fx

F a b Fa Fb

x

x

p

P ( a p X ≤ b )= F ( b )− F ( a ),forall a p b

٨

Cumulative Distribution Function [Probability Review]

„ Example: An inspection device has cdf:

The probability that the device lasts for less than 2 years:

The probability that it lasts between 2 and 3 years:

/ 2 0

( ) x

x (^) t F x = (^) ∫ e −^ dt = − e −

P ( 0 ≤ X ≤ 2 )= F ( 2 )− F ( 0 )= F ( 2 )= 1 − e −^1 = 0. 632

P ( 2 ≤ X ≤ 3 )= F ( 3 )− F ( 2 )=( 1 − e −^ (^3 /^2 ))−( 1 − e −^1 )= 0. 145

٩

Expectation [ Probability Review]

„ The expected value of X is denoted by E(X)

If X is discrete

If X is continuous

a.k.a the mean, m, or the 1st^ moment of X

A measure of the central tendency

„ The variance of X is denoted by V(X) or var(X) or σ^2

Definition: V(X) = E[(X – E[X]^2 ]

Also, V(X) = E(X^2 ) – [E(x)] 2

A measure of the spread or variation of the possible values of X around the mean

„ The standard deviation of X is denoted by σ

Definition: square root of V(X)

Expressed in the same units as the mean

i

E x xi pxi all

() ( )

∞ E ( x )= (^) −∞ xf ( x ) dx

B

١٠

Expectations [ Probability Review ]

„ Example: The mean of life of the previous inspection device
is:
„ To compute variance of X , we first compute E(X 2 ) :
„ Hence, the variance and standard deviation of the device’s life
are:

0

/ 2 (^00)

/ 2

= (^) ∫ =− ∫

∞ (^) − ∞ ∞ (^) −

e dx

x

E X xe dx

x x xe

2 /^2

0

/ 2 0 0

∫ − ∫

∞ (^) − ∞ ∞ (^) −

e dx
x

E X xex^ dx x e x

2

V X

V X

σ

١١

Useful Statistical Models

„ In this section, statistical models appropriate to

some application areas are presented. The

areas include:

Queueing systems

Inventory and supply-chain systems

Reliability and maintainability

Limited data

١٢

Queueing Systems [Useful Models]

„ In a queueing system, interarrival and service-time

patterns can be probablistic (for more queueing examples, see

Chapter 2).

„ Sample statistical models for interarrival or service time

distribution:

Exponential distribution: if service times are completely random

Normal distribution: fairly constant but with some random variability (either positive or negative)

Truncated normal distribution: similar to normal distribution but with restricted value.

Gamma and Weibull distribution: more general than exponential (involving location of the modes of pdf’s and the shapes of tails.)

١٣

Inventory and supply chain [Useful Models]

„ In realistic inventory and supply-chain systems, there are

at least three random variables:

The number of units demanded per order or per time period

The time between demands

The lead time

„ Sample statistical models for lead time distribution:

Gamma

„ Sample statistical models for demand distribution:

Poisson: simple and extensively tabulated.

Negative binomial distribution: longer tail than Poisson (more large demands).

Geometric: special case of negative binomial given at least one demand has occurred.

١٤

Reliability and maintainability [Useful Models]

„ Time to failure (TTF)

Exponential: failures are random

Gamma: for standby redundancy where each

component has an exponential TTF

Weibull: failure is due to the most serious of a large

number of defects in a system of components

Normal: failures are due to wear

١٧

Bernoulli Trials

and Bernoulli Distribution [Discrete Dist’n]

„ Bernoulli Trials:

Consider an experiment consisting of n trials, each can be a success or a failure. „ Let Xj = 1 if the jth experiment is a success „ and Xj = 0 if the jth experiment is a failure

The Bernoulli distribution (one trial):

where E(Xj) = p and V(Xj ) = p(1-p) = pq

„ Bernoulli process:

The n Bernoulli trials where trails are independent: p(x 1 ,x 2 ,…, x (^) n) = p 1 (x 1 )p 2 (x 2 ) … pn (xn)

0 , otherwise

( ) ( ) p q x ,j ,,...,n

p x j n p x px j

j j j j

١٨

Binomial Distribution [Discrete Dist’n]

„ The number of successes in n Bernoulli trials, X , has a

binomial distribution.

The mean, E(x) = p + p + … + p = n*p

The variance, V(X) = pq + pq + … + pq = n*pq

The number of outcomes having the required number of successes and failures

Probability that there are x successes and (n-x) failures

−

0 , otherwise
pq x n
x
n
px

x nx

١٩

Geometric & Negative

Binomial Distribution [Discrete Dist’n]

„ Geometric distribution

The number of Bernoulli trials, X , to achieve the 1 st^ success:

E(x) = 1/p, and V(X) = q/p^2

„ Negative binomial distribution

The number of Bernoulli trials, X, until the k th^ success

If Y is a negative binomial distribution with parameters p and k, then:

E(Y) = k/p, and V(X) = kq/p^2

−

0 , otherwise
q^1 p x n
px

x

−

0 , otherwise

q p y kk k k

y px

yk k

٢٠

Poisson Distribution [Discrete Dist’n]

„ Poisson distribution describes many random processes

quite well and is mathematically quite simple.

where α > 0, pdf and cdf are:

E(X) = α = V(X)

−

0 , otherwise
x
x
e
px
α α x

∑

−

x

i

i

i
e
F x

α α

٢٣

Uniform Distribution [Continuous Dist’n]

„ A random variable X is uniformly distributed on the

interval ( a,b ), U ( a,b ), if its pdf and cdf are:

„ Properties

P(x 1 < X < x 2 ) is proportional to the length of the interval [ F(x 2 ) – F(x 1 ) = (x 2 -x 1 )/(b-a) ]

E(X) = (a+b)/2 V(X) = (b-a)^2 /

„ U(0,1) provides the means to generate random numbers,

from which random variates can be generated.

0 , otherwise

f ( x ) b a a x b  

x b

a x b b a

x a

x a F x 1 ,

( ) p

p

٢٤

Exponential Distribution [Continuous Dist’n]

„ A random variable X is exponentially distributed with

parameter λ > 0 if its pdf and cdf are:

−

0 , elsewhere

e x f x λ^ λ x 

 

 = − ≥ = ∫

− 1 − , 0

0, 0 () 0 e dt e x

x F x x^ λ t λ x λ

p

E(X) = 1/ λ V(X) = 1/ λ^2

Used to model interarrival times when arrivals are completely random, and to model service times that are highly variable

For several different exponential pdf’s (see figure), the value of

intercept on the vertical axis is λ,

and all pdf’s eventually intersect.

٢٥

Exponential Distribution [Continuous Dist’n]

„ Memoryless property

For all s and t greater or equal to 0:

P(X > s+t | X > s) = P(X > t)

Example: A lamp ~ exp(λ = 1/3 per hour), hence, on

average, 1 failure per 3 hours.

„ The probability that the lamp lasts longer than its mean life is: P(X > 3) = 1-(1-e -3/3 ) = e-1^ = 0. „ The probability that the lamp lasts between 2 to 3 hours is: P(2 <= X <= 3) = F(3) – F(2) = 0. „ The probability that it lasts for another hour given it is operating for 2.5 hours: P(X > 3.5 | X > 2.5) = P(X > 1) = e-1/3^ = 0.

٢٦

Normal Distribution [Continuous Dist’n]

„ A random variable X is normally distributed has the pdf:

Mean:

Variance:

Denoted as X ~ N( μ , σ^2 )

„ Special properties:

f( μ -x)=f( μ +x) ; the pdf is symmetric about μ.

The maximum value of the pdf occurs at x = μ; the mean and

mode are equal.

lim (^) x →−∞ f ( x )= 0 ,andlim x →∞ f ( x )= 0

= − p x p x f x , 2

exp 2

2

σ

μ σ π

− ∞p μp∞
σ^2 f 0

٢٩

Weibull Distribution [Continuous Dist’n]

„ A random variable X has a Weibull distribution if its pdf has the form:

„ 3 parameters:

Location parameter: υ,

Scale parameter: β , (β > 0)

Shape parameter. α, (> 0)

„ Example: υ = 0 and α = 1 :

 

 

 ≥ 

 

 

 

  

  

−^ −  

  

 −

−

0 , otherwise

() exp ,

1 ν α

ν α

ν α

β x β x β x f x

( −∞ p νp∞ )

When β = 1 , X ~ exp( λ = 1/ α )

٣٠

Lognormal Distribution [Continuous Dist’n]

„ A random variable X has a lognormal distribution if its

pdf has the form:

Mean E(X) = eμ+σ (^2) /

Variance V(X) = e2μ+σ^2 /2 (^ eσ^2 - 1)

„ Relationship with normal distribution

When Y ~ N( μ , σ^2 ), then X = e Y^ ~ lognormal(μ, σ^2 )

Parameters μ and σ^2 are not the mean and variance of the lognormal

 

 

 

 

 

 

 (^) − = − 0, otherwise

, 0 2

exp ln 2

1 ()

2 σ^2 x f

x μ f x π σx

μ =1, σ^2 =0.5,1,2.

٣١

Poisson Distribution

„ Definition: N(t) is a counting function that represents

the number of events occurred in [0,t].

„ A counting process { N(t), t>=0 } is a Poisson process

with mean rate λ if:

Arrivals occur one at a time

{ N(t), t>=0 } has stationary increments

{ N(t), t>=0 } has independent increments

„ Properties

Equal mean and variance: E[N(t)] = V[N(t)] = λ t

Stationary increment: The number of arrivals in time s to t is

also Poisson-distributed with mean λ (t-s)

, for 0 and 0 , 1 , 2 ,... !

[ ()= ]= ≥ =

− t n n

e t PNt n

λ t λ n

٣٢

Stationary & Independent Memoryless

Interarrival Times [Poisson Dist’n]

„ Consider the interarrival times of a Possion process ( A 1 , A 2 , … ), where Ai is the elapsed time between arrival i and arrival i+

The 1st^ arrival occurs after time t iff there are no arrivals in the interval [0,t], hence: P{A 1 > t} = P{N(t) = 0} = e-^ λ t P{A 1 <= t} = 1 – e-^ λ t^ [cdf of exp(λ)]

Interarrival times, A 1 , A 2 , … , are exponentially distributed and independent with mean 1/ λ

Arrival counts ~ Poi( λ )

Interarrival time B42 ~ Exp(1/ λ )

٣٣

Splitting and Pooling [Poisson Dist’n]

„ Splitting:

Suppose each event of a Poisson process can be classified as Type I, with probability p and Type II, with probability 1-p.

N(t) = N1(t) + N2(t) , where N1(t) and N2(t) are both Poisson

processes with rates λ p and λ (1-p)

„ Pooling:

Suppose two Poisson processes are pooled together

N1(t) + N2(t) = N(t) , where N(t) is a Poisson processes with rates

N(t) ~ Poi( λ )

N1(t) ~ Poi[ λ p]

N2(t) ~ Poi[ λ (1-p)]

λ

λp

λ(1-p)

N(t) ~ Poi( λ 1 + λ 2 )

N1(t) ~ Poi[ λ 1 ]

N2(t) ~ Poi[ λ 2 ]

λ (^1) λ 1 + λ (^2)

λ 2

٣٤

Nonstationary Poisson

Process (NSPP) [Poisson Dist’n]

„ Poisson Process without the stationary increments, characterized by

λ (t) , the arrival rate at time t.
„ The expected number of arrivals by time t, Λ (t) :
„ Relating stationary Poisson process n(t) with rate λ=1 and NSPP N(t)
with rate λ (t) :

Let arrival times of a stationary process with rate λ = 1 be t 1 , t 2 , …,

and arrival times of a NSPP with rate λ (t) be T 1 , T 2 , …, we know:
ti = Λ (Ti)
Ti = Λ −1 (ti)

= (^) ∫

t Λ(t) λ(s)ds 0

٣٥

„ Example: Suppose arrivals to a Post Office have rates 2 per minute from 8 am until 12 pm, and then 0.5 per minute until 4 pm. „ Let t = 0 correspond to 8 am, NSPP N(t) has rate function:

Expected number of arrivals by time t:

„ Hence, the probability distribution of the number of arrivals between 11 am and 2 pm. P[N(6) – N(3) = k] = P[N( Λ (6)) – N( Λ (3)) = k] = P[N(9) – N(6) = k] = e(9-6)(9-6) k/k! = e^3 (3) k/k!

 ≤

≤

  1. 5 , 4 8

2 , 0 4 ( ) p

p t

t λ t



 

  • = + ≤

≤ Λ =

∫ 2 ∫ 0.^526 ,^48

2 , 0 4 ( )^4 0 4 p

p t t ds ds

t t t t

Nonstationary Poisson

Process (NSPP) [Poisson Dist’n]

٣٦

„ A distribution whose parameters are the observed values

in a sample of data.

May be used when it is impossible or unnecessary to establish that a random variable has any particular parametric distribution.

Advantage: no assumption beyond the observed values in the sample.

Disadvantage: sample might not cover the entire range of possible values.

Empirical Distributions [Poisson Dist’n]