Download presentation
Presentation is loading. Please wait.
Published bySidney Gilham Modified over 9 years ago
1
1 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
2
2 Two 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
3
3 Book Store A B books I 1 (12) I 2 (12) beginning of Day 1 and Day 2: similar I 1 (12) and I 2 (12): i.i.d. Day 1Day 2
4
4 Book Store B B books X books I 1 (12) I 2 (12) X and B have different distributions dependence: X & I 1 (12); X & I 2 (12) I 1 (12) & I 2 (12) Day 1Day 2
5
5 Two Book Stores first bookstore from 8 am to 8 pm I i (12) ~ i.i.d. ~ i.i.d. terminating second bookstore 24 hrs every day I i (12) dependent, different distributions dependent, different distributions non-terminating
6
6 Two Book Stores differences termination condition run length quantities of interest initial condition
7
7 Strong Law of Large Numbers - Basis to Analyze Terminating Systems i.i.d. random variables X 1, X 2, … finite mean and variance 2 define
8
8 Strong Law of Large Numbers - Basis to Analyze Terminating Systems a fair die thrown continuously X i = the number shown on the ith throw
9
9 Strong Law of Large Numbers - Basis to Analyze Terminating Systems in terminating systems, each replication is an independent draw of X X i are i.i.d. E(X) (X 1 + … + X n )/n
10
10 Central Limit Theorem - Basis to Analyze Terminating Systems interval estimate & hypothesis testing of normal random variables t, 2, and F i.i.d. random variables X 1, X 2, … of finite mean and variance 2 CLT: approximately normal for “ large enough ” n can use t, 2, and F for
11
11 Output Analysis – Terminating Systems n replications; sample space for ith replication i = 1 n ; sample space of the whole experiment = ( 1, , n ), where i is outcome of the ith replication sampled values: X 1 ( 1 ), …, X n ( n ) estimate = E(X) estimate by estimate by= g(X 1 ( 1 ), …, X n ( n ))
12
12 unbiased estimator of ? variance of estimator efficient estimator of ? confidence on the range estimator # of simulation runs (replications) required? Output Analysis – Terminating System statistical tests for
13
13 Output Analysis – 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
14
14 Theory of Regenerative Processes - 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)
15
15 Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems the actual story: X t = number of bottles in the store at t distribution of X t a function of t converges to that of X questions of interest: with respect to X P(X = k), E(X )
16
16 Theory of Regenerative Processes - 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
17
17 Theory of Regenerative Processes - Basis to Analyze Non-Terminating Systems for a regenerative process {B(t)}, under mild conditions for the 24-hour store
18
18 Theory of Regenerative Processes - 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
19
19 To Generate the Random 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
20
20 To Generate Random 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) ?
21
21 Examples 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 101520 25 30 p: 0.10.150.30.20.140.11
22
22 Examples: Probability and Expectation of 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?
23
23 Examples: Probability and Expectation of Random Variables use 10 replications 50 replications 500 replications 5000 replications accuracy?
24
24 Examples: Probability and Expectation of Functions of Random Variables X ~ x: 100 150 200 250 300 p(x): 0.1 0.3 0.3 0.2 0.1 Y = Find E(Y) and P(Y 30)
25
25 Examples: Probability and Expectation of 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)
26
26 Example: Newsboy Problem - # of “ 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)
27
27 Example: Newsboy Problem - # of “ 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)
28
28 Example: Newsboy Problem - # of “ 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
29
29 Example: Newsboy Problem - # of “ 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
30
30 Exercise situation similar to the example salvage value = 0 for the first 50 pieces = $0.75 / piece from the 51 st piece onwards questions find Q * P(profit 400)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.