0% found this document useful (0 votes)
18 views

Prof - Kiran Seth: Made By: Rahul Shami & Kaustubh Khade

The document discusses various probability distributions including discrete distributions like Bernoulli, binomial, geometric, negative binomial, and Poisson distributions as well as continuous distributions like uniform, normal, exponential, and Erlang distributions. It also covers generating random variates from these distributions using methods like the linear congruential generator. Finally, it discusses how these distributions can be used in simulation, particularly for modeling queues with a Poisson arrival process.

Uploaded by

Ethan Hunt
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Prof - Kiran Seth: Made By: Rahul Shami & Kaustubh Khade

The document discusses various probability distributions including discrete distributions like Bernoulli, binomial, geometric, negative binomial, and Poisson distributions as well as continuous distributions like uniform, normal, exponential, and Erlang distributions. It also covers generating random variates from these distributions using methods like the linear congruential generator. Finally, it discusses how these distributions can be used in simulation, particularly for modeling queues with a Poisson arrival process.

Uploaded by

Ethan Hunt
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 42

Prof .

Kiran Seth
Made by : Rahul Shami &
Kaustubh Khade
Random in nature……

Some order behind the seeming


disorder………..
DISTRIBUTION:

(a) Discrete:
Coin tossing experiment:
(i) One toss:
Head: success
Tails: failure

P {success} = p =P{X=1}
P {failure} = q =P{X=0}

Where X represent the no. of successes


BERNOULLI’S DISTRIBUTION
(i) n-tosses:
P {k successes} =P{X=k}
=nCk pk qn-k

k=0, 1, 2…………n

BINOMIAL DISTRIBUTION
(i) no. of tosses till first success:

P {first success on kth try}


= qk-1 p
n=[k, ∞)

GEOMETRIC DISTRIBUTION
(i) no. of tosses till kth success:

P { kth success on nth try}

= n-1Ck-1 pk qn-k
k=1, 2, 3…….
= P {Xk = n}

NEGATIVE BINOMIAL
Bernoulli Dist.

(i)

P(X=k)

0
1

x
Binomial Dist.

(ii)

P(X=k)

0
n

x
Geometric Dist.

(iii)

P(X=k)

x
Negative Binomial

(iv)

P(Xk=n)

xk
(i)

P{X=k}= e-λt (λt)k / k!


k=0,1,2,3……..

POISSON DISTRIBUTION
The shape is just like that of the
Binomial Distribution with n→∞.

In fact it can be shown that when

n→∞ & p→0

the Binomial Distribution tends towards


the Poisson.
There exist many other Discrete
Distributions:
(b) CONTINIOUS DISTRIBUTION:

(i) UNIFORM:
fx (X)=1
P {X≤x} =Fx (X) =x
0≤x≤1
Uniform Dist.

PDF CDF

1 1
fX(x)
FX(x)

0 0 1
x 1 x
(ii) NORMAL :
2 2
fX (x)= (1/√2π.σ) e -(x-μ) /2 σ

-∞<x<∞
Normal Dist.

PDF CDF

1
fX(x)
FX(x)

0 μ 0 1
X X
(iii) EXPONENTIAL DISTRIBUTION:

fX (x)=λ e-λx x≥0

FX (x) = 1-e-λx
Exponential Dist.

PDF CDF

λ
1
fX(x)
FX(x)

0 0
x x
(i) ERLANG DISTRIBUTION:

f X(x) = λ e-λx (λx)k-1/(k-1) !

x≥0
PDF CDF

1
fX (x)
k FX (x)
k

0 0
xk xk
(a) MIXED DISTRIBUTION:

P {wq=0} = 1-ρ
P {wq≤ t} = 1-ρe-μ (1-ρ) t
for t > 0

HOW DO WE USE THESE


DISTRIBUTIONS??
POISSON PROCESS

No. of
Arrivals
X (t)

∆t ∆t ∆t

Time (t)
P {one arrival in a small interval of time
∆t } = P {X (∆t) =1}
= λ ∆t
P {more than one arrival} = 0 ∆t

Stationary & independent……


Therefore,
P{X (∆t) = 0} = 1- λ ∆t
No. of arrivals in time t is Poisson
distributed.
P { no arrival in time ∆t }
= e -λ ∆t (λ ∆t)0 /0!
= e - λ ∆t
= 1 - λ ∆t
Inter arrival times are Exponentially
Distributed.
P {an arrival in time ∆t}
= P{X (∆t) = 1}
= 1- e -λ ∆t = 1- (1- λ ∆t)
Time till the nth arrival is Erlang
Distribution.

Sn = X1+ X2 +………..Xn
X (t) ≥ n ↔ Sn ≤ t
t

P {Sn ≤ t} =0 λ e-λt (λt)n-1 dt /(n-1)


= P{ X (t) ≥ n}
SIMULATION
Experiment arm of OR.

If the problem is too complex then resort


to simulation.
RANDOM VARIATE GENERATOR:

Two steps:

(1) Generate u(0,1) r,v


(2) Generate u(0,1) to the
desired Distribution.
Linear Congruential Generator (LCG)

Zi = (aZi-1 + c) (mod m)
a = multiplier
c = increment
m=
modulus
a < m , c < m , Z0< m

Max (Z1, Z2……) = m-1


Min (Z1, Z2…….) = 0
Let
Ui = Zi /m 0≤ ui ≤1

For well chosen a, c, m , ui s behave as


sample from u(0,1) .
LCG Example-1
a=11 , c=0 , m=16 , Zo=1
Zi = (11 Zi-1) (mod 16)
Z1= =11
Z2= =9
Z3= =3
Z4= =1
Z5= =11
Z6= =9
:
:
:
:
1, 11, 9, 3, 1, 11……….

Cycle
Cycle= 4
LCG Example-2
a=13, c=13, m=16 , Zo=1
Zi = (13 Zi-1+13) (mod 16)
Z0 = 1
Z2 = 10
Z3 =0
:
:
:
Z11 = 8
Cycle of length 16 = full period
Ave. ui’s actually random.
They are pseudo random numbers that
pass the statistics tests.
ui’s take discrete value while u(0,1) are
continuous .
Take m large enough so test 1/m is less
than computer round off error.
HOW DO WE GET LARGE PERIODS ?
The LCG has full period iff.

(i) The only positive integer that divides


both m & c is 1.

(ii) If q is a prime no. that divides m then


it divides a-1.

(iii) If 4 divides m then it divides a-1.


RANDOM NUMBERS

F (x) = 1 for 0≤x≤1


= 0 otherwise
1
F (x)

0
X 1
PSEUDO RANDOM NUMBERS

Xn+1= (a Xn + c) (mod m)
a< m, c< m
GENERATING RANDOM NUMBERS
FROM A PROBABILITY DISTRIBUTION
EXPONENTIAL DISTRIBUTION:

R=F (x)=1-e-λx
(1-R) =e-λx
X= ln (1-R)/-λ = ln (R1)/-λ

NORMAL DISTRIBUTION:

R1, R2, R3……….Rn →n random-


numbers

∑ Ri ≈ η (n/2, √n/12) by central limit


theorem.
ERLANG DISTRIBUTION:

X1, X2, X3……… XK ≈ exponential then,

∑ Xi =Sk ≈ Erlang(k)

L = (Total area under the graph) / (total time)

I = (Sum of the idle time) /(no. of idle periods)

W = (Waiting time of customers) /


(total no. of customers)
SIMULATION OF A GI/G /1 QUEUE

No. of
people
in the
system

Time

You might also like