Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
UNIVERSITT
DUISBURG ESSEN
Campus Duisburg
Rechnergesttzte Netzanalysen
ehem.: Simulation in Logistics g II
tul
06.11.2013
Rechnergesttzte Netzanalysen
Random Variables and Probability y Distributions Random Variable (RV) Discrete Random Variable
A real number assigned to each outcome of an experiment in the sample space Can only take a finite or a countable infinite set of values e.g., hit or miss {0 or 1}, Flip a coin of shooting a basketball, outcome of throwing a dart {1, 2, , 20} number of customers waiting in a queue 20}, Simulate Monte Carlo: throw a dice {1, 2, 3, 4, 5, 6}, a pair of dices {2, 3, 4, , 10, 11, 12} Can take on a continuum of values (infinite) e.g., customer interarrival time
Rechnergesttzte Netzanalysen 4
06.11.2013
Rechnergesttzte Netzanalysen
06.11.2013
Rechnergesttzte Netzanalysen
x b P(a X b)
Cumulative distribution function (cdf), F(x) Definition: F(x) = (from to x) f(y) dy = P(X x) Defines the probability that the continuous random variable X assuming a value less than or equal to x 8 06.11.2013 Rechnergesttzte Netzanalysen
F (X)
0.75
0.5
1 dX = 0.25
0.25
X cdf
06.11.2013
Rechnergesttzte Netzanalysen
f (X) 1 2/3
2
1/3 + (x-1)/3 ( 1)/3
X 1
10
The expectation of xn is defined as the nth moment of a random d variable i bl Expected value is a special case when n = 1, it is thus called the first moment the mean (Erwartungswert/Mittelwert)
06.11.2013 Rechnergesttzte Netzanalysen 11
Skewed Positively
Skewed Negatively
06.11.2013
Rechnergesttzte Netzanalysen
13
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
Causal relationship x and y are independent if Cov[x, Cov[x y] = 0 Formally, p(y|x) = p(y) for discrete f (y|x) ( | ) = f (y) ( ) for f continuous ti
[-1,1]
Rechnergesttzte Netzanalysen
14
Random Variables
06.11.2013
Rechnergesttzte Netzanalysen
16
06.11.2013
Rechnergesttzte Netzanalysen
18
Binomial Distribution
Let N = # trials, p = p probability y of each success trial
Example: N=7, p=0.5 X = # of success SSSFSSF X=5 FFSFSSS X=4 SSFSFSF X=4 ...etc. t
Geometric Distribution
The geometric Th t i distribution di t ib ti is i related l t d to t a sequence of f Bernoulli B lli trials; t i l the th random d variable of interest , X, is defined to be the number of trials to achieve the first success. The distribution of X is given by
p(x) = qx1p, x = 1, 2,
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. Thus, P(FFFFS) = qx1p the mean and variance are given by E(X) = 1/p 1/ and V(X) = q/P
06.11.2013 Rechnergesttzte Netzanalysen 21
06.11.2013
Rechnergesttzte Netzanalysen
22
Poisson Distribution
Gives (probability of) the number of events that occur in a given period Formula looks quite complicated (and NOT discrete), but it is discrete and using it is not that difficult
e - x p(x) = x! 0
Poisson (Simon Denis, Fr. 17811840 )
Das Bild kann zurzeit nicht angezeigt werden.
X {0,1,...,t} otherwise
Where is the mean arrival rate. Note that must be positive E(X) = V(X) = Applications of Poisson Distribution Discrete distribution, used to model the number of independent events occuring per unit time, E Batch Eg. B h sizes i of f customers and d items i If the time betweeen successive events is exponential, then the number of events in a fixed time interval is poisson.
06.11.2013
Rechnergesttzte Netzanalysen
23
Question: determine the probability of two or more calls in period. P( ( 2 or more) )=? one hour p
Rechnergesttzte Netzanalysen 24
06.11.2013
Bernoulli Relatives
Normal
Bernoulli
Binomial
Poisson
06.11.2013 Rechnergesttzte Netzanalysen 25
Random Variables
06.11.2013
Rechnergesttzte Netzanalysen
26
Uniform Distribution
A random variable X is uniformly distributed on the interval (a,b), U(a,b), if its pdf and cdf are:
1 , a x b f ( x) = b 0, otherwise a
0, x a x , a x b F ( x) = ab a x b 1,
E(X) = (a+b)/2 V(X) = (ba)2/12
The uniform distribution plays a vital role in simulation. Random numbers, uniformly distributed between 0 and 1, provide the means to generate random events.
Rechnergesttzte Netzanalysen 27
06.11.2013
Uniform Distribution
The Bus 933 arrives every 15 minutes at the terminal MArea beginning at 6:50 P .M. until 7:50 P .M. A certain passenger does not know the schedule and arrives randomly (uniformly distributed) between 7:00 P .M. and 7:30 P .M. every Wednesday evening. What is the probability that he waits more than 5 minutes for a bus? The probability is P(5 < x < 15) + P(20 < x < 30) X is uniform random variable on (0,30). The desired probability is given by F(15) F(5) + F(30) F(20) = 15/30 5/30 + 1 20/30 = 2/3
06.11.2013 Rechnergesttzte Netzanalysen 30 2 8
Exponential Distribution
PDF CDF
exponential p
Exponential Memoryless property: P{X > s + t|X > t}= P{X > s} t,s 0.
06.11.2013 Rechnergesttzte Netzanalysen 29
Example of the use of the memoryless property of Exponential Distribution A queueing system has two servers. The service times are assumed to be exponentially distributed (with the same parameter). Upon arrival of a customer () both servers are occupied () but there are no other waiting customers. customers
06.11.2013
Rechnergesttzte Netzanalysen
30
Question: whats the probability that the life of the light bulb is between 2 and 3 years? Solution:
Question: What is the probability that it lasts for another year if it has already
being operating for 2.5 2 5 years?
06.11.2013
Rechnergesttzte Netzanalysen
31
Erlang Distribution
Agner Krarup Erlang
The Erlang distribution is the distribution of the sum of k independent identically distributed random variables each having an exponential distribution. Events which occur independently with some average rate are modeled with a Poisson process. The waiting times between k occurrences of the event are Erlang distributed. PDF: CDF: the shape k, which is a nonnegative integer, and the rate , which is anon negative real number .
Rechnergesttzte Netzanalysen 32
06.11.2013
06.11.2013
Rechnergesttzte Netzanalysen
33
Normal Distribution
Johann Carl Friedrich Gauss
normal
E[X]= , Var(X)= 2 .
Normal Canonical: C i l mean = 0, 0 = 1. 1 f(-x)=f(+x); the pdf is symmetric about . The maximum value of the pdf occurs at x = . bellshaped curve symmetric about its mean . Shape determined by its standard deviation .
06.11.2013 Rechnergesttzte Netzanalysen 34
Normal Distribution
T Transformation f ti of f variables: i bl let l t Z = (X ) / ,
06.11.2013
Rechnergesttzte Netzanalysen
35
Normal Distribution
The time Th i required i d to load l d an oceangoing i vessel, l X, X is i distributed di ib d as N(12,4). Question: What is the p probability y that the vessel is loaded in less than 10 hours? Solution:
06.11.2013
Rechnergesttzte Netzanalysen
36
Weibull distribution
The random variable X with probability density function
1 x x f ( x) = p exp
Waloddi Weibull 18 June 188712 October 1979
for x > 0 i a Weibul is W ib l random d variable i bl with ith scale parameter > 0 and shape parameter > 0. p By inspecting the probability density function, it is seen that when h = 1, 1 the th Weibull W ib ll distribution is identical to the p distribution. exponential
06.11.2013
39 Netzanalysen Rechnergesttzte
3 Rechnergesttzte Netzanalysen 7
Weibull distribution
Weibul 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 h time (e.g., ( b bearing wear). ) Decreases with time (some semiconductors). Remains constant (failures caused by external shocks h k to the h system). ) with < 1 exhibit a failure rate that decreases with time,with = 1 have a constant failure rate (consistent with the exponential distribution) and populations with > 1 have a failure rate that increases with time. time
49 Netzanalysen Rechnergesttzte
06.11.2013
3 Rechnergesttzte Netzanalysen 8
Weibull distribution
06.11.2013
41 Netzanalysen Rechnergesttzte
3 Rechnergesttzte Netzanalysen 9
Empirical Distributions
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: Di d t sample l might i ht not t cover the th entire ti range of possible values.
06.11.2013 Rechnergesttzte Netzanalysen 41
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.
06.11.2013 Rechnergesttzte Netzanalysen 42