Vous êtes sur la page 1sur 38

Statistical Models in Simulation

Rechnergesttzte Netzanalysen
Computational Network Analysis
Prof. Dr.-Ing. Bernd Noche
M.Sc Mandar Jawale

Statistical Models in Simulation

Introduction
Probability and Statistcs is integral part of Simulation.
Probability statistics are required for:
To model a probabilistic system.
Choose input probability distribution
Perform statistical analysis.

In this lesson , focus on basic probability and statistics relevant to


Simulation.

Statistical Models in Simulation

Applications Statistical Models


Queueing System: interarrival times and the service times.
Exponential distribution, Weibull distribution, and gamma distribution,
normal distribution.
Inventory System: the number of units demanded per order or per
time period, the time between placing an order, and the lead time.
Geometric, Poisson, and negative binomial distribution provide a range
of distribution shapes that satisfy a variety of demand patterns.
The lead time distribution can often be fitted fairly well by a gamma
distribution.
Reliability and Maintainability: time to failure, time to repair.
Time to failure has been modeled with exponential, gamma and Weibull
distribution.
Limited Data: in many instances simulations begin before data
collection has been completed.
Uniform, triangular, and beta distribution.
3

Statistical Models in Simulation

Random Variable
Random Variable: is a fuction that assigns a real number to each
point in ths sample space.
Discrete Random Vairable: A random variable is said to be
discrete if it can take on at countable number of values or finite
values (i = 1,2,3,...).
Continuous random variable :A random variable is said to be
continuous such that it can take value for any set of real numbers.(
where the values can between 0 and 1)

Statistical Models in Simulation

Random Variable example


Continuous
position of a particle

Discrete
heads in N coin flips

volume of oil in a tank

score of a soccer game

process inter-arrival time

Demand of a warehouse

Statistical Models in Simulation

Discrete Random Variable(cdf & pmf)


Cumulative distribution function (cdf): All random variables
(discrete and continuous) have a cumulative distribution function.
It is a function giving the probability that the random variable X is
less than or equal to x, for every value x.
A cdf for F(x) of the random variable X is defined for each real
number as follow: F(x) = P(X x) for -<x<
Probability mass function (pmf): The probability that a discrete
random variable X takes on a particular value x, that is, P(X = x)
(all i) p(xi) = 1
F(x) = (xi x) p(xi)

Statistical Models in Simulation

Continuous random variable (cdf & pdf)


Cumulative distribution function (cdf): The probability that the
continuous random variable X assuming a value less than or equal
to x
F(x) = (from - to x) f(y) dy = P(X x)
Probability density function: The probability density function of a
continuous random variable is a function which can be integrated to
obtain the probability that the random variable takes a value in a
given interval.
P(a X b) = (from a to b) f(x) dx
It follows the conditions :
f(x) 0 and (from - to ) f(x) dx = 1

Statistical Models in Simulation

Expectation & Moment


Used to characterize probability distribution functions
The Expectation (expected value) of a random variable x, E[x]: E[x]
= (all i) xi p(xi)
when x is discrete
E[x] = (all x) x f(x)dx
when x is continuous
In general, can be a function of x
E[xn] = (all i) xin p(xi)
when x is discrete
E[xn] = (all x) xn f(x)dx
when x is continuous
The expectation of xn is defined as the nth moment of a random
variable

Statistical Models in Simulation

Expectation & Moment


A variant of the nth moment is the nth moment of a random variable
about the mean
E[(x - E[x])n]
Important: the second moment about the mean
E[(x - E[x])2] = 2 = Var[x]
where = standard deviation of the random variable

Statistical Models in Simulation

Variance and Covariance


Variance: measures of the spread of probability distribution.
It is the measure of dispersion of a variable about its mean.
Thus larger the variance , the more likely the random variable is to
take values far from its mean.
Two distribution have same
mean, but a) has small variance
While b) has large variance
a
b
Covariance
For two random variables x and y: Cov[x, y] = E[(x - E[x]) (y - E[y])]
Measures the linear association between x and y
x and y are independent if Cov[x, y] = 0
Measure of dependence - correlation

10

Statistical Models in Simulation

Distributions

Discrete

Continuous

Bernoulli

Uniform

Binomial

Exponential

Geometric

Weibull

Poisson

Normal
11

Statistical Models in Simulation

Bernoulli Distribution
A Bernoulli (p) random variable X can be outcome of an experiment
that either fails or succeeds. If the probability of success is p,
and we let X=0 if the experiment fails and X=1 if it succeeds, then
X~ Bernoulli (p),. Such an experiment, often called as Bernoulli
Trial.

12

Statistical Models in Simulation

Bernoulli Distribution
Pmf

Cdf

13

Statistical Models in Simulation

Bernoulli Distribution
Applications: Random occurences with two possible outcomes.
Used to generate other discrete random variates eg.
Binomial,geometric and negative binomial
Examples of bernoulli trials

Mode

Interpret

Tossing of coin

1 if heads; 0 if tails

Dart board game

1 if hits bulls eye, 0 if fails

Football score

1 if goal score, 0 if not

14

Statistical Models in Simulation

Binomial Distribution bin(N,p)


The binomial distribution is used when there are exactly two
mutually exclusive outcomes of a trial. These outcomes are
appropriately labeled "success" and "failure". The binomial
distribution is used to obtain the probability of observing x successes
in N trials, with the probability of success on a single trial denoted by
p. The binomial distribution assumes that p is fixed for all trials.

