Lecturer: Olga Galinina

Similar documents
Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

Lecturer: Olga Galinina

1 Basic concepts from probability theory

Part I Stochastic variables and Markov chains

ABC methods for phase-type distributions with applications in insurance risk problems

Stochastic process. X, a series of random variables indexed by t

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

M/G/1 and M/G/1/K systems

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

Basic concepts of probability theory

Lecture 4a: Continuous-Time Markov Chain Models

Basic concepts of probability theory

Slides 8: Statistical Models in Simulation

Introduction to Markov Chains, Queuing Theory, and Network Performance

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

GI/M/1 and GI/M/m queuing systems

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

Basic concepts of probability theory

Chapter 3 sections. SKIP: 3.10 Markov Chains. SKIP: pages Chapter 3 - continued

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

Chapter 3 sections. SKIP: 3.10 Markov Chains. SKIP: pages Chapter 3 - continued

IEOR 6711, HMWK 5, Professor Sigman

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

Name of the Student:

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

57:022 Principles of Design II Final Exam Solutions - Spring 1997

HITTING TIME IN AN ERLANG LOSS SYSTEM

IE 303 Discrete-Event Simulation

Figure 10.1: Recording when the event E occurs

Chapter 2. Poisson Processes. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

The exponential distribution and the Poisson process

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

Contents LIST OF TABLES... LIST OF FIGURES... xvii. LIST OF LISTINGS... xxi PREFACE. ...xxiii

Exponential Distribution and Poisson Process

1.225J J (ESD 205) Transportation Flow Systems

LECTURE #6 BIRTH-DEATH PROCESS

Continuous-time Markov Chains

(b) What is the variance of the time until the second customer arrives, starting empty, assuming that we measure time in minutes?

Math 597/697: Solution 5

Homework 4 due on Thursday, December 15 at 5 PM (hard deadline).

Introduction to queuing theory

Basics of Stochastic Modeling: Part II

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

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

THE POISSON WAITING TIME DISTRIBUTION: ANALYSIS AND APPLICATION

Modelling the risk process

CHAPTER 3 ANALYSIS OF RELIABILITY AND PROBABILITY MEASURES

QUEUING SYSTEM. Yetunde Folajimi, PhD

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

A Diffusion Approximation for the G/GI/n/m Queue

Stat410 Probability and Statistics II (F16)

Renewal theory and its applications

Chapter 2 Queueing Theory and Simulation

Northwestern University Department of Electrical Engineering and Computer Science

Assignment 3 with Reference Solutions

Birth-Death Processes

Uniform random numbers generators

Queueing Theory. VK Room: M Last updated: October 17, 2013.

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

INDEX. production, see Applications, manufacturing

CPSC 531 Systems Modeling and Simulation FINAL EXAM

Markov Model. Model representing the different resident states of a system, and the transitions between the different states

2905 Queueing Theory and Simulation PART III: HIGHER DIMENSIONAL AND NON-MARKOVIAN QUEUES

Performance Modelling of Computer Systems

Irreducibility. Irreducible. every state can be reached from every other state For any i,j, exist an m 0, such that. Absorbing state: p jj =1

CS418 Operating Systems

Q = (c) Assuming that Ricoh has been working continuously for 7 days, what is the probability that it will remain working at least 8 more days?

ELEG 3143 Probability & Stochastic Process Ch. 6 Stochastic Process

Queues and Queueing Networks

Continuous Distributions

1 Probability and Random Variables

IEOR 3106: Introduction to Operations Research: Stochastic Models. Professor Whitt. SOLUTIONS to Homework Assignment 2

Lecture 1: Brief Review on Stochastic Processes

Queueing Theory and Simulation. Introduction

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

Math 576: Quantitative Risk Management

Stochastic Renewal Processes in Structural Reliability Analysis:

Poisson Processes. Stochastic Processes. Feb UC3M

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

1 Delayed Renewal Processes: Exploiting Laplace Transforms

SYMBOLS AND ABBREVIATIONS

Random Walk on a Graph

Introduction to Queueing Theory

Discrete-event simulations

