Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS433 Modeling and Simulation Lecture 12 Output Analysis Large-Sample Estimation Theory Dr. Anis Koubâa 10 Jan 2009.

Similar presentations


Presentation on theme: "CS433 Modeling and Simulation Lecture 12 Output Analysis Large-Sample Estimation Theory Dr. Anis Koubâa 10 Jan 2009."— Presentation transcript:

1 CS433 Modeling and Simulation Lecture 12 Output Analysis Large-Sample Estimation Theory Dr. Anis Koubâa http://10.2.230.10:4040/akoubaa/cs433/ 10 Jan 2009 Al-Imam Mohammad Ibn Saud University

2 Goals of Today  Understand the problem of confidence in simulation results  Learn how to determine of range of value with a certain confidence a certain stochastic simulation result  Understand the concept of  Margin of Error  Confidence Interval with a certain level of confidence

3 Reading  Required  Lemmis Park, Discrete Event Simulation - A First Course, Chapter 8: Output Analysis  Optional  Harry Perros, Computer Simulation Technique - The Definitive Introduction, 2007 Chapter 5

4 Problem Statement  For a deterministic simulation model one run will be sufficient to determine the output.  A stochastic simulation model will not give the same result when run repetitively with independent random seed.  One run is not sufficient to obtain confident simulation results from one sample.  Statistical Analysis of Simulation Result: multiple runs to estimate the metric of interest with a certain confidence

5 Example:  The estimation of the mean value of the response time of M/M/1 Queue (from a simulation or experiments)  May vary from one run to another (depending on the seed)  Depends on the number of samples/size of samples  Objective  For a given large sample output, determine what is the mean value with a certain confidence on the result.

6 M. Peter Jurkat UNM/MPJ CS452/Mgt532 V. Output Analysis 6 Stochastic Process Simulation  Each stochastic variable (e.g., time between arrivals) is generated by a stream of random numbers from a RNG beginning with a particular seed value  need multiple runs and statistical analysis for stochastic models (i.e., sampling)  The same RNG with the same seed, x 0, will always generate the same sequence of pseudo-random numbers  repeated simulation with the same inputs (e.g. time, parameters) and the same seed will result in identical outputs  For independent replications, we need a different seed for each replication ( تكرار )

7 7 Simulation Sampling  Each simulation run may yield only one value of each simulation output (e.g., average waiting time, proportion of time server is idle)  Need replications to gain statistical stability and significance (confidence) in output distribution M. Peter Jurkat UNM/MPJ CS452/Mgt532 V. Output Analysis

8 8 Simulation Termination (Simulation Time)  Terminating Simulation: Runs for some duration of time T E, where E is a specified event that stops the simulation.  Bank example: Opens at 8:30 am (time 0) with no customers present and 8 of the 11 teller working (initial conditions), and closes at 4:30 pm (Time T E = 480 minutes).  Non-Terminating Simulation: Runs continuously, or at least over a very long period of time.  Examples: simulating telephone systems, or a computer network  Main Objective: Study the steady-state (long-run) properties of the system, properties that are not influenced by the initial conditions of the model ⇨ Collecting a Large Sample

9 9 Experimental Design Issues

10 What types of parameters to estimate?  In general, a stochastic variable is described by their probability distributions and parameters.  For quantitative random variables, the distributions are described by the mean  and variance   For a binomial random variables, the location and shape are determined by p.  If the values of parameters are unknown, we make inferences about them using sample information.

11 Types of Inference  Estimation:  Estimating or predicting the value of the parameter from simulation results.   “What is (are) the most likely values of  or p?” استدلال اِسْتِنْباط

12 Types of Inference - Example  Examples:  A consumer wants to estimate the average price of similar homes in his city before putting his home on the market. Estimation: Estimation: Estimate , the average home price.  A engineer wants to estimate the average waiting time in a queue obtained by a simulation. Estimation: Estimation: Estimate , the average waiting time in the queue.

13 Estimators

14 Definitions  In statistics, an estimator is  a function of the observable sample data that is  used to estimate an unknown population parameter (which is called the estimand);  an estimate is the result from the actual application of the function to a particular sample of data.  Many different estimators are possible for any given parameter.  Some criterion is used to choose between the estimators, although it is often the case that a criterion cannot be used to clearly pick one estimator over another. http://en.wikipedia.org/wiki/Estimator

15 Estimation Procedure  To estimate a parameter of interest (e.g., a population mean, a binomial proportion, a difference between two population means, or a ratio of two population standard deviation), the usual procedure is as follows: 1. Select a random sample from the population of interest (simulation output, experimental measures, random variables, etc). 2. Calculate the point estimate of the parameter (i.e. the mean value of the sample). 3. Calculate a measure of its variability, often a confidence interval. 4. Associate with this estimate a measure of variability. http://en.wikipedia.org/wiki/Estimator

