Optimization and Simulation

Similar documents
Chapter 3. Bootstrap. 3.1 Introduction. 3.2 The general idea

Today. Lecture 4: Last time. The EM algorithm. We examine clustering in a little more detail; we went over it a somewhat quickly last time

Behavior of the sample mean. varx i = σ 2

Modelling competition in demand-based optimization models

Solving singularity issues in the estimation of econometric models

MS&E 226: Small Data

STA258H5. Al Nosedal and Alison Weir. Winter Al Nosedal and Alison Weir STA258H5 Winter / 27

Exploiting mobility data from Nokia smartphones

Three challenges in route choice modeling

ISyE 6416: Computational Statistics Spring Lecture 13: Monte Carlo Methods

Probability Model for 2 RV s

Performance Evaluation

Use of Extreme Value Statistics in Modeling Biometric Systems

RANDOM SAMPLING OF ALTERNATIVES IN A ROUTE CHOICE CONTEXT

Statistics 406 Exam November 17, 2005

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

Lab 5 Monte Carlo integration

4.5 The smoothed bootstrap

STAT 725 Notes Monte Carlo Integration

Statistics I 2011/2012 Notes about the third Computer Class: Simulation of samples and goodness of fit; Central Limit Theorem; Confidence intervals.

PARAMETRIC MODEL SELECTION TECHNIQUES

THE RECURSIVE HESSIAN SKETCH FOR ADAPTIVE FILTERING. Robin Scheibler and Martin Vetterli

The Bootstrap and Jackknife

Training in Mapping Changes on an Archaeological Site

Statistical Matching using Fractional Imputation

Note Set 4: Finite Mixture Models and the EM Algorithm

Lecture 12. August 23, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

Recursive Estimation

Will Monroe July 21, with materials by Mehran Sahami and Chris Piech. Joint Distributions

Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors

Resampling Methods for Dependent Data

Optimal Denoising of Natural Images and their Multiscale Geometry and Density

Week 4: Simple Linear Regression III

Summer School in Statistics for Astronomers & Physicists June 15-17, Cluster Analysis

Biogeme & Binary Logit Model Estimation

Nonparametric Error Estimation Methods for Evaluating and Validating Artificial Neural Network Prediction Models

DATA ANALYSIS USING HIERARCHICAL GENERALIZED LINEAR MODELS WITH R

Logit Mixture Models

Snell s Law. Introduction

Math 494: Mathematical Statistics

Data Analysis & Probability

Nonparametric Density Estimation

Locating Mobile Nodes with EASE: Learning Efficient Routes from Encounter Histories Alone

STATISTICAL LABORATORY, April 30th, 2010 BIVARIATE PROBABILITY DISTRIBUTIONS

Laplace Transform of a Lognormal Random Variable

Test Oracles and Randomness

(X 1:n η) 1 θ e 1. i=1. Using the traditional MLE derivation technique, the penalized MLEs for η and θ are: = n. (X i η) = 0. i=1 = 1.

Introduction. Advanced Econometrics - HEC Lausanne. Christophe Hurlin. University of Orléans. October 2013

ScienceDirect. Analytical formulation of the trip travel time distribution

MONTEREY, CALIFORNIA

R Programming: Worksheet 6

Comparison of Means: The Analysis of Variance: ANOVA

Monte Carlo for Spatial Models

Probability and Statistics for Final Year Engineering Students

Applied Statistics and Econometrics Lecture 6

Exam 2 is Tue Nov 21. Bring a pencil and a calculator. Discuss similarity to exam1. HW3 is due Tue Dec 5.

Monte Carlo Simula/on and Copula Func/on. by Gerardo Ferrara

INFO Wednesday, September 14, 2016

* Hyun Suk Park. Korea Institute of Civil Engineering and Building, 283 Goyangdae-Ro Goyang-Si, Korea. Corresponding Author: Hyun Suk Park

Bootstrap confidence intervals Class 24, Jeremy Orloff and Jonathan Bloom

Chapter 6. THE NORMAL DISTRIBUTION

Predictive Distributed Visual Analysis for Video in Wireless Sensor Networks

Speeding up R code using Rcpp and foreach packages.

DATA ANALYSIS USING HIERARCHICAL GENERALIZED LINEAR MODELS WITH R

Lecture 25: Review I

Chapter 4 Convex Optimization Problems