15

Statistical Models in Simulation

Binomial Distribution bin(N,p)


Pmf

Cdf

16

Statistical Models in Simulation

Binomial Distribution bin(N,p)


Applications: Number of defective items in a batch of size N;
number of items in a batch of random size; Number of items
demanded from an inventory.
Numerical Example: A production process manufactures machines
on the average at 2% nonconforming. Every day a random sample
of size 50 is taken from the process. If the sample contains more
than 2 nonconforming machines , the process will be stopped.
what is the probability that the process is stopped by the sampling
scheme?

17

Statistical Models in Simulation

Geometric Distribution geom(p)


The geometric distribution is related to a sequence of Bernoulli trials;
the random variable of interest , X, is defined to be the number of
trials to achieve the first success.
The event {X = 0} occurs when there are x 1 failures followed by a
success. Each of the failures has an associated probability of q = 1
p, and each success has a probability p.

18

Statistical Models in Simulation

Geometric Distribution geom(p)


Pmf

cdf

19

Statistical Models in Simulation

Geometric Distribution geom(p)


Applications: Number of failures before the first success in a
sequence of independent Bernoulli trials with probability p of
success on each trial
Number of items inspected before encountering the first defective
item; number of items in a batch of random sizes; number of item
demanded from an inventory
Numerical Example: Forty percent of the assembled machines are
rejected at the inspection station.
Find the probability that the first acceptable machines is the third
one inspected.

20

Statistical Models in Simulation

Poisson Distribution ()
The Poisson distribution is a discrete probability distribution for the
counts of events that occur randomly in a given interval of time.
X = The number of events in a given interval, then the mean number
of events per interval is

21

Statistical Models in Simulation

Poisson Distribution ()
Pmf

Cdf

22

Statistical Models in Simulation

Poisson Distribution ()
Application: Number of items in a batch of random size, number of
item demanded from inventory.
Numerical Example: A drilling machine repairman is called each
time there is a call for service. The number of calls per hour is
known to occur in accordance with a Poisson distribution with a
mean of 2 per hour.
What is the probability of three calls in the next hour?

23

Statistical Models in Simulation

Uniform Distribution U(a,b)


Uniform distribution is used as a model for a qunatity that is felt to be
randomly varying between a and b about which little else is known.

24

Statistical Models in Simulation

Uniform Distribution U(a,b)


Pdf

Cdf

25

Statistical Models in Simulation

Uniform Distribution U(a,b)


Application: The uniform distribution plays a vital role in simulation.
Random numbers, uniformly distributed between 0 and 1, provide
the means to generate random events.

26

Statistical Models in Simulation

Exponential Distribution
The exponential distribution model the time between independent
events that happen at a constant average rate.
Its also a special case of Weibull distribution where =1.

27

Statistical Models in Simulation

Exponential Distribution
Pdf

Cdf

28

Statistical Models in Simulation

Exponential Distribution
Applications: Inter-arrivals times of customers to a system that
occur at a constant rate. Time to failure of a piece of equipment.
Model service times that are highly variable. Inappropriate for
modeling process delay times.
Numerical Example: The life of a light bulb is given by X, which is
said to have an exponential distribution with mean 2 years.
whats the probability that the life of the light bulb is between 2 and 3
years?

29

Statistical Models in Simulation

Weibull Distribution
Weibull distribution is often used to model the time until failure of
many different physical systems.
for x > 0, Weibull random variable with scale parameter > 0 and
shape parameter > 0.
By inspecting the probability density function, it is seen that when
=1, the Weibull distribution is identical to the exponential distribution.

30

Statistical Models in Simulation

Weibull Distribution
Pdf

Cdf

31

Statistical Models in Simulation

Weibull Distribution
Application: Weibull distribution is often used to model the time
until failure of many different physical systems.
Distribution parameters provide a great deal of flexibility to model
systems in which the number of failures:
Increases with time (e.g., bearing wear);
Decreases with time (some semiconductors).
Remains constant (failures caused by external shocks to the
system).
Numerical Example: The time to failure for a electronic device is
known have a Weibull distribution with = 1/3, and = 200 hours
(time measured in use hours).
what is the mean time to failure of this device? What is the
probability that it fails before 2000 hours?
32

Statistical Models in Simulation

Normal Distribution N(, 2)


Bell-shaped curve symmetric about its mean .
Shape determined by its standard deviation .

Z = (X ) /
33

Statistical Models in Simulation

Normal Distribution N(, 2)


Pmf

Cdf

34

Statistical Models in Simulation

Normal Distribution N(, 2)


Applications: Error of various types, quantities that are sum of a
large numbers.
Numerical Example: The top 5% of applicants will recieve
scholarships. If their score are N(500, 1002 ) , how high the score of
a student should be to qualify for a scholarship?

35

Statistical Models in Simulation

Summary
The world that the simulation analyst sees is probabilistic, not
deterministic.
Reviewed several important probability distributions and showed
applications of the probability distributions in a simulation context.
Difference between discrete, continuous, and empirical distributions.

36

Statistical Models in Simulation

Reference
Simulation Modelling and Analysis
(Averill M.Law W.David Kelton)
WolframAlpha
A Primer on Statistical Distributions
(N. Balakrishnan, V.B Nevzorov).

Numerical examples will be solved later in the lecture


Numerical Excercise
37

Statistical Models in Simulation

THANK YOU

38

Vous aimerez peut-être aussi