Name of the Student: Problems on Discrete & Continuous R.Vs

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

Data analysis and stochastic modeling

Jitter Analysis of an MMPP 2 Tagged Stream in the presence of an MMPP 2 Background Stream

CHAPTER 3 MATHEMATICAL AND SIMULATION TOOLS FOR MANET ANALYSIS

Review. DS GA 1002 Statistical and Mathematical Models. Carlos Fernandez-Granda

Chapter 5: Generating Random Numbers from Distributions

Overall Plan of Simulation and Modeling I. Chapters

Qualifying Exam CS 661: System Simulation Summer 2013 Prof. Marvin K. Nakayama

E[X n ]= dn dt n M X(t). ). What is the mgf? Solution. Found this the other day in the Kernel matching exercise: 1 M X (t) =

Time Reversibility and Burke s Theorem

Continuous time Markov chains

Probability and Statistics Concepts

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6

Transcription:

Renewal models Lecturer: Olga Galinina E-mail: olga.galinina@tut.fi

Outline Reminder. Exponential models definition of renewal processes exponential interval distribution Erlang distribution hyperexponential distribution Cox distribution phase-type distribution examples Non-exponential models Gamma distribution Pareto distribution Fitting Two-moments Mises and Whitt s approaches 2

Reminder 3

Reminder on traffic models Models based on point processes Based on interval representation Based on number representation Models based on flows Flow-oriented stochastic models Flow-oriented deterministic models 4

Reminder on traffic models Consider now a time interval between two successive arrivals: X, 1. i = T i T i 1 1 i Called interarrival time(distribution: interarrival time distribution) Figure 1: Representation of point process using intervals Number representation: time interval is constant, we observe the number of arrivals at t. Interval representation: number of arriving customers is constant, we observe time interval until there are n arrivals. 5

Reminder on traffic models Figure 2: Number representation of arrival process. 6

Renewal process Renewal process is an arrival process in which the interarrival intervals are positive, independent and identically distributed RVs. Can be described as: the joint distributions of the interarrival times X 1, X 2,... the joint distributions of the arrival epochs T 1, T 2,... n T X n = i=1 i the joint distributions of the number of arrivals, N(t), t > 0 Renewal = the process probabilistically starts over at each arrival epoch, T n. Many complicated processes have randomly occurring instants at which the system returns to a state probabilistically equivalent to the starting state. These embedded renewal epochs allow us to separate the long term behavior of the process (which can be studied through renewal theory) from the behavior within each renewal period. 7

Exponential distribution It is convenient to graphically represent the exponential distribution as shown: Figure 3: Phase denoting exponential distribution. What are problems with exponential distribution: often it cannot describe well the real-life time intervals. How to deal with it: use combinations of exponentials. What we get: more accurate approximation of observed time intervals; retain attractive memoryless property of exponential distribution. 8

Exponential distribution We may use any distribution with non-negative values to model time intervals. Why it plays a key role among lifetime distributions: memoryless property; residual time has the same distribution as initial one. Exponential distribution is characterized by single parameter, so-called intensity or rate λ. The CDFand PDFare as follows: X λx ( ) = 1, λ> 0, 0. λx ( ) = λ, λ> 0, 0. F x e x f x e x X The mean and variance are as follows: 1 1,. λ λ [ ] = D[ X] = 2 E X 9

Exponential-based interval distributions Note! Exponential distribution is the most important interval distribution in classic teletraffic theory. Applications: to model renewal arrival process (interarrival times are i.i.d.); to model service time of the server. Combination of exponentials allows to model more general time intervals: Erlang distribution; generalized Erlang distribution; hyperexponential distribution; Cox distribution; phase type (PH) distribution. 10

Exponential-based interval distributions + analytically tractable: reason: retains (to the some extent) memoryless properties; can be used in analytical studies. include a wide class of distributions: example: phase-type distribution allows to mimic arbitrary PDF. easy to generate interarrival times in simulation studies: you just have to be able to generate exponential RVs. - all renewal models: does not allow to take into account autocorrelation; practically, limited to simple cases of exponential combinations: analytical analysis of PH/PH/-/-/-queuing system can be complicated. 11