CHAPTER 2 Modeling Distributions of Data

MATH : EXAM 3 INFO/LOGISTICS/ADVICE

Discrete Mathematics Course Review 3

BIOINF 585: Machine Learning for Systems Biology & Clinical Informatics

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

UVA CS 4501: Machine Learning. Lecture 10: K-nearest-neighbor Classifier / Bias-Variance Tradeoff. Dr. Yanjun Qi. University of Virginia

Chapter 6. THE NORMAL DISTRIBUTION

Blending of Probability and Convenience Samples:

Section 6.2: Generating Discrete Random Variates

Today s outline: pp

On Choosing An Optimally Trimmed Mean

Application of Characteristic Function Method in Target Detection

Markov chain Monte Carlo methods

LAB #2: SAMPLING, SAMPLING DISTRIBUTIONS, AND THE CLT

Confidence Intervals. Dennis Sun Data 301

What We ll Do... Random

Confidence sharing: an economic strategy for efficient information flows in animal groups 1

Extended Hopfield Network for Sequence Learning: Application to Gesture Recognition

PandasBiogeme: a short introduction

So..to be able to make comparisons possible, we need to compare them with their respective distributions.

Clustering. Mihaela van der Schaar. January 27, Department of Engineering Science University of Oxford

CS CS 5623 Simulation Techniques

Generating random samples from user-defined distributions

Digital Image Processing Laboratory: MAP Image Restoration

Problem Set 3. MATH 778C, Spring 2009, Austin Mohr (with John Boozer) April 15, 2009

Integrated Algebra 2 and Trigonometry. Quarter 1

Scale effects in physical hydraulic engineering models

Week 4: Simple Linear Regression II

A noninformative Bayesian approach to small area estimation

Advanced Digital Signal Processing Adaptive Linear Prediction Filter (Using The RLS Algorithm)

This is a good time to refresh your memory on double-integration. We will be using this skill in the upcoming lectures.

Scalable Bayes Clustering for Outlier Detection Under Informative Sampling

Chapter 6: Simulation Using Spread-Sheets (Excel)

5 Bootstrapping. 4.7 Extensions. 4.8 References. 5.1 Bootstrapping for random samples (the i.i.d. case) ST697F: Topics in Regression.

Transcription:

Optimization and Simulation Statistical analysis and bootstrapping Michel Bierlaire Transport and Mobility Laboratory School of Architecture, Civil and Environmental Engineering Ecole Polytechnique Fédérale de Lausanne M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 1 / 17

Introduction The outputs of the simulator are random variables. Running the simulator provides one realization of these r.v. We have no access to the pdf or CDF of these r.v. Well... this is actually why we rely on simulation. How to derive statistics about a r.v. when only instances are known? How to measure the quality of this statistic? M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 2 / 17

Sample mean and variance Consider X 1,..., X n i.i.d. r.v. E[X i ] = µ, Var(X i ) = σ 2. The sample mean X = 1 n is an unbiased estimate of the population mean µ, as E[ X] = µ. The sample variance S 2 = 1 n 1 n i=1 X i n (X i X) 2 is an unbiased estimator of the population variance σ 2, as E[S 2 ] = σ 2. (see proof: Ross, chapter 7) i=1 M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 3 / 17

Sample mean and variance Recursive computation 1 Initialize X 0 = 0, S 2 1 = 0. 2 Update the mean X k+1 = X k + X k+1 X k k +1 3 Update the variance ( Sk+1 2 = 1 1 ) Sk 2 k +(k +1)( X k+1 X k ) 2. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 4 / 17

