Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Similar documents
Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

Slides 8: Statistical Models in Simulation

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

B.N.Bandodkar College of Science, Thane. Subject : Computer Simulation and Modeling.

Lecture Notes 2 Random Variables. Discrete Random Variables: Probability mass function (pmf)

3 Modeling Process Quality

Lecture Notes 2 Random Variables. Random Variable

Math 180A. Lecture 16 Friday May 7 th. Expectation. Recall the three main probability density functions so far (1) Uniform (2) Exponential.

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Random variables. DS GA 1002 Probability and Statistics for Data Science.

Part I Stochastic variables and Markov chains

Dr. Maddah ENMG 617 EM Statistics 10/15/12. Nonparametric Statistics (2) (Goodness of fit tests)

STAT2201. Analysis of Engineering & Scientific Data. Unit 3

MA/ST 810 Mathematical-Statistical Modeling and Analysis of Complex Systems

15 Discrete Distributions

Chapter 2. Random Variable. Define single random variables in terms of their PDF and CDF, and calculate moments such as the mean and variance.

Plotting data is one method for selecting a probability distribution. The following

Chapter 3, 4 Random Variables ENCS Probability and Stochastic Processes. Concordia University

The exponential distribution and the Poisson process

A Probability Primer. A random walk down a probabilistic path leading to some stochastic thoughts on chance events and uncertain outcomes.

Continuous Probability Spaces

Random variable X is a mapping that maps each outcome s in the sample space to a unique real number x, x. X s. Real Line

Modeling and Performance Analysis with Discrete-Event Simulation

Random Variables. Definition: A random variable (r.v.) X on the probability space (Ω, F, P) is a mapping

Chapter Learning Objectives. Probability Distributions and Probability Density Functions. Continuous Random Variables

Brief Review of Probability

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Moment functions. x r p X (x) (1) E[X r ] = x r f X (x) dx (2) (x E[X]) r p X (x) (3)

Probability Distributions Columns (a) through (d)

Random Variables Example:

Introduction to Probability Theory for Graduate Economics Fall 2008

MATH : EXAM 2 INFO/LOGISTICS/ADVICE

Guidelines for Solving Probability Problems

Chapter 3.3 Continuous distributions

n px p x (1 p) n x. p x n(n 1)... (n x + 1) x!

Recall Discrete Distribution. 5.2 Continuous Random Variable. A probability histogram. Density Function 3/27/2012

Chapter 3 Single Random Variables and Probability Distributions (Part 1)

Northwestern University Department of Electrical Engineering and Computer Science

Continuous-time Markov Chains

Probability and Distributions

(Ch 3.4.1, 3.4.2, 4.1, 4.2, 4.3)

Copyright c 2006 Jason Underdown Some rights reserved. choose notation. n distinct items divided into r distinct groups.

BMIR Lecture Series on Probability and Statistics Fall, 2015 Uniform Distribution

STAT/MATH 395 PROBABILITY II

Ching-Han Hsu, BMES, National Tsing Hua University c 2015 by Ching-Han Hsu, Ph.D., BMIR Lab. = a + b 2. b a. x a b a = 12

Chapter 5. Chapter 5 sections

Mathematical Statistics 1 Math A 6330

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 18

Week 1 Quantitative Analysis of Financial Markets Distributions A

A) Questions on Estimation

THE QUEEN S UNIVERSITY OF BELFAST

Chapter 2: The Random Variable

Math 151. Rumbos Spring Solutions to Review Problems for Exam 3

Random Variables and Their Distributions

ECON 5350 Class Notes Review of Probability and Distribution Theory

Review for the previous lecture

Special distributions

Continuous Random Variables

1 Review of Probability and Distributions

ECE 313 Probability with Engineering Applications Fall 2000

Things to remember when learning probability distributions:

Learning Objectives for Stat 225

Continuous random variables

Class 26: review for final exam 18.05, Spring 2014

3 Continuous Random Variables

STAT 3610: Review of Probability Distributions

SDS 321: Introduction to Probability and Statistics

ECE 302 Division 2 Exam 2 Solutions, 11/4/2009.

1 Probability and Random Variables

ELEG 3143 Probability & Stochastic Process Ch. 2 Discrete Random Variables

Basic concepts of probability theory

Discrete Random Variables

Expected value of r.v. s

PAS04 - Important discrete and continuous distributions

1 Presessional Probability

Random variable X is a mapping that maps each outcome s in the sample space to a unique real number x, < x <. ( ) X s. Real Line

