1 1 random variables a random variable is a numerical description of the a random variable is a...

71
1 Random Variables A random variable is a numerical descriptio outcome of an experiment. A discrete random variable may assume eithe finite number of values or an infinite sequ values. A continuous random variable may assume any numerical value in an interval or collectio intervals.

Upload: neal-bishop

Post on 17-Jan-2016

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

1 1

Random Variables

A random variable is a numerical description of the outcome of an experiment.

A discrete random variable may assume either a finite number of values or an infinite sequence of values.

A continuous random variable may assume any numerical value in an interval or collection of intervals.

Page 2: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

2 2

Page 3: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

3 3

Random Variables

Question Random Variable x Type

Familysize

x = Number of dependents reported on tax return

Discrete

Distance fromhome to store

x = Distance in miles from home to the store site

Continuous

Own dogor cat

x = 1 if own no pet; = 2 if own dog(s) only; = 3 if own cat(s) only; = 4 if own dog(s) and cat(s)

Discrete

Page 4: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

4 4

The probability distribution for a random variable describes how probabilities are distributed over the values of the random variable.

We can describe a discrete probability distribution with a table, graph, or formula.

Probability Distributions

The probability distribution is defined by a probability function, denoted by f(x), that provides the probability for each value of the random variable.

The required conditions for a discrete probability function are:

f(x) > 0 f(x) = 1

Page 5: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

5 5

Continuous Probability Distributions

f (x)f (x)

x x

Uniform Probability Distribution

x

f (x)

Normal Probability Distribution

xx

f (x)f (x)

Exponential Probability Distribution

Page 6: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

6 6

0 5 10 15 20 25 30 350

0.02

0.04

0.06

0.08

0.1

0.12

0.14

Exponential: 8.6 minutes time interval

0 1 2 3 4 50

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Poisson: 1 per 8.6 minutes

Page 7: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

7 7

Continuous Probability Distributions

A continuous random variable can assume any value in an interval on the real line or in a collection of intervals.

It is not possible to talk about the probability of the random variable assuming a particular value. Instead, we talk about the probability of the random variable assuming a value within a given interval.

Page 8: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

8 8

Area Under the Curve

The probability of the random variable assuming a value within some given interval from x1 to x2 is defined to be the area under the graph of the probability density function between x1 and x2.

f (x)f (x)

x x

Uniform

x1 x1 x2 x2

x

f (x) Normal

x1 x1 x2 x2

x1 x1 x2 x2

Exponential

xx

f (x)f (x)

x1

x1

x2 x2

Page 9: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

9 9

Uniform Probability Distribution

where: a = smallest value the variable can assume b = largest value the variable can assume

f (x) = 1/(b – a) for a < x < b = 0 elsewhere

A random variable is uniformly distributed whenever the probability is proportional to the interval’s length.

Var(x) = (b - a)2/12E(x) = (a + b)/2

Page 10: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

10 10

a ba b

Continuous Probability Distributions

a ba bx1

x2x1

x1

P(x1 ≤ x≤ x2)

P(x≤ x1) P(x≥ x1) P(x≥ x1)= 1- P(x<x1)

x2x1

P(x1 ≤ x≤ x2)

Page 11: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

11 11

Example: Slater's Buffet

Slater customers are charged for the amount of salad they take. Sampling suggests that the amount of salad taken is uniformly distributed between 5 ounces and 15 ounces.x = salad plate filling weight

f(x)f(x)

x x

1/101/10

Salad Weight (oz.)Salad Weight (oz.)

55 1010 1515

f(x) = 1/10 for 5 < x < 15 = 0 elsewhere

E(x) = (a + b)/2 = (5 + 15)/2 = 10

Var(x) = (b - a)2/12 = (15 – 5)2/12 = 8.33

Page 12: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

12 12

f(x)f(x)

x x

1/101/10

Salad Weight (oz.)Salad Weight (oz.)

55 1010 1515

P(12 < x < 15) = 1/10(3) = .3P(12 < x < 15) = 1/10(3) = .3

