Difference between revisions of "Forest ErrAna StatDist"

From New IAC Wiki
Jump to navigation Jump to search
 
(48 intermediate revisions by 2 users not shown)
Line 34: Line 34:
  
  
Here the above average of a parent distribution is defined in terms of an infinite sum of observations (x_i) of an observable x divided by the number of observations.   
+
Here the above average of a parent distribution is defined in terms of an infinite sum of observations (<math>x_i</math>) of an observable x divided by the number of observations.   
  
 
<math>\bar{x}</math> is a calculation of the mean using a finite number of observations
 
<math>\bar{x}</math> is a calculation of the mean using a finite number of observations
Line 55: Line 55:
 
Definition of the average
 
Definition of the average
 
:<math>\mu \equiv \lim_{N\rightarrow \infty} \frac{\sum x_i}{N}</math>
 
:<math>\mu \equiv \lim_{N\rightarrow \infty} \frac{\sum x_i}{N}</math>
 +
 +
the deviation average would be given by
  
 
:<math>\lim_{N\rightarrow \infty} \frac{\sum (x_i - \mu)}{N}</math>  
 
:<math>\lim_{N\rightarrow \infty} \frac{\sum (x_i - \mu)}{N}</math>  
Line 80: Line 82:
 
The standard deviation is defined as the square root of the variance
 
The standard deviation is defined as the square root of the variance
  
:S.D. = <math>\sqrt{\sigma}</math>
+
:S.D. = <math>\sqrt{\sigma^2}</math>
  
  
Line 96: Line 98:
  
 
:<math>\frac{\sum(x_i-\mu)^2}{N}  =\frac{\sum x_i^2}{N} - \mu^2</math>
 
:<math>\frac{\sum(x_i-\mu)^2}{N}  =\frac{\sum x_i^2}{N} - \mu^2</math>
 +
 +
In the case where your observables are weighted by the probability of the observation one has an expectations value given by
 +
 +
<math>E[x] \equiv \sum x_i P_x(x)</math>
 +
 +
and a variance given by
  
 
:<math>\Rightarrow \sigma^2 = E[(x-\mu)^2] = \sum_{x=0}^n (x_i - \mu)^2 P(x_i)</math>
 
:<math>\Rightarrow \sigma^2 = E[(x-\mu)^2] = \sum_{x=0}^n (x_i - \mu)^2 P(x_i)</math>
 
: <math>= E[x^2] - \left ( E[x]\right )^2 = \sum_{x=0}^n x_i^2 P(x_i) - \left ( \sum_{x=0}^n x_i P(x_i)\right )^2</math>
 
: <math>= E[x^2] - \left ( E[x]\right )^2 = \sum_{x=0}^n x_i^2 P(x_i) - \left ( \sum_{x=0}^n x_i P(x_i)\right )^2</math>
 +
 +
to compare with the previous expression, let <math> P(x_i) = 1/N</math>
  
 
== Average for an unknown probability distribution (parent population)==
 
== Average for an unknown probability distribution (parent population)==
Line 106: Line 116:
 
===Arithmetic Mean and variance===
 
===Arithmetic Mean and variance===
  
If <math>n</math> observables are mode in an experiment then the arithmetic mean of those observables is defined as
+
If <math>n</math> observables are made in an experiment then the arithmetic mean of those observables is defined as
  
 
:<math>\bar{x} = \frac{\sum_{i=1}^{i=N} x_i}{N}</math>
 
:<math>\bar{x} = \frac{\sum_{i=1}^{i=N} x_i}{N}</math>
Line 120: Line 130:
 
:<math>\sigma^2 = \frac{\sum_{i=1}^{i=N} (x_i - \bar{x})^2}{N}</math> = RMS Error= Root Mean Squared Error
 
:<math>\sigma^2 = \frac{\sum_{i=1}^{i=N} (x_i - \bar{x})^2}{N}</math> = RMS Error= Root Mean Squared Error
  
;Note:RMS = Root Mean Square = <math>\frac{\sum_i^n x_i^2}{n}</math> =
+
;Note:RMS = Root Mean Square = <math>\frac{\sum_i^n x_i^2}{N}</math> =
  
 
==== Statistical Variance decreases with  N====
 
==== Statistical Variance decreases with  N====
Line 139: Line 149:
  
 
:<math>\sigma^2_{\bar{x}} = \frac{\sum \left (\bar{x} -\overline{\left ( \bar{x} \right ) }  \right )^2}{N} =\frac{\sum \bar{x_i}^2}{N}  -\left( \overline{\left ( \bar{x} \right ) }  \right )^2</math>
 
