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

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

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

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

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

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

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

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

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

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

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

Lecture Notes 2 Random Variables. Random Variable

Introduction to Probability Theory for Graduate Economics Fall 2008

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

Chapter 2: The Random Variable

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

Discrete Random Variables

Part I Stochastic variables and Markov chains

3 Modeling Process Quality

Guidelines for Solving Probability Problems

Relationship between probability set function and random variable - 2 -

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

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

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

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

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

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

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

Transform Techniques - CF

DS-GA 1002 Lecture notes 2 Fall Random variables

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

IE 303 Discrete-Event Simulation

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

The exponential distribution and the Poisson process

Discrete Distributions

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

Queueing Theory and Simulation. Introduction

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

ECE 313 Probability with Engineering Applications Fall 2000

CS 237: Probability in Computing

Common ontinuous random variables

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

Continuous Probability Spaces

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

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

Review of Probability. CS1538: Introduction to Simulations

Probability distributions. Probability Distribution Functions. Probability distributions (contd.) Binomial distribution

MATH : EXAM 2 INFO/LOGISTICS/ADVICE

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

Probability Distributions Columns (a) through (d)

Random Variables Example:

Expected value of r.v. s

1 Probability and Random Variables

STAT 3610: Review of Probability Distributions

Northwestern University Department of Electrical Engineering and Computer Science

THE QUEEN S UNIVERSITY OF BELFAST

Probability Density Functions and the Normal Distribution. Quantitative Understanding in Biology, 1.2

CMPSCI 240: Reasoning Under Uncertainty

15 Discrete Distributions

Chapter 7: Theoretical Probability Distributions Variable - Measured/Categorized characteristic

Basic concepts of probability theory

Brief Review of Probability

ECS /1 Part IV.2 Dr.Prapun

Basic concepts of probability theory

Chapter 2 Queueing Theory and Simulation

Distributions of Functions of Random Variables. 5.1 Functions of One Random Variable

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

Chapters 3.2 Discrete distributions

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)

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

Continuous-time Markov Chains

Fundamental Tools - Probability Theory II

Mathematical Statistics 1 Math A 6330

Transform Techniques - CF

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

2009 Winton 1 Distributi ( ons 2) (2)

Binomial and Poisson Probability Distributions

Things to remember when learning probability distributions:

Probability and Distributions

Beautiful homework # 4 ENGR 323 CESSNA Page 1/5

Lecture 3. Discrete Random Variables

Topic 3: The Expectation of a Random Variable

Chapter 2: Random Variables

Probability and Statistics

Lecturer: Olga Galinina

Topic 3: The Expectation of a Random Variable

Chapter 2. Discrete Distributions

Week 1 Quantitative Analysis of Financial Markets Distributions A

Review for the previous lecture

Manual for SOA Exam MLC.

Figure 10.1: Recording when the event E occurs

STAT2201. Analysis of Engineering & Scientific Data. Unit 3

Transform Techniques - CF

Chapter 4. Probability-The Study of Randomness

EE126: Probability and Random Processes

Chapter 6: Random Processes 1

Basic concepts of probability theory

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

Random Variable And Probability Distribution. Is defined as a real valued function defined on the sample space S. We denote it as X, Y, Z,

Transcription:

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

Statistical Models in Simulation Real World phenomena of interest Sample phenomena select distribution Probabilistic, not deterministic Model test goodness of fit

Terminology/Concepts in Probability and Statistics Discrete Random Variables (X) The number of possible values of X is finite or countably infinite Eample 5.1: The number of jobs arriving at a shop each week Number of jobs in a given week: X Possible values of X: The range space of X, R X = {1,2,3, } The probability that the R.V. X takes on the value i p( i ) is the probability that the R.V. X equals i all event probabilities are non-negative probabilities measure proportion of event occurrences p ( ) = PX ( = ) p ( ) 0 i= 1 i i p ( ) = 1 i i i

Discrete Random Variables Eample 5.2: Testing a single die R X ={1,2,3,4,5,6} Assume the die is loaded, with the probability of a given face showing proportional to the number of spots i 1 2 3 4 5 6 p( i ) 1/21 2/21 3/21 4/21 5/21 6/21 probability mass function (p.m.f) p() 6/21 5/21 4/21 3/21 2/21 1/21 1 2 3 4 5 6

Continuous Random Variables The Range Space R X of the random variable X is an interval or collection of intervals b Pa ( X b) = f( d ) a f() is the probability density function (p.d.f.) The p.d.f. is nonzero within the Range Space The total area under the p.d.f. represents all possible events The p.d.f. is zero outside the Range Space f( ) 0 R R X f( d ) = 1 f( ) = 0 R X X