What is the probability that a customer will take between 12 and 15 ounces of salad?

Uniform Probability Distribution

1212

Page 13: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

13 13

The Uniform Probability Distribution

P(8<x < 12) = ?P(8<x < 12) = ?

x x

f (x )f (x )

55 15151212

1/101/10

88

P(8<x < 12) = (1/10)(12-8) = .4P(8<x < 12) = (1/10)(12-8) = .4

x x

f (x )f (x )

55 15151212

1/101/10P(0<x < 12) = ?P(0<x < 12) = ?

P(0<x < 12) = P(5<x < 12)== (1/10)(12-5) = .7

P(0<x < 12) = P(5<x < 12)== (1/10)(12-5) = .7

P(10<x < 22) = ?P(10<x < 22) = ?

P(10<x < 22) = P(10<x < 15)== (1/10)(15-10) = .5

P(10<x < 22) = P(10<x < 15)== (1/10)(15-10) = .5

Page 14: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

14 14

Most computer languages include a functon that can be used to generate random numbers. In Excel, the RAND() function can be used to generate random numbers between 0 and 1. If we let x denote a random number generated using RAND(), then x is a continuous random variable with the following probability density function.

f(x) = 1 for 0 ≤ x ≤ 1f(x) = 0, elsewherea) Graph the density function.

Uniform Distribution Problem 4

f(x)f(x)

x x

11

00 11b) Compute P( .25 ≤ x ≤ .75)c) Compute P( x ≤ .3) d) Compute P( x > .6)

e) Generate 100 uniform random variables between 20 and 80 using RAND() function. f) Compute Mean and StdDev for part (e)

Page 15: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

15 15

Microsoft Excel Worksheet

A uniform distrubution is in the range of 6 and 10 .a) What is f(x) for 6 <= x <= 10b) what is the probability of x <= 8c) what is the probability of x >= 10d) what is the probability of 7 <= x <= 9e) what is the probability of 0 <= x <= 10f) what is the probability of 8 <= x <= 16

A uniform distrubution is in the range of 3 -- 8Draw the distribution graph when 4 <= x <= 73 0.333

4 0.250

5 0.200 O X X X O6 0.167 O X X X O7 0.143 O X X X O8 0.125 O X X X O9 0.111 O X X X O10 0.100 O X X X O11 0.091 O X X X O12 0.083 O X X X O13 0.077 O X X X O14 0.071 O X X X O15 0.067 O X X X O

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Page 16: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

16 16

j) Suppose this is the probability distribution of the sales price of a peice of antique in thousand dollars. What price (in thousand dollars) do you offer to maximize the probability of getting this antique.

A uniform distrubution is in the range of 4 and 9 .Supose you want to sell this piece and you have a customer who will pay 12 thousand dollars for this piece. What price (in

thosand dollars) do you offer to maximize your expected profit.

-30

-25

-20

-15

-10

-5

0

5

0 5 10 15 20 25A uniform distrubution is in the range of 4 and 9 .Supose you want to sell this piece and you have a customer who will pay 12 thousand dollars for this piece. What price (in

thosand dollars) do you offer to maximize your expected profit. 8

Profit 4Probability 0.80Expected Profit 3.2

3 88

Page 17: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

17 17

The News Vendor Problem Swell Productions (The Retailer) is sponsoring an outdoor conclave for owners of collectible and classic Fords. The concession stand in the T-Bird area will sell clothing such as official Thunderbird racing jerseys. Suppose the probability of jerseys sales quantities is uniformly (and continuously) distributed between 100 and 400. Suppose sales price is $80 per jersey, purchase cost is $40, and unsold jerseys are returned to the manufacturer for $20 per unit. How many Jerseys Swell Production orders?

100 400QCu: Underage CostCu = 80-40 = 40Co: Overage CostCo = 40-20 = 20SL* = Cu/(Cu+Co)SL* = 40/(40+20) = 2/3(Q-100)/(400-100) = 2/3 Q= 300

Page 18: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

18 18