Part IA Probability. Definitions. Based on lectures by R. Weber Notes taken by Dexter Chua. Lent 2015

Chapter 1 Statistical Reasoning Why statistics? Section 1.1 Basics of Probability Theory

Probability Distribution

Chapter 3. Discrete Random Variables and Their Probability Distributions

Lecture 2: Repetition of probability theory and statistics

CS 237: Probability in Computing

Probability and Statistics Concepts

ECS /1 Part IV.2 Dr.Prapun

Chapter 4. Probability-The Study of Randomness

(Ch 3.4.1, 3.4.2, 4.1, 4.2, 4.3)

Closed book and notes. 60 minutes. Cover page and four pages of exam. No calculators.

Why study probability? Set theory. ECE 6010 Lecture 1 Introduction; Review of Random Variables

2009 Winton 1 Distributi ( ons 2) (2)

Chapter 3. Discrete Random Variables and Their Probability Distributions

1.1 Review of Probability Theory

Common ontinuous random variables

Chapter 2. Discrete Distributions

IE 230 Probability & Statistics in Engineering I. Closed book and notes. 60 minutes.

Lecture Notes 1 Probability and Random Variables. Conditional Probability and Independence. Functions of a Random Variable

Basic concepts of probability theory

Random Variable. Discrete Random Variable. Continuous Random Variable. Discrete Random Variable. Discrete Probability Distribution

1 Random Variable: Topics

b. ( ) ( ) ( ) ( ) ( ) 5. Independence: Two events (A & B) are independent if one of the conditions listed below is satisfied; ( ) ( ) ( )

Transcription:

Simulation Discrete-Event System Simulation

Chapter 4 Statistical Models in 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 parameters Test for goodness of fit In this chapter: Review several important probability distributions Present some typical application of these models 3

Review of Terminology and Concepts In this section, we will review the following concepts: Discrete random variables Continuous random variables Cumulative distribution function Epectation 4