Probability of events in an interval f() =a =b b b a Pa ( < X < b) = f( d ) = f( d ) f( d ) a

Continuous Random Variables Eponential distribution with mean m Eponential distribution f( ) = 1 / m e 0 m 0 otherwise m := 2 f( ) := 1 m e m := 0,.01.. 3 m 0.6 f( ) 0.4 0.2 MathCad 0 0 2 4 6

Cumulative Distribution Function Measures probability that the R.V. X assumes a value less than or equal to for discrete R.V. for continuous R.V. Properties of F( ): F( ) = p ( i ) F( ) = ftdt () i a< b Fa ( ) Fb ( ) lim F( ) = 1 lim F( ) = 0

C.D.F. Eamples Loaded die i (-8,1) [1,2) [2,3) [3,4) [4,5) [5,6) [6, 8) p( i ) 0 1/21 3/21 6/21 10/21 15/21 21/21 probability mass function (p.m.f) p() 21/21 15/21 10/21 5/21 1 2 3 4 5 6

C.D.F. Eamples Eponential distribution 1 F ( ) = e dt = 1 e m 0 t/ m / m F( ) t 1 m := e dt m = 2 m 0 eponential distribution is easily evaluated, making it very popular for closed form solutions F( ) 1 0.5 0 0 2 4 6

Useful Parameters of R.V.s Epected Value if X is a R.V., the Epected Value (Epectation) is: Discrete case: E( X) = p i ( i) i Continuous case: E( X) = f( ) d E(X) is also called the mean, µ, or the 1 st moment of X E(X n ) is the n th moment of X n n E( X ) = i p ( i) i n n E( X ) = f ( ) d

More Useful Parameters of R.V.s Variance ( [ ]) 2 V( X) = E X E X = var( X) = σ [ ] V X EX E X 2 ( ) = ( ) ( ) 2 2 Standard deviation σ = V( X) Mode - the value that occurs most often (discrete) or peak of p.d.f. (continuous). Bimodality - two peaks in the p.d.f.

Statistical Models To address the statistical model to consider: What is the problem being addressed? Queuing Reliability/failure Inventory Communications systems behavoir What is known about the process? Completely random Essentially constant with a random component Constrained non-negative limited tails of distribution Tractable mathematical analysis

Statistical Models To address the statistical model to consider: What is the problem being addressed? Queuing Reliability/failure Inventory Communications systems behavoir Eponential distribution What is known about the process? Completely random Essentially constant with a random component Constrained non-negative limited tails of distribution unlimited tails Tractable mathematical analysis

Statistical Models To address the statistical model to consider: What is the problem being addressed? Queuing Reliability/failure Inventory Communications systems behavoir What is known about the process? Completely random Essentially constant with a random component Constrained non-negative limited tails of distribution unlimited precursors unlimited tails Gaussian/Normal distribution Tractable mathematical analysis

Statistical Models To address the statistical model to consider: What is the problem being addressed? Queuing Reliability/failure Inventory Communications systems behavoir What is known about the process? Completely random Essentially constant with a random component Constrained non-negative limited tails of distribution Truncated Gaussian/Normal distribution or small variance Tractable mathematical analysis

Statistical Models To address the statistical model to consider: What is the problem being addressed? Queuing Reliability/failure Inventory Communications systems behavoir What is known about the process? Completely random Essentially constant with a random component Constrained non-negative limited tails of distribution Normal Eponential Poisson Tractable mathematical analysis

Discrete Distributions Bernoulli trials and binomial distributions Consider an eperiment (e.g., flipping a coin, receiving a bit) consisting of n trials which can be a success (1) or failure (0) The n Bernoulli trials are called a Bernoulli process if the trials are independent For one trial, the Bernoulli distribution is: p =1 p ( ) = 1 p= q =0 0 otherwise Binomial distribution: The number of successes in a Bernoulli process has a binomial distribution n pq n =0,1,2,...n p ( ) = 0 otherwise

Discrete Distributions Geometric distribution The number of Bernoulli trials before the first success p ( ) = q 1 p =1,2,... 0 otherwise Poisson distribution Models arrival processes in queuing systems quite well One of the few distributions that makes the mathematics tractable mean and variance = α e α α =0,1,2,... p ( ) =! 0 otherwise

Continuous Distributions Eponential distribution Model completely random interarrival times Model highly variable service times λ is a rate: service rate, arrival rate Distribution has long tail, useful for modeling component lifetime. λ is failure rate λ λe 0 f( ) = 0 otherwise

Continuous Distributions Uniform distribution Easiest distribution to generate, serves as a basis for other R.V.s in simulation Uniform p.d.f.: 1 a b f( ) = b-a 0 otherwise Uniform distribution a := 1 b := 1 1 f( ) := if a b,, 0 b a := a 1, a 1 +.01.. b + 1 0.6 f( ) 0.4 0.2 0 2 0 2