The expected number of participants in a conference is uniformly distributed between 100 and 700. The participants spend one night in the hotel and the cost is paid by the conference. The hotel has offered a rate of $200 per room if a block of rooms is reserved (non-refundable) in advance. The rate in the conference day is $300. All rooms will be single occupied. How many rooms should we reserve in the non-refundable block to minimize our expected total cost. 100 700

The News Vendor Problem

Service level (Probability of demand not exceeding what we have ordered) SL* = Cu/(Cu+Co)Co: Overage cost Co = 200.Cu: Underage costCu = 300-200 = 100

Page 19: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

19 19

The News Vendor Problem

a=100 b=700

?

B-1=600

1/6000.3333

SL* = Cu/(Cu+Co)SL* = 100/(100+200) = 1/3SL* = (Q-a)/(b-a) = (Q-100)/600 = 1/3

Q= 300

Uniform Random Variable GenerationX= a+(b-a)Rand()X= 100+600Rand()

Page 20: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

20 20

Simulation of Project Management Network

U(20,60) U(20,60)A B

Microsoft Excel Worksheet

60 70 80 90 100 110 120 1300

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Average = 80.3 C.V.= 0.21

A B Project45 28 74 40.97182 0.001 80.431 38 69 44.06677 0.002 16.433 23 56 44.3676 0.003 0.2039828 52 80 44.58495 0.004

Page 21: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

21 21

Simulation of Project Management NetworkU(20,60)A

U(20,60)C

U(20,60)B

Microsoft Excel Worksheet

A B Project45 28 74 40.97182 0.001 80.431 38 69 44.06677 0.002 16.433 23 56 44.3676 0.003 0.2039828 52 80 44.58495 0.004

60 70 80 90 100 110 120 1300

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Average = 87.1 C.V.= 0.16

Page 22: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

22 22

Simulation of Project Management Network

U(20,60) U(20,60)A B

U(20,60)E

U(20,60) U(20,60)C D

Microsoft Excel Worksheet

A B Project45 28 74 40.97182 0.001 80.431 38 69 44.06677 0.002 16.433 23 56 44.3676 0.003 0.2039828 52 80 44.58495 0.004

60 80 100 120 140 160 180 2000

0.2

0.4

0.6

0.8

1

1.2

Average = 133.1 C.V.= 0.14

Page 23: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

23 23

Normal Probability Distribution

The normal probability distribution is the most important distribution for describing a continuous random variable.

It is widely used in statistical inference. It has been used in a wide variety of

applications including:• Heights of

people• Rainfall

amounts

• Test scores• Scientific

measurements Abraham de Moivre, a French mathematician, published The Doctrine of Chances in 1733.

He derived the normal distribution.

Page 24: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

24 24

Normal Probability Distribution

2 2( ) / 21( )

2xf x e

= 3.14159

e = 2.71828

The distribution is symmetric; its skewness measure is zero.The highest point on the normal curve is at the mean, which is also the median and mode.

Standard Deviation s

Mean mx

Page 25: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

25 25

Normal Probability Distribution

The entire family of normal probability distributions is defined by its mean m and its standard deviation s .

-10 0 25x

= 15

= 25

x

The standard deviation determines the width of the curve: larger values result in wider, flatter curves.

The mean can be any numerical value: negative, zero, or positive.

Page 26: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

26 26

Normal Probability DistributionProbabilities for the normal random variable are given by areas under the curve. The total area under the curve is 1 (.5 to the left of the mean and .5 to the right).

xm – 3s m – 1s

m – 2sm + 1s

m + 2sm + 3sm

68.26%

95.44%99.72%

Page 27: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

27 27

Standard Normal Probability Distribution

A random variable having a normal distribution with a mean of 0 and a standard deviation of 1 is said to have a standard normal probability distribution. The letter z is used to designate thestandard normal random variable.

s = 1

0z

Page 28: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

28 28

Standard Normal Probability Distribution

zx

We can think of z as a measure of the number of standard deviations x is from .

is used to compute the z value given a cumulative probability. is used to compute the z value given a cumulative probability.NORMSINVNORMSINVNORM.S.INV

