1 1 slide review of probability distributions n probability distribution is a theoretical frequency...

47
1 Review of Probability Distributions Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered 1 through 6). What is the probability that you get a 1? or a 5? Example 2. If you throw a fair coin twice. What is the probability that you get two tails?

Upload: pamela-newton

Post on 17-Dec-2015

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

1 1 Slide

Slide

Review of Probability Distributions

Probability distribution is a theoretical frequency distribution.

Example 1.If you throw a fair die (numbered 1 through 6). What is the probability that you get a 1? or a 5?

Example 2.If you throw a fair coin twice. What is the probability that you get two tails?

Page 2: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

2 2 Slide

Slide

A variable can be discrete or continuous

A variable is discrete if it takes on a limited number of values, which can be listed.Example: Poisson distributionOther examples:

A variable is continuous if it can take any value within a given range.Example: Exponential distribution.Other examples:

Discrete vs. Continuous distributions

Page 3: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

3 3 Slide

Slide

Poisson Distribution

A Poisson distribution is a discrete distribution that can take an integer value > 0 (i.e., 0, 1, 2, 3, ….)

Formula• P(x) = (lx e –l)/x! (where e = natural

logarithm or 2.718, and x! = x factorial)

Example• l = 3 • What is P(x = 0)?

• What is P(x = 2)?

Page 4: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

4 4 Slide

Slide

Exponential Distribution

An exponential distribution is a continuous random variable that can take on any positive value.

Formula: f(x) = l e (-lx) ; F(x) = P(X < x) = 1- e (-lx)

for l > 0, and 0 < x < infinity. Example: l = 3

f(x=5) =

F(x=5)

Page 5: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

5 5 Slide

Slide

Relationship between Poisson distribution and Exponential distribution

Poisson distribution and exponential distribution are used to describe the same random process.

Poisson distribution describes the probability that there is/are x occurrence/s per given time period.

Exponential distribution describes the probability that the time between two consecutive occurrence is within a certain number x.

ExampleIf the arrival rate of customers are Poisson distributed and, say, 6 per hour, then the time between arrivals of customers are exponentially distributed with a mean of (1/6) hour or 10 minutes.

Page 6: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

6 6 Slide

Slide

Class Exercise

Suppose the arrival rate of customers is 10 per hour, Poisson distributed

What is the probability that 2 customers are arrival in one hour?

What is the average inter-arrival time of customers?

What is the probability that the inter-arrival time of customers is exactly 3 minutes?

What is the probability that the inter-arrival time of customers is less than or equal to 3 minutes?

Page 7: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

7 7 Slide

Slide

Chapter 11: Waiting Line Models

Structure of a Waiting Line System Queuing Systems Queuing System Input Characteristics Queuing System Operating Characteristics Analytical Formulas Single-Channel Waiting Line Model with

Poisson Arrivals and Exponential Service Times

Single-Channel Waiting Line Model with Poisson Arrivals and Constant Service Times

Multiple-Channel Waiting Line Model with Poisson Arrivals and Exponential Service Times

Economic Analysis of Waiting Lines

Page 8: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

8 8 Slide

Slide

Queuing theory is the study of waiting lines. Four characteristics of a queuing system are:

• the manner in which customers arrive• the time required for service• the priority determining the order of

service• the number and configuration of servers

in the system.

Structure of a Waiting Line System

Page 9: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

9 9 Slide

Slide

Structure of a Waiting Line System

Distribution of Arrivals• Generally, the arrival of customers into the

system is a random event. • Frequently the arrival pattern is modeled as a

Poisson process Distribution of Service Times

• Service time is also usually a random variable.

• A distribution commonly used to describe service time is the exponential distribution.

Queue Discipline• Most common queue discipline is first come,

first served (FCFS). • What is the queue discipline in elevators?

Page 10: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

10 10 Slide

Slide

Structure of a Waiting Line System

Single Service Channel

Multiple Service Channels

S1S1

S1S1

S2S2

S3S3

Customerleaves

Customerleaves

Customerarrives

Customerarrives

Waiting line

Waiting line

System

System

Single Service Channel

Multiple Service Channels

Page 11: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

11 11 Slide

Slide

Steady-State Operation

When a business like a restaurant opens in the morning, no customers are in the restaurant.

Gradually, activity builds up to a normal or steady state.

The beginning or start-up period is referred to as the transient period.

The transient period ends when the system reaches the normal or steady-state operation.