:<math>\sigma^2_{\bar{x}} = \frac{\sum \left (\bar{x} -\overline{\left ( \bar{x} \right ) }  \right )^2}{N} =\frac{\sum \bar{x_i}^2}{N}  -\left( \overline{\left ( \bar{x} \right ) }  \right )^2</math>
:<math>=\frac{\sum \bar{x_i}^2}{N}  -\left( \bar{x} \right )^2</math>
+
::<math>=\frac{\sum \bar{x_i}^2}{N}  -\left( \bar{x} \right )^2</math>
:<math>=\frac{\sum \left( \sum \frac{x_i}{N}\right)^2}{N}  -\left( \bar{x} \right )^2</math>
+
::<math>=\frac{\sum \left( \sum \frac{x_i}{N}\right)^2}{N}  -\left( \bar{x} \right )^2</math>
:<math>=\frac{1}{N^2}\frac{\sum \left( \sum x_i\right)^2}{N}  -\left( \bar{x} \right )^2</math>
+
::<math>=\frac{1}{N^2}\frac{\sum \left( \sum x_i\right)^2}{N}  -\left( \bar{x} \right )^2</math>
:<math>=\frac{1}{N^2}\frac{\sum \left (\sum x_i^2 + \sum_{i \ne j} x_ix_j \right )}{N}  -\left( \bar{x} \right )^2</math>
+
::<math>=\frac{1}{N^2}\frac{\sum \left (\sum x_i^2 + \sum_{i \ne j} x_ix_j \right )}{N}  -\left( \bar{x} \right )^2</math>
:<math>=\frac{1}{N^2} \left [ \frac{\sum \left(\sum x_i^2 \right)}{N}  + \frac{ \sum \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  -\left( \bar{x} \right )^2</math>
+
::<math>=\frac{1}{N^2} \sum \left [ \frac{ \left(\sum x_i^2 \right)}{N}  + \frac{ \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  -\left( \bar{x} \right )^2</math>
  
  
;If the measurements are all independent
+
::<math>\sigma^2 =\frac{\sum x_i^2}{N} - \left ( \frac{\sum x_i}{N}\right )^2</math>
:Then <math> \frac{\sum_{i \ne j} x_i x_j}{N} = \frac{\sum x_i}{N} \frac{ \sum x_j}{N}</math> : if <math>x_i</math> is independent of <math>x_j</math> (<math>i \ne j</math>)
 
:<math>= \left ( \frac{\sum x_i}{N} \right)^2 = \bar{x}^2</math>
 
  
example:
 
:(x_1x_2 + x_1x_3 + x_2x_1+x_2x_3+x_3x_1+x_3x_2+ ...) = (x_1+x_2+x_3)
 
The above part of the proof needs work
 
  
:<math>\sigma^2_{\bar{x}}=\frac{1}{N^2} \left [ \frac{\sum \left(\sum x_i^2 \right)}{N}  + \sum_{i \ne j} \bar{x}^2 \right ]  -\left( \bar{x} \right )^2</math>
+
:<math>\sigma^2_{\bar{x}}=\frac{1}{N^2} \sum  \left [ \sigma^2 +  \left ( \frac{\sum x_i}{N}\right )^2  + \frac{ \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  -\left( \bar{x} \right )^2</math>
 +
::<math>= \frac{\sigma^2}{N} + \frac{1}{N^2} \sum  \left [  \left ( \frac{\sum x_i}{N}\right )^2 + \frac{ \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  -\left( \bar{x} \right )^2</math>
 +
::<math>= \frac{\sigma^2}{N} + \frac{1}{N^2} \sum  \left [  \left ( \bar x \right )^2 + \frac{ \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  -\left( \bar{x} \right )^2</math>
 +
::<math>= \frac{\sigma^2}{N} +  \frac{\left ( \bar x \right )^2}{N}  + \frac{1}{N^2} \sum \left [ \frac{ \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  -\left( \bar{x} \right )^2</math>
  
I use the expression <math>\sigma^2 = E[x^2] - \left ( E[x] \right)^2</math>  again, except for<math> x_i</math> and not <math>\bar{x}</math> and turn it around so
 
  
: <math>\frac{\left(\sum x_i^2 \right)}{N} = \sigma^2 + \left ( \frac{\sum x_i}{N}\right)^2</math>
+
;If the measurements are all independent
  
Now I have
+
::<math> \sum \left [ \frac{ \left (\sum_{i \ne j} x_ix_j \right )}{N} \right ]  = (N^2-N) \left ( \frac{\sum x_i}{N}\right )^2</math>
  
:<math>\sigma^2_{\bar{x}}=\frac{1}{N^2} \left [ \sum \left (\sigma^2 +  \left ( \frac{\sum x_i}{N} \right )^2 \right )+ \sum_{i \ne j} \bar{x}^2 \right ]  -\left( \bar{x} \right )^2</math>
+
:<math>\sigma^2_{\bar{x}}= \frac{\sigma^2}{N} +   \frac{\left ( \bar x \right )^2}{N}   + (1-\frac{1}{N}) \left ( \frac{\sum x_i}{N}\right )^2  -\left( \bar{x} \right )^2</math>
:<math>=\frac{1}{N^2} \left [ N\sigma^2 + N\left ( \frac{\sum x_i}{N} \right )^2 + \sum_{i \ne j} \bar{x}^2 \right ]  -\left( \bar{x} \right )^2</math>
+
::<math>= \frac{\sigma^2}{N} +   \frac{\left ( \bar x \right )^2}{N}   + \left( \bar{x} \right )^2 \frac{\left ( \bar x \right )^2}{N}   -\left( \bar{x} \right )^2</math>
:<math>=\frac{1}{N^2} \left [ N\sigma^2 +  N\left ( \frac{\sum x_i}{N} \right )^2 + N(N-1) \bar{x}^2 \right ] -\left( \bar{x} \right )^2</math> Number of cross terms is N*(N-1)
+
::<math>= \frac{\sigma^2}{N} </math>  
:<math>=\frac{1}{N^2} \left [ N\sigma^2 +  N\left ( \frac{\sum x_i}{N} \right )^2 + (N^2 -N) \left ( \frac{\sum x_i}{N} \right )^2 \right ]  -\left( \bar{x} \right )^2</math> Number of cross terms is N*(N-1)
 
:<math>= \left [ \frac{\sigma^2}{N} + \left ( \frac{\sum x_i}{N} \right )^2 \right ]  -\left( \bar{x} \right )^2</math>
 
:<math>= \left [ \frac{\sigma^2}{N} +  \left (  \bar{x}\right )^2 \right ]  -\left( \bar{x} \right )^2</math>  
 
:<math>= \frac{\sigma^2}{N} </math>  
 
  
  
Line 188: Line 191:
 
To determine the "true" variance consider taking average of several sample variances (this is the same argument used above which let to <math>\overline{(\bar{x})} = \bar{x}</math> )
 
To determine the "true" variance consider taking average of several sample variances (this is the same argument used above which let to <math>\overline{(\bar{x})} = \bar{x}</math> )
  
:<math>\frac{\sum \sigma_i^2}{N} = E[\sigma^2] - \left ( E[\sigma] \right)^2 = \frac{ \sum_j \left [ \frac{\sum_i x_i^2}{n} -\left ( \bar{x} \right)^2 \right ]_j}{N}</math>
+
:<math>\frac{\sum_j \left [ \sigma_n^2 \right ]_j}{N} = \frac{ \sum_j \left [ \frac{\sum_i x_i^2}{n} -\left ( \bar{x} \right)^2 \right ]_j}{N}</math>
 
:<math>= \frac{1}{n}\sum_i \left ( \frac{\sum_j x_j^2}{N} \right )_i - \frac {\sum_j \left ( \bar{x} \right)^2 }{N}</math>
 
:<math>= \frac{1}{n}\sum_i \left ( \frac{\sum_j x_j^2}{N} \right )_i - \frac {\sum_j \left ( \bar{x} \right)^2 }{N}</math>
 
:<math>= \frac{1}{n}\sum_i \left ( \frac{\sum_j x_j^2}{N} \right )_i - \left [ \left ( \frac {\sum_j \bar{x}}{N} \right)^2  + \sigma_{\bar{x}}^2\right ]</math>  :  as shown previously      <math>E[\bar{x}^2] = \left ( E[\bar{x}] \right )^2 + \sigma_{\bar{x}}^2</math>
 
:<math>= \frac{1}{n}\sum_i \left ( \frac{\sum_j x_j^2}{N} \right )_i - \left [ \left ( \frac {\sum_j \bar{x}}{N} \right)^2  + \sigma_{\bar{x}}^2\right ]</math>  :  as shown previously      <math>E[\bar{x}^2] = \left ( E[\bar{x}] \right )^2 + \sigma_{\bar{x}}^2</math>
Line 205: Line 208:
 
:<math>\frac{\sum \sigma_i^2}{N} =</math> an average of all possible sample variance which should be equivalent to the "true" population variance.
 
:<math>\frac{\sum \sigma_i^2}{N} =</math> an average of all possible sample variance which should be equivalent to the "true" population variance.
  
:<math>\Rightarrow \frac{\sum \sigma_i^2}{N} \sim \sum \frac{x_i-\bar{x}}{n}</math>
+
:<math>\Rightarrow \frac{\sum \sigma_i^2}{N} \sim \sum \frac{(x_i-\bar{x})^2}{n}</math> : if all the variances are the same this would be equivalent
  
: <math>\sigma^2 = \frac{n}{n-1}\frac{\sum(x_i-\bar{x})}{n}</math>
+
: <math>\sigma^2 = \frac{n}{n-1}\frac{\sum(x_i-\bar{x})^2}{n}</math>
: <math>= \frac{\sum(x_i-\bar{x})}{n-1} =</math> unbiased sample variance
+
: <math>= \frac{\sum(x_i-\bar{x})^2}{n-1} =</math> unbiased sample variance
  
 
==Probability Distributions==
 
==Probability Distributions==
  
=== Mean(Expectation value) and variance===
+
=== Mean(Expectation value) and variance for a Given Probability Distribution===
 
====Mean of Discrete Probability Distribution====
 
====Mean of Discrete Probability Distribution====
  
Line 229: Line 232:
 
<math>x_i =</math> ith observable quantity
 
<math>x_i =</math> ith observable quantity
  
<math>P(x_i) =</math> probability of observing <math>x_i</math> = Probability Mass Distribution for a discrete probability distribution
+
<math>P(x_i) =</math> probability of observing <math>x_i</math> = Probability Distribution for a discrete probability distribution
  
 
====Mean of a continuous probability distibution====
 
====Mean of a continuous probability distibution====
Line 319: Line 322:
  
  
This means the probability of getting exactly k successes after n trials is  
+
This means the probability of getting exactly <math>x</math> successes after <math>n</math> trials is  
  
 
:<math>P_B(x) = {n\choose x}p^{x}q^{n-x} </math>
 
:<math>P_B(x) = {n\choose x}p^{x}q^{n-x} </math>
Line 380: Line 383:
 
:<math>P = \frac{\mbox{number of desired outcomes}}{\mbox{number of possible outcomes}} = \frac{1}{2}</math> = Uniform distribution with a=0 (tails) b=1 (heads).
 
:<math>P = \frac{\mbox{number of desired outcomes}}{\mbox{number of possible outcomes}} = \frac{1}{2}</math> = Uniform distribution with a=0 (tails) b=1 (heads).
  
Suppose you toss a coin 4 times.  Here are the possible outcomes
+
Suppose you toss a coin 4 times.   
 +
 
 +
 
 +
 
 +
 
 +
Here are the possible outcomes
  
  
Line 422: Line 430:
 
|16||h|| h || h|| h||4
 
|16||h|| h || h|| h||4
 
|}
 
|}
 +
 +
 +
How many possible ways can you get all tails (x=4).
 +
 +
 +
<math>{n\choose x}=\frac{n!}{x!(n-x)!}=\frac{4!}{4!(4-4)!} =1</math> 0! = 1
  
  
Line 531: Line 545:
  
  
:<math>P(0,x, \lambda) = e^{\frac{-x}{\lambda}} \approx 1 - \frac{x}{\lambda}</math>
+
:<math>P(0,x, \lambda) = 1 - \frac{x}{\lambda} \approx e^{\frac{-x}{\lambda}}</math>
  
 
Now we wish to find the probability of finding <math>N</math> events over a distance <math>x</math> given the mean free path.
 
Now we wish to find the probability of finding <math>N</math> events over a distance <math>x</math> given the mean free path.
  
This is calculated as a joint probability.  If it were the case that we wanted to know the probability of only one interaction over a distance <math>L</math>.  Then we would want to multiply the probability that an interaction happened after a distance <math>dx</math> by the probability that no more interactions happen by the time the particle reaches the distance <math>L</math>.  
+
This is calculated as a joint probability.  If it were the case that we wanted to know the probability of only one interaction over a distance <math>L</math>, then we would want to multiply the probability that an interaction happened after a distance <math>dx</math> by the probability that no more interactions happen by the time the particle reaches the distance <math>L</math>.  
  
 
For the case of <math>N</math> interactions, we have a series of <math>N</math> interactions happening over N intervals of <math>dx</math> with the probability <math>dx/\lambda</math>  
 
For the case of <math>N</math> interactions, we have a series of <math>N</math> interactions happening over N intervals of <math>dx</math> with the probability <math>dx/\lambda</math>  
Line 596: Line 610:
 
The Gaussian distribution is accepted as one of the most likely distributions to describe measurements.
 
The Gaussian distribution is accepted as one of the most likely distributions to describe measurements.
  
A Gaussian distribution which is normalized such that its integral is unity is refered to as the Normal distribution.  You could mathematically construct a Gaussian distribution which is not normalized to unity (this is often done when fitting experimental data).
+
A Gaussian distribution which is normalized such that its integral is unity is refered to as the Normal distribution.  You could mathematically construct a Gaussian distribution that is not normalized to unity (this is often done when fitting experimental data).
  
 
:<math>P_G(x,\mu, \sigma) = \frac{1}{\sigma \sqrt{2 \pi}}e^{-\frac{1}{2} \left( \frac{x -\mu}{\sigma} \right) ^2}</math> = probability of observing <math>x</math> from a Gaussian parent distribution with a mean <math>\mu</math> and standard deviation <math>\sigma</math>.
 
:<math>P_G(x,\mu, \sigma) = \frac{1}{\sigma \sqrt{2 \pi}}e^{-\frac{1}{2} \left( \frac{x -\mu}{\sigma} \right) ^2}</math> = probability of observing <math>x</math> from a Gaussian parent distribution with a mean <math>\mu</math> and standard deviation <math>\sigma</math>.
Line 602: Line 616:
 
==== Half-Width <math>\Gamma</math> (a.k.a. Full Width as Half Max)====
 
==== Half-Width <math>\Gamma</math> (a.k.a. Full Width as Half Max)====
  
The half width <math>\Gamma</math> is used to describe the range of <math>x</math> through which the distributions amplitude decreases to half of its maximum value.
+
The half width <math>\Gamma</math> is used to describe the range of <math>x</math> through which the distribution's amplitude decreases to half of its maximum value.
  
 
;ie: <math>P_G(\mu \pm \frac{\Gamma}{2}, \mu, \sigma) = \frac{P_G(\mu,\mu,\sigma)}{2}</math>
 
;ie: <math>P_G(\mu \pm \frac{\Gamma}{2}, \mu, \sigma) = \frac{P_G(\mu,\mu,\sigma)}{2}</math>
Line 618: Line 632:
 
==== Binomial with Large N becomes Gaussian====
 
==== Binomial with Large N becomes Gaussian====
  
Consider the binomial distribution in which a fair coin is tossed a large number of times (N is very large and and EVEN number N=2n)
+
Consider the binomial distribution in which a fair coin is tossed a large number of times (N is very large and an EVEN number N=2n)
  
 
What is the probability you get exactly <math>\frac{1}{2}N -s</math> heads and <math>\frac{1}{2}N +s</math> tails where s is an integer?
 
What is the probability you get exactly <math>\frac{1}{2}N -s</math> heads and <math>\frac{1}{2}N +s</math> tails where s is an integer?
Line 664: Line 678:
 
similarly
 
similarly
  
:<math>\ln\left [(n-s)! \right ] \sim  \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n-1)^{1/2} \right  ] + (n-s)(\ln\left [ (n-s) \right ] -1 )</math>
+
:<math>\ln\left [(n-s)! \right ] \sim  \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n-s)^{1/2} \right  ] + (n-s)(\ln\left [ (n-s) \right ] -1 )</math>
:<math>\ln\left [(n+s)! \right ] \sim  \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n+1)^{1/2} \right  ] + (n+s)(\ln\left [ (n+s) \right ] -1 )</math>
+
:<math>\ln\left [(n+s)! \right ] \sim  \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n+s)^{1/2} \right  ] + (n+s)(\ln\left [ (n+s) \right ] -1 )</math>
  
 
:<math>\Rightarrow \ln (R) = 2 \times  \left (\ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ n^{1/2} \right  ] +n(\ln\left [ n \right ] -1 ) \right ) </math>
 
:<math>\Rightarrow \ln (R) = 2 \times  \left (\ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ n^{1/2} \right  ] +n(\ln\left [ n \right ] -1 ) \right ) </math>
:<math>- \left ( \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n-1)^{1/2} \right  ] + (n-s)(\ln\left [ (n-s) \right ] -1 )\right )</math>  
+
:<math>- \left ( \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n-s)^{1/2} \right  ] + (n-s)(\ln\left [ (n-s) \right ] -1 )\right )</math>  
:<math> -\left ( \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n+1)^{1/2} \right  ] + (n+s)(\ln\left [ (n+s) \right ] -1 )\right ) </math>
+
:<math> -\left ( \ln \left [ \left (2 \pi \right)^{1/2} \right ] +\ln  \left [ (n+s)^{1/2} \right  ] + (n+s)(\ln\left [ (n+s) \right ] -1 )\right ) </math>
: <math>= 2 \ln  \left [ n^{1/2} \right  ] +2 n(\ln\left [ n \right ] -1 )  - \ln  \left [ (n-1)^{1/2} \right  ] - (n-s)(\ln\left [ (n-s) \right ] -1 ) -\ln  \left [ (n+1)^{1/2} \right  ] - (n+s)(\ln\left [ (n+s) \right ] -1 )</math>  
+
: <math>= 2 \ln  \left [ n^{1/2} \right  ] +2 n(\ln\left [ n \right ] -1 )  - \ln  \left [ (n-s)^{1/2} \right  ] - (n-s)(\ln\left [ (n-s) \right ] -1 ) -\ln  \left [ (n+s)^{1/2} \right  ] - (n+s)(\ln\left [ (n+s) \right ] -1 )</math>  
  
  
: <math>\ln  \left [ n^{1/2} \right  ] = \ln  \left [ (n-1)^{1/2} \right  ]  = \ln  \left [ (n+1)^{1/2} \right  ]</math> For Large n
+
: <math>\ln  \left [ n^{1/2} \right  ] = \ln  \left [ (n-s)^{1/2} \right  ]  = \ln  \left [ (n+s)^{1/2} \right  ]</math> For Large <math>n \gg s</math>
  
 
:<math> \ln (R) =  2 n(\ln\left [ n \right ] -1 )  - (n-s)(\ln\left [ (n-s) \right ] -1 ) - (n+s)(\ln\left [ (n+s) \right ] -1 )</math>
 