is used to compute the cumulative probability given a z value. is used to compute the cumulative probability given a z value.NORMSDISTNORMSDISTNORM.S.DIST

The “S” in the function names remindsus that they relate to the standardnormal probability distribution.

Page 29: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

29 29

Excel Formula Worksheet

Using Excel to ComputeStandard Normal Probabilities

A B12 3 P (z < 1.00) =NORM.S.DIST(1,1)4 P (0.00 < z < 1.00)5 P (0.00 < z < 1.25)6 P (-1.00 < z < 1.00)7 P (z > 1.58)8 P (z < -0.50)9

Probabilities: Standard Normal Distribution

0.8413=NORM.S.DIST(1,1)-NORM.S.DIST(0,1)=NORM.S.DIST(1.25)-NORM.S.DIST(0,1) 0.3944=NORM.S.DIST(1,1)-NORM.S.DIST(-1,1) 0.6827=1-NORM.S.DIST(1.58,1)0.0571=NORM.S.DIST(-0.5,1) 0.3085

0.3413

Page 30: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

30 30

Excel Formula Worksheet

Using Excel to ComputeStandard Normal Probabilities

A B

12 3 z value with .10 in upper tail =NORM.S.INV(0.9)4 z value with .025 in upper tail

)

5 z value with .025 in lower tail

=NORM.S.INV(0.025)

6

Finding z Values, Given Probabilities

1.28=NORM.S.INV(0.975) 1.96

=NORM.S.INV(0.025) -1.96

Page 31: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

31 31

Standard Normal Probability Distribution

Pep Zone sells auto parts and supplies including a popular multi-grade motor oil. When the stock of this oil drops to 20 gallons, a replenishment order is placed. The store manager is concerned that sales are being lost due to stockouts while waiting for a replenishment order. It has been determined that demand during replenishment lead-time is normally distributed with a mean of 15 gallons and a standard deviation of 6 gallons The manager would like to know the probability of a stockout during replenishment lead-time. In other words, what is the probability that demand during lead-time will exceed 20 gallons?

P(x ≥ 20) = ?

Page 32: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

32 32

z = (x - )/ = (20 - 15)/6 = .833333

Solving for the Stockout Probability

Step 1: Convert x to the standard normal distribution.

Step 2: Find the area under the standard normal curve to the left of z = .83.

NORM.S.DIST(0.83333,1)

Standard Normal Probability Distribution

.7977

Page 33: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

33 33

P(z > .83) = 1 – P(z < .83) = 1- .7977

= .2023

Solving for the Stockout Probability

Step 3: Compute the area under the standard normal curve to the right of z = .83.

Probability of a

stockoutP(x > 20)

Standard Normal Probability Distribution

Page 34: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

34 34

Solving for the Stockout Probability

0 .83

Area = .7967Area = 1 - .7977

= .2023

z

Standard Normal Probability Distribution

Page 35: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

35 35

Standard Normal Probability Distribution

Standard Normal Probability Distribution

If the manager of Pep Zone wants the probability

of a stockout during replenishment lead-time to be

no more than .05, what should the reorder point be?

---------------------------------------------------------------

Page 36: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

36 36

Solving for the Reorder Point

0

Area = .9500

Area = .0500

zz.05

Standard Normal Probability Distribution

This is done using =NORM.S.INV(0.95) 1.645

Page 37: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

37 37

Solving for the Reorder Point

Step 2: Convert z.05 to the corresponding value of x.

x = + z.05 = 15 + 1.645(6) = 24.87 or 25

A reorder point of 25 gallons will place the probability of a stockout during leadtime at (slightly less than) .05.

Standard Normal Probability Distribution

Page 38: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

38 38

Normal Probability Distribution

Solving for the Reorder Point

15x

24.87

Probability of a

stockout during

replenishmentlead-time

= .05

Probability of no

stockout during

replenishmentlead-time

= .95

Page 39: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

39 39

Solving for the Reorder Point