Erlang and generalized Erlang distributions Generalized Erlangian RV of order k, k = 2, 3,..., is sum of k exponentially distributed RVs. PDF of generalized Erlang distribution is convolution of kpdfs of exponentials; the intensity of distributions may be different. We restrict our attention to the case when all distributions have the same intensity: λ1 = λ2 =... = λ Erlangian distributed RV of order k, k = 2, 3,..., is sum of i.i.d. exponential RVs. Using the convolution we can obtain the PDF of Erlang RV X of order k: ( ) k 1 ( λt) ( λt) λt λt FX x = e = 1 e, λ > 0, t 0, k = 2,3,... j! j! j = k j = 0 12

Erlang and generalized Erlang distributions Erlangian RV of order k is graphically represented by exponentially distributed RVs in series: Figure 4: Phase diagram of Erlang distribution. Taking derivative, we can find a PDF of Erlang distribution: k 1 ( λx) λx f X ( x) = e, λ > 0, x 0, k = 2,3,... k 1 1! ( ) The mean and variance are as follows: k k,. λ λ [ ] = D[ X] = 2 E X Note! Generalized Erlang distribution is the sum of k exponential RVs with different rates. 13

Erlang and generalized Erlang distributions Figure 5. Erlang distribution 14

Hyperexponential distribution Hyperexponentially distributed RV of order k is following RV: its distribution is the weighted sum of k exponential distributions. Let us assume: we are given k exponentially distributed RVs with intensities λ,..., 1 λk each RV is associated with weighting factor p i, i= 1,2,..., k, such that they sum up to one: k p i = 1. i=1 The CDF of hyperexponential distribution is therefore: ( ) k λx F x = 1 pe, λ > 0, x 0. X j= 1 i Note! If λ1 =... = λk = λ, then hyperexponential RV is exponential with intensity kλ. 15

Hyperexponential distribution The first two moments of hyperexponential RV X is as follows: k p i [ ] 2 k 2 2 E X =, E X p 2 i, C 1. i 1 λ = = i i= 1 λi The important case: there are only two exponential RVs for which p = p, p = 1 p. 1 2 In this case we have the following CDF of hyperexponential RV: X λ x ( ) = ( ) F x pe p e 1 λ2x 1 1. Figure 6: Phase diagram of hyperexponential distribution with two phase 16

Cox distribution More general comparing to Erlang and hyperexponential distributions. It can be described by exponentially distributed RVs combined in series and parallel. We consider Cox distribution, (branching Erlang distribution). Figure 7: Random variable having Cox distribution. 17

Cox distribution Figure 8: Another representation of Cox distributed RV. The mean value of Cox RV X can be expressed as follows: k i k 1 qi E[ X] = q ( 1 p ) =, λ q = p p p... p = where i 0 1 2 i 1. i i i= 1 j= 1 λj i= 1 i 18

Cox distribution The variance is given as follows: k i 1 q 2. i= 1 j= 1 λ λ j i i 2 [ ] = E [ X] D X Important property of Cox distribution is: the sum of 2 Cox-distributed RVs is another Cox-distributed RV. PDF of Cox-distributed RV is a weighted sum of exponential PDFs. 19

Phase type distribution Arbitrary combination of exponentials Here is the state diagram of phase distribution (do not be confused with phase diagram). Figure 9: Phase distributed RV. Phase distributed RV: RV X is the total residence time starting from entering the Markov chain up to leaving it. state 0,1,..., r are transient, state 0 is absorbing. Note! renewal process with phase distributed times is denoted by PH-RP. 20

PH-PR PR example r = 3 Figure 10: Phase distribution with r = 3. Phase distributed RV: at time t = 0we at the state iwith probability π,i i = 1, 2, 3, 4; when we enter the absorbing state (state 0) the time has PH distribution. 21