Waiting line/Queueing models describe the steady-state operating characteristics of a waiting line.

Page 12: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

12 12 Slide

Slide

Queuing Systems

A three part code of the form A/B/k is used to describe various queuing systems.

A identifies the arrival distribution, B the service (departure) distribution, and k the number of identical servers for the system.

Symbols used for the arrival and service processes are: M - Markov distributions (Poisson/exponential), D - Deterministic (constant) and G - General distribution (with a known mean and variance). For example, M/M/k refers to a system in which arrivals occur according to a Poisson distribution, service times follow an exponential distribution and there are k servers working at identical service rates.

Page 13: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

13 13 Slide

Slide

Analytical Formulas

When the queue discipline is FCFS, analytical formulas have been derived for several different queuing models including the following: • M/M/1• M/D/1• M/M/k

Analytical formulas are not available for all possible queuing systems. In this event, insights may be gained through a simulation of the system.

Page 14: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

14 14 Slide

Slide

Queuing Systems Assumptions

The arrival rate is l and arrival process is Poisson

There is one line/channel

The service rate, m, is per server (even for M/M/K).

The queue discipline is FCFS

Unlimited maximum queue length

Infinite calling population

Once the customers arrive they do not leave the system until they are served

Page 15: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

15 15 Slide

Slide

Queuing System Input Characteristics

= the arrival rate 1/ = the average time between arrivals µ = the service rate for each server 1/µ = the average service time = the standard deviation of the service time

Suppose the arrival rate, l, is 6 per hour.

What is the average time between arrivals?

Page 16: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

16 16 Slide

Slide

Relationship between L and Lq and W and Wq.

Single Service Channel

S1S1Customer

leavesCustomer

arrives

System

How many customers are waiting in the queue?

How many customers are in the system?

Suppose a customer waits for 10 minutes before she is served and the service time takes another 5 minutes.What is the waiting time in the queue?What is the waiting time in the system?

Page 17: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

17 17 Slide

Slide

Queuing System Operating Characteristics

P0 = probability the service facility is idle

Pn = probability of n units in the system

Pw = probability an arriving unit must wait for service Lq = average number of units in the queue

awaiting service L = average number of units in the system Wq = average time a unit spends in the queue awaiting service W = average time a unit spends in the system

Page 18: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

18 18 Slide

Slide

M/M/1 Operating Characteristics

P0 = 1 – /l m

Pn = ( / )l m n P0 = ( / )l m n (1 – / )l m

Pw = /l m

Lq = l2 /{ (m m – )}l

L = Lq + /l m = /(l m – )l

Wq = Lq/l = /{ (l m m – )}l

W = Wq + 1/m = 1 /(m – )l

Page 19: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

19 19 Slide

Slide

Some General Relationships for Waiting Line Models (M/M/1, M/D/1, and M/M/K)

Little's flow equations are:

L = W and Lq = Wq

Little’s flow equations show how operating characteristics L, Lq, W, and Wq are related in

any waiting line system. Arrivals and service times

do not have to follow specific probability

distributions for the flow equations to be applicable.

Page 20: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

20 20 Slide

Slide

Single-Channel Waiting Line Model

M/M/1 queuing system Number of channels = Arrival process = Service-time distribution = Queue length = Calling population = Customer leave the system without service?

Examples:• Single-window theatre ticket sales booth• Single-scanner airport security station

Page 21: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

21 21 Slide

Slide

Example: SJJT, Inc. (A)

M/M/1 Queuing SystemJoe Ferris is a stock trader on the floor of

the NewYork Stock Exchange for the firm of Smith, Jones,Johnson, and Thomas, Inc. Daily stock transactions arrive at Joe’s desk at a rate of 20 per hour, Poisson distributed. Each order received by Joe requires an average of two minutes to process, exponentially distributed. Joe processes these transactions in FCFS order.

Page 22: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

22 22 Slide

Slide

Example: SJJT, Inc. (A)

What is the probability that an arriving order does not have to wait to be processed?

What percentage of the time is Joe processing orders?

Page 23: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

23 23 Slide

Slide

Example: SJJT, Inc. (A)

What is the probability that Joe has exactly 3 orders waiting to be processed?

What is the probability that Joe has at least 2 orders in the system?

Page 24: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

24 24 Slide

Slide

Example: SJJT, Inc. (A)

What is the average time an order must wait from the time Joe receives the order until it is finished being processed (i.e. its turnaround time)?

What is the average time an order must wait from before Joe starts processing it?