Continuous Distributions Gamma distribution Gamma function: Γ ( β) = Γ ( β) = ( β 1) Γ( β 1) If β is an integer, Γ( β)=( β-1)! 0 β 1 e d Gamma pdf: βθ f( ) = Γ( β ) β 1 βθ ( βθ ) e > 0 0 otherwise β is shape parameter, θ is scale parameter when β is integer, Gamme distribution is related to eponential distribution: If the R.V. X is the sum of β independent, eponentially distributed R.V.s, each with parameter βθ, then X has a Gamma distribution with parameters β and θ

Continuous Distributions Erlang distibution The Gamma p.d.f. is also known as the Erlang distribution of order k when β=k, an integer With the block calls dropped, eponential arrival rates and eponential holding times assumptions, the Erlang distribution is used to predict the number of busy trunks in a telephone system.

Continuous Distributions Normal distribution (Gaussian distribution) mean µ, variance σ 2 2 f ( ) = σ 1 2π e 1 µ 2 σ Normal distribution σ := 1 µ := 0 f( ) 1 := σ 2 π 1 2 e µ σ 2 := µ 4 σ, µ 4 σ +.01.. µ + 4 σ 0.4 f( ) 0.2 0 5 0 5

Continuous Distributions Weibull distribution β 1 υ β β υ α e υ f ( ) = α α 0 otherwise location parameter ν, scale parameter α, shape parameter β This distribution is a general case of many other distributions, e.g., with β=1 this is the eponential distribution with λ=1/α

Continuous Distributions Weibull distribution with ν=0 α := 1 f( β, ) := β α α β 1 α e β := 0,.01.. 3 3 f (.5, ) f( 1, ) f( 2, ) f( 4, ) 2 1 0 0 1 2 3 Error in tet book, figure 5.20: α=1, not.5

Continuous Distributions Rayleigh Distribution Special case of Weibull distribution with α=2 β 1 β β ν ν ep f ( ) = 2 2 2 ν 0 otherwise used to model multipath fading, radiation, wind speeds

Continuous Distributions Triangular distribution Triangular distribution 2( a) a b ( b a)( c a) 2( c ) f ( ) = b< c ( c b)( c a) 0 elsewhere a := 1 b := 1.5 c := 3.7 ( a) ( c ) f( ) := if a b, 2, if b < c, 2, 0 ( b a) ( c a) ( c b) ( c a) := a 2, a 2 +.01.. c + 2 1 f( ) 0.5 0 0.5 0 2 4

Continuous Distributions Lognormal distribution 2 (ln µ ) 2 2σ > f( ) = 1 e 2πσ 0 0 otherwise Shadow fading is often modeled as a lognormal process

Poisson Process A counting process {N(t), t=0} is a Poisson process with mean rate λ if arrivals occur singly {N(t), t=0} has stationary increments: The distribution of the number of arrivals between t and t+s depends only on s, the length of the interval, and not on t, the starting point {N(t), t=0} has independent increments: The number of arrivals during nonoverlapping time intervals are independent R.V.s λt n e ( λt) PNt [ () = n] = for t 0 and n= 0,1,2,... n!

Poisson Process Properties of a Poisson Process Random splitting A Poisson process {N(t), t=0} having rate λ Each time an event occurs, it is arbitrarily be classified as either a type I (with probability p, N 1 (t)) or type II (with probability 1-p, N 2 (t)) event N 1 (t) and N 2 (t) are retain the property of being Poisson processes having rates λp and λ(1-p) Pooling of two arrival streams Given two independent Poisson processes N(t)=N 1 (t)+n 2 (t) is a Poisson process with rate λ 1 +λ 2

Known vs. Empirical Distributions Real World phenomena of interest Sample phenomena select distribution Model test goodness of fit Situation A: You understand the processes that create random variability in observed phenomena. Pick the proper distribution, adjust parameters, and verify fit to data Situation B: You do not fully understand (or don t really care, or don t have the time to analyze) the processes that create random variability. Either use sampled data to form an empirical distribution pick a known distribution that is the best approimation

Homework 5 1. If you haven t turned in HW4 (or even if you have and want to change your input), redo it with the listing I emailed 2. Simulate (using whatever means available to you: e.g., C, Ecel, Matlab, MathCad, pencil and paper, etc.), 100 samples of a R.V. as listed below. Calculate the indicated statistics of the simulated values: a) eponential distribution with mean=3 b) normal distribution with mean = 1, variance = 1 c) What percentage of the time does the normal distribution eceed the mean by 2 standard deviations? What percentage is epected?