Written by Scott D. Anderson
scott.anderson@acm.org

This work is licensed under a Creative Commons
License.
Review
- Article on tort law facts (to discuss next time):
- Are the facts on businesses suing businesses relevant? Why or why not?
- They concentrated on trials in which plaintifff succeeds. Good call?
- They used the median award and median punitive damage, not the mean.
Good call?
- other observations?
Two Sample tests
- Testing using the Bootstrap. In the interests of time, we won't do
this, but we'll talk about the logic of it:
- Tests:
- H0: there's no difference between the two sets of data; they're drawn
from the same population
- H1: there is a difference between the two sets of data; they're drawn
from different populations
- Assuming H0, mix the samples together.
- Repeatedly resample from the pooled data and calculate M
(e.g. difference of the sample means)
- Look at the distribution of M values under H0
- Reject H0 if our actual M is unusual (say, p<0.05)
- Testing using the z test
- Assume H0 and that both samples were drawn from the same population
- Pool the samples in order to estimate the standard error
- Calculate the pooled estimate of the standard error
- Compute the z score and p-value of M
- Reject if M is unusual (say, p<0.05)
- Testing using the t test (next time)
DES Models
- Fast Food Operation. This is a demo supplied with Extend. We'll
explore it, following the description below.
- Queuing Models. We'll look at the first
three:
- SQSS model (Single Queue, Single Server)
- untimedSQSS model. This one stops by when the last customer is
served: the "in queue" rule.
- MQMserver model. This allows customers to choose the shortest queue.
A bit complicated, but useful.
- quicker-queue.mox shows how
to find out which queue is quicker.
Fast Food Operation
Extend has a built-in example model of a hamburger joint. We'll
explore this first. You needn't understand every aspect of this model, but
try to think about how this expands your repertoire of modeling
techniques.
- Open Extend 6/Examples/Operations Research/Fast Food Operations.mox.
- It's a hierarchical model. Open the various parts to explore.
- Notice the use of the Timer block in the "Ordering" h-block. Where
does the sensor input come from?
- There is an "unbatch" block in the "Ordering" h-block. Read the
documentation on this. Look at where the information is flowing. Can you
see what the block is doing?
- In the kitchen, there is a "Resource" block. Read its documentation.
Make some educated guesses about how it works.
- Similarly, read about the "Activity, Service" block and the "Activity,
Multiple" blocks in the kitchen.
- The "Get Attribute" block in the "WaitingArea" is somewhat
mysterious. What is being done with the attribute? Try adding a "Plotter
Discrete Event" and plotting the number of customers in the queue after
the "Get Attribute" block. Notice that the queue length doesn't increase
and decrease by just one customer each time. It increases by as much as
3, which is the maximum number of hamburgers.
- Look at the "Batch" block at the top level. What is this doing?
This is a pretty cool model, and pretty complicated. Some of you may
decide to build something this complex for your project, but it's not
required. I'm just looking for you to build something interesting and
challenging.
Running the Restaurant
When we run the Fast Food Operation model, we get several kinds of
data, including the wait time for each customer, the length of the line,
and the number of burgers. Let's suppose we're only interested in the
average wait time.
- Modify the model to compute the mean wait time.
- Set up the model to compute the mean of the mean wait times over
several runs, say 30.
- Compute a 95 percent confidence interval on the mean waiting time for
customers.
Now, here's some data you could take to your boss!
Suppose, though, that your boss knows some statistics and says, "Gee,
I'd really rather have an estimate of the median wait time."
Now what?
- Run the simulation once.
- Extract the wait-time data from the plotter, copy it to Excel, and
compute the median.
- Is the median the same as the mean? If so, this might be a
symmetrical distribution, in which case you can tell your boss to use the
original point estimate.
- Try this several times. Because this is so tedious, we won't collect
a lot of median data.
Think about how you would compute a confidence interval on a median.
There are a couple of issues:
- How do you combine a collection of medians into an overall point
estimate. Do you take their mean or their median?
- If you take their mean, you could use the same procedure for finding a
confidence interval as you do for any other mean.
- If you take their median, you have to use a bootstrap procedure.
- Try this for just one of the median runs, resampling from the median
data of one run.
|