February 16, 2012 --- Class 12 --- Random Walks and Biased Estimators
Using Mathematica
Activities:
Random Walks Using Mathematica
We continued our introduction to Mathematica by defining a function
to create a random walk on the integers. We used ListPlot to plot
the walk.
Biased Esimators Using Mathematica
We considered the problem posed in section H of the handout.
Suppose we have a distribution of velocities and we want to
know the travel time for an entity traveling with the average
velocity. The natural thing to do is to measure some velocities
and estimate the average from the measurements. Dividing the
distance by the average, we estimate the time for an entity moving
with the average velocity. However, this is a biased estimate.
A very simple example involves a uniform distribution between zero
and one. The average is 1/2. If the distance is 1, the time for
average velocity is 2. However, with a small sample of measurements
we do not get 2, even as the average of many repetitions of the
experiment.
We started by teaching Mathematica to do multiple integrals
analytically and then having it get a numerical result as described
in the handout.
We trained Mathematica to do multiple integrals analytically
for the problem we are considering. Without
waiting too long, we were able to get up to a sample size of 6;
however, this result still shows significant bias.
We also used Mathematica to do larger sample sizes with a numerical
technique.
Several Mathematica notebooks contain examples of the commands
used: ~sg/Documents/feb16_v1.nb , ~sg/Documents/feb16_v2.nb and
~sg/Documents/October_10_2006.nb .