Phase type distribution All preceding distributions are the special cases of more general distribution, called phase-type distribution. Such distribution is characterized by a transient Markov chain with finite number of states (phases) M with transition probability matrix P. Transition probability matrix of transient Markov chain in power of n tends to zero, while n (we will always leave the Markov chain). Phase type distribution is characterized by following properties: The residence time in each phase (state) is exponentially distributed with mean 1/µ. The probability to enter state i, i 1,2,..., M is. = α, = 1,2,..., M. If these conditions are met then the RV X (denoting the total residence time up to absorption) has a phase distribution. i i 22

Definition of PH distribution Definition of phase distribution: time to absorb in r+1 states Markov chain with: ( π π ) initial state vector ; infinitesimal generator in the following form: 0, 0 0, t T λ λ λ... λ 1 j 11 13 1 r j 1 λ21 λ 2 23... λ λ j 2r j 2 T = λ31 λ32.... t = T1, π0 = 1 π1; λ 3j j 3............... λr1 λr2 λr3... λ rj j r Note! phase distribution is often denoted by Note! phase distribution is often denoted by PH ( π, T ) π 23

Properties of PH distribution CDF of PH distribution: F x e T = 1 π e Tx 1, ( ) 1 1, = i= 0 i! PDF of PH distribution: f x t = T1. 1 i T. i! ( ) =π e Tx t, Moments: i 1 i E! ( ) X = i π T 1. PH ( π, T ) π 24

Special cases Exponential, Erlang and generalized Erlang. Figure 11: Special cases of phase distribution: exponential, Erlang and generalized Erlang. 25

Special cases Hyperexponential, Coxian Figure 12: Special cases of phase distribution: hyperexponential, Coxian. 26

Example. Exponential distribution Represent exponential distribution using PH: exponential distribution: π= 0, =, ( ) t ( λ) π= 1, =. ( ) T ( λ) state space {0,1}; initial probability vector and infinitesimal generator are: 0 0 0,1,. λ λ ( ) 27

Example. Erlang distribution Represent Erlang distribution using PH: Erlang distribution: λ λ... 0 0 λ... 0 π = ( 1,0,...,0 ), T =............. 0 0... λ T π0= 0, t = ( 0,0,... λ) 0 0 0... 0 0 λ λ... 0 0,1,0...,0, 0 0 λ... 0................ λ 0 0... λ ; ( ) 28

Note of phase distribution Phase distribution is not unique: x fitting PDF: ( ) = ( ) + ( ) f X e e X 2 5x 23 13 : we have the following representations: π 1 2 22 2,,, 3 3 T = = 0 5 π 1 4 55 0,,, 5 5 T = = 0 2 3 3 1 1 1 1 π = 0,,, T = 1 4 2. 2 2 1 0 6 orders are different; representation with minimal order is called minimal representation. 29

Renewal arrival process In number representation of renewal arrival process a random variable A n, n = 1, 2,..., denoting the number of arrivals in subsequent time intervals of fixed length are i.i.d. but they are allowed to have general distribution. Note that with a few exceptions the superpositions of renewal arrival process does not yield a renewal arrival process. Renewal arrival process have a severe modeling drawback: these models cannot capture autocorrelation properties in network traffic. It is severe due to the following reason: when offered to a queuing system correlated traffic give rise to much worse performance parameters than renewal arrival processes. Processes which are able to capture autocorrelation properties of real traffic: Markovian models; Regression models; Self-similar models with long range dependence properties. Traffic modeling: concept, measurements, models 30

Non-exponential renewal models 31

Non-exponential renewal models When exponential-based distribution: when you have to ensure analytical tractability; you have a tool in hand. when you have reasons for a certain exponential-based distribution: repair process with two exponential stages. when no other analytical distribution succeeds: here, you may also turn to empirical distribution or discrete approximation. When NOT exponential-based distribution: when you have reasons for guessing a particular distribution; when a particular distribution leads to simplicity; when coarse approximations is sufficient. 32