Page 25: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

25 25 Slide

Slide

Example: SJJT, Inc. (A)

What is the average number of orders Joe has waiting to be processed?

What is the average number of orders in the system?

Page 26: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

26 26 Slide

Slide

M/D/1 queuing system Single channel Poisson arrival-rate distribution Constant service time Unlimited maximum queue length Infinite calling population Examples:

• Single-booth automatic car wash• Coffee vending machine

Single-Channel Waiting Line Model with Poisson Arrivals and Constant Service

Times

Page 27: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

27 27 Slide

Slide

M/D/1 Operating Characteristics

P0 = 1 – /l m

Pw = /l m

Lq = l2 /{2 (m m – )}l

L = Lq + /l m

Wq = Lq/l = /{2 (l m m – )}l

W = Wq + 1/m

Page 28: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

28 28 Slide

Slide

Example: SJJT, Inc. (B)

M/D/1 Queuing SystemThe New York Stock Exchange the firm of

Smith, Jones, Johnson, and Thomas, Inc. now has an opportunity to purchase a new machine that can process the transactions in exactly 2 minutes. Instead of using Joe, the company would like to evaluate the impact of using the new machine. Daily stock transactions still arrive at a rate of 20 per hour, Poisson distributed.

Page 29: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

29 29 Slide

Slide

Example: SJJT, Inc. (B)

What is the average time an order must wait from the time the order arrives until it is finished being processed (i.e. its turnaround time)?

What is the average time an order must wait from before machine starts processing it?

Page 30: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

30 30 Slide

Slide

Example: SJJT, Inc. (B)

What is the average number of orders waiting to be processed?

What is the average number of orders in the system?

Page 31: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

31 31 Slide

Slide

Improving the Waiting Line Operation

Waiting line models often indicate when improvements in operating characteristics are desirable.

To make improvements in the waiting line operation, analysts often focus on ways to improve the service rate by:

- Increasing the service rate by making a creative

design change or by using new technology.

- Adding one or more service channels so that more

customers can be served simultaneously.

Page 32: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

32 32 Slide

Slide

M/M/k queuing system Multiple channels (with one central waiting

line) Poisson arrival-rate distribution Exponential service-time distribution Unlimited maximum queue length Infinite calling population Examples:

• Four-teller transaction counter in bank• Two-clerk returns counter in retail store

Multiple-Channel Waiting Line Model withPoisson Arrivals and Exponential Service

Times

Page 33: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

33 33 Slide

Slide

M/M/k Example: SJJT, Inc. (C)

M/M/2 Queuing SystemSmith, Jones, Johnson, and Thomas, Inc.

has begun a major advertising campaign which it believes will increase its business 50%. To handle the increased volume, the company has hired an additional floor trader, Fred Hanson, who works at the same speed as Joe Ferris.

Note that the new arrival rate of orders, , is 50% higher than that of problem (A). Thus, = 1.5(20) = 30 per hour.

Page 34: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

34 34 Slide

Slide

M/M/k Example: SJJT, Inc. (C)

Sufficient Service Rate: > l kmQuestion

Will Joe Ferris alone not be able to handle the increase in orders?

AnswerSince Joe Ferris processes orders at a

mean rate of µ = 30 per hour, then = µ = 30 and the utilization factor is 1.

This implies the queue of orders will grow infinitely large. Hence, Joe alone cannot handle this increase in demand.

Page 35: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

35 35 Slide

Slide

M/M/k Example: SJJT, Inc. (C)

Probability of No Units in System (continued)

Given that = 30, µ = 30, k = 2 and ( /µ) = 1, theprobability that neither Joe nor Fred will be working