:<math> \ln (R) =  2 n(\ln\left [ n \right ] -1 )  - (n-s)(\ln\left [ (n-s) \right ] -1 ) - (n+s)(\ln\left [ (n+s) \right ] -1 )</math>
Line 779: Line 793:
 
:<math>\sigma^2 = \mu</math>
 
:<math>\sigma^2 = \mu</math>
  
replacing dummy variable x with r - \mu
+
replacing dummy variable x with r - <math>\mu</math>
  
 
:<math>P_P(r) =  \frac{1}{\sqrt{2 \pi \sigma^2}} e^{\frac{-(r - \mu)^2}{2\sigma^2} } =\frac{1}{\sigma \sqrt{2 \pi}}e^{-\frac{1}{2} \left( \frac{r -\mu}{\sigma} \right) ^2}</math> = Gaussian distribution when <math>\mu \gg 1</math>
 
:<math>P_P(r) =  \frac{1}{\sqrt{2 \pi \sigma^2}} e^{\frac{-(r - \mu)^2}{2\sigma^2} } =\frac{1}{\sigma \sqrt{2 \pi}}e^{-\frac{1}{2} \left( \frac{r -\mu}{\sigma} \right) ^2}</math> = Gaussian distribution when <math>\mu \gg 1</math>
Line 794: Line 808:
 