By raising the reorder point from 20 gallons to 25 gallons on hand, the probability of a stockoutdecreases from about .20 to .05. This is a significant decrease in the chance thatPep Zone will be out of stock and unable to meet acustomer’s desire to make a purchase.

Standard Normal Probability Distribution

Page 40: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

40 40

Using Excel to ComputeNormal Probabilities

Excel has two functions for computing cumulative probabilities and x values for any normal distribution:

NORM.DIST is used to compute the cumulative probability given an x value.

NORM.INV is used to compute the x value given a cumulative probability.

Page 41: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

41 41

Excel Formula Worksheet

Using Excel to ComputeNormal Probabilities

A B

12 3 P (x > 20) =1-NORM.DIST(20,15,6,1)4 56 7 x value with .05 in upper tail 8

Probabilities: Normal Distribution

Finding x Values, Given Probabilities=0.2023

=NORM.INV(0.95,15,6)=24.87

Note: P(x > 20) = .2023 here using Excel, while our previous manual approach using the z table yielded .2033 due to our rounding of the z value.

Page 42: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

42 42

Reorder Point

If average demand during the lead time is 200 and standard deviation of demand during lead time is 25. At what level of inventory we should order such that with 90% confidence we will not have stockout. =NORM.S.INV(0.9) = 1.2816

(X-)/σ =1.2816

X= +1.2816σ

X= 200 +1.2816(25)

200+32

=NORM.INV(0.9,200,25)

232.0388

Page 43: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

43 43

Average lead time demand is 20,000 units. Standard deviation of lead time demand is 5,000 units. The warehouse currently orders a 14-day supply, 28,000 units, each time the inventory level drops to 24,000 units. What is the probability that the demand during the period exceeds inventory?

X= 24000m= 20000σ = 5000=NORM.DIST(24000,20000,5000,1)= 0.788145 In 78.81 % of the order cycles, the warehouse will not have a stockout. Risk = 21.19%.

Service Level

Page 44: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

44 44

Optimal Service Level: The News Vendor Problem

An electronics superstore is carrying a 60” LEDTV for the upcoming Christmas holiday sales. Each TV can be sold at $2,500. The store can purchase each unit for $1,800. Any unsold TVs can be salvaged, through end of year sales, for $1,700. The retailer estimates that the demand for this TV will be Normally distributed with mean of 150 and standard deviation of 15. How many units should they order? Note: If they order 150, they will be out of stock 50% of the time.Which service level is optimal? 80%, 90%, 95%, 99%??Cost =1800, Sales Price = 2500, Salvage Value = 1700Underage Cost = Marginal Benefit = p-c = 2500-1800 = 700Overage Cost = Marginal Cost = c-v = 1800-1700 = 100Optimal Service Level = SL* = P(LTD ≤ ROP) = Cu/(Cu+Co)Or in NVP Terminology SL* = P(R ≤ Q*) = Cu/(Cu+Co)

Page 45: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

45 45

Optimal Service Level: The Newsvendor Problem

Underage cost = Marginal Benefit =Cu = 2500-1800 = 700Overage Cost = Marginal Cost = Co = 1800-1700 = 100SL* = Cu/(Cu+Co)SL* = 700/800 = 0.875

1.15

Probability of excess inventory

0.875

Probability of shortage

0.125

LTD =N(150,15)

ROP = LTD + Isafety= LTD + zσLTD

= 150+1.15(15)

Isafety = 17.25 = 18

ROP = 168

Risk = 12.5%

Page 46: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

46 46

The News Vendor Problem

The expected number of participants in a conference is normally distributed with mean of 500 and standard deviation of 150. The participants spend one night in the hotel and the cost is paid by the conference. The hotel has offered a rate of $200 per room if a block of rooms is reserved (non-refundable) in advance. The rate in the conference day is $300. All rooms will be single occupied. How many rooms should we reserve in the non-refundable block to minimize our expected total cost. Service level (Probability of demand not exceeding what we have ordered) SL* = Cu/(Cu+Co)Co = 200, Cu = 300-200 = 100SL* = Cu/(Cu+Co) = 100/(100+200) = 1/3=NORM.INV(1/3,500,150) =436

