Top Banner
1 Outline Outline terminating and non-terminating systems theories for output analysis Strong Law of Large Numbers Central Limit Theorem Regenerative Processes random variate generation from Excel simulating with Excel simple random variables functions of random variables newsboy problem
30

1 Outline terminating and non-terminating systems theories for output analysis Strong Law of Large Numbers Central Limit Theorem Regenerative.

Dec 16, 2015

Download

Documents

Sidney Gilham
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

1

OutlineOutline

terminating and non-terminating systems theories for output analysis

Strong Law of Large Numbers Central Limit Theorem Regenerative Processes

random variate generation from Excel simulating with Excel

simple random variables functions of random variables newsboy problem

Page 2: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

2

Two Book StoresTwo Book Stores

Bookstore A from 8 am to 8 pm inventory count at 8 pm order up to B leadtime: 12 hours customer arrivals:

Poisson process of rate , each for one book

loss sales

Bookstore B 24 hours every day continuous review order up to B leadtime: 12 hours customer arrivals:

Poisson process of rate , each for one book

loss sales

Page 3: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

3

Book Store Book Store AAB books B books

I1(12)

I2(12)

beginning of Day 1 and Day 2: similar

I1(12) and I2(12): i.i.d.

Day 1 Day 2

Page 4: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

4

Book Store Book Store BBB books X books

I1(12)

I2(12)

X and B have different distributions dependence: X & I1(12); X & I2(12) I1(12) &

I2(12)

Day 1 Day 2

Page 5: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

5

Two Book StoresTwo Book Stores

first bookstore from 8 am to 8 pm Ii(12) ~ i.i.d.

~ i.i.d.

terminating

second bookstore 24 hrs every day Ii(12) dependent,

different distributions

dependent, different distributions

non-terminating

