Professional Documents
Culture Documents
3 Mathematical Statistical Models
3 Mathematical Statistical Models
Kleber Barcia V.
Chapter 3
Introduction
In this chapter:
Chapter 3
Random Variables
Continuous Random Variables
Cumulative Distribution Functions
Expected Value
Kleber Barcia V.
Chapter 3
[Probability Review]
i 1
p( xi ) 1
The collection of pairs [xi, p(xi)], i = 1,2,, is called the probability mass
function (pmf) of X.
Kleber Barcia V.
4
Rev. 1
Chapter 3
[Probability Review]
Example:
Consider the roll of a dice. Consider X as the number of points for each
face of the die. Then:
Rx = {1,2,3,4,5,6}
Assume load is distributed proportionally to the number of points of
each face.
xi
p(xi)
1/21
2/21
3/21
4/21
5/21
6/21
Then:
1. p( xi ) 0, for all i
2.
i 1
p( xi ) 1 / 21 2 / 21 ... 6 / 21 1
Chapter 3
[Probability Review]
P(a X b) f ( x)dx
a
f ( x)dx 1
RX
3. f ( x) 0, if x is not in RX
Properties
x0
1. P( X x0 ) 0, because f ( x)dx 0
x0
Chapter 3
[Probability Review]
e x / 2 , x 0
f ( x) 2
otherwise
0,
1 3 x / 2
P(2 x 3) e dx e 3 2 e 1 0.14
2 2
Kleber Barcia V.
Chapter 3
If X is discrete, then
F ( x) p( xi )
all
xi x
If X is continuous, then
F ( x) f (t )dt
Properties
1. F is nondecreas ing function. If a b, then F (a) F (b)
2. lim x F ( x) 1
3. lim x F ( x) 0
Chapter 3
The probability that the device lasts for less than 2 years:
Kleber Barcia V.
Chapter 3
Expected Value
[Probability Review]
If X is discrete
E ( x) xi p( xi )
all i
If X is continuous
E ( x) xf ( x)dx
10
Chapter 3
Expected Value
[Probability Review]
1 x / 2
x / 2
E ( X ) xe dx xe
e x / 2 dx 2
0
2 0
0
1
x / 2
2 x / 2
2
E ( X ) x e dx x e
e x / 2 dx 8
0
2 0
0
2
V (X ) 8 2 4
s V (X ) 2
Kleber Barcia V.
11
Chapter 3
Queuing systems
[Useful Models]
Kleber Barcia V.
12
Chapter 3
Gamma
Poisson: simple.
Kleber Barcia V.
13
Chapter 3
[Useful models]
Gamma:
Weibull:
Normal:
Kleber Barcia V.
Chapter 3
Other models
uniform
triangular
beta
discrete Distributions
[Useful Models]
Bernoulli
15
Chapter 3
Binomial Distribution
[Discrete Distribution]
The number of
outcomes having the
required number of
successes and
failures
Probability that
there are
x successes and
(n-x) failures
x!nn! x!
n
x
Kleber Barcia V.
16
Chapter 3
Binomial Distribution
[Discrete Distribution]
n = 50
50
(0.02) x (0.98)50 x , x 0,1,2,...,50
p( x) x
0,
otherwise
p = 0.02
p( X 2)
x 0
(0.02) (0.98)
50
x
50 x
E (x) = n * p = 50 (0.02) = 1
Kleber Barcia V.
17
Chapter 3
Geometric distribution
[Discrete Distribution]
Geometric Distribution
q x 1 p, x 0,1,2,..., n
p( x)
otherwise
0,
18
Rev. 1
Chapter 3
Poisson distribution
[Discrete Distribution]
e a a x
p( x) x! , x 0,1,...
otherwise
0,
e a a i
F ( x)
i!
i 0
x
E(X) = a = V(X)
a = np
a=2
19
Chapter 3
Poisson distribution
[Discrete Distribution]
Kleber Barcia V.
20
Chapter 3
Continuous distributions
Lognormal
Kleber Barcia V.
21
Chapter 3
Uniform Distribution
[Continuous Distribution]
, a xb
f ( x) b a
otherwise
0,
xa
0,
x a
F ( x)
, a xb
b a
xb
1,
E(X) = (a+b)/2
V(X) = (b-a)2/12
U(0,1) provides the means to generate random numbers,
from which random variables can be generated.
Kleber Barcia V.
22
Chapter 3
Uniform Distribution
[Continuous Distribution]
x a
F ( x)
, a xb
b a
23
Chapter 3
Exponential Distribution
[Continuous Distribution]
x0
0,x
F ( x)
lt
lx
l
e
dt
e
, x0
E(X) = 1/l
Kleber Barcia V.
V(X) = 1/l2
24
Chapter 3
Exponential Distribution
[Continuous Distribution]
Memoryless property
For all s and t greater or equal to 0:
P(X > s+t / X > s) = P(X > t)
Example:
The probability that the lamp lasts longer than its mean life is:
P(X > 3) = 1-(1-e-3/3) = e-1 = 0.368
Kleber Barcia V.
25
Rev. 1
Chapter 3
Normal Distribution
[Continuous Distribution]
m
Mean:
2
s
0
Variance:
Represented as X ~ N (m,s2)
Kleber Barcia V.
26
Chapter 3
Normal Distribution
[Continuous Distribution]
xm
F ( x ) P X x P Z
( xm ) /s
1 z2 / 2
e
dz
( xm ) /s
( z )dz (
xm
, where ( z )
1 t 2 / 2
e
dt
2
Tabla A.3.
Kleber Barcia V.
27
Chapter 3
Normal Distribution
[Continuous Distribution]
Kleber Barcia V.
28
Chapter 3
Weibull distribution
[Continuous Distribution]
A random variable X has a Weibull distribution if its pdf and cdf have
the form:
x 1
x
exp
, x
f ( x) a a
a
0,
otherwise
x
F ( x) 0,
1 exp a , x
When = 1,
X ~ exp(l = 1/a)
3 parameters:
Location parameter: , ( )
Scale parameter:
, ( > 0)
Shape parameter. a, (a > 0)
Example: = 0 and a = 1:
Kleber Barcia V.
29
Chapter 3
Weibull distribution
[Continuous Distribution]
Example: The time it takes for an aircraft to land and clear the runaway
at an international airport has a Weibull distribution with = 1.34 min.,
= 0.5 and = 0.04 min. Find the probability that an incoming plane will
take more than 1.5 min. to land and clear the runaway.
Then the probability that an plane will require more than 1.5 min. to
land and clear the runaway is:
1-0865 = 0.135
Kleber Barcia V.
30
Rev. 1
Chapter 3
Kleber Barcia V.
31
Chapter 3
Customers:
It refers to anything or anyone that arrives at a workplace
and requires service. Example: people, machines, trucks,
e-mails.
Server:
Refers to any resource that provides the requested service.
Example: a repair technician, production machines, the
airport runway.
Kleber Barcia V.
32
Chapter 3
Population
Population:
They are potential customers, it can be assumed finite or infinite.
System capacity:
It is a limit on the number of customers that may be in the waiting
line or system.
Kleber Barcia V.
33
Chapter 3
Process arrival
Random arrivals
Scheduled arrivals:
Kleber Barcia V.
34
Chapter 3
Process arrival
Kleber Barcia V.
35
Rev. 1
Chapter 3
Balk: leave when they see that the line is too long,
Renege: leave after being in the line when it is moving too slowly,
First-in-first-out (FIFO)
Last-in-first-out (LIFO)
Kleber Barcia V.
36
Rev. 1
Chapter 3
Kleber Barcia V.
37
Chapter 3
Kleber Barcia V.
38
Chapter 3
Kleber Barcia V.
39
Chapter 3
Queueing Notation
[Characteristics of Queueing System]
Kleber Barcia V.
40
Chapter 3
Queueing Notation
[Characteristics of Queueing System]
Pn:
Pn(t):
l:
le:
m:
r:
An:
Sn:
Wn:
WnQ:
L(t):
LQ(t):
L:
LQ:
w:
wQ:
Kleber Barcia V.
Chapter 3
Let Ti denote the total time during [0,T] in which the system
contained exactly i customers, the time-weighted-average number
of customers in a system is defined by:
1
L
T
i 0
iTi
T
i i
T
i 0
1
iTi
T
i 0
L(t )dt
0
L
L(t )dt L as T
T 0
Kleber Barcia V.
42
Chapter 3
1
1 T
Q
LQ
iTi
LQ (t )dt LQ as T
T i 0
T 0
if L(t) 0
0,
LQ (t )
L(t ) 1, if L(t) 1
0(15) 1(4) 2(1)
LQ
0.3 customers
20
Kleber Barcia V.
43
Chapter 3
i 1
where W1, W2, , WN are the individual times that each of the N
customers spend in the system during [0,T].
w as N
w
1 N Q
w Q Wi wQ
N i 1
Kleber Barcia V.
as
44
Chapter 3
i 1
W1 W2 ... W5
5
2 (8 3) (10 5) (14 7) (20 16)
1 N Q
w Q Wi wQ
N i 1
w Q
Kleber Barcia V.
as
0 033 0
1.2 time units
5
45
Chapter 3
L lw
Arrival rate
L lw as T and N l N / T
Kleber Barcia V.
46
Chapter 3
Server Utilization
r r as T
Kleber Barcia V.
47
Chapter 3
Server Utilization
T T0
1 T
Ls
L(t ) LQ (t ) dt
T 0
T
T = total time
T0 = server idle time
Kleber Barcia V.
48
Chapter 3
Server Utilization
L s r Ls r as T
and
l
r lE ( s )
m
l
r 1
m
Kleber Barcia V.
49
Chapter 3
Server Utilization
Ls
l
r
,
c
cm
Kleber Barcia V.
Chapter 3
Si
12 minutes with probability 0.1
Arrivals are deterministic, A1 = A2 = = l-1 = 10.
Services are stochastic, E(Si) = 9.3 min and V(S0) = 0.81 min2.
On average, the physician's utilization = r l/m = 0.93 < 1.
Consider the system is simulated with service times: S1 = 9, S2 =
12, S3 = 9, S4 = 9, S5 = 9, . The system becomes:
Kleber Barcia V.
Chapter 3
System incurs a cost for each customer in the queue, say at a rate
of $10 per hour.
The average cost per customer is:
N
j 1
$10 *W jQ
N
$10 * w Q
hour customer
Kleber Barcia V.
52
Rev. 1
Chapter 3
nPn
n 0
Kleber Barcia V.
Then : LQ lwQ
53
Chapter 3
M/G/1 queues
r2
l2s 2
LQ
2(1 r ) 2(1 r )
l (1 / m 2 s 2 )
l (1 / m 2 s 2 )
w
, wQ
m
2(1 r )
2(1 r )
1
Kleber Barcia V.
54
Chapter 3
M/G/1 queues
The proportion of arrivals who find Able idle and thus experience no delay is P0
= 1-r = 1/5 = 20%.
The proportion of arrivals who find Baker idle and thus experience no delay is
P0 = 1-r = 1/6 = 16.7%.
Kleber Barcia V.
55
Chapter 3
M/M/1 queues
Pn 1 r r n
l2
r2
L
, LQ
m l 1 r
m m l 1 r
1
1
l
r
w
, wQ
m l m (1 r )
m m l m (1 r )
Kleber Barcia V.
56
Chapter 3
M/M/1 queues
5.0
6.0
7.2
8.64
10.0
0.500
0.600
0.720
0.864
1.000
1.00
1.50
2.57
6.35
0.20
0.25
0.36
0.73
Kleber Barcia V.
57
Chapter 3
s
m
E ( X )2 1 m 2
The larger cv, the more variable is the distribution relative to its
expected value.
LQ
2(1 r )
2
1 r
LQ for M/M/1
queue
Kleber Barcia V.
Chapter 3
Multiserver queues
c 1 (l / m ) n l c 1 cm
P0
n! m c! cm l
n 0
r P L ( ) c
L cr
cr
2
1 r
c(c!)(1 r )
(cr ) c 1 P0
w
Kleber Barcia V.
59
Chapter 3
Multiserver queues
Kleber Barcia V.
60
Chapter 3
Kleber Barcia V.
61
Chapter 3
( K n)!c!c n c
L nPn ,
n 0,1,..., c 1
n
l
P0 ,
m
w L / le ,
n 0
l
m
n c, c 1,...K
wQ LQ le ,
r le / cm ,
LQ
n c Pn
n c 1
where le is the long run effective arrival rate of customers to queue (or entering/e xiting service)
le
( K n )l P
n 0
Kleber Barcia V.
62
Chapter 3
10!
5
10 5
P0
n2
n
20
20
(
10
n
)!
2
!
2
n2
n 0
0.065
10
nP
3.17 machines
n 0
Kleber Barcia V.
63
Chapter 3
Networks of Queues
Kleber Barcia V.
64
Chapter 3
Networks of Queues
r2 = 48/(3*20) = 0.8
r3 = 80/90 = 0.89
Kleber Barcia V.
65
Chapter 3
Networks of Queues
lj aj
l p
i
ij
all i
Arrival rate from
outside the network
If queue j has cj < parallel servers, each working at rate mj, then
the long-run utilization of each server is rj=lj/(cmj) (where rj < 1
for stable queue).
If arrivals from outside the network form a Poisson process with
rate aj for each queue j, and if there are cj identical servers
delivering exponentially distributed service times with mean 1/mj,
then, in steady state, queue j behaves likes an M/M/cj queue with
arrival rate l j a j li pij
all i
Kleber Barcia V.
66
Chapter 3
Networks of Queues
Example of a driver's license office:
After checking, 15% of drivers need to take the written exam takes
about 20 minutes.
Everyone should wait for the photo of your license. This station
processes an average of 60 licenses per hr.
The head office want to know the arrival rate for each of the queues.
Kleber Barcia V.
67
Chapter 3
Networks of Queues
Kleber Barcia V.
HOMEWORK 5 at SIDWEB
------
68