Analysis 1: Difference between revisions
No edit summary |
|||
Line 29: | Line 29: | ||
Given a function <math>f(x)</math>, what is the error on <math>f</math> if you know the mean <math>\mu</math> and the variance <math>\sigma^2</math> of <math>x</math>? Let's make things interesting and introduce another variable <math>y</math>. Let's start with our expression for variance | Given a function <math>f(x)</math>, what is the error on <math>f</math> if you know the mean <math>\mu</math> and the variance <math>\sigma^2</math> of <math>x</math>? Let's make things interesting and introduce another variable <math>y</math>. Let's start with our expression for variance | ||
<math>\sigma_f^2 = \langle (f(x) - \mu_f)^2 \rangle </math>, | <math>\sigma_f^2 = \langle (f(x,y) - \mu_f)^2 \rangle</math>, | ||
where <math>\sigma_f^2</math> and <math>\mu_f^2</math> are the variance and the mean of $f(x)$. As you might | where <math>\sigma_f^2</math> and <math>\mu_f^2</math> are the variance and the mean of $f(x)$. As you might | ||
==Error on the Sample Mean== | ==Error on the Sample Mean== | ||
Armed with the above derivations, we can now address the variance of the sample mean. | Armed with the above derivations, we can now address the variance of the sample mean. |
Revision as of 18:21, 8 February 2012
under construction
Mean and Variance
The measurements you make in the lab are subject to error. We can formalize this idea by thinking of a measurement of<math>x</math>. This may be the number of counts per minute from the ML or the RS labs, or it might be a reading of the Hall voltage, etc etc. Nature determines the expectation value of the measurement. We'll use the mean as the expectation value (instead of, say, the median):
<math>\mu = \langle x \rangle. </math>
If you take a lot of data, such that you have <math>N</math> measurements of <math>x</math> -- <math>x_i</math>, then the sample mean is given by
<math>m = \frac{1}{N} \sum^N_i x_i </math>
which should be familiar. In order to quantify the error associated with our data, we introduce the variance $\sigma^2$
<math>\sigma^2 = \langle (x-\mu)^2 \rangle. </math>
This is the "second moment" of the distribution of data. Note that the square is essential because, from the definition of the mean, <math> \langle (x-\mu) \rangle = 0 </math>. The square root of the variance is the standard deviation <math>\sigma</math>. Analogously to the mean, we can compute the sample variance from our dataset <math>x_i</math>:
<math>s^2 = \frac{1}{N-1} \sum^{N}_i (x_i - m)^2 </math>.
Why do we use <math>N-1</math> instead of <math>N</math> in the denominator for the sample variance? We'll come back to that later.
In some cases, particular data is characterized by a distribution where the variance is readily available from the data itself. An example relevant to your labs is the variance on counts, which is derived from the Poisson distribution. In this case, if you have counted a total of, say, <math>M</math> muons or alpha particles in so many seconds, the variance on this number is <math>M</math> (and the standard deviation is therefore <math>\sqrt M</math>). See suggested texts for a discussion of the Poisson distribution (but this is all you need to know for the class).
Simple Error Propagation
Given a function <math>f(x)</math>, what is the error on <math>f</math> if you know the mean <math>\mu</math> and the variance <math>\sigma^2</math> of <math>x</math>? Let's make things interesting and introduce another variable <math>y</math>. Let's start with our expression for variance
<math>\sigma_f^2 = \langle (f(x,y) - \mu_f)^2 \rangle</math>,
where <math>\sigma_f^2</math> and <math>\mu_f^2</math> are the variance and the mean of $f(x)$. As you might
Error on the Sample Mean
Armed with the above derivations, we can now address the variance of the sample mean.