1
$\begingroup$

Im looking for some pointers on how to perform a Monte Carlo simulation. Say im conducting a survey of how late flights are for a certain airline. I amass 1000 records, and plot a cumulative sum of these values. I want to determine how likely it is to have several flights grouped together that a decrease in the cumulative sum would exceed X%. Would i

1) calculate the mean and standard deviation of this sample, use these to generate multiple samples, and record the probability of such a decrease?

2) take the original sample, shuffle it, and then select values from it (without replacement), and record the probability of such a decrease?

$\endgroup$
2
  • $\begingroup$ By cumulative sum do you mean rolling some with a period of k (eg the sum of the last 20 flights late times)? Otherwise I don't see how it can decrease unless some flights come in early ie have negative "late" times - which way is it? $\endgroup$ Commented Feb 15, 2013 at 19:54
  • $\begingroup$ Yeah there can be positive and negative times. Cumulative in the sense that the values would be 1,4,7,-3,2,-3,... and the cumulative sum values would be 1,5,12,9,11,8,... $\endgroup$
    – Hans Rudel
    Commented Feb 15, 2013 at 19:56

1 Answer 1

2
$\begingroup$

Both approaches need some modification. If you do the first, in order to generate multiple samples from the mean and standard deviation you need to make assumptions about the distribution eg that it is Normal. The approach will work (if your distributional assumption is sound), but adds little or nothing to traditional methods. Only use it if you are satisfied you can characterise the distribution of times well - and this is highly unlikely to be a Normal distribution (Gamma is more likely) so you need the techiques to fit a non-normal distribution.

The second approach makes better use of the information contained in the empirical distribution of your sample, but it won't work unless your selection of values is done with replacement (rather than without replacement). If you select without replacement you will just end up with your original sample of n once you have selected all n values from it.

The second approach is a form of the bootstrap, and I would encourage you to read some of the voluminous material available.

In both cases you need to assume that there is no information in the ordering of the times - for example, that one flight being late doesn't make the next flight late too. If this isn't the case, you will need an alternative approach.

$\endgroup$
5
  • $\begingroup$ It sounds as though bootstrapping (second approach) is probably what im looking for. I originally thought it might be possible to use the binomial distribution but im assuming that would only be applicable for a sequence of X late planes in a sample rather than the decrease in the sum of the values. $\endgroup$
    – Hans Rudel
    Commented Feb 15, 2013 at 20:05
  • $\begingroup$ How large should each sample be (ie how many times do i select values from the original sample)? How many time should i repeat this process? just lookin for a rule of thumb. Thanks for taking the time to answer my question, i really appreciate it. $\endgroup$
    – Hans Rudel
    Commented Feb 15, 2013 at 20:08
  • 1
    $\begingroup$ If each resample is the same size as the original it will give you a sense of the distribution that can be expected to apply to the original, so usually it's best to have the same size or possibly one less. $\endgroup$ Commented Feb 16, 2013 at 20:53
  • $\begingroup$ How many times would u resample? 10 or 20k? Thanks for ur help. $\endgroup$
    – Hans Rudel
    Commented Feb 16, 2013 at 21:34
  • 1
    $\begingroup$ 1000 is plenty in most straightforward situations, but it depends on the complexity of the test statistic/s you create (particularly if you want to observe how often a rare coincidence of events takes place). You don't want the answer to depend on how many replications you do. 10,000 should be stacks... $\endgroup$ Commented Feb 16, 2013 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.