Mean Square Error Consider X 1,..., X n i.i.d. r.v. with CDF F. Consider a parameter θ(f) of the distribution (mean, quantile, mode, etc.) Consider θ(x 1,...,X n ) an estimator of θ(f). The Mean Square Error of the estimator is defined as [ ) ] 2 MSE(F) = E F ( θ(x1,...,x n ) θ(f), where E F emphasizes that the expectation is taken under the assumption that the r.v. all have distribution F. If F is unknown, it is not immediate to find an estimator of MSE. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 5 / 17

How many draws must be used? Let X a r.v. with mean θ and variance σ 2. We want to estimate the mean θ of the simulated distribution. The estimator used is the sample mean: X. The mean square error is E[( X θ) 2 ] = σ2 n The sample mean X is normally distributed with mean θ and variance σ 2 /n. So we can stop generating data when σ/ n is small. σ is approximated by the sample variance S. Law of large numbers: at least 100 draws (say) should be used. See Ross p. 121 for details. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 6 / 17

Mean Square Error Other indicators than the mean are desired. Theoretical results about the MSE cannot always be derived. Solution: rely on simulation. Method: bootstrapping. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 7 / 17

Empirical distribution function Consider X 1,..., X n i.i.d. r.v. with CDF F. Consider a realization x 1,...,x n of these r.v. The empirical distribution function is defined as F e (x) = 1 n n I{x i x}, i=1 where I{x i x} = { 1 if xi x, 0 otherwise. CDF of a r.v. that can take any x i with equal probability. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 8 / 17

Empirical CDF 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 F e (x), n = 10 F(x) 0 0 0.5 1 1.5 2 2.5 3 3.5 4 M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 9 / 17

Empirical CDF 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 F e (x), n = 100 F(x) 0 0 1 2 3 4 5 6 7 8 M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 10 / 17

Empirical CDF 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 F e (x), n = 1000 F(x) 0 0 1 2 3 4 5 6 7 8 M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 11 / 17

Mean Square Error We use the empirical distribution function F e We can approximate [ ) ] 2 MSE(F) = E F ( θ(x1,...,x n ) θ(f), by [ ) ] 2 MSE(F e ) = E Fe ( θ(x1,...,x n ) θ(f e ), θ(f e ) can be computed directly from the data (mean, variance, etc.) M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 12 / 17

Mean Square Error We want to compute [ ) ] 2 MSE(F e ) = E Fe ( θ(x1,...,x n ) θ(f e ), F e is the CDF of a r.v. that can take any x i with equal probability. Therefore, MSE(F e ) = 1 n n n i 1 =1 n i n=1 Clearly impossible to compute when n is large. Solution: simulation. [ ( θ(xi1,...,x in) θ(f e )) 2 ], M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 13 / 17

Bootstrapping For r = 1,...,R Draw x r 1,...,xr n from F e, that is draw from the data: 1 Let s be a draw from U[0,1] 2 Set j = floor(ns). 3 Return x j. Compute M r = ( θ(x r 1,...,x r n) θ(f e )) 2, Estimate of MSE(F e ) and, therefore, of MSE(F): Typical value for R: 100. 1 R R r=1 M r M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 14 / 17

Bootstrap: simple example Data: 0.636, -0.643, 0.183, -1.67, 0.462 Mean= -0.206 MSE= E[( X θ) 2 ] = S 2 /n= 0.1817 r ˆθ θ(f e) MSE 1-0.643-0.643-0.643 0.462 0.462-0.201-0.206 2.544e-05 2-0.643 0.183 0.636 0.636 0.636 0.2896-0.206 0.2456 3-1.67-1.67 0.183 0.462 0.636-0.411-0.206 0.04204 4-1.67-0.643 0.183 0.183 0.636-0.2617-0.206 0.003105 5-0.643 0.462 0.462 0.636 0.636 0.3105-0.206 0.2667 6-1.67-1.67 0.183 0.183 0.183-0.5573-0.206 0.1234 7-0.643 0.183 0.183 0.462 0.636 0.1642-0.206 0.137 8-1.67-1.67-0.643 0.183 0.183-0.7225-0.206 0.2667 9 0.183 0.462 0.462 0.636 0.636 0.4756-0.206 0.4646 10-0.643 0.183 0.183 0.462 0.636 0.1642-0.206 0.137 0.1686 M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 15 / 17

Summary The number of draws is determined by the required precision. In some cases, the precision is derived from theoretical results. If not, rely on bootstrapping. Idea: use simulation to estimate the Mean Square Error. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 16 / 17

Appendix: MSE for the mean Consider X 1,..., X n i.i.d. r.v. Denote θ = E[X i ] and σ 2 = Var(X i ). Consider X = n i=1 X i/n. E[ X] = n i=1 E[X i]/n = θ. MSE: E[( X θ) 2 ] = Var X ( n ) = Var X i /n i=1 = n Var(X i )/n 2 i=1 = σ 2 /n. M. Bierlaire (TRANSP-OR ENAC EPFL) Optimization and Simulation 17 / 17