Gamma distribution Consider PDF of Erlang distribution one more: ( ) k ( λx) ( k ) 1 λx f X x = e, λ > 0, x 0, k = 2,3,... 1! If k is allowed to take on non-negative real values we get: ( ) ( ) k 1 Γ( x) λx λ =, > 0, 0. λ x f X x e λ x which is known as Gamma distribution; Γ(x) is Gamma function: x t x t e dt. ( ) Mean and variance are given by: Γ = k k,. λ λ [ ] = D[ X] = 2 E X 0 33

Gamma distribution Figure 13: Illustration of gamma distribution. 34

Weibull distribution CDF and PDF are given by: PDF is given by: X ( ) ( λxλ x ) k F x = e > x k > ( ) 1, λ 0, 0, 0. ( λx) k k 1 fx x kλ x e λ k k =, > 0, > 0. Mean and variance are given by: 1 1 2 1 2 E[ X] = Γ 1 +, σ [ X] = Γ 1 ( E[ X] ) 2. 2 + λ k λ k Note! when k = 1, we have exponential distribution; when k = 3, Weibull distribution appears similar to Normal; frequently used in reliability! 35

Weibull distribution Figure 14: Illustration of Weibull distribution. 36

Pareto distribution PDF and CDF of Pareto distribution is given by: a xm a ( a+ 1) FX ( x) = 1, fx( x) = axmx, a> 0, x xm, xm > 0. x Mean is given by: ax = m a 1 1 [ ]. E X Variance exists if α>2 and given by: [ X] 2 σ = 2 ax m ( a 1) ( a 2) 2. Note: when α Pareto distribution approaches Dirac delta function. 37

Pareto distribution Figure 15: Illustration of Pareto distribution (c = 1). 38

Fitting parameters of renewal processes 39

Fitting parameters of renewal processes Where to use renewal processes: data are realization of strictly stationary process; data are iid: carry out tests for correlation to ensure that! if there is correlation renewal processes are not suited! What are the approaches: moments fitting procedures; shape fitting procedures. Note! both procedures have the same aim; procedures often yields different solutions. 40

Two moments fitting Note the following: exponentialdistribution: C 2 =1; Erlangdistribution: C 2 <1; hyperexponential distribution: C 2 >1. Two moment fitting procedure: compute estimate of the coefficient of variation C 2 : C 2 1: use exponentialdistribution; C 2 <1: use Erlangdistribution; C 2 >1: use hyperexponentialdistribution. estimate parameters of respective distributions. Note! This may sometimes result in very coarse fitting. 41

Two moments fitting. C 2 <1 You may use mixture of Erlang distributions: mix of Erlang distribution E k 1,k : k 1: exponentials with the same mean with probability p; k: exponentials with the same mean with probability (1 p); PDF is given by: ( ) k ( λx) ( k ) ( ) k ( λx) ( k ) 2 1 λx λx f X x = pλ e + 1 p λ e, x 0. 2! 1! when pgoes from 0 to 1, C 2 goes from 1/(k 1) to 1/k! The procedure: determine k from: 1/k C 2 1/(k 1); get pand λfrom the following: ( 1/2 ( ) ) 2 2 2 2 k p λ E[ X ] 1 p = kc k 1 + C k C, =. 2 1+ C 42

Two moments fitting. 1 2< C< 1 You may use generalized Erlang distribution: special case: sum of two exponentials with different rates λ 1 and λ 2 ; this may produce: 1 2 < C < 1, recall, C varies between m 1/2 and 1 for generalized Erlang distribution. If we are given mean E[X] and SCV C 2 : find λ 1 and λ 2 as follows: [ ] ( C ) E X 1 2 λ i = ± 2 1 2 1. 43

Two moments fitting. 0<C 2 <1 You may use shifted exponential distribution: PDF is given by: λ( x d f x = e ), x d. X ( ) λ λ is the rate of exponential, d is constant mean and variance are given by:. 1 2 [ ] [ ] ( [ ]) 2 2 1 E X = + d, σ X = E X C =. 2 λ λ Parameters are given by: λ = 1, d = E[ X] 1. σ X λ [ ] Note! this distribution is shifted by d on X-axis; such form may not be proper at all for many applications! 44

