This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Laboratory 1
Introduction to Statistics and Data Analysis
Introduction
Statistics is the science of obtaining meaningful information from data. The methodology of statistics allows scientists to “separate information from noise” and to quantify how certain they are
about the results of their measurements. If scientists did not consistently analyze the results of
their experiments within a statistical framework, they would frequently be misled by anecdotal
evidence, or by the results of a few anomalous trials.
In this laboratory, we will explore a few of the most important concepts in statistics, and we will
also discuss what it means for measurements to be “accurate” and “precise”. We will then use these
tools to see how well some real data ﬁt to a simple model of uniform acceleration. The concepts
we study here will provide a framework for our analysis of experimental data throughout the rest
of the course. Theoretical Background: Systematic vs. Statistical Error
In general, there are two types of error that creep into experimental data: systematic and statistical
error. Systematic errors are biases in measurement that often lead to measured values’ being
consistently too high or too low. These can be the result of poorly calibrated equipment or other
consistent human errors that repeat themselves in every trial. Systematic errors are distinguished
from other errors because the addition of more data does not reduce systematic error.
Statistical errors are a very different type of error, and do not arise from any “mistake” on the
experimenter’s part. A statistical error is any error that can be reduced by repeating the experiment
a large number of times. Many statistical errors in experimental measurements are caused by unknown and unpredictable changes in the experiment or measurement apparatus that lead to “noise”
in the measurement. Since the processes that generate noise tend to be random, it is expected that
averaging over multiple trials will reduce the noise.
Now consider a situation in which you have an experimental quantity that you are trying to measure, such as g, the gravitational acceleration at Earth’s surface. The “true” value of this quantity
is out there, but you do not know what it is. So you devise an experiment to measure it, and you
perform a series of trials.
Precision refers to the degree of mutual agreement among your measurements. They may all be
very far from the true value of whatever quantity you are trying to measure, but as long as the
1 measurements themselves are close together, your data are precise. In Figure 1, the bottom left
target shows a set of measurements that are precise but not accurate.
Accuracy is the degree of conformity of a measured quantity to its true value. For a set of measurements to be considered accurate, they must be clustered relatively randomly around the “true”
value, but each individual measurement does not need to be close to the true value. In Figure 1,
the top right target shows a set of measurements that are accurate but not precise. Figure 1: The difference between precision and accuracy. The true value of the measurement is at
the center of the target.
Problem 1.1 According to the deﬁnitions above, does systematic error
have a greater impact on a measurement’s precision or its accuracy? What
about statistical error?
Problem 1.2 Can the impact of statistical error be reduced by simply repeating a measurement lots of times and taking the average over all of those
trials? Why or why not? Could you reduce systematic error by repeating a
measurement? Why or why not? Theoretical Background: Basic Statistical Concepts
The mean is deﬁned as the arithmetic average of a set of values obtained from a series of N
observations. The formula for calculating the mean is
x≡
¯ 1N
xi ,
N i∑
=1
2 (1) where the individual measurements are labeled xi , and x signiﬁes the mean of x. The variance is
¯
related to the arithmetic average of the square of the difference between the value of each observation and the mean, written as
1N
2
σ≡
¯
(2)
∑ (xi − x)2 .
N − 1 i =1
It is not exactly equal to the arithmetic average, because the denominator includes N − 1 instead
of N . There is a good reason for this (related to the concept of degrees of freedom), and a full
explanation can be found in any introductory statistics text. In Equation 2, the differences are
squared so that positive and negative differences will not cancel each other out. The variance is a
measure of how closely the data cluster around the mean. If the variance is small, most data points
are close to the mean. The standard deviation is the square root of the variance, usually written
as σ , where σ is deﬁned mathematically as
1N
σ≡
¯
(3)
∑ (xi − x)2.
N − 1 i =1 Its units are the same as those of whatever it is you are measuring, which gives it an advantage over
the variance. For example, if all of your xi have units of meters, their standard deviation will also
have units of meters. Their variance, however, will have units of meters squared, which makes it
harder to interpret.
The probability associated with a particular outcome of a measurement is the likelihood that this
outcome will occur. For example, if you toss a fair coin, the probability of landing on “heads” is
1/2, or 0.5. The probability will always be expressed as a number between 0 and 1. A probability
distribution function for a measurement is the set of probabilities for every possible outcome
of that measurement. For example, for a single coin toss, there are two outcomes (“heads” and
“tails”), each of which has a probability 1/2 of occurring. Therefore, the probability distribution
function for a single coin toss is {1/2,1/2}.
• The sum of the elements of a probability distribution must always be 1, because something
must happen.
• Probability distributions fall into two categories: discrete and continuous. Discrete probability distributions occur when the outcome of a measurement takes on only certain values
(typically integers). Continuous probability distributions occur when the outcome can be
any decimal value.
• One important type of probability distribution function is the Gaussian distribution function,
which has the functional form
(x − x)2
¯
P(x) = C0 exp −
.
(4)
2σ 2
This formula actually represents a set of distributions, each of which has different values of
3 x and σ . The shape for these distributions look like those in Figure 2  they follow the classic
¯
“bell curve”. In Equation (4), x is the mean of the distribution: the value of the variable x that
¯
is at the center of the distribution. The term σ is the standard deviation of the distribution. It
√
is a measure of the distribution’s width. For C0 = 1/(σ 2π ), the area under the bell curve
equals 1, and the distribution is a special type called a Normal distribution function.
• The Central Limit Theorem states that the sum of a large number of probability distributions from independent random processes will be approximately normally distributed. This
is the reason why so many random processes in nature (such as mechanical “noise”) follow
normal distribution functions  they are the result of multiple independent processes acting
together.
Problem 1.3 In one experiment, you take a fair coin and ﬂip it twice. You
measure the number of heads that appeared in those two ﬂips and call that
number x. In this experiment, what is the probability distribution function
for the number of heads that appear? What is the mean number of heads
that appear?
Problem 1.4 Look at Figure 2. Do the two distributions on the left have
identical means, identical standard deviations, or both? How about the distributions on the right? Figure 2: Two normal distributions (see Question 1.4).
Now, say that you are making measurements of a quantity we will call “x”. If you measured x
an inﬁnite number of times and made a histogram of your experimental values, your graph would
look something like the one in Figure 3. Without worrying too much about the values on the
vertical axis, think about what this graph means. It means that, for any given single measurement,
you are very likely to get a result that is close to the true value of x (which is at the center of the
distribution), and less and less likely to get results that are further and further from the true value.
4 Figure 3: The red curve shows the result of taking an inﬁnitely large number of measurements of
x, making a histogram of their values, and ﬁtting a smooth curve to the histogram. It also represents
the probability distribution function (P(x)) for the outcome of a single measurement of x.
As you can see from Figure 3, your chances of obtaining a single measurement close to the true
value of x are good, but they are not that good. There is still a sizeable probability that you will
think x is something very far from its actual value. This problem can be solved, in part, by repeating
your measurement several times and taking the mean of your experimental values. For example,
assume you repeated your measurement of x, but this time you made six separate measurements
and took their mean to be the measured value of x.
What would happen? It is true that some of those values might still be far from the true x. But it
is very unlikely that all of your values would be far from the true x, and even less likely that they
would all be off in the same direction. More likely, some of your six measurements would be too
low, and some would be too high. By taking their mean, you would cancel out some of the error.
The chance that your reported value is close to the true value goes up as you take the mean of more
and more measurements.
We quantify this by deﬁning a quantity known as the error of the mean for a set of N measurements. It is deﬁned as
σ
σx ≡ √ ,
(5)
¯
N
where σ is the standard deviation of the N measurements as deﬁned in Equation 3. Given that σ
is a measure of the uncertainty associated with taking a single measurement, σx is a measure of
¯
the uncertainty associated with taking the mean of N measurements. As you can see, this formula
states that you can determine the mean to arbitrary accuracy by simply taking a larger and larger
number of measurements: as N goes up, the error of the mean gets smaller and smaller.
This is a very important result, because statisticians have shown that, provided certain assumptions
are met, we can expect the true value of whatever we are trying to measure to be within the interval
5 x ± σx
¯
¯
x ± 2 σx
¯
¯
x ± 3 σx
¯
¯ 68.2% of the time
95.4% of the time
99.7% of the time. Another way of looking at this is: if we repeat our measuring (and averaging) process an inﬁnite
number of times, the interval x ± 2σx will include the true value in 95.4% of our results. Alterna¯
¯
tively, for a single set of N measurements, there is a 95.4% chance that the mean of our measurements is within ±2σx of the true value. In other words, the distribution of the means (x) of repeated
¯
¯
√
measurements is a Gaussian with a standard deviation of σx = σ / N . Please note the difference
¯
between a single measurement without averaging and a set of N measurements with averaging. For
a single measurement, we get a value x. The distribution of repeated single measurements is also a
Gaussian, but with a standard deviation of σ as shown in Fig. 3.
Perhaps you have heard the term conﬁdence interval before; this is exactly what we are describing
here. Most scientists report their results as a mean and a 95% conﬁdence interval. (The 95% is just
convention; it has no special signiﬁcance.) To do this, they report their data as
x ± 1.960 σx .
¯
¯
Practically  and nonrigorously  speaking, this means that the scientists are “95% sure” that the
interval they are reporting contains the unknown true value of the quantity of interest.
Problem 1.5 If the standard deviation of four measurements is 0.1, what
is the error of the mean?
Problem 1.6 If the error of the mean for four measurements is 0.05, how
many trials need to be performed to get the error of the mean below 0.01?
Below 0.001?
√
Problem 1.7 Notice again that σx depends inversely on N , where N is
¯
the number of independent measurements that go into the average value
x. What happens to the width of a particular conﬁdence interval as N in¯
creases? What does this tell you about your conﬁdence in the accuracy of
your measurement as N increases? Experimental Background: The Ultrasonic Sensor
In this laboratory, we will take position measurements of a falling object using a device called an
ultrasonic sensor. This device is capable of measuring the position of an object to a precision of
a few millimeters. The sensor produces 1millisecond bursts of 50 kHz sound waves. It works in
a way similar to the locating system employed by bats: it measures the time delay of the echo to
establish the distance from it to the object.
6 Figure 4: A picture of the ultrasonic ranger and vacuum release system used for measuring gravitational acceleration. The ultrasonic sensor is beneath a wire mesh housing in the bottom of the
bucket. Experiments
Experiment 1: Fitting Data to a Model
To demonstrate some of the statistical concepts described above, we will begin by ﬁtting several
sets of data to a simple model. In this experiment, our model will be one of yposition as a function
of time for an object in freefall. We will assume that the object starts from rest at t = 0, such that
1
y = y0 − g t 2 .
2 (6) Our data will be a set of real measurements of g obtained by dropping a rubber ball several times
and ﬁtting Equation 6 to the y vs. t measurements provided by the ultrasonic sensor. Each of the
data sets will look like that in Figure 5. Since the ball is small and heavy, we can safely assume
that the effect of air drag will be negligible.
1. Use the vacuum release system to clamp the ball in place directly above the ultrasonic sensor.
You can apply pressure to the ball by compressing the vacuum hand pump a few times while
it is in place.
7 Figure 5: Raw position (y) vs. time (t ) data for one experimental trial. The region corresponding
to the ball drop is highlighted in gray, and a bestﬁt quadratic curve is included. 2. Ensure that the ball falls directly onto the ultrasonic sensor by releasing it using the trigger
on the hand pump. Adjust the position of the ultrasonic sensor as necessary.
3. Set up LoggerPro so that it takes 3 seconds of position vs. time data at 20 samples per
second. You can do this by opening the template ﬁle free fall.cmbl from the “LoggerPro
Files” folder.
4. Begin taking data by clicking the green Collect button on LoggerPro. As the data points
begin to plot across the screen, pull the trigger to allow the ball to drop. You want to make
sure you are recording a complete drop.
Problem 1.8 How can you measure gravitational acceleration from the position vs. time graph of a falling object?
5. If you are satisﬁed with how your data look, ﬁt an appropriate function (quadratic) to the
position vs. time graph. (See Appendix A Section 1.4 for how to do this.) Paste the graph
with ﬁt lines included into your lab report.
6. Drop the ball three more times and record position vs. time data for its fall for each trial.
Perform the same ﬁt procedure and paste your graphs into your lab report.
7. Using your method from Problem 1.8, calculate g for each of your trials.
8. Record your values for g (magnitude of g) using the online data collection tool. Instructions
for using the online tool can be found in Appendix A Section 3. 8 Experiment 2: Statistical Analysis
We will now statistically analyze your data and the class data to determine which set provides
the better measurement of g, whose true value (we know in advance) is 9.81 m/s2 . We will also
analyze larger data sets, which represent data taken by hundreds of different groups of students. Figure 6: Screenshot of the statistical analysis page for Laboratory 1. 1. Open the LoggerPro template statistics.cmbl. You will see four histograms, two of which
are blank (see Figure 6).
2. Record your group’s four values of g in the “Your Values” column, and record the class values of g (from the online data collection tool) in the “Class Values” column. Two histograms
should appear. There are also two more histograms, representing data taken by 250 groups
and 600 groups.
3. Add a statistics box to each histogram and paste all of the histograms into the appropriate
places in your lab report. (See Appendix A Section 1.1.) In your lab report, calculate the
95% conﬁdence interval for the mean of each set of data. You may want to consult Appendix
A Section 2.1 for help inputting functions into Excel.
4. Perform a Gaussian ﬁt to the distribution of 600 groups’ data (see Appendix A Section 1.4).
Paste this histogram including the ﬁt and ﬁt constants into the corresponding designated area
of your lab report.
5. Using only the ﬁtting constants from the previous step, calculate the standard deviation (σ )
and the error of the mean resulting from this ﬁt. Also, calculate the percent deviation of
9 this error of the mean from the error of the mean obtained with the information given by the
statistics box.
Problem 1.9 Look at the conﬁdence intervals for your four graphs. Which
conﬁdence interval is the widest? Which is the narrowest? Why is this so?
Your answer should show that you understand the two factors that affect the
size of a conﬁdence interval.
Problem 1.10 Which of the four sets of data above is the most precise?
Which is the least precise? Which is the most accurate? Which is the least
accurate? Why? Explain your answers thoroughly for all four questions.
Problem 1.11 What do you notice about the shapes of the histograms as
more and more data points are added? What would the shape look like if
you had an inﬁnite number of data points?
Problem 1.12 . In the last step of the procedures, you ﬁt a Gaussian
distribution to the largest data set. How does the error of the mean for
this Gaussian ﬁt compare to the error of the mean you estimated from the
“Statistics Box”? (Refer to Equation 4) Is it consistent with what you
expect from the Central Limit Theorem? Why or why not?
√
Problem 1.13 The error of the mean is proportional to 1/ N . (See
Equation 5.) Given this fact, what could possibly explain a situation where
the error of the mean for the class data is larger than the error of the mean
for your group’s data alone? Your explanation should refer to the concepts
of systematic and statistical error.
Problem 1.14 The distributions for 250 groups and 600 groups look very
similar; they have approximately the same width and are centered at about
the same mean. Given this fact, what advantage do we gain by having all
that additional data? Remember: we are concerned with how close our
mean is to the true (unknown) value.
Problem 1.15 If you did not know that the real value of g is 9.8 m/s2 ,
could you determine how accurate your data are? What implications does
this have for experimental situations where a researcher is measuring an
unknown parameter? 10 ...
View
Full
Document
This note was uploaded on 09/13/2011 for the course ECONOMICS 101 taught by Professor Gerson during the Spring '11 term at University of Michigan.
 Spring '11
 Gerson

Click to edit the document details