12

)(120 dttI i

12

)(120 duuIi

12

)(120 duuIi

Page 6: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

6

Two Book StoresTwo Book Stores

differences termination condition run length quantities of interest initial condition

Page 7: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

7

Strong Law of Large Numbers Strong Law of Large Numbers - - Basis to Analyze Terminating SystemsBasis to Analyze Terminating Systems

i.i.d. random variables X1, X2, …

finite mean and variance 2

1)(lim|}{ n

nXP

nXX

nnX ...1 define

Page 8: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

8

Strong Law of Large Numbers Strong Law of Large Numbers - - Basis to Analyze Terminating SystemsBasis to Analyze Terminating Systems

a fair die thrown continuously Xi = the number shown on the ith throw

?lim n

nX

?3

1lim should Why

otherwise.

},4,3{ if

,0

,11

n

YX

Y

n

ii

n

nn

Page 9: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

9

Strong Law of Large Numbers Strong Law of Large Numbers - - Basis to Analyze Terminating SystemsBasis to Analyze Terminating Systems

in terminating systems, each replication is an independent draw of X Xi are i.i.d.

E(X) (X1 + … + Xn)/n

Page 10: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

10

Central Limit Theorem Central Limit Theorem - - Basis to Analyze Terminating SystemsBasis to Analyze Terminating Systems

interval estimate & hypothesis testing of normal random variables

t, 2, and F

i.i.d. random variables X1, X2, … of finite mean and

variance 2

normal standard/

dn

n

X

CLT: approximately normal for “large enough” n can use t, 2, and F for

Page 11: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

11

Output Analysis Output Analysis – Terminating Systems– Terminating Systems

n replications; sample space for ith replication i

= 1n ; sample space of the whole experiment

= (1, , n), where i is outcome of the ith

replication sampled values: X1(1), …, Xn(n)

estimate = E(X)̂ estimate estimate by by = g(X1(1), …, Xn(n))

Page 12: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

12

unbiased estimator of ? variance of estimator efficient estimator of ? confidence on the range estimator # of simulation runs (replications) required?

Output Analysis Output Analysis – Terminating System– Terminating System

statistical tests for ̂

Page 13: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

13

Output Analysis Output Analysis – Non-Terminating System– Non-Terminating System

similar questions as terminating systems non-terminating

possibly with dependent random variables the mean and probability of quantities that follow

the stationary (limiting) distribution

Page 14: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

14

Theory of Regenerative Processes Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems- Basis to Analyze Non-Terminating Systems

Cho-Free low-fat chocolate milk in a 24-hour store order 20 bottles when out of stock order lead-time = four hours shelf life of each bottle = one week expired milk: thrown away immediately customer arrivals: Poisson process of rate unsatisfied customers never return what probability & expectation are we talking about?

P(store is out of stock of Cho-Free) E(number of bottles in the store)

Page 15: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

15

Theory of Regenerative Processes Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems- Basis to Analyze Non-Terminating Systems

the actual story: Xt = number of bottles in the store at t

distribution of Xt a function of t converges to that of X

questions of interest: with respect to X

P(X = k), E(X)

Page 16: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

16

Theory of Regenerative Processes Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems- Basis to Analyze Non-Terminating Systems

{B(t)} is a regenerative process if there exists a non-negative random variable T {B(t)| 0 t < T} is independent of {B(t)| T t} {B(t)| 0 t} and {B(t)| t T} are stochastically

equivalent most practical systems are regenerative

Page 17: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

17

Theory of Regenerative Processes Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems- Basis to Analyze Non-Terminating Systems

for a regenerative process {B(t)}, under mild conditions

)()(

lim 0

BE

t

duuBB

t

t

for the 24-hour store

t

duuXt

t

0)(

limstore in the bottles of # average

t

duP

t

uX

t

0 }0)({1

lim )stock ofout is store the(

Page 18: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

18

Theory of Regenerative Processes Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems- Basis to Analyze Non-Terminating Systems

in practice, simulate one long run questions

unbiased estimator, variance of estimator, confidence interval, interval estimator

untouched questions dependent random variables imprecise result for finite simulation time biased by initial condition

Page 19: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

19

To Generate the To Generate the Random MechanismRandom Mechanism

will discuss later, general overview everything based on random variates from uniform (0,

1) often each stream of uniform (0, 1) random variates is a

deterministic sequence of numbers on a round robin “first” number in the robin to use: SEED many simple, handy generators

Page 20: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

20

To Generate To Generate Random Variates in ExcelRandom Variates in Excel

for uniform [0, 1]: rand() function for other distributions: use Random

Number Generator in Data Analysis Tools uniform, discrete, Poisson, Bernoulli,

Binomial, Normal tricks to transform

uniform [-3.5, 7.6]? normal (4, 9) (where 4 is the mean and 9 is the variance)?

Page 21: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

21

ExamplesExamples

Example 1: Generate 1000 samples of X ~ uniform(0,1)

Example 2: Generate 1000 samples of Y ~ normal(5,1)

Example 3: Generate 1000 samples of Z ~

z: 5 10 15 20 25 30

p: 0.1 0.15 0.3 0.2 0.14 0.11

Page 22: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

22

Examples: Examples: Probability and Expectation Probability and Expectation

of Random Variablesof Random Variables

Example 4. Use simulation to estimate (a) P(X > 0.5) (b) P(2 < Y < 8) (c) E(Z)

questions before solving terminating or non-terminating? which theorem to base on? state?

Page 23: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

23

Examples: Examples: Probability and Expectation Probability and Expectation

of Random Variablesof Random Variables

use 10 replications 50 replications 500 replications 5000 replications

accuracy?

Page 24: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

24

Examples: Examples: Probability and Expectation Probability and Expectation of Functions of Random Variablesof Functions of Random Variables

X ~

x: 100 150 200 250 300

p(x): 0.1 0.3 0.3 0.2 0.1

502 2 X Y =

Find E(Y) and P(Y 30)

Page 25: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

25

Examples: Examples: Probability and Expectation Probability and Expectation of Functions of Random Variablesof Functions of Random Variables

X ~ N(10, 4), Y ~ N(9,1), independent estimate

P(X < Y) Cov(X, Y) = E(XY) - E(X)E(Y)

Page 26: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

26

Example: Newsboy Problem Example: Newsboy Problem - # of - # of “Newspapers” to Order“Newspapers” to Order

order 2010 calendars in Sept 2009 cost: $2 each; selling price: $4.50 each salvage value of unsold items at Jan 1 2010: $0.75 each from historical data: demand for new calendars Demand: 100 150 200 250 300 Prob. : 0.3 0.2 0.3 0.15 0.05 objective: profit maximization questions

how many calendars to order with the optimal order quantity, P(profit $400)

Page 27: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

27

Example: Newsboy Problem Example: Newsboy Problem - # of - # of “Newspapers” to Order“Newspapers” to Order

D = the demand of the 2007 calendar D follows the given distribution

Q = the order quantity {100, 150, 200, 250, 300}

V = the profit in ordering Q pieces = 4.5 min (Q, D) + 0.75 max (0, Q - D) - 2Q

objective: find Q* to maximize E(V)

Page 28: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

28

Example: Newsboy Problem Example: Newsboy Problem - # of - # of “Newspapers” to Order“Newspapers” to Order

two-step solution procedure 1 estimate E(profit) for a given Q

generate demands find the profit for each demand sample find the (sample) mean profit of all demand samples

2 look for Q*, which gives largest mean profit

Page 29: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

29

Example: Newsboy Problem Example: Newsboy Problem - # of - # of “Newspapers” to Order“Newspapers” to Order

our simulation of 1000 samples, Q = 100: E(V) = 250 Q = 150: E(V) = 316.31 Q = 200: E(V) = 348.31 Q = 250: E(V) = 328.75 Q = 300: E(V) = 277.17

Q* = 200 is optimal remarks: many papers on this issue

Page 30: 1  Outline  terminating and non-terminating systems  theories for output analysis  Strong Law of Large Numbers  Central Limit Theorem  Regenerative.

30

ExerciseExercise

situation similar to the example salvage value

= 0 for the first 50 pieces = $0.75 / piece from the 51st piece onwards

questions find Q* P(profit 400)