Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2...

50
1 Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. Chapter 2 Probability, Statistics, and Traffic Theories Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved

Transcript of Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2...

Page 1: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

1Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Chapter 2

Probability, Statistics, and Traffic Theories

Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved

Page 2: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

2Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Outline

Introduction Probability Theory and Statistics Theory

Random variables Probability mass function (pmf) Probability density function (pdf) Cumulative distribution function (cdf) Expected value, nth moment, nth central moment, and variance Some important distributions

Traffic Theory Poisson arrival model, etc.

Basic Queuing Systems Little’s law Basic queuing models

Page 3: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

3Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Introduction

Several factors influence the performance of wireless systems: Density of mobile users Cell size Moving direction and speed of users (Mobility models) Call rate, call duration Interference, etc.

Probability, statistics theory and traffic patterns, help make these factors tractable

Page 4: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

4Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Probability Theory and Statistics Theory

Random Variables (RVs) Let S be sample associated with experiment E X is a function that associates a real number to each s S RVs can be of two types: Discrete or Continuous Discrete random variable => probability mass function (pmf) Continuous random variable => probability density function (pdf)

s X(s)X

S RS

R

Page 5: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

5Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Discrete Random Variables

In this case, X(s) contains a finite or infinite number of values The possible values of X can be enumerated

E.g., throw a 6 sided dice and calculate the probability of a particular number appearing.

1 2 3 4 6

0.1

0.3

0.1 0.1

0.2 0.2

5

Probability

Number

Page 6: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

6Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Discrete Random Variables

The probability mass function (pmf) p(k) of X is defined as:

p(k) = p(X = k), for k = 0, 1, 2, ...

where

1. Probability of each state occurring

0 p(k) 1, for every k;

2. Sum of all states

p(k) = 1, for all k.

Page 7: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

7Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Continuous Random Variables

In this case, X contains an infinite number of values

Mathematically, X is a continuous random variable if there is a function f, called probability density function (pdf) of X that satisfies the following criteria:

1. f(x) 0, for all x;

2. f(x)dx = 1.

Page 8: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

8Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Cumulative Distribution Function

Applies to all random variables A cumulative distribution function (cdf) is defined

as: For discrete random variables:

For continuous random variables:

F(x) = P(X x) = f(x)dx-

x

P(k) = P(X k) = P(X = k)all k

Page 9: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

9Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Probability Density Function

The pdf f(x) of a continuous random variable X is the derivative of the cdf F(x), i.e.,

x

f(x)

AreaCDF

dx

xdFxf X

Page 10: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

10Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Discrete Random Variables Expected value represented by E or average of random

variable

nth moment

nth central moment

Variance or the second central moment

Expected Value, nth Moment, nth Central Moment, and Variance

E[X] = kP(X = k)all k

E[Xn] = knP(X = k)all k

E[(X – E[X])n] = (k – E[X])nP(X = k)all k

2 = Var(X) = E[(X – E[X])2] = E[X2] - (E[X])2

Page 11: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

11Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Expected Value, nth Moment, nth Central Moment, and Variance

1 2 3 4 5 6

0.1

0.3

0.1 0.1

0.2 0.2

E[X] = 0.166

Page 12: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

12Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Continuous Random Variable Expected value or mean value

nth moment

nth central moment

Variance or the second central moment

Expected Value, nth Moment, nth Central Moment, and Variance

E[X] = xf(x)dx+

-

E[Xn] = xnf(x)dx+

-

E[(X – E[X])n] = (x – E[X])nf(x)dx+

-

2 = Var(X) = E[(X – E[X])2] = E[X2] - (E[X])2

Page 13: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

13Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Some Important Discrete Random Distributions

Poisson

E[X] = , and Var(X) = Geometric

E[X] = 1/(1-p), and Var(X) = p/(1-p)2

P(X = k) = p(1-p)k-1 ,

where p is success probability

