# Appendix J - Statistics Introduction

There has been no real explanation of statistics in the body of the
text. However, we have freely quoted "folding errors in quadrature",
"stochastic error" and other concepts. In order to give some minimal
background, we expand a bit on the basic concepts of statistical error.
References are provided at the end of the text (Section 13). The
treatment here is completely without rigor.

Consider first a discrete series of N measurements of a quantity y,
y~i~, i = 1, \... N. The mean and mean square deviation from the mean of
those measurements are ![](media/image1.emf) and ![](media/image2.emf).

$\begin{array}{r}
\overline{y}\text{} = \sum_{i}^{N}\frac{y_{i}}{N} \\
\sigma^{2} = \sum_{i}^{}\frac{\left( y_{i} - \overline{y} \right)^{2}}{N}
\end{array}$ J.1

In the limit where ![](media/image3.emf) the distribution of results y
approaches a continuous distribution function
$\frac{d\underline{P}}{\text{dy}}$ where the probability to observe y
between y and y + dy is defined to be
$d\ \underline{P}\  = \ \ \frac{d\underline{P}}{\text{dy}}\text{}\text{dy}$.
The expressions for ![](media/image4.emf) and ![](media/image5.emf) in
the continuous case become

$\begin{array}{r}
\overline{y}\text{}\  \rightarrow \int_{}^{}{y(d\frac{\underline{P}}{\text{dy}})\text{dy}\  = \ \int_{}^{}{yd\underline{P}}} \\
\sigma^{2}\text{} \rightarrow \ \int_{}^{}{(y - \overline{y})^{2}}(d\frac{\underline{P}}{\text{dy}})\text{dy} = \int_{}^{}{\left( y - \overline{y} \right)^{2}d\underline{P}} \\
\text{}\ \text{}\int_{}^{}{d\underline{P}}\  = \ \text{}1
\end{array}$ J.2

The most commonly assumed distribution function is the Gaussian. It is
often assumed to apply in experimental situations, because, in the limit
of large numbers of events, many distributions approach a Gaussian. The
theoretical function is characterized by 2 parameters, a mean \<y\> and
a root mean square (rms) deviation from the mean equal to
![](media/image6.emf).

$d\underline{P}\ \left( y,\ \left\langle y \right\rangle,\ \Delta y \right)\  = \ \ \frac{1}{\sqrt{2\pi {\Delta y}^{2}}}\ \text{exp}\left\lbrack - \ \frac{1}{2}\left( \frac{y\  - \ \left\langle y \right\rangle}{\Delta y} \right)^{2} \right\rbrack\text{dy}$
J.3

It is easy to show that the Gaussian given in Eq. J.3 is normalized to
1, and that the parameters ![](media/image7.emf) and
![](media/image8.emf) are $\overline{y}$ and $\sigma$ respectively as
defined in Eq. J.2. Note that $\overline{y}$ and $\sigma$ refer to a
large experimental data set, while ![](media/image9.emf) and
![](media/image10.emf) are parameters which define a theoretical
distribution function, *d[P]{.underline}/dy*.

Since it is used so extensively in the text, we quickly derive the
Poisson distribution. Examples used in the body of the text include mean
free path, decay lifetime, and phototube photoelectron statistics.
Consider a case where the probability of interacting in traversing dx is
dx/![](media/image11.emf); the mean free path is ![](media/image12.emf).
The probability of getting no events in traversing x is
$\underline{P}(0,x)$.

$\begin{array}{r}
d\underline{P}\ (0,\ x)\  = \  - \ \underline{P}(0,x)\ \frac{\text{dx}}{\left\langle L \right\rangle} \\
\underline{P}\ (0,\ x)\  = \ e^{\frac{- x}{\left\langle L \right\rangle}}
\end{array}$ J.4

The exponential law for no interaction is already very familiar having
been quoted in the discussion of cross sections. For getting N events in
x, the appropriate probability is [P]{.underline}(N,x), where we find
none in dx and N in x (with the ordering of the events being assumed to
be irrelevant). Assuming joint probabilities multiply;

$\begin{array}{r}
d\underline{P}(N,x) = \underset{i}{\overset{N}{\Pi }}\frac{\left( d\frac{x_{i}}{\left\langle L \right\rangle} \right)}{N!}e^{\frac{- x}{\left\langle L \right\rangle}} \\
\ \underline{P}(N,x)\  = \ \frac{e^{\frac{- x}{\left\langle L \right\rangle}}}{N!}\ \left( \frac{x}{\left\langle L \right\rangle} \right)^{N} \\
\text{} = \ \frac{\left\langle N \right\rangle^{N}}{N!}e^{- \left\langle N \right\rangle},\ \left\langle N \right\rangle = \frac{x}{\left\langle L \right\rangle}
\end{array}$ J.5

In terms of the mean number of events/traversal, ![](media/image13.emf),
we recognize the Poisson photoelectron distribution, for example. The
Poisson distribution approaches a Gaussian in the appropriate limit as N
becomes large.