Page 47: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

47 47

Daily demand for your merchandise has mean of 20 and standard deviation of 5. Sales price is $100 per unit of product.You have decided to close this business line in 64 days. Your supplier has also decided to close this line immediately, but has agreed to provide your last order at a cost of $60 per unit. Any unsold product will be disposed at cost of $10 per unit. How many units do you order

Problem Game- The News Vendor Problem

LTD = R ×L =20 ×64 = 1280.

Should we order 1280 units or more or less?

It depends on our service level.

sLTD = (L)*(sR)

sLTD = (64)* (5)

sLTD = 8* 5 = 40Underage cost = Cu = = 100 – 60 = 40.

Overage cost = Co = 60 +10 =70

Page 48: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

48 48

SL = Cu/(Cu+Co) = 40/(40+70) = 0.3636.

Due to high overage cost, SL*< 50%.

Z(0.3636) = ?The optimal Q = LTD + z σLTD

=NORM.S.INV(0.3636) = -0.34885Q = 1280 -0.34885(40)

ROP = 1280-13.9541ROP = 1266.0459 =NORM.INV(probability, mean, standard_dev)=NORM.INV(0.3636,1280,40=1266.0459

Problem Game- The News Vendor Problem

Page 49: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

49 49

100000 in One Stock or 10000 in Each of 10 stocks

Suppose there are 10 stocks and with high probability they all have Normal pdf return with mean of 5% and standard deviation of 5%. These stocks are your only options and no more information is available. You have to invest $100,000. What do you do?=NORM.S.INV(rand())=z = 0.441475 X= µ + sz = X = 5%+ 0.441475(5%) X= 5%+2.21% = 7.21%=NORM.INV(probability, mu, sigma)=NORM.INV(probability, 5%, 5%)=NORM.INV(rand(), 5%, 5%)= -8.1%

Page 50: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

50 50

100,000 vs. 10(10,000) investment in N(5%, 5%)

100000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 1000003860 692 109 75 -176 1319 210 1128 1073 780 1111 63219196 656 515 353 832 1011 -262 88 728 1408 383 5712-6873 -285 994 1087 -316 976 -256 96 273 303 -11 2861-671 -298 554 363 736 539 337 285 -270 627 753 3626586 653 915 397 243 538 -645 843 1116 720 533 53134538 46 51 1 735 -60 841 775 -194 264 886 33456764 184 601 687 754 1111 477 -996 214 681 63 37769072 249 863 435 1157 546 765 -794 94 957 969 52415915 315 683 203 -17 65 -236 562 961 450 465 34514264 177 1005 76 587 284 71 127 172 270 -448 2321

100000 10(10000)Min= -9789 666Max= 21192 10204

Mean= 4888.58 5089.734StdDev= 4982 1569

CV= 1.02 0.31Maean/StdDev 0.98 3.24

Page 51: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

51 51

Risk Aversion Individual

-15000

-10000

-5000

0

5000

10000

15000

20000

Page 52: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

52 52

Exponential Probability Distribution

The exponential random variables can be used to describe:• Time between vehicle arrivals at a toll booth• Distance between major defects in a highway• Time required to complete a questionnaire• time it takes to complete a task.

In waiting line applications, the exponential distribution is often used for interarrival time and service times.

A property of the exponential distribution is that the mean and standard deviation are equal.

The exponential distribution is skewed to the right. Its skewness measure is 2.

Page 53: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

53 53

Density Function

Exponential Probability Distribution

f x e x( ) / 1

for x > 0

Cumulative Probabilities

P x x e x( ) / 0 1 o

P(x≥x0 )= 1- P(x≤ x0) = e –x0/ = EXP(-x0/)

e = 2.71828 = expected or mean in terms of time (in Poisson Distribution it was number of occurrences over a period of time

x0 = some specific value of x

Page 54: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

54 54

Exponential Probability Distribution

Example: Al’s Full-Service Pump

The time between arrivals of cars at Al’s full-

service gas pump follows an exponential probability

distribution with a mean time between arrivals of 3

minutes. Al would like to know the probability that

the time between two successive arrivals will be 2

minutes or less.

Page 55: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

55 55

xx

f(x)f(x)

.1.1

.3.3

.4.4

.2.2

0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10Time Between Successive Arrivals (mins.)

Exponential Probability Distribution

P(x < 2) = 1 - 2.71828-2/3 = 1 – EXP(-2/3) =

Example: Al’s Full-Service Pump

1-0.5134 = 0.4866

Page 56: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

56 56

Excel Formula Worksheet

Using Excel to ComputeExponential Probabilities

A B

12 3 P (x < 2) =EXPON.DIST(2,1/3,1)4

Probabilities: Exponential Distribution

A B

12 3 P (x < 2) 0.48664

Probabilities: Exponential Distribution

=EXPON.DIST(2,1/3,0)= ??

Page 57: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

57 57

Exponential Probability Distribution

Average trade time in Ameritrade is one second. Ameritrade has promised its customers if trade time exceeds 5 second it is free (a $10.99 cost saving. The same promises have been practiced by Damion Pizza (A free regular pizza) and Wells Fargo ($5 if waiting time exceeds 5 minutes). There are 150,000 average daily trade. What is the cost to Ameritrade”P(x≥ X0) = e-X0/= e-5/1 = 0.006738Probability of of not meeting the promise is 0.6738%0.006738*150,000* = 1011 [email protected] per order = 10.99*1011 = $11111 per dayWhat was the cost if they had improved their service level by 50% that is to make it free for transactions exceeding 2.5 secs. e-2.5/1 = 0.0820858.2085%*150,000*10.99 = $135317 per dayWe cut the promised time by half, our cost increased 12 times.

Page 58: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

58 58

Exponential Probability Distribution

In a single phase single server service process and exponentially distributed interarrival time and service times, the actual total time that a customer spends in the process is also exponentially. Suppose total time the customers spend in a pharmacy is exponentially distributed with mean of 15 minutes. The pharmacy has promised to fill all prescriptions in 30 minutes. What percentage of the customers cannot be served within this time limit?P(x≥30) = EXP(-30/15) = 0.135313.53% of customers will wait more than 30 minutes. = P(x≤30) = EXPON.DIST(30,1/15,1)= P(x≤30) = 0.864665P(x ≥ 30) = 1- P(x≤30) = 1- 0.864665 = 0.1353

Page 59: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

59 59

Exponential Probability Distribution 90% of customers are served in less than what time limit?1-e-X0/ = 0.9Find X0e-X0/ = 0.1 e-X0/15 = 0.1ln (0.1) = -X0/15X0 = -15ln(0.1)X0 = -15(-2.30259) = 34.5388 More than 90% of customers are served in less than 35 mins.What is the probability of 3 customers arriving in 30 minutesOne customer arrives per 15 minutes.

Page 60: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

60 60

Exponential Probability Distribution 90% of customers are served in less than what time limit?

0 0 150.064493 10.124827 20.181269 30.234072 40.283469 5

0.32968 60.372911 70.413354 80.451188 90.486583 100.519695 110.550671 12

0.57965 130.606759 140.632121 15

0

5

10

15

20

25

30

35

40

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Chart Title

0 0 150.9 34.54

Page 61: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

61 61

Exponential Probability Distribution SOLVER

0.9 34.54 15

Page 62: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

62 62

Exponential Random Variable P(x ≤ X0) = 1-e(-X0/µ)

P(x ≤ X0) = rand() = 1-e(-X0/µ)

1-rand() = e(-X0/µ)

1-rand() by itself is a rand()rand() = e(-X0)/µ)

e(-X0/µ) = rand() X0= -µrand()x= -µrand()

Page 63: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

63 63

The Poisson distributionprovides an appropriate description

of the number of occurrencesper interval

The exponential distributionprovides an appropriate description

of the length of the intervalbetween occurrences

One customer arrives per 15 minutes. The average number of customers arriving in 30 mins is 2.This is Poisson distribution. =POISSON.DIST(3,2,1) =0.857123

Page 64: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

64 64

Examples of Poisson distributed random variables:

the number of knotholes in 14 linear feet of pine board

the number of vehicles arriving at a toll booth in one hour

Poisson Probability Distribution

Bell Labs used the Poisson distribution to model the arrival of phone calls.

Page 65: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

65 65

A Poisson distributed random variable is often useful in estimating the number of occurrences over a specified interval of time or space

It is a discrete random variable that may assume an infinite sequence of values (x = 0, 1, 2, . . . ).

Poisson Probability Distribution

The occurrence or nonoccurrence in any interval is independent of the occurrence or nonoccurrence in any other interval.

The probability of an occurrence is the same for any two intervals of equal length.

Page 66: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

66 66

Poisson Probability Function

Poisson Probability Distribution

f xex

x( )

!

where: x = the number of occurrences in an interval f(x) = the probability of x occurrences in an interval = mean number of occurrences in an interval e = 2.71828 x! = x(x – 1)(x – 2) . . . (2)(1)

Page 67: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

67 67

Poisson Probability Distribution

Poisson Probability Function

In practical applications, x will eventually become large enough so that f(x) is approximately zero and the probability of any larger values of x becomes negligible.

Since there is no stated upper limit for the number of occurrences, the probability function f(x) is applicable for values x = 0, 1, 2, … without limit.

Page 68: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

68 68

More than 50 million guests stay at bed and breackfacts each year.The websit for B&B Inns of North America which averages 7 visitors per minute, enables many B&B to attract questsa) Compute the probability of 0 website visotor in a one muinute periodb) Compute the probability of 2 or more website visotor in a one muinute periodc) Compute the probability of 1 or more website visotor in a 30 second periodd) Compute the probability of 5 or more website visotor in a one muinute period