is: = 1/[(1 + (1/1!)(30/30)1] +

[(1/2!)(1)2][2(30)/(2(30)-30)]

= 1/(1 + 1 + 1) = 1/3 = .333

P

n kk

k

n k

n

k0

0

1

1

( / )!

( / )!

( )

What is the probability that neither Joe nor Fred will be working on an order at any point in time?

Page 36: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

36 36 Slide

Slide

M/M/k Example: SJJT, Inc. (C)

Probability of n Units in System

knforPn

Pn

n __!

)/(0

knforPkk

Pkn

n

n __!

)/(0)(

Page 37: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

37 37 Slide

Slide

Example: SJJT, Inc. (C)

Average Length of the Queue

The average number of orders waiting to be filled with both Joe and Fred working is 1/3.

2

02 2

( ) (30)(30)(30 30) 1( ) (1/ 3)

( 1)!( ) (1!)(2(30) 30) 3

k

qL Pk k

Average Length of the system

L = Lq + ( /µ) = 1/3 + (30/30) = 4/3

Page 38: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

38 38 Slide

Slide

Example: SJJT, Inc. (C)

Average Time in Queue

Wq = Lq /(1/3)/30 = 1/90 hr. = 0.67 min.

Average Time in System

W = L/(4/3)/30 = 4/90 hr. = 2.67 min.

QuestionWhat is the average turnaround time for

an order with both Joe and Fred working?

Page 39: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

39 39 Slide

Slide

Example: SJJT, Inc. (C)

Economic Analysis of Queuing SystemsThe advertising campaign of Smith,

Jones, Johnson and Thomas, Inc. (see problems (A) and (B)) was so successful that business actually doubled. The mean rate of stock orders arriving at the exchange is now 40 per hour and the company must decide how many floor traders to employ. Each floor trader hired can process an order in an average time of 2 minutes.

Page 40: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

40 40 Slide

Slide

Example: SJJT, Inc. (C)

Economic Analysis of Queuing Systems Based on a number of factors the

brokerage firm has determined the average waiting cost per minute for an order to be $.50. Floor traders hired will earn $20 per hour in wages and benefits. Using this information compare the total hourly cost of hiring 2 traders with that of hiring 3 traders.

Page 41: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

41 41 Slide

Slide

Economic Analysis of Waiting Lines

The total cost model includes the cost of waiting and

the cost of service.

TC cwL csk where: cw the waiting cost per time period for each unit L the average number of units in the system cs the service cost per time period for each channel k = the number of channels TC = the total cost per time period

Page 42: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

42 42 Slide

Slide

Example: SJJT, Inc. (C)

Economic Analysis of Waiting LinesTotal Hourly Cost = (Total hourly cost for orders in the system)

+ (Total salary cost per hour) = ($30 waiting cost per hour)

x (Average number of orders in the system)

+ ($20 per trader per hour) x (Number of traders) = 30L + 20k

Thus, L must be determined for k = 2 traders and for k = 3 traders with = 40/hr. and = 30/hr. (since the average service time is 2 minutes (1/30 hr.).

Page 43: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

43 43 Slide

Slide

Example: SJJT, Inc. (C)

Cost of Two Servers

P0 = 1 / [1+(1/1!)(40/30)]+[(1/2!)(40/30)2(60/(60-40))]

= 1 / [1 + (4/3) + (8/3)]

= 1/5

P

n kk

k

n k

n

k0

0

1

1

( / )!

( / )!

( )

Page 44: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

44 44 Slide

Slide

Example: SJJT, Inc. (C)

Cost of Two Servers (continued)

Thus,

L = Lq + ( /µ) = 16/15 + 4/3 = 2.40

Total Cost = 30(2.40) + (20)(2) = $112.00 per hour

2

02 2

( ) (40)(30)(40 30) 16( ) (1/ 5)

( 1)!( ) (1!)(2(30) 40) 15

k

qL Pk k

Page 45: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

45 45 Slide

Slide

Example: SJJT, Inc. (C)

Cost of Three Servers

P0 = 1/[[1+(1/1!)(40/30)+(1/2!)(40/30)2]+

[(1/3!)(40/30)3(90/(90-40))] ]

= 1 / [1 + 4/3 + 8/9 + 32/45]

= 15/59

P

n kk

k

n k

n

k0

0

1

1

( / )!

( / )!

( )

Page 46: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

46 46 Slide

Slide

Example: SJJT, Inc. (C)

Cost of Three Servers (continued)

Thus, L = .1446 + 40/30 = 1.4780

Total Cost = 30(1.4780) + (20)(3) = $104.35 per hour

3

02 2

( ) (30)(40)(40 30)( ) (15/ 59) .1446

( 1)!( ) (2!)(3(30) 40)

k

qL Pk k

Page 47: 1 1 Slide Review of Probability Distributions n Probability distribution is a theoretical frequency distribution. Example 1. If you throw a fair die (numbered

47 47 Slide

Slide

Example: SJJT, Inc. (C)

System Cost Comparison

Waiting Wage Total

Cost/Hr Cost/HrCost/Hr

2 Traders $82.00 $40.00 $112.00

3 Traders 44.35 60.00 104.35

Thus, the cost of having 3 traders is less than that of 2 traders.