Two moments fitting. C 2 >1 You may use H 2 (p 1, p 2, λ 1, λ 2 ): we use hyperexponential distribution with balanced means: p λ = p λ 1 2 1 2 probabilities p 1 and p 2 can be found as: 2 1 C 1 p1 = 1 +, p2 = 1 p1. 2 2 C 1 + rates λ 1 and λ 2 are given by: 2 p1 2 p2 λ1 =, λ2 =. E X. [ ] E[ X ] Note! when C 2 1, use exponential distribution. 45

Two moments fitting. C 2 >0.5 When C 2 >0.5 you may use Cox-2 distribution: parameters are given by: 1 λ1 = 2 E[ X ], p2 =, λ 2 2 = λ1p1. 2C Figure 16: Illustration of the Cox-2 distribution. 46

Fitting more than two moments Note! well-developed for mixtures of exponentials; there are many approaches; no complete guides on when and what to fit! We consider: Mises algorithm for approximation by arbitrary discrete distribution suitable for fitting more than 2 moments; especially effective in simulation studies; may result in excellent fitting to a distribution. Whitt s approach for mixtures of exponentials; suitable for more than 2 moments; may result in excellent fitting to a distribution. 47

Mises algorithm Question we have to answer: {m 0, m 1,..., m 2n 1 } be 2nvalues: Is there RV that have these values as its first 2nmoments such that: i m = t df ( t),0 i 2n 1. i 0 If we define the following determinants: D i T m0 m1... mi m1 m2... mi m1 m2... mi+ 1 ( 1) m2 m3... mi+ 1 =, Di =......................... mi mi+ 1... m2i mi+ 1 mi+ 2... m2i+ 1 there exists approximating distribution if and only if: D > 0,0 i n 1, D = 0, i n, i ( 1) ( 1) ( 1) i D > 0,0 i n 1, D 0, i = n,, D = 0, i n. i i i 48

Mises algorithm If exists, we have to construct and solve a set of n linear equations: c m + cm +... + c m = m 0 0 1 1 n 1 n 1 n c m + cm +... + c m = m 0 1 1 2 n 1 n n+ 1... c m + cm +... + c m = m. 0 n 1 1 n n 1 2n 2 2n 1 Construct the polynomial: roots are real and distinct and are n moments of the simple RV {t 1, t 2,..., t n }; construct and solve (for p 1, p 2,..., p n ) nequations, one for each of the first nmoments: p + p +... + p = m 1 2 n 0 t p + t p +... + t p = m 1 1 2 2 n n 1 t 2 2 2 1p1+ t2p 2+... + tn p n = m2... t p + t p +... + t p = m n 1 n 1 n 1 1 1 2 2 n n n 1 49

Example: Mises algorithm Question: get RV of four values that approximates exponential with mean 1. Notes regarding the procedure: in this case we know moments: m i = i!. for F X (x) =1 e λx moments are m i = i!λ i, i=1, 2,. we know particular distribution - exponential: testing for existence of distribution can be omitted; we can construct four values RV with first eights moments. 50

Example: Mises algorithm Solve the following for (c 0, c 1, c 2, c 3 ): c 0 (1) + c 1 (1) + c 2 (2) + c 3 (6) = 24 c 0 (1) + c 1 (2) + c 2 (6) + c 3 (24) = 120 c 0 (2) + c 1 (6) + c 2 (24) + c 3 (120) = 720 c 0 (6) + c 1 (24) + c 2 (120) + c 3 (720) = 5040. we get (c 0, c 1, c 2, c 3 ) = (24, 96, 72, 16); we have to find the roots of g(t) = t 4 16t 3 + 72t 2 96t + 24; solution is (t 0, t 1, t 2, t 3 ) = (0.6032, 0.3574, 0.0389, 0.0005); solve the following to get (p 1, p 2, p 3, p 4 ): p 1 + p 2 + p3 + p4 = 1 0.3225p 1 + 1.7458p 2 + 4.5366p 3 + 9.3951p 4 = 1 0.32252p 1 + 1.74582p 2 + 4.53662p 3 + 9.39512p 4 = 2 0.32253p 1 + 1.74583p 2 + 4.53663p 3 + 9.39513p 4 = 6 (p 0, p 1, p 2, p 3 )= (0.6032, 0.3574, 0.0389, 0.0005). 51