16 Definitions  There are two types of estimators:  Point estimator:  Point estimator: It is a single number calculated to estimate the parameter. Example: average value of a sample.  Interval estimator:  Interval estimator: Two numbers are calculated to create an interval within which the parameter is expected to lie. An interval estimation uses the sample data to calculate an interval of possible values of an unknown parameter. The most known forms of interval estimation are: Confidence intervals (a Frequentist Method) Credible intervals (a Bayesian Method).

17 Point Estimators

18 Properties of Point Estimators  The estimator depends on the sample sampling distribution.  The estimator depends on the sample: Since an estimator is calculated from sample values, it varies from sample to sample according to its sampling distribution. unbiased estimator real (expected) mean value  An unbiased estimator is an estimator where the mean of its sampling distribution equals the real (expected) mean value of the parameter of interest.  It does not systematically overestimate or underestimate the target parameter.

19 Properties of Point Estimators unbiased smallest spreadvariability  Among all the unbiased estimators, we prefer the estimator whose sampling distribution has the smallest spread (or variability).

20 Measuring the Goodness of an Estimator  Error of estimation (or Bias)  Error of estimation (or Bias) is the distance between an estimate and the true value of the parameter. The distance between the bullet and the bull’s-eye. Because of the Central Limit Theorem..  In this chapter, the sample sizes are large, so that our unbiased estimators will have normal distributions.

21 The Margin of Error unbiased  FACT. For unbiased estimators with normal sampling distributions, 95% of all point estimates will lie within 1.96 standard deviations of the parameter of interest.  Margin of error: The maximum error of estimation, calculated as

22 Estimating Means and Proportions  For a quantitative population,  For a binomial population,

23 Example 1  A homeowner randomly samples 64 homes similar to his own and finds that the average selling price is 252,000 SAR with a standard deviation of 15,000 SAR. Question: Estimate the average selling price for all similar homes in the city.

24 A quality control technician wants to estimate the proportion of soda bottles that are under-filled. He randomly samples 200 bottles of soda and finds 10 under-filled cans. What is the estimation of the proportion of under-filled cans? Example 2

25 Interval Estimators Confidence Interval

26 Interval Estimation Create an interval (a, b) so that you are fairly sure that the parameter lies between these two values. confidence coefficient, 1- .“Fairly sure” means “with high probability”, measured using the confidence coefficient, 1- . Suppose 1-  = 0.95 and that the estimator has a normal distribution. Parameter  1.96SE Usually, 1-  = 0.90, 0.95, 0.98, 0.99

27 Interval Estimation Since we don’t know the value of the parameter, consider which has a variable center. Only if the estimator falls in the tail areas will the interval fail to enclose the parameter. This happens only 5% of the time. Estimator  1.96SE Worked Failed APPLET MY