0.0009120.0072950.0301970.172992

Patients arrive at the emergency room of Mercy Hospital at the average rate of 7 per hour on weekend evenings.

enables many B&B to attract questsa) Compute the probability of 4 arrivals in 30 minutes on a weekend evening?b) Compute the probability of 2 or less arrivals in 30 minutes on a weekend evening?c) Compute the probability of 3 or more arrivals in 30 minutes on a weekend evening?d) Compute the probability of 12 or more arrivals in two hous on a weekend evening?

0.1890.3210.6790.740

Page 69: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

69 69

Simulation of Break-Even AnalysisF V P Q

Uniform Uniform Normal Exponential80000 10 40 9000120000 30 8

Fixed Cost =INT(A$3+(A$4-A$3)*RAND())Variable Cost=INT(B$3+(B$4-B$3)*RAND())Sales Price=INT($C$3+$C$4*NORM.S.INV(RAND()))Sales =-INT($D$3*LN(RAND()))

Uniform Uniform Normal ExponentialF V P Q profit Profit Sorted Cumulati

80000 10 40 9000120000 30 880433 10 41 17614 465601 -312776 0.000288984 18 43 503 -76409 -299437 0.0004

108015 22 49 13510 256755 -274902 0.0006111706 20 54 7484 142750 -269786 0.0008110011 19 33 9725 26139 -256009 0.00199404 28 36 3850 -68604 -213930 0.001295878 28 42 4391 -34404 -210306 0.001497437 18 37 16448 215075 -197208 0.001682867 21 59 10671 322631 -191990 0.001883784 17 40 5008 31400 -191812 0.00283399 23 47 2041 -34415 -182333 0.002298222 28 27 1643 -99865 -176777 0.002491725 18 39 7566 67161 -173914 0.0026

101480 23 41 6859 21982 -170164 0.0028

Page 70: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

70 70

Simulation of Break-Even Analysis

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-500000 0 500000 1000000 1500000 2000000 2500000 3000000

Probability of Failure: 48.8%Min Profit:-312776 Max Profit:2460856

Page 71: 1 1 Random Variables A random variable is a numerical description of the A random variable is a numerical description of the outcome of an experiment

71 71

End Continous PD and Poisson