Suppose the N events yield measures y~i~ of some variable and that we
wish to make an hypothesis that they are described by a distribution
function which predicts *y* as $\overline{y}$ when characterized by a
single parameter ![](media/image14.emf) (for simplicity). Note that
$\overline{y}$ is the theoretical prediction in what follows and not the
sample mean as given in Eq. J.1. For example, we measure N decay times
t~i~ and assumes a distribution with a single lifetime,
![](media/image15.emf). The joint probability of the N independent
measures defines a "likelihood function" L. Recall that independent
events have probabilities which multiply. For example, the chance to
roll a five on a die is 1/6, while the change to roll a six and a five
(in that order) is 1/36.

![](media/image16.emf) J.6

The maximum of the likelihood would occur at a value of
![](media/image17.emf), ![](media/image18.emf) for which we have the
largest joint probability. In the special case of a Gaussian function
![](media/image19.emf), we minimize the ![](media/image20.emf) function;
i.e. the method of least squares. A maximum L, if d[P]{.underline} is a
Gaussian, means a minimum value of the argument of the exponential.

$\begin{array}{r}
c^{2}\text{\textasciitilde}\text{ln}L \\
\frac{\sum_{i = 1}^{N}\left\lbrack y_{i} - \overline{y}\left( \alpha,x_{i} \right) \right\rbrack^{2}}{s_{i^{2}}} \\
L(\alpha)\left| \text{max} \Rightarrow c^{2}(\alpha) \right|_{\text{min}} \\
¶\frac{c^{2}}{\text{¶α}}|_{\left\langle \alpha \right\rangle} = 0
\end{array}$ J.7

The minimum value of ![](media/image21.emf), in the special case
$\overline{y} = \alpha$ occurs for:

$\begin{array}{r}
\frac{\partial \chi^{2}}{\partial \overline{y}}\  = \ 0 \\
\overline{y}\  = \ \frac{\left( \sum_{i}^{}\frac{y_{i}}{\sigma_{i}^{2}} \right)}{\left( \sum_{i}^{}\frac{1}{\sigma_{i}^{2}} \right)}
\end{array}$ J.8

In the special case that all errors are equal, ![](media/image22.emf),
![](media/image23.emf) and we recover Eq. J.1. The result Eq. J.8 is the
best estimator of the mean of a set of measures assuming a Gaussian
error distribution. We expect that it is related to the sample mean, as
indeed we have shown.

The algebra for the error on the mean is straightforward. The value
![](media/image24.emf) occurs when ![](media/image25.emf) is minimized.
The estimate of *σ~y~* comes from looking at how fast we deviate from
the minimum $(\partial^{2}\frac{\chi^{2}}{\partial^{2}}\overline{y})$;
see also Eq. J.11.

![](media/image26.emf) J.9

If the measurements have different errors ![](media/image27.emf) then
they are "weighted" as the inverse square of that error in finding the
best estimation of the mean. This is called the weighted mean technique.
If all individual measurement errors are the same,
![](media/image28.emf), then the best estimate of the error to be
attached to the ensemble of N measurements is,
$N\text{WT}_{o},\text{or}s = \frac{s_{o}}{\sqrt{N}}$. We remark on this
![](media/image29.emf) behavior in the body of the text several times.
We see that error estimators improve only slowly with the number of
measures. It is also intuitively clear that poor measurements with large
errors (small weights) should not strongly influence the estimate for
![](media/image30.emf) relative to good measurements with small errors
(large weights).

The idea of estimating $\alpha$ is that for a large data set the
likelihood clusters about its most probable value,
![](media/image31.emf), and has a width ![](media/image32.emf) (See Eq.
J.2).

$\sigma_{\alpha^{2}} = \ \lbrack\int_{}^{}{\left( \alpha  - \left\langle \alpha \right\rangle \right)^{2}\text{}Ld\alpha}\frac{\rbrack}{\ }\lbrack\int_{}^{}{Ld\alpha}\rbrack$
J.10

For the special case of Gaussian errors, ![](media/image33.emf) and
![](media/image34.emf). Therefore, the best estimate of the error on
![](media/image35.emf) can be found using the expression for
![](media/image36.emf) and differentiating,
$\partial\frac{\chi^{2}}{\partial}\alpha = \frac{\left( \alpha - \left\langle \alpha \right\rangle \right)}{\sigma_{\alpha}^{2}}$
which is minimized when ![](media/image37.emf) = 0 by assumption.
Differentiating again, ![](media/image38.emf), leading to an estimate
for the error of *α* using the behavior of *χ*^2^ as a function of *α*.

![](media/image39.emf) J.11

Clearly, if the hypothesis is good, then ![](media/image40.emf) for a
single variable, since in that case ![](media/image41.emf). The test of
how well a hypothesis fits the data depends on the size of
![](media/image42.emf). The precise idea of "goodness of fit, and
significance" can be explored in the references.