:<math>A_G(\Delta x, \mu, \sigma) = \frac{1}{\sigma \sqrt{2 \pi}} \int_{\mu - \Delta x}^{\mu + \Delta x} e^{- \frac{1}{2} \left ( \frac{x - \mu}{\sigma}\right )^2} dx</math>
 
:<math>A_G(\Delta x, \mu, \sigma) = \frac{1}{\sigma \sqrt{2 \pi}} \int_{\mu - \Delta x}^{\mu + \Delta x} e^{- \frac{1}{2} \left ( \frac{x - \mu}{\sigma}\right )^2} dx</math>
  
The advantage of this definition becomes apparent when you are interesting in quantifying the probability that a measurement would fall outside a range <math>\Delta x</math>.
+
The advantage of this definition becomes apparent when you are interested in quantifying the probability that a measurement would fall outside a range <math>\Delta x</math>.
  
  
Line 815: Line 829:
  
  
There is an 8% probability that 5 or more student will fail the class
+
There is an 8% probability that 5 or more students will fail the class
  
 
===== 2 SD rule of thumb for Gaussian PDF =====
 
===== 2 SD rule of thumb for Gaussian PDF =====
Line 837: Line 851:
  
  
The above integral can only be done numerically by expanding the exponential in a power series
+
The above integral can be done numerically by expanding the exponential in a power series
  
 
:<math>e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}</math>
 