Example: Mises algorithm Figure 17: Approximation for exponential distribution. 52

Example: Whitt s algorithm Existence for first five moments: first five moments are usually sufficient for fair approximation; generic test is too complicated when n > 3. Necessary conditions: {µ 1, µ 2,..., µ m } be m values; for m 5 these values are moments of non-negative RV if for each k, k=1, 2,..., m: µ 0, k = 1, 1 µ µ 0, k = 2, 2 2 1 µ µ µ 0, k = 3, 2 1 3 2 ( ) ( ) 2 2 ( ) ( ) ( ) µ µ µ µ µ µ µ µ µ µ µ µ 2 2 2 4 3 1 1 4 2 3 + 2 1 3 2 k = 1 3 5 4 1 2 5 3 4 1 2 4 3 0, 4, µ µ µ µ µ µ µ µ µ + µ µ µ µ 0, k = 5. 53

Matching for m moments: C 2 > 1 two moments may not be sufficient for accuracy we require; three moments are harder to fit. What we are going to fit: hyperexponential distribution; necessary conditions for existence have already shown; what are sufficient condition? Sufficient condition: existence of hyperexponential distribution with µ 1, µ 2,..., µ m : assume that µ 1, µ 2 /2!,..., µ m /m! satisfy necessity of existence; then there exists approximating hyperexponential distributionwith m 2+ 1 phases. 54

Matching for m moments: C 2 > 1 Two moments (µ 1, µ 2 ): there should exist H 2 : 2 2+ 1 = 2 H 2 exists if the following holds: µ 1 0, C µ = 1 1. 2 2 2 µ 1 Two moments (µ 1, µ 2, µ 3 ): there should exist H 2 ( 3 2+ 1 = 2); H 2 exists if the following holds: µ 0, C 1 µ = 1 1, 2 2 2 µ 1 µ µ 1.5 µ. 2 1 3 2 55

Example: 3 moments matching C 2 > 1 If C2>1 and necessary and sufficient conditions are satisfied: use H 2 distribution: 3 2+ 1 = 2 ; determine parameters as follows: ( ) ( ) 2 x+ 1.5y 2 + 3µ 2 2 2 2 3 1 1 y ± x+ 1.5y + 3µ 1 y + 18µ 1 y λ i = 6µ 1y p p µ λ = 0, 1 1 2 1 1 1 λ1 λ2 = 1 p. 2 1 x and y denote the following: x= µ µ 1.5 µ, 2 1 3 2 y = µ µ 2 2 2 1, where both are must be greater than 0., 56

Fitting shape of distributions What is the idea: approximate arbitrary shape; we are no longer dealing with moments! Which distribution to use: non-negative distributions; distributions which are dense: denseness: for any F X (x) there is approximating distributions. Non-negative dense distributions: acyclic PH distribution; Cox distribution; mixture of Erlang distribution; Note! Very hard to do... possible when you really need. 57

Using discrete distribution Assume: we proved that the process is iid, and we estimated histogram. We may use this histogram as a model... if the data are continuous we have approximation; if the data are discrete we have exact model. Figure 18: Histogram can be used as a model. 58

Testing for accuracy of fitting this step is only needed when task is to fit distributions! What kind of tests: χ 2 test; Kolmogorov s test. What are hypothesis: H 0 : data follows obtained distribution; H 1 : data do not follow obtained distribution. Note! for these tests see lecture on statistics. 59

Q-Q Q plot for visual comparison When and why to use: when: after fitting; why: to visually compare accuracy of fitting. How to construct: compute estimates of quantiles of empirical data; fraction of points below a given value. compute quantiles of approximating distribution; plot 45-degree line. Features of Q-Q plot: can be used for two samples too; sample sizes can be different; many distributional aspects are revealed. 60

Q-Q Q plot for visual comparison Figure 19: Example of the quantile-quantile plot. The following is very important: does not provide guarantees of any kind! 61

63