For multiple parameters, ![](media/image43.emf), specifying the
hypothesis, the error analysis becomes more difficult. Still, for N
measurements at location ![](media/image44.emf) yielding values
![](media/image45.emf) of a variable ![](media/image46.emf), the
![](media/image47.emf) is the same as in Eq. J.7, and we minimize
![](media/image48.emf) with respect to the set *α~j~*, *j* = 1, M by
simultaneously solving the set of M least square equations.

$\frac{\text{¶c}^{2}}{\text{¶α}_{j}} = 0$ J.12

An example might be chamber measurements sampling a trajectory in a
magnetic field. The orbit, ![](media/image49.emf), is a function of the
parameters ${\overrightarrow{x}}_{o},{\hat{\alpha}}_{o}$, q, and p, as
we have derived. A least squares fit to the helical path will yield the
best fit value of the parameters defining the path of the track. In
particular, we will determine the momentum of the track with some error.
This outline of a procedure makes quite specific what we mean by using
detectors to measure the momentum of a track.

With M parameters, the errors on the parameters are estimated from a
straightforward generalization of Eq. J.11. However, in this case there
is an "error matrix" H^-1^, of dimension M x M, with off diagonal
elements indicating a correlation between the parameters.

$\begin{array}{r}
H_{\text{ij}} = \partial\frac{\chi^{2}}{\partial}\alpha_{i}\partial\alpha_{j} \\
\sigma_{{}_{\alpha i}}^{2}\text{} = \ \left( H^{- 1} \right)_{\text{ii}} \\
\left\langle \alpha_{i} - \ \left\langle \alpha_{i} \right\rangle \right\rangle\ \left\langle \alpha_{j} - \ \left\langle \alpha_{j} \right\rangle \right\rangle = \left( H^{- 1} \right)_{\text{ij}}
\end{array}$ J.13

The diagonal elements of the inverse H matrix provide an estimator of
the errors on the M parameters *α~j~*.

For example, assume N points at x~i~ measuring y~i~ with error
![](media/image50.emf). Assume no forces, so that the path
![](media/image51.emf) is a straight line. By hypothesis
![](media/image52.emf). The remaining degrees of freedom are N-M, so
generalizing our previous discussion, we expect ![](media/image53.emf)
would indicate a reasonable fit to the hypothesis. The minimum value of
![](media/image54.emf) with respect to a and b occurs when

$\begin{array}{r}
\chi^{2}\text{} = \text{}\ \sum_{i}^{N}\frac{\left( y_{i} - \text{ax}_{i} - b \right)^{2}}{\sigma_{i^{2}}} \\
\frac{\partial\chi^{2}}{\partial a}\  = \ 2\sum_{i}^{N}\left( y_{i} - \text{ax}_{i} - b \right)\frac{\left( - x_{i} \right)}{\sigma_{i^{2}}} = 0 \\
\frac{\partial\chi^{2}}{\partial b}\  = \ 2\sum_{i}^{N}\left( y_{i} - \text{ax}_{i} - b \right)\frac{( - 1)}{\sigma_{i^{2}}} = 0
\end{array}$ J.14

This is 2 equations in 2 unknowns. The solution is left as an exercise
for the reader.

![](media/image55.emf) J.15

The error matrix on a and b follows from Eq. J.13. The algebraic details
are again left to the reader.

![](media/image56.emf) J.16

These formulae serve us as a concrete example of the least squares
method in a case of practical interest. They also illustrate the general
method, Eq. J.12, Eq. J.13, in a particularly simple case.

Suppose we determine a variable ![](media/image57.emf) which is a
function of N variables ![](media/image58.emf) each with a different
error ![](media/image59.emf). The maximum likelihood for
![](media/image60.emf), occurs, we assume, when the
![](media/image61.emf) attain their most likely values.

![](media/image62.emf) J.17

Using the definition, Eq. J.1, for mean square deviation, we can find
the error on ![](media/image63.emf) due to the errors on
![](media/image64.emf). We assume that the fluctuations in the
![](media/image65.emf) are uncorrelated so that all cross terms,
proportional to y~i~ y~j~, i ≠ j, average to zero. The series Taylor
expansion in N dimensions is applied.

![](media/image66.emf) J.18

This result allows us to "propagate" errors. If we know the error in y,
then we can find the error on any function of y = Y. For a single
variable the error in Y becomes, $s_{Y} = s_{y}¶\frac{Y}{¶}y$. For a
function of many variables, we can work out the result using Eq. J.18.
For example, the product ![](media/image67.emf) has a fractional error
which "adds in quadrature".

![](media/image68.emf) J.19

Many volumes have been written on probability and statistics. The aim of
this Appendix has been only to introduce the concepts of a data set, the
sample mean and standard deviation and its characterization by a
distribution function ![](media/image69.emf) defined by parameters
![](media/image70.emf). The "best" estimate of the mean is derived along
with an estimate of the error on that best estimate assuming Gaussian
errors and using the method of maximum likelihood/least sources.
Propagation of errors is introduced as a final topic. Having provided
this Appendix, we have a self contained explanation of the topics in
statistics alluded to in the body of the text.