28 To Change the Confidence Level To change to a general confidence level, 1- , pick a value of z that puts area 1-  in the center of the z-distribution (i.e. Normal Distribution N(0,1). 100(1-  )% Confidence Interval: Estimator  z  SE Tail area  /2  Confidence Level z  /2 0.050.190%1.645 0.0250.0595%1.96 0.010.0298%2.33 0.0050.0199%2.58

29 Confidence Intervals for Means and Proportions  For a quantitative population  For a binomial population

30 Example 1  A random sample of n = 50 males showed a mean average daily intake of dairy products equal to 756 grams with a standard deviation of 35 grams. Find a 95% confidence interval for the population average m.

31 Example 1  Find a 99% confidence interval for m, the population average daily intake of dairy products for men. The interval must be wider to provide for the increased confidence that is does indeed enclose the true value of .

32 Example 2  Of a random sample of n = 150 college students, 104 of the students said that they had played on a soccer team during their K-12 years. Estimate the proportion of college students who played soccer in their youth with a 98% confidence interval.

33 Estimate the Difference between two means

34 Estimating the Difference between Two Means  Sometimes we are interested in comparing the means of two populations.  The average growth of plants fed using two different nutrients.  The average scores for students taught with two different teaching methods.  To make this comparison,

35 Estimating the Difference between Two Means  We compare the two averages by making inferences about , the difference in the two population averages.  If the two population averages are the same, then  = 0.  The best estimate of  is the difference in the two sample means,

36 The Sampling Distribution of

37 Estimating  1 -    For large samples, point estimates and their margin of error as well as confidence intervals are based on the standard normal distribution (z-distribution).

38 Example  Compare the average daily intake of dairy products of men and women using a 95% confidence interval. Avg Daily IntakesMenWomen Sample size50 Sample mean756762 Sample Std Dev3530

39 Example, continued Could you conclude, based on this confidence interval, that there is a difference in the average daily intake of dairy products for men and women?  1 -   = 0.  1 =  The confidence interval contains the value  1 -   = 0. Therefore, it is possible that  1 =  .You would not want to conclude that there is a difference in average daily intake of dairy products for men and women.

40 Estimating the Difference between Two Proportions  Sometimes we are interested in comparing the proportion of “successes” in two binomial populations.  The proportion of male and female voters who favor a particular candidate.  To make this comparison,

41 Estimating the Difference between Two Means  We compare the two proportions by making inferences about p1-p2, the difference in the two population proportions.  If the two population proportions are the same, then p1-p2 = 0.  The best estimate of p1-p2 is the difference in the two sample proportions,

42 The Sampling Distribution of

43 Estimating p 1 -p   For large samples, point estimates and their margin of error as well as confidence intervals are based on the standard normal distribution (z-distribution).

44 Example Compare the proportion of male and female college students who said that they had played sport in a team during their K-12 years using a 99% confidence interval. Youth SoccerMaleFemale Sample size8070 Played soccer6539

45 Example, continued Could you conclude, based on this confidence interval, that there is a difference in the proportion of male and female college students who said that they had played sport in a team during their K-12 years? The confidence interval does not contains the value p1-p2 = 0. Therefore, it is not likely that p1= p2. You would conclude that there is a difference in the proportions for males and females. A higher proportion of males than females played soccer in their youth.

46 One Sided Confidence Bounds two-sided  Confidence intervals are by their nature two-sided since they produce upper and lower bounds for the parameter.  One-sided bounds  One-sided bounds can be constructed simply by using a value of z that puts  rather than  /2 in the tail of the z distribution.

47 How to Choose the Sample Size?

48 Choosing the Sample Size  The total amount of relevant information in a sample is controlled by two factors: sampling planexperimental design - The sampling plan or experimental design: the procedure for collecting the information sample size n - The sample size n: the amount of information you collect. margin of errorwidth of the confidence interval.  In a statistical estimation problem, the accuracy of the estimation is measured by the margin of error or the width of the confidence interval.

49 1. Determine the size of the margin of error, B, that you are willing to tolerate. 2. Choose the sample size by solving for n or n  n 1  n 2 in the inequality: 1.96 SE  B, where SE is a function of the sample size n. s   Range / 4. 3. For quantitative populations, estimate the population standard deviation using a previously calculated value of s or the range approximation   Range / 4. p .5 4. For binomial populations, use the conservative approach and approximate p using the value p .5. Choosing the Sample Size

50 Example A producer of PVC pipe wants to survey wholesalers who buy his product in order to estimate the proportion of wholesalers who plan to increase their purchases next year. What sample size is required if he wants his estimate to be within.04 of the actual proportion with probability equal to.95? He should survey at least 601 wholesalers.

51 Key Concepts I. Types of Estimators 1. Point estimator: a single number is calculated to estimate the population parameter. Interval estimator 2. Interval estimator: two numbers are calculated to form an interval that contains the parameter. II. Properties of Good Estimators 1. Unbiased: the average value of the estimator equals the parameter to be estimated. 2. Minimum variance: of all the unbiased estimators, the best estimator has a sampling distribution with the smallest standard error. 3. The margin of error measures the maximum distance between the estimator and the true value of the parameter.

52 III. Large-Sample Point Estimators To estimate one of four population parameters when the sample sizes are large, use the following point estimators with the appropriate margins of error. Key Concepts

53 IV. Large-Sample Interval Estimators To estimate one of four population parameters when the sample sizes are large, use the following interval estimators.

54 Key Concepts 1. All values in the interval are possible values for the unknown population parameter. 2. Any values outside the interval are unlikely to be the value of the unknown parameter. 3. To compare two population means or proportions, look for the value 0 in the confidence interval. If 0 is in the interval, it is possible that the two population means or proportions are equal, and you should not declare a difference. If 0 is not in the interval, it is unlikely that the two means or proportions are equal, and you can confidently declare a difference. V. One-Sided Confidence Bounds Use either the upper (  ) or lower (  ) two-sided bound, with the critical value of z changed from z  / 2 to z .


Download ppt "CS433 Modeling and Simulation Lecture 12 Output Analysis Large-Sample Estimation Theory Dr. Anis Koubâa 10 Jan 2009."

Similar presentations


Ads by Google