0,...,2,1,0,!

)(

andkk

ekXP

k

Page 14: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

14Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Some Important Discrete Random Distributions

Binomial Out of n dice, exactly k dice have the same value: probability

p k and (n-k) dice have different values: probability(1-p) n-k. For any k dice out of n:

k)!k!(nn!

kn

ndability, aucess probp is the s,...,,nn,...,,,k where

,knp)(kpknk)P(X

; 210 ;210,

1

Page 15: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

15Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Some Important Continuous Random Distributions

Normal

E[X] = , and Var(X) = 2

x y

X

x

X

dyexF

exf

2

2

2

2

2

)(

2

)(

2

1 )(

by obtained becan function on distributi cumulative theand

x-for ,2

1 )(

Page 16: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

16Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Some Important Continuous Random Distributions

Uniform

E[X] = (a+b)/2, and Var(X) = (b-a)2/12

bfor x ,1

for ,

for ,0

)(

isfunction on distributi cumulative theand

otherwise ,0

for ,)(

bxaab

ax

ax

xF

bxaab

dxf

X

X

Page 17: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

17Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Some Important Continuous Random Distributions

Exponential

E[X] = 1/, and Var(X) = 1/2

xe

x(x)F

isfunctionondistributicumulativetheand

xe

xxf

xX

xX

0for ,1

0 ,0

0for ,

0 ,0)(

Page 18: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

18Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Multiple Random Variables

There are cases where the result of one experiment determines the values of several random variables

The joint probabilities of these variables are: Discrete variables:

p(x1, …, xn) = P(X1 = x1, …, Xn = xn) Continuous variables:

cdf: Fx1x2…xn(x1, …, xn) = P(X1 x1, …, Xn xn)

pdf:n

n

n

xxx

xxxFxxxf

nXXXn

nXXX

..

),...,(),...,(

.21

21

21

21,...,21,...,

Page 19: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

19Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Independence and Conditional Probability

Independence: The random variables are said to be independent of each other when the occurrence of one does not affect the other. The pmf for discrete random variables in such a case is given by:

p(x1,x2,…xn)=P(X1=x1)P(X2=x2)…P(X3=x3) and for continuous random variables as:

FX1,X2,…Xn = FX1(x1)FX2(x2)…FXn(xn) Conditional probability: is the probability that X1= x1 given that

X2= x2. Then for discrete random variables the probability becomes:

and for continuous random variables it is:

),...,(

),...,,(),...,|(

22

1 2212211

nn

nnnn

xXxXP

xXxXxXPxXxXxXP

),...(

),...,,(),...,|(

22

22112211

nn

nnnn

xXxXP

xXxXxXPxXxXxXP

Page 20: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

20Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Bayes Theorem

A theorem concerning conditional probabilities of the form P(X|Y) (read: the probability of X, given Y) is

where P(X) and P(Y) are the unconditional probabilities of X and Y respectively.

)(

)()|()|(

YP

XPXYPYXP

Page 21: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

21Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Important Properties of Random Variables

Sum property of the expected value Expected value of the sum of random variables:

Product property of the expected value Expected value of product of stochastically

independent random variables

n

i

ii

n

i

ii XEaXaE11

][

n

i

i

n

i

i XEXE11

][

Page 22: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

22Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Important Properties of Random Variables Sum property of the variance

Variance of the sum of random variables is

where cov[Xi,Xj] is the covariance of random variables Xi and Xj and

If random variables are independent of each other, i.e., cov[Xi,Xj]=0, then

n

i i

jijiii

n

i

ii XXaaXVaraXaVar1

1-n

1i

n

1j

2

1

],cov[2 )(

][][][

])][])([[(],cov[

jiji

jjiiji

XEXEXXE

XEXXEXEXX

n

i

ii

n

i

ii XVaraXaVar1

2

1

)(

Page 23: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

23Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Important Properties of Random Variables

Distribution of sum - For continuous random variables with joint pdf fXY(x, y) and if Z = Φ(X,Y), the distribution of Z may be written as

where ΦZ is a subset of Z. For a special case Z= X+Y

If X and Y are independent variables, the fXY (x,y)= fX(x)fY(y)

If both X and Y are non negative random variables, then pdf is the convolution of the individual pdfs, fX(x) and fY(y).

dxdyyxfzZPzFzZ

XYZ ),()()(

Z

XYXY dxdyyxfdxdyyxfzFz

),(),()(

z-for ,)()()( dxxzfxfzf YXZ

z

YXZ zdxxzfxfzf0

-for ,)()()(

Page 24: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

24Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Central Limit Theorem

The Central Limit Theorem states that whenever a random sample (X1, X2,.. Xn) of size n is taken from any distribution with expected value E[Xi] = and variance Var(Xi) = 2, where i =1,2,..,n, then their arithmetic mean is defined by

n

iin X

nS

1

1

Page 25: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

25Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Central Limit Theorem

The sample mean is approximated to a normal distribution with E[Sn] = , and Var(Sn) = 2 / n.

The larger the value of the sample size n, the better the approximation to the normal.

This is very useful when inference between signals needs to be considered.

Page 26: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

26Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Poisson Arrival Model

A Poisson process is a sequence of events “randomly spaced in time”.

For example, customers arriving at a bank and Geiger counter clicks are similar to packets arriving at a buffer.

The rate of a Poisson process is the average number of events per unit time (over a long time).

Page 27: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

27Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Properties of a Poisson Process

Properties of a Poisson process For a time interval [0, t] , the probability of n arrivals in

t units of time is

For two disjoint (non overlapping ) intervals (t1, t2) and (t3, t4), (i.e. , t1 < t2 < t3 < t4), the number of arrivals in (t1, t2) is independent of arrivals in (t3, t4)

tn

n en

ttP

!

)()(

Page 28: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

28Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Interarrival Times of Poisson Process

Interarrival times of a Poisson process We pick an arbitrary starting point t0 in time . Let

T1 be the time until the next arrival. We have

P(T1 > t) = P0(t) = e -t

Thus the cumulative distribution function of T1 is given by

FT1(t) = P(T1≤ t) = 1 – e -t

The pdf of T1 is given by

fT1(t) = e -t

Therefore, T1 has an exponential distribution with mean rate .

Page 29: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

29Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Exponential Distribution

Similarly T2 is the time between first and second arrivals,we define T3 as the time between the second and third arrivals, T4 as the time between the third and fourth arrivals and so on.

The random variables T1, T2, T3… are called the interarrival times of the Poisson process.

T1, T2, T3,… are independent of each other and each has the same exponential distribution with mean arrival rate .

Page 30: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

30Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Memoryless and Merging Properties Memoryless property

A random variable X has the property that “the future is independent of the past” i.e., the fact that it hasn't happened yet, tells us nothing about how much longer it will take before it does happen.

Merging property If we merge n Poisson processes with distributions for the

inter arrival times

1- e- λit where i = 1, 2, …, ninto one single process, then the result is a Poisson process for which the inter arrival times have the distribution 1- e -t with mean

= 1 + 2 +..+ n..

Page 31: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

31Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Basic Queuing Systems

What is queuing theory? Queuing theory is the study of queues (sometimes

called waiting lines). Can be used to describe real world queues, or more

abstract queues, found in many branches of computer science, such as operating systems.

Basic queuing theory

Queuing theory is divided into 3 main sections: Traffic flow Scheduling Facility design and employee allocation

Page 32: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

32Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Kendall’s Notation

D.G. Kendall in 1951 proposed a standard notation for classifying queuing systems into different types. Accordingly the systems were described by the notation A/B/C/D/E where:

A Distribution of inter arrival times of customers

B Distribution of service times

C Number of servers

D Maximum number of customers in the system

E Calling population size

Page 33: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

33Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Kendall’s notation

A and B can take any of the following distributions types:

M Exponential distribution (Markovian)

D Degenerate (or deterministic) distribution

Ek Erlang distribution (k = shape parameter)

Hk Hyper exponential with parameter k

Page 34: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

34Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Little’s Law

Assuming a queuing environment to be operating in a stable steady state where all initial transients have vanished, the key parameters characterizing the system are: – the mean steady state consumer arrival N – the average no. of customers in the system T – the mean time spent by each customer in the system

which gives

N = T

Page 35: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

35Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Markov Process

A Markov process is one in which the next state of the process depends only on the present state, irrespective of any previous states taken by the process.

The knowledge of the current state and the transition probabilities from this state allows us to predict the next state.

Page 36: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

36Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Birth-Death Process

Special type of Markov process Often used to model a population (or, no. of jobs in

a queue). If, at some time, the population has n entities (n

jobs in a queue), then birth of another entity (arrival of another job) causes the state to change to n+1.

On the other hand, a death (a job removed from the the queue for service) would cause the state to change to n-1.

Any state transitions can be made only to one of the two neighboring states.

Page 37: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

37Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

The state transition diagram of the continuous birth-death process

State Transition Diagram

0 1 2 n-1 n n+1……

0

1

1

2

2

3

n-2

n-1

n-1

n

n

n+1

n+1

n+2

Page 38: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

38Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

M/M/1/ or M/M/1 Queuing System

When a customer arrives in this system it will be served if the server is free. Otherwise the customer is queued.

In this system customers arrive according to a Poisson distribution and compete for the service in a FIFO (first in first out) manner.

Service times are independent identically distributed (IID) random variables, the common distribution being exponential.

Page 39: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

39Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Queuing Model and State Transition Diagram

Queue Server

0 1 2 i-1 i i+1……

The M/M/1/ queuing model

The state transition diagram of the M/M/1/ queuing system

Page 40: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

40Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Equilibrium State Equations

.1 ),1()1()()(

,0 ),1()0(

iiPiPiP

iPP

If mean arrival rate is and mean service rate is , i = 0, 1, 2.. be the number of customers in the system and P(i) be the state probability of the system having i customers.

From the state transition diagram, the equilibrium state equations are given by

Page 41: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

41Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Traffic Intensity

We know that the P(0) is the probability of server being free. Since P(0) > 0, the necessary condition for a system being in steady state is,

This means that the arrival rate cannot be more than the service rate, otherwise an infinite queue will form and jobs will experience infinite service time.

1

Page 42: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

42Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Queuing System Metrics

= 1 – P(0), is the probability of the server being busy. Therefore, we have

P(i) = i(1- ) The average number of customers in the system is

Ls =

The average dwell time of customers is

Ws =

1

Page 43: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

43Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Queuing System Metrics

The average queuing length is

)(

2

1 1

2)()1(

iiPiLq

The average waiting time of customers is

)()1(

2

qq

LW

Page 44: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

44Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

M/M/S/ Queuing Model

Queue

Servers

S

S

.

.

2

1

Page 45: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

45Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

State Transition Diagram

0 1 2 S-1 S S+1……

2

3

(S-1)

S

S

S

Page 46: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

46Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Queuing System Metrics

The average number of customers in the system is

02)1(!

)0()(

i

S

sS

PiiPL

The average dwell time of a customer in the system is given by

2)1(!.

)0(1

SS

PLW

SS

S

Page 47: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

47Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Queuing System Metrics

The average queue length is

si

S

qSS

PiPSiL

2

1

)()!1(

)0()()(

The average waiting time of customers is

2)1(!.

)0(

SS

PLW

Sq

q

Page 48: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

48Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

M/G/1/ Queuing Model

We consider a single server queuing system whose arrival process is Poisson with mean arrival rate .

Service times are independent and identically

distributed with distribution function FB and pdf fb.

Jobs are scheduled for service as FIFO.

Page 49: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

49Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Basic Queuing Model

Let N(t) denote the number of jobs in the system (those in queue plus in service) at time t.

Let tn (n= 1, 2,..) be the time of departure of the nth job and Xn be the number of jobs in the system at time tn, so that

Xn = N (tn), for n =1, 2,.. The stochastic process can be modeled as a

discrete Markov chain known as imbedded Markov chain, which helps convert a non-Markovian problem into a Markovian one.

Page 50: Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 2 Probability, Statistics, and Traffic Theories Copyright.

50Copyright © 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Queuing System Metrics The average number of jobs in the system, in the steady state is

The average dwell time of customers in the system is

The average waiting time of customers in the queue is

Average waiting time of customers in the queue is

The average queue length is

qWNE ][

)1(2

][][

22

BENE

)1(2

][1][ 2

BENEWs

)1(2

][ 2

BEWq

)1(2

][ 22

BELq