:<math>e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}</math>
Line 847: Line 861:
 
: <math>=\left .  \frac{1}{\pi} \sum_{j=0}^{\infty} \frac{(-1)^j \left (\frac{x}{\sqrt{2}} \right)^{2j+1}}{j! (2j+1)} \right |_{x=\mu - 2\sigma}</math>
 
: <math>=\left .  \frac{1}{\pi} \sum_{j=0}^{\infty} \frac{(-1)^j \left (\frac{x}{\sqrt{2}} \right)^{2j+1}}{j! (2j+1)} \right |_{x=\mu - 2\sigma}</math>
  
No analytical for the probability but one which you can compute.
+
The probability is one which you can compute.
  
 
Below is a table representing the cumulative probability <math>P_G(x< \mu - \delta \mbox{ and }  x> \mu + \delta , \mu, \sigma)</math> for events to occur outside and interval of <math>\pm \delta</math> in a Gaussian distribution
 
Below is a table representing the cumulative probability <math>P_G(x< \mu - \delta \mbox{ and }  x> \mu + \delta , \mu, \sigma)</math> for events to occur outside and interval of <math>\pm \delta</math> in a Gaussian distribution
Line 907: Line 921:
  
  
The above integral does not converge for large deviations <math>(x -\mu)</math> .  The width of the distribution is instead characterized by <math>\Gamma</math> = FWHM
+
The above integral does not converge for large z [large deviations <math>(x -\mu)</math>] .  The width of the distribution is instead characterized by <math>\Gamma</math> = FWHM
  
 
===Landau===
 
===Landau===
Line 923: Line 937:
 
Bethe-Bloch derived an expression to determine the AVERAGE amount of energy lost by a particle traversing a given material <math>(\frac{dE}{dx})</math> assuming several collisions which span the physical limits of the interaction.
 
Bethe-Bloch derived an expression to determine the AVERAGE amount of energy lost by a particle traversing a given material <math>(\frac{dE}{dx})</math> assuming several collisions which span the physical limits of the interaction.
  
