90 likes | 110 Views
Previously. Optimization Probability Review Inventory Models Markov Decision Processes Queues. Agenda. Simulation. Simulation (Ch 15). Interested in quantity X (it is random) Run simulation to get realizations of X: X 1 , X 2 , X 3 , … , X n Evaluate output:
E N D
Previously • Optimization • Probability Review • Inventory Models • Markov Decision Processes • Queues
Agenda • Simulation
Simulation (Ch 15) • Interested in quantity X (it is random) • Run simulation to get realizations of X: • X1, X2, X3, … , Xn • Evaluate output: • look at average E[X] ≈ AVERAGE(X1,…,Xn) • standard deviation [X] ≈ STDEV(X1,…,Xn) • distribution of realizations
Agenda • Confidence intervals • for output evaluation • Generating realizations
Independent Case • Suppose X1, X2, X3, … , Xn are independent, • an = AVERAGE(X1,…,Xn) • sn = STDEV(X1,…,Xn) • E[X] in [an-y , an+y] with probability 1-p • y = -NORMINV(p/2, 0, sn / n1/2) • y = -NORMINV(p/2, 0, 1) sn / n1/2 • y decrease to 50% 1/n1/2 decrease to 50% n1/2 increase to 2x n increase to 4x
Rare Event • X = 1 with probability q, 0 otherwise • q small • sn ≈ (q(1-q))1/2 ≈ q1/2 > q ≈ an • for a decent error sn/n1/2 ≈ 10% an • n ≈ (100)/q • suppose y=10% an, 1-p=90% • y= -NORMINV(p/2, 0, 1) sn / n1/2 • 1.64=-NORMINV(5%, 0, 1) • so, sn/n1/2 = 6.1% an • n ≈ 271/q
Standard Deviation • X = # customers in line at lunch place at noon • Data X1,…,X20 from last month (n=20) • an=6.2, sn=1.8 • Want 90% confidence interval for [X]:
Standard Deviation • Want 90% confidence interval for [X]. • Var[X] = E[ (X-E[X])2 ] • Idea: Y = (X-an)2 • Get confidence interval on E[Y] ≈ Var[X] • Confidence interval on [X]
Not independent • an ≈ E[X], sn ≈ [X] • No good bounds on • Error • Necessary n • Generally larger • Queueing example (p534): Estimating Lq • relative error 10%, 1-p=90%, =0.8 • n ≈ 240,000 arrivals needed