Discrete Random Variables X is a discrete random variable if the number of possible values of X is finite, or countable infinite. Eample: Consider jobs arriving at a job shop. - Let X be the number of jobs arriving each week at a job shop. R possible values of X (range space of X {0,1,, } p( i probability the random variable X is i, p( i P(X i p( i, i 1,, must satisfy: 1.. p( i i 1 0, p( i for alli 1 The collection of pairs [ i, p( i ], i 1,,, is called the probability distribution of X, and p( i is called the probability mass function (pmf of X. 5

Continuous Random Variables X is a continuous random variable if its range space R is an interval or a collection of intervals. The probability that X lies in the interval [a, b] is given by: f( is called the probability density function (pdf of X, satisfies: 1.. R f ( 0, X f ( d 1 3. f ( 0, P ( a X b f ( d for all in if R is not in X R X b a Properties 1.. P( X 0 0, because f ( d 0 P( a X b P( a < X b P( a X 0 0 < b P( a < X < b 6

Continuous Random Variables Eample: Life of an inspection device is given by X, a continuous random variable with pdf: f ( 1 e 0, /, 0 otherwise Lifetime in Year X has an eponential distribution with mean years Probability that the device s life is between and 3 years is: P( 3 1 3 e / d 0.14 7

Cumulative Distribution Function Cumulative Distribution Function (cdf is denoted by F(, where F( P(X If X is discrete, then F ( p( i i If X is continuous, then F ( f ( t dt Properties 1. F is nondecreasing function.. 3. lim F( 1 lim F( 0 If a b, then F( a F( b All probability question about X can be answered in terms of the cdf: P( a X b F( b F( a, for all a b 8

Cumulative Distribution Function Eample: An inspection device has cdf: F( 1 0 e t / dt 1 e / The probability that the device lasts for less than years: P(0 X F( F(0 F( 1 e 1 0.63 The probability that it lasts between and 3 years: P( X 3 F(3 F( (1 e (3/ (1 e 1 0.145 9

Epectation The epected value of X is denoted by E(X If X is discrete If X is continuous E( p( all i i i E ( f ( d a.k.a the mean, m, µ, or the 1 st moment of X A measure of the central tendency The variance of X is denoted by V(X or var(x or σ Definition: V(X E( (X E[X] Also, V(X E(X ( E( 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: σ V ( Epressed in the same units as the mean 10

Computer Science, Informatik 4 11 Epectations Eample: The mean of life of the previous inspection device is: To compute variance of X, we first compute E(X : Hence, the variance and standard deviation of the device s life are: / 1 ( 0 / 0 0 / + d e d e X E e 8 / 1 ( 0 / 0 0 / + d e d e X E e ( 4 8 ( X V X V σ

Computer Science, Informatik 4 1 Epectations / 1 ( 0 / 0 0 / + d e d e X E e 1 ( ( ( 1 1 ( ( 1 '( '( ( Set ( '( ( ( '( ( Integration Partial / 1 ( / 0 0 / 0 / / / 0 / 0 0 / d e e d e X E e v u e v u d v u v u d v u d e d e X E e +

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 13

Useful models Queueing Systems In a queueing system, interarrival and service-time patterns can be probabilistic. Sample statistical models for interarrival or service time distribution: Eponential 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 eponential (involving location of the modes of pdf s and the shapes of tails. 14

Useful models Inventory and supply chain Computer Science, Informatik 4 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 Time between placing an order and the receipt of that order Sample statistical models for lead time distribution: Gamma Sample statistical models for demand distribution: Poisson: simple and etensively tabulated. Negative binomial distribution: longer tail than Poisson (more large demands. Geometric: special case of negative binomial given at least one demand has occurred. 15

Useful models Reliability and maintainability Time to failure (TTF Eponential: failures are random Gamma: for standby redundancy where each component has an eponential 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 16

Useful models Other areas For cases with limited data, some useful distributions are: Uniform Triangular Beta Other distribution: Bernoulli Binomial Hypereponential 17

Discrete Distributions Discrete random variables are used to describe random phenomena in which only integer values can occur. In this section, we will learn about: Bernoulli trials and Bernoulli distribution Binomial distribution Geometric and negative binomial distribution Poisson distribution 18

Bernoulli Trials and Bernoulli Distribution Computer Science, Informatik 4 Bernoulli Trials: Consider an eperiment consisting of n trials, each can be a success or a failure. - X j 1 if the j-th eperiment is a success - X j 0 if the j-th eperiment is a failure The Bernoulli distribution (one trial: p, j 1 p j ( j p( j, j 1,,..., n q : 1 p, j 0 where E(X j p and V(X j p(1-p pq Bernoulli process: The n Bernoulli trials where trails are independent: p( 1,,, n p 1 ( 1 p ( p n ( n 19

Binomial Distribution The number of successes in n Bernoulli trials, X, has a binomial distribution. p( n 0, p q n, 0,1,,..., n otherwise The number of outcomes having the required number of successes and failures Probability that there are successes and (n- failures The mean, E( p + p + + p n*p The variance, V(X pq + pq + + pq n*pq 0

Geometric Distribution Geometric distribution The number of Bernoulli trials, X, to achieve the 1 st success: p( 1 q p, 0,1,,..., n 0, otherwise E( 1/p, and V(X q/p 1

Negative Binomial Distribution 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: y 1 p( k 1 0, yk E(Y k/p, and V(X kq/p q (k-1 successes y 1 yk k 1 p( q p k 1 144 443 { p p k k th success, y k, k otherwise + 1, k +,...

Poisson Distribution Poisson distribution describes many random processes quite well and is mathematically quite simple. where α > 0, pdf and cdf are: α p( e! 0, α E(X α V(X, 0,1,... otherwise F( i α α e i 0 i! 3

Poisson Distribution Eample: A computer repair person is beeped each time there is a call for service. The number of beeps per hour ~ Poisson(α per hour. The probability of three beeps in the net hour: p(3 3 /3! e - 0.18 also, p(3 F(3 F( 0.857-0.6770.18 The probability of two or more beeps in a 1-hour period: p( or more 1 ( p(0 + p(1 1 F(1 0.594 4

Continuous Distributions Continuous random variables can be used to describe random phenomena in which the variable can take on any value in some interval. In this section, the distributions studied are: Uniform Eponential Weibull Normal Lognormal 5

Uniform Distribution A random variable X is uniformly distributed on the interval (a, b, U(a, b, if its pdf and cdf are: 1, f ( b a 0, Properties a b otherwise F( 0, a, b a 1, P( 1 < X < is proportional to the length of the interval [F( F( 1 ( - 1 /(b-a] E(X (a+b/ V(X (b-a /1 a < a b < b U(0,1 provides the means to generate random numbers, from which random variates can be generated. 6

Eponential Distribution A random variable X is eponentially distributed with parameter λ > 0 if its pdf and cdf are: f ( λe 0, λ, 0 elsewhere 0, F( λe dt 1 e 0 λt λ, < 0 0 E(X 1/λ V(X 1/λ 7

Eponential Distribution Used to model interarrival times when arrivals are completely random, and to model service times that are highly variable For several different eponential pdf s (see figure, the value of intercept on the vertical ais is λ, and all pdf s eventually intersect. 8

Eponential Distribution Memoryless property For all s and t greater or equal to 0: P(X > s+t X > s P(X > t Eample: A lamp ~ ep(λ 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.368 - The probability that the lamp lasts between to 3 hours is: P( < X < 3 F(3 F( 0.145 - The probability that it lasts for another hour given it is operating for.5 hours: P(X > 3.5 X >.5 P(X > 1 e -1/3 0.717 9

Computer Science, Informatik 4 30 Eponential Distribution Memoryless property ( ( ( ( ( t X P e e e s X P t s X P s X t s X P t s t s > > + > > + > + λ λ λ

Weibull Distribution A random variable X has a Weibull distribution if its pdf has the form: 3 parameters: β ν f ( α α 0, Location parameter: υ, Scale parameter: β, (β > 0 Shape parameter. α, (> 0 β 1 ν ep α ( < ν < β, ν otherwise Eample: υ 0 and α 1: 31

Weibull Distribution Weibull Distribution β 1 β ν ep f ( α α 0, For β 1, υ0 ν α β, ν otherwise f ( 1 ep α 0, 1 α, ν otherwise When β 1, X ~ ep(λ 1/α 3

Normal Distribution A random variable X is normally distributed if it has the pdf: 1 1 µ f ( ep, < < σ π σ Mean: Variance: < µ < σ > 0 Denoted as X ~ N(µ,σ Special properties: lim f ( 0, and lim f ( 0 f(µ-f(µ+; the pdf is symmetric about µ. The maimum value of the pdf occurs at µ; the mean and mode are equal. 33

Normal Distribution Evaluating the distribution: Use numerical methods (no closed form Independent of µ and σ, using the standard normal distribution: Z ~ N(0,1 Transformation of variables: let Z (X - µ / σ, F( P ( X ( µ / σ µ P Z σ 1 z / e dz π ( µ / σ φ( z dz Φ( µ σ, where Φ( z z 1 e π t / dt 34

Normal Distribution Eample: The time required to load an oceangoing vessel, X, is distributed as N(1,4, µ1, σ The probability that the vessel is loaded in less than 10 hours: 10 1 F( 10 Φ Φ( 1 0.1587 - Using the symmetry property, Φ(1 is the complement of Φ (-1 35

Lognormal Distribution A random variable X has a lognormal distribution if its pdf has the form: ( 1 ln µ ep, > 0 f ( µ1, πσ σ σ 0.5,1,. 0, otherwise Mean E(X e µ+σ / Variance V(X e µ+σ / ( e σ -1 Relationship with normal distribution When Y ~ N(µ, σ, then X e Y ~ lognormal(µ, σ Parameters µ and σ are not the mean and variance of the lognormal random variable X 36

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 n ( λt λt P[ N( t n] e, for t 0 and n 0,1,,... n! 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 37

Poisson Distribution Interarrival Times Consider the interarrival times of a Possion process (A 1, A,, where A i is the elapsed time between arrival i and arrival i+1 The 1 st 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 ep(λ] Interarrival times, A 1, A,, are eponentially distributed and independent with mean 1/λ Arrival counts ~ Poisson(λ Stationary & Independent Interarrival time ~ Ep(1/λ Memoryless 38

Poisson Distribution Splitting and Pooling Computer Science, Informatik 4 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 + N(t, where N1(t and N(t are both Poisson processes with rates λp and λ(1-p N(t ~ Poisson(λ λ λp λ(1-p N1(t ~ Poisson[λp] N(t ~ Poisson[λ(1-p] Pooling: Suppose two Poisson processes are pooled together N1(t + N(t N(t, where N(t is a Poisson processes with rates λ 1 + λ N1(t ~ Poisson[λ 1 ] λ 1 λ 1 + λ N(t ~ Poisson(λ 1 + λ N(t ~ Poisson[λ ] λ 39

Poisson Distribution 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: sample might not cover the entire range of possible values. 40

Summary The world that the simulation analyst sees is probabilistic, not deterministic. In this chapter: Reviewed several important probability distributions. Showed applications of the probability distributions in a simulation contet. Important task in simulation modeling is the collection and analysis of input data, e.g., hypothesize a distributional form for the input data. Student should know: Difference between discrete, continuous, and empirical distributions. Poisson process and its properties. 41