For the case a thin absorbers, the number of collisions is so small that the central limit theorem used to average over several collision doesn't apply and there is a finite possibility of observing large energy losses.
+
For the case of thin absorbers, the number of collisions is so small that the central limit theorem used to average over several collision doesn't apply and there is a finite possibility of observing large energy losses.
  
 
As a result one would expect a distribution which is Gaussian like but with a "tail" on the <math>\mu + \sigma</math> side of the distribution.
 
As a result one would expect a distribution which is Gaussian like but with a "tail" on the <math>\mu + \sigma</math> side of the distribution.
Line 990: Line 1,004:
 
==== Variance ====
 
==== Variance ====
  
:<math>\mu = \frac{1}{\lambda^2}</math>
+
:<math>\sigma = \frac{1}{\lambda^2}</math>
  
 
== Skewness and Kurtosis==
 
== Skewness and Kurtosis==
Line 1,026: Line 1,040:
 
K=3 for Normal Distribution
 
K=3 for Normal Distribution
  
In ROOT the Kurtosis entry in the statistics box is really the "excess kurtosis" which is the subtraction of the kurtosis by 2
+
In ROOT the Kurtosis entry in the statistics box is really the "excess kurtosis" which is the subtraction of the kurtosis by 3
  
 
Excess Kurtosis = <math>\frac{\sum (x_i - \bar{x})^4}{(N-1)s^4} - 3</math>
 
Excess Kurtosis = <math>\frac{\sum (x_i - \bar{x})^4}{(N-1)s^4} - 3</math>

Latest revision as of 21:49, 31 January 2020

Parent Distribution

Let xi represent our ith attempt to measurement the quantity x

Due to the random errors present in any experiment we should not expect xi=x.

If we neglect systematic errors, then we should expect xi to, on average, follow some probability distribution around the correct value x.

This probability distribution can be referred to as the "parent population".


Average and Variance

Average

The word "average" is used to describe a property of a "parent" probability distribution or a set of observations/measurements made in an experiment which gives an indication of a likely outcome of an experiment.

The symbol

μ

is usually used to represent the "mean" of a known probability (parent) distribution (parent mean) while the "average" of a set of observations/measurements is denoted as

ˉx

and is commonly referred to as the "sample" average or "sample mean".



Definition of the mean

μlim


Here the above average of a parent distribution is defined in terms of an infinite sum of observations () of an observable x divided by the number of observations.

is a calculation of the mean using a finite number of observations


This definition uses the assumption that the result of an experiment, measuring a sample average of , asymptotically approaches the "true" average of the parent distribution .

Variance

The word "variance" is used to describe a property of a probability distribution or a set of observations/measurements made in an experiment which gives an indication how much an observation will deviate from and average value.

A deviation of any measurement from a parent distribution with a mean can be defined as

the deviations should average to ZERO for an infinite number of observations by definition of the mean.

Definition of the average

the deviation average would be given by


But the AVERAGE DEVIATION is given by an average of the magnitude of the deviations given by

= a measure of the dispersion of the expected observations about the mean

Taking the absolute value though is cumbersome when performing a statistical analysis so one may express this dispersion in terms of the variance

A typical variable used to denote the variance is

and is defined as


Standard Deviation

The standard deviation is defined as the square root of the variance

S.D. =


The mean should be thought of as a parameter which characterizes the observations we are making in an experiment. In general the mean specifies the probability distribution that is representative of the observable we are trying to measure through experimentation.


The variance characterizes the uncertainty associated with our experimental attempts to determine the "true" value. Although the mean and true value may not be equal, their difference should be less than the uncertainty given by the governing probability distribution.

Another Expression for Variance

Using the definition of variance (omitting the limit as )

Evaluating the definition of variance


In the case where your observables are weighted by the probability of the observation one has an expectations value given by

and a variance given by

to compare with the previous expression, let

Average for an unknown probability distribution (parent population)

If the "Parent Population" is not known, you are just given a list of numbers with no indication of the probability distribution that they were drawn from, then the average and variance may be calculate as shown below.

Arithmetic Mean and variance

If observables are made in an experiment then the arithmetic mean of those observables is defined as


The "unbiased" variance of the above sample is defined as

If you were told that the average is then you can calculate the

"true" variance of the above sample as

= RMS Error= Root Mean Squared Error
Note
RMS = Root Mean Square = =

Statistical Variance decreases with N

The repetition of an experiment can decrease the STATISTICAL error of the experiment

Consider the following:

The average value of the mean of a sample of n observations drawn from the parent population is the same as the average value of each observation. (The average of the averages is the same as one of the averages)

sample mean
if all means are the same

This is the reason why the sample mean is a measure of the population average ( )

Now consider the variance of the average of the averages (this is not the variance of the individual measurements but the variance of their means)




If the measurements are all independent


The above is the essence of counting statistics.

It says that the STATISTICAL error in an experiment decreases as a function of

Biased and Unbiased variance

Where does this idea of an unbiased variance come from?


Using the same procedure as the previous section let's look at the average variance of the variances.

A sample variance of measurements of is


To determine the "true" variance consider taking average of several sample variances (this is the same argument used above which let to )

: as shown previously
 : also shown previously the universe average is the same as the sample average


Here

the sample variance
an average of all possible sample variance which should be equivalent to the "true" population variance.
 : if all the variances are the same this would be equivalent
unbiased sample variance

Probability Distributions

Mean(Expectation value) and variance for a Given Probability Distribution

Mean of Discrete Probability Distribution

In the case that you know the probability distribution you can calculate the mean or expectation value E(x) and standard deviation as

For a Discrete probability distribution

where

number of observations

number of different possible observable variables

ith observable quantity

probability of observing = Probability Distribution for a discrete probability distribution

Mean of a continuous probability distibution

