CS 525, Simulation

Quiz 1, 2 February 2005


  1. With respect to the first assignment, a question came up in class about an investment strategy based on an average price derived from the twelve most recent prices (this is known as a 12-month moving average). The question was: what should you do about the first twelve months?

    Give two possible ways of dealing with the moving average for the first twelve months (if you can't remember the ones described in class, then come up with your own) and describe which of the two is better (be sure to to define what "better" means).


    The problem is caused by the lack of 12-month moving averages for the first twelve months of the simulation. This is an instance of the transient (or initialization or start-up) problem: it may take a while for the model to reach steady-state operation.

    There are, in essence, three ways to deal with the transient problem:

    1. Ignore it (most useful for static simulations).

    2. Run the simulation long enough so that the transient effects don't matter.

    3. Pre-load the model with steady-state parameter values, effectively skipping transient behavior.

    For this assignment, "better" is probably best interpreted as "most accurate" in terms of getting a high return. Under this definition, pre-loading the simulation with a 12-month average is the best, with running the simulation longer being second best.

    Most answers to this question were reasonable, except for missing definitions of "better".


  2. In class I presented two properties of the relative frequency and probability of outcomes: each outcome has a relative frequency and probability between 0 and 1 inclusive, and the sum of all outcomes is 1. Can you claim similar properties for the relative frequencies and probabilities of events? Justify your answer.


    The inclusive 0-1 bounds on relative frequencies holds for events because the definition of relative frequency doesn't change, and the number of times an event occurs is between 0 and N inclusive, where N is the number of trials.

    Sum to 1 property for relative frequencies, however, need not hold for events. Unlike the set of all possible outcomes, which equals the sample space, the set of all possible events need not equal the sample space. For example, in the three coin flip experiment, neither of the events A = { tails first } or B = { tails last } contains the outcome HHH, which is a valid outcome. This means nA + nB may be less than N and their relative frequencies will sum to less than 1. A similar argument can be made in the opposite direction by noting that events A and B need not be disjoint, which means nA + nB may be more than N and their relative frequencies will sum to more than 1.

    This question tripped me up while I was writing the lecture notes on probability. It also tripped up most of the answers too.



This page last modified on 5 February 2005.