The average (mean) of a sample drawn from any probability distribution is defined in terms of the expectation value E(x) such that

The expectation value for a continuous probability distribution is calculated as

Variance

Variance of a discrete PDF

Variance of a Continuous PDF

Expectation of Arbitrary function

If is an arbitrary function of a variable governed by a probability distribution

then the expectation value of is

or if a continuous distribtion

Uniform

The Uniform probability distribution function is a continuous probability function over a specified interval in which any value within the interval has the same probability of occurring.

Mathematically the uniform distribution over an interval from a to b is given by


Mean of Uniform PDF

Variance of Uniform PDF


Now use ROOT to generate uniform distributions. http://wiki.iac.isu.edu/index.php/TF_ErrAna_InClassLab#Day_3

Binomial Distribution

Binomial random variable describes experiments in which the outcome has only 2 possibilities. The two possible outcomes can be labeled as "success" or "failure". The probabilities may be defined as

p
the probability of a success

and

q
the probability of a failure.


If we let represent the number of successes after repeating the experiment times

Experiments with are also known as Bernoulli trails.

Then is the Binomial random variable with parameters and .

The number of ways in which the successful outcomes can be organized in repeated trials is

where the denotes a factorial such that .

The expression is known as the binomial coefficient and is represented as


The probability of any one ordering of the success and failures is given by


This means the probability of getting exactly successes after trials is

Mean

It can be shown that the Expectation Value of the distribution is


:summation starts from x=1 and not x=0 now
:factor out  : replace n-1 with m everywhere and it looks like binomial distribution
:change summation index so y=x-1, now n become n-1
 :
:definition of binomial expansion
:q+p =1


variance

Remember



To calculate the variance of the Binomial distribution I will just calculate and then subtract off .

: x=0 term is zero so no contribution

Let m=n-1 and y=x-1


Examples

The number of times a coin toss is heads.

The probability of a coin landing with the head of the coin facing up is

= Uniform distribution with a=0 (tails) b=1 (heads).

Suppose you toss a coin 4 times.



Here are the possible outcomes


order Number Trial # # of Heads
1 2 3 4
1 t t t t 0
2 h t t t 1
3 t h t t 1
4 t t h t 1
5 t t t h 1
6 h h t t 2
7 h t h t 2
8 h t t h 2
9 t h h t 2
10 t h t h 2
11 t t h h 2
12 t h h h 3
13 h t h h 3
14 h h t h 3
15 h h h t 3
16 h h h h 4


How many possible ways can you get all tails (x=4).


0! = 1


The probability of order #1 happening is

P( order #1) =

P( order #2) =

The probability of observing the coin land on heads 3 times out of 4 trials is.

A 6 sided die

A die is a 6 sided cube with dots on each side. Each side has a unique number of dots with at most 6 dots on any one side.

P=1/6 = probability of landing on any side of the cube.

Expectation value :

The expected (average) value for rolling a single die.

The variance:


If we roll the die 10 times what is the probability that X dice will show a 6?

A success will be that the die landed with 6 dots face up.

So the probability of this is 1/6 (p=1/6) , we toss it 10 times (n=10) so the binomial distribution function for a success/fail experiment says

So the probability the die will have 6 dots face up in 4/10 rolls is

Mean = np = Variance =

Poisson Distribution

The Poisson distribution is an approximation to the binomial distribution in the event that the probability of a success is quite small . As the number of repeated observations (n) gets large, the binomial distribution becomes more difficult to evaluate because of the leading term


The poisson distribution overcomes this problem by defining the probability in terms of the average .


Poisson as approximation to Binomial

To drive home the idea that the Poisson distribution approximates a Binomial distribution at small p and large n consider the following derivation

The Binomial Probability Distriubtions is


The term

IFF we have x terms above
then
example:

This leave us with



For

Derivation of Poisson Distribution

The mean free path of a particle traversing a volume of material is a common problem in nuclear and particle physics. If you want to shield your apparatus or yourself from radiation you want to know how far the radiation travels through material.

The mean free path is the average distance a particle travels through a material before interacting with the material.

If we let represent the mean free path
Then the probability of having an interaction after a distance x is

as a result

= probability of getting no events after a length dx

When we consider ( we are looking for small distances such that the probability of no interactions is high)


Now we wish to find the probability of finding events over a distance given the mean free path.

This is calculated as a joint probability. If it were the case that we wanted to know the probability of only one interaction over a distance , then we would want to multiply the probability that an interaction happened after a distance by the probability that no more interactions happen by the time the particle reaches the distance .

For the case of interactions, we have a series of interactions happening over N intervals of with the probability


= probability of finding events within the length


The above expression represents the probability for a particular sequence of events in which an interaction occurs after a distance then a interaction after ,

So in essence the above expression is a "probability element" where another probability element may be


where the first interaction occurs after the distance .


So we can write a differential probability element which we need to add up as


The N! accounts for the degeneracy in which for every N! permutations there is really only one new combination. ie we are double counting when we integrate.


Using the integral formula


we end up with

Mean of Poisson Dist


Variance of Poisson Dist

For Homework you will show, in a manner similar to the above mean calculation, that the variance of the Poisson distribution is

Gaussian

The Gaussian (Normal) distribution is an approximation of the Binomial distribution for the case of a large number of possible different observations. Poisson approximated the binomial distribution for the case when p<<1 ( the average number of successes is a lot smaller than the number of trials ).

The Gaussian distribution is accepted as one of the most likely distributions to describe measurements.

A Gaussian distribution which is normalized such that its integral is unity is refered to as the Normal distribution. You could mathematically construct a Gaussian distribution that is not normalized to unity (this is often done when fitting experimental data).

= probability of observing from a Gaussian parent distribution with a mean and standard deviation .

Half-Width (a.k.a. Full Width as Half Max)

The half width is used to describe the range of through which the distribution's amplitude decreases to half of its maximum value.

ie
Side note
the point of steepest descent is located at such that

Probable Error (P.E.)

The probable error is the range of in which half of the observations (values of ) are expected to fall.

Binomial with Large N becomes Gaussian

Consider the binomial distribution in which a fair coin is tossed a large number of times (N is very large and an EVEN number N=2n)

What is the probability you get exactly heads and tails where s is an integer?

The Binomial Probability distribution is given as

p = probability of success= 1/2

q= 1-p = 1/2

N = number of trials =2n

x= number of successes=n-s



Now let's cast this probability with respect to the probability that we get an even number of heads and tails by defining the following ratio R such that

Take the natural logarithm of both sides


Stirling's Approximation says

similarly


For Large

If

Then

or

as a result




In binomial distributions

for this problem

or


= probability of exactly heads AND tails after flipping the coin N times (N is and even number and s is an integer).

If we let and realize that for a binomial distributions

Then


So when N gets big the Gaussian distribution is a good approximation to the Binomianl

Gaussian approximation to Poisson when

= Poisson probability distribution

substitute



Stirling's Approximation when




: if Note:


another mathematical identity


if then

In the Poisson distribution

replacing dummy variable x with r -

= Gaussian distribution when

Integral Probability (Cumulative Distribution Function)

The Poisson and Binomial distributions are discrete probability distributions (integers).

The Gaussian distribution is our first continuous distribution as the variables are real numbers. It is not very meaningful to speak of the probability that the variate (x) assumes a specific value.

One could consider defining a probability element which is really an integral over a finite region such that

The advantage of this definition becomes apparent when you are interested in quantifying the probability that a measurement would fall outside a range .


The Cumulative Distribution Function (CDF), however, is defined in terms of the integral from the variates min value

Probability that you measure a value less than or equal to
discrete CDF example

The probability that a student fails this class is 7.3%.

What is the probability more than 5 student will fail in a class of 32 students?

Answ:

= 8%


There is an 8% probability that 5 or more students will fail the class

2 SD rule of thumb for Gaussian PDF

In the above example you calculated the probability that more than 5 student will fail a class. You can extend this principle to calculate the probability of taking a measurement which exceeds the expected mean value.

One of the more common consistency checks you can make on a sample data set which you expect to be from a Gaussian distribution is to ask how many data points appear more than 2 S.D. () from the mean value.


The CDF for this is


Let


The above integral can be done numerically by expanding the exponential in a power series

The probability is one which you can compute.

Below is a table representing the cumulative probability for events to occur outside and interval of in a Gaussian distribution


1
2
3
4


TF Error CDF Gauss.png

Cauchy/Lorentzian/Breit-Wigner Distribution

In Mathematics, the Cauchy distribution is written as

= Cauchy-Lorentian Distribution
Note; The probability does not fall as rapidly to zero as the Gaussian. As a result, the Gaussian's central peak contributes more to the area than the Lorentzian's.

This distribution happens to be a solution to physics problems involving forced resonances (spring systems driven by a source, or a nuclear interaction which induces a metastable state).

= Breit-Wigner distribution
mass resonance
FWHM
= uncertainty principle
lifetime of resonance/intermediate state particle


A Beit-Wigner function fit to cross section measured as a function of energy will allow one to evaluate the rate increases that are produced when the probing energy excites a resonant state that has a mass and lasts for the time derived from the Half Width .

mean

Mean is not defined

Mode = Median = or

Variance

The variance is also not defined but rather the distribution is parameterized in terms of the Half Width


Let

Then


The above integral does not converge for large z [large deviations ] . The width of the distribution is instead characterized by = FWHM

Landau

where is any positive real number.

To simplify computation it is more convenient to use the equivalent expression


The above distribution was derived by Landau (L. Landau, "On the Energy Loss of Fast Particles by Ionization", J. Phys., vol 8 (1944), pg 201 ) to describe the energy loss by particles traveling through thin material ( materials with a thickness on the order of a few radiation lengths).

Bethe-Bloch derived an expression to determine the AVERAGE amount of energy lost by a particle traversing a given material assuming several collisions which span the physical limits of the interaction.

For the case of thin absorbers, the number of collisions is so small that the central limit theorem used to average over several collision doesn't apply and there is a finite possibility of observing large energy losses.

As a result one would expect a distribution which is Gaussian like but with a "tail" on the side of the distribution.

Gamma

where


The distribution is used for "waiting time" models. How long do you need to wait for a rain storm, how long do you need to wait to die,...

Climatologists use this for predicting how rain fluctuates from season to season.

If integer then the above distribution is a sum of independent exponential distributions

Mean

Variance

Properties

Beta

Mean

Variance

Exponential

The exponential distribution may be used to describe the processes that are in between Binomial and Poisson (exponential decay)


Mean

Variance

Skewness and Kurtosis

Distributions may also be characterized by how they look in terms of Skewness and Kurtosis

Skewness

Measures the symmetry of the distribution


Skewness =

where

The higher the number the more asymmetric (or skewed) the distribution is. The closer to zero the more symmetric.


A negative skewness indicates a tail on the left side of the distribution. Positive skewness indicates a tail on the right.

Kurtosis

Measures the "pointyness" of the distribution

Kurtosis =

where



K=3 for Normal Distribution

In ROOT the Kurtosis entry in the statistics box is really the "excess kurtosis" which is the subtraction of the kurtosis by 3

Excess Kurtosis =

In this case a Positive excess Kurtosis will indicate a peak that is sharper than a gaussian while a negative value will indicate a peak that is flatter than a comparable Gaussian distribution.


ForeErrAna Gaus-Cauchy SkeKurt.gifForeErrAna Gaus-Landau SkeKurt.gifForeErrAna Gaus-gamma SkeKurt.gif

[1] Forest_Error_Analysis_for_the_Physical_Sciences