Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Practical data analysis Large Number Theorems Width of a - - PowerPoint PPT Presentation
Practical data analysis Large Number Theorems Width of a - - PowerPoint PPT Presentation
Practical data analysis References Variability Probability Distributions Practical data analysis Large Number Theorems Width of a distribution Doru Constantin and Guillaume Tresset Sampling Chi-squared doru.constantin@u-psud.fr
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
References I
◮ Barlow, R. J. (1993).
Statistics: A Guide to the Use of Statistical Methods in the Physical Sciences. Chichester, England; New York: Wiley.
◮ Bevington, P. R. (1969).
Data Reduction and Error Analysis for the Physical Sciences. New York: McGraw-Hill.
◮ Bevington, P. R. and K. Robinson (2003).
Data Reduction and Error Analysis for the Physical Sciences (3 ed.). New York: McGraw-Hill.
◮ Bohm, G. and G. Zech (2010).
Introduction to Statistics and Data Analysis for Physicists. Hamburg: Verlag Deutsches Elektronen-Synchrotron. Freely available online from http://www-library.desy.de/preparch/books/ vstatmp_engl.pdf
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
References II
◮ Drosg, M. (2009).
Dealing with Uncertainties (2 ed.). Springer.
◮ Feller, W. (1968).
An Introduction to Probability Theory and Its Applications (3rd edition ed.). New York: Wiley.
◮ Grinstead, C. M. and J. L. Snell (1997).
Introduction to Probability (2 ed.). American Mathematical Society. Freely available online from http://www.dartmouth.edu/~chance/
◮ Hughes, I. G. and T. P. A. Hase (2010).
Measurements and their Uncertainties. Oxford: Oxford University Press. Short and very legible introduction.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
References III
◮ Jaynes, E. T. (2003).
Probability Theory – The Logic of Science. Cambridge: Cambridge University Press.
◮ Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery
(1992). Numerical Recipes in C: The Art of Scientific Computing (2 ed.). Cambridge: Cambridge University Press.
◮ Taylor, J. R. (1997).
An Introduction to Error Analysis (2 ed.). Sausalito: University Science Books.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Variability
- 1. When measuring the height of all adult males in a
certain town, one finds 177 ± 5 cm.
- 2. The charge of the electron is
(1.602176565 ± 0.000000035) × 10−19 C.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
The meaning of probability
Casting a die:
- 1. Out of a large number of trials, each face will come
- n top about 1 in 6 times.
- 2. Our state of knowledge gives us no reason to prefer
- ne of the faces over the others.
Each face has a 1/6 probability of coming up.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Random variables
◮ A random variable “is simply an expression whose
value is the outcome of a particular experiment” (Grinstead & Snell, 1997). It takes values in a certain domain Ω.
◮ This domain (or sample space) can be discrete,
Ω = {ω1, ω2, . . . ωk, . . .} ⊂ Zn (finite or countably infinite) or continuous Ω ⊂ Rn
◮ The elements of the sample space (ωk or x ∈ Rn) are
called outcomes. Subsets of Ω are called events.
◮ We introduce a probability distribution,
characterized by a distribution function m. In the discrete case, this function satisfies: m(ω) ≥ 0, ∀ω ∈ Ω
- ω∈Ω m(ω) = 1
The probability of an event E is defined as : P(E) =
ω∈E m(ω).
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Continuous distributions
Let X be a continuous real-valued random variable. A density function for X is a function f : Ω → R such that P(a ≤ X ≤ b) = b
a
f(x)dx, ∀ a, b ∈ R. ∀E ⊂ R P(X ∈ E) =
- E
f(x)dx. P([x, x + dx]) = f(x)dx f(x)dx is the probability of the outcome x The cumulative distribution function of X is: F(x) = P(X ≤ x) = x
−∞
f(t)dt, with d dxF(x) = f(x)
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Central tendency
Figure: Log-normal distribution with parameters µ = 0 and σ = 0.25 (solid line) and σ = 1 (dashed line). The mean (blue), median (green) and mode (red) are shown for both curves.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Spread
Q1 Q3 IQR Median Q3 + 1.5 × IQR Q1 − 1.5 × IQR −0.6745σ 0.6745σ 2.698σ −2.698σ 50% 24.65% 24.65% 68.27% 15.73% 15.73% −4σ −3σ −2σ −1σ 0σ 1σ 3σ 2σ 4σ −4σ −3σ −2σ −1σ 0σ 1σ 3σ 2σ 4σ −4σ −3σ −2σ −1σ 0σ 1σ 3σ 2σ 4σ
Figure: Boxplot details
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Higher-order moments
γ1 = X − µ σ 3 skewness; γ2 = X − µ σ 4 − 3 kurtosis
Graphics by MarkSweep. Licensed under Public domain via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Uniform
◮ All outcomes have equal
probability
◮ U(x; a, b) =
1 b−a
for x ∈ [a, b]
- therwise
◮ µ = 1
2(a + b), m = 1 2(a + b)
M = any value in [a, b].
◮ σ2 =
1 12(b − a)2, γ1 = 0, γ2 = −6/5
◮ One cannot have a uniform
distribution over an infinite domain (discrete or continuous)!
1 b− a
a b x
f (x)
/ / 4 _p
a b x
1 F (x)
/ / 4
Graphics by IkamusumeFan. Licensed under CCA-SA 3.0 via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Binomial
◮ Number k of successes in a
sequence of n independent yes/no experiments (Bernoulli trials), each of which yields success with probability p.
◮ B(k; n, p) = Ck
n pk(1 − p)n−k;
k ∈ {0, 1, . . . , n}
◮ µ = np, m = np or np
M = (n + 1)p or (n + 1)p − 1.
◮ σ2 = np(1 − p),
γ1 =
1−2p
√
np(1−p),
γ2 = 1−6p(1−p)
np(1−p)
◮ k is the variable, n and p are
parameters.
10 20 30 40 p=0.5 and n=20 p=0.7 and n=20 p=0.5 and n=40
/ /
Graphics by Tayste. Licensed under Public domain via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Normal
◮ Very widely encountered. ◮ N(x; µ, σ) =
1 σ √ 2π e− (x−µ)2
2σ2 ;
x ∈ R
◮ X = m = M = µ
- X2
= σ2, γ1 = 0, γ2 = 0
0.8 0.6 0.4 0.2 0.0 −5 −3 1 3 5
x
1.0 −1 2 4 −2 −4 0,
μ=
0,
μ=
0,
μ=
−2,
μ=
2
0.2,
σ =
2
1.0,
σ =
2
5.0,
σ =
2
0.5,
σ =
/ / 4 i
x
0.8 0.6 0.4 0.2 0.0 1.0 −5 −3 1 3 5 −1 2 4 −2 −4 0,
μ=
0,
μ=
0,
μ=
−2,
μ=
2
0.2,
σ =
2
1.0,
σ =
2
5.0,
σ =
2
0.5,
σ =
/ / 4 i
Graphics by Inductiveload. Licensed under Public domain via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Poisson
◮ Probability of a given number of
independent events k occurring in a fixed interval with a known average rate.
◮ P(k; λ) = λk
k ! e−λ; k ∈ N, λ ∈ R+
◮ µ = λ, m ≃ ⌊λ + 1/3 − 0.02/λ⌋
M = ⌈λ⌉ − 1, ⌊λ⌋
◮ σ2 = λ,
γ1 = λ−1/2, γ2 = λ−1
◮ Can be seen as the limit of a
binomial distribution for large n: P(k; λ = np) ≃ B(k; n, p)
◮ Approaches N for large λ:
P(k; λ) ≃ N(x = k; µ = λ, σ2 = λ)
Graphics by Skbkekas. Licensed under CCA 3.0 via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Lorentzian
◮ Shape of resonance peaks. Also
named after Cauchy (in mathematics) and Breit and Wigner (in spectroscopy)
◮ L(x; x0, γ) =
1 πγ
- 1+
x−x0
γ
2;
x ∈ R, x0 ∈ R, γ ∈ R+
◮ m = M = x0 ◮ No µ or higher moments!
Graphics by Skbkekas. Licensed under CCA 3.0 via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
The law of large numbers
Statement [Feller 1968, Vol. I, Chapter X, Eq. (1.2)] Let Xk be a sequence of mutually independent random variables with a common distribution. If the expectation µ = E(Xk) exists, then for every ǫ > 0, as n → ∞. P
- X1 + . . . + Xn
n − µ
- > ǫ
- → 0
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
The central limit theorem
Statement [Feller 1968, Vol. I, Chapter X, Eq. (1.3)] Let Xk be a sequence of mutually independent random variables with a common distribution. Suppose that µ = E(Xk) and σ2 = Var(Xk) exist and let Sn = X1 + . . . + Xn. Then for every fixed β P Sn − nµ σ √n < β
- → N(β)
where the normal (cumulative) distribution function N(β) = 1 √ 2π x
−∞
exp
- −y2
2
- dy = 1
2
- 1 + erf
- x
√ 2
- .
Weak convergence: ∀x ∈ R, lim
n→∞ Fn(x) = F(x)
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Sum of variables and convolution
The sum of two random variables: Z = X + Y fZ(z) = ∞
−∞
dx fX(x)fY(z − x) = fX ∗ fY Convolution theorem: ˜ fZ(q) = ˜ fX(q)˜ fY(q)
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Standard deviation and width
We are usually interested in σ as a measure of the HWHM!
◮ Gaussian:
X2 = σ HWHM = σ √ 2 ln 2
◮ Lorentzian:
X2 =? HWHM = γ N(x; 0, σ)
F
=⇒ N(q; 0, 1/σ) ∼ exp[−(qσ)2] L(x; 0, γ)
F
=⇒ exp(−|q|γ) For the sum: σsum =
- σ2
1 + σ2 2
γsum = γ1 + γ2
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Sampling
Estimate the population parameters µ and σ by taking a sample of n measurements x1, x2, . . . , xn followed by computing the sample mean ¯ x and sample variance s2: ¯ x = 1 n
n
- i=1
xi s2 = 1 n
n
- i=1
(xi − ¯ x)2
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
The relevant distribution
1.0 0.8 0.6 0.4 0.2 0.0 p(R) 50 40 30 20 10
R [nm]
Schulz spheres 〈R〉 = 13.5 nm σ/〈R〉 = 0.3 Number Volume Volume squared
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Sample statistics – the mean
¯ x = µ
- (¯
x − µ)2 = 1 n
n
- i=1
xi − µ
2
= 1 n2
n
- i=1
(xi − µ)
2
= 1 n2
n
- i=1
- (xi − µ)2
+ 2 n2
n
- i=1
n
- j=i+1
- (xi − µ)(xj − µ)
- = σ2
n Standard error of the mean SEM = (¯ x − µ)2 = σ √n
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Sample statistics – the variance
- s2
=
- 1
n
n
- i=1
(xi − ¯ x)2
- = 1
n
n
- i=1
(xi − µ) − (¯ x − µ)2 = 1 n
n
- i=1
- (xi − µ)2
− 2 n
n
- i=1
(xi − µ)(¯ x − µ) + 1 nn
- (¯
x − µ)2
- σ2/n
= σ2 − 2 n
- (¯
x − µ)
n
- i=1
(xi − µ)
- n(¯
x−µ)
- + σ2
n = σ2 − 2σ2 n + σ2 n =⇒
- s2
= n − 1 n σ2
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Estimators
◮ Definition: Estimator ˆ
a of the property a of the parent population.
◮ Consistency:
lim
n→∞ ˆ
a = a
◮ Lack of bias:
ˆ a = a
◮ Efficiency:
- (a − ˆ
a)2 is small.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Confidence intervals
−2σ −1σ 1σ −3σ 3σ µ 2σ 34.1% 34.1% 13.6% 2.1% 13.6% 0.1% 0.1% 2.1%
Two-sided confidence intervals for the normal distribution:
◮ µ − σ, µ + σ
C ≃ 68%
◮ µ − 2σ, µ + 2σ
C ≃ 95%
◮ µ − 3σ, µ + 3σ
C ≃ 99%
Graphics by Mwtoews. Licensed under CCA 2.5 via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Chi-squared distribution
The chi-squared distribution with ν degrees of freedom is the distribution of a sum of the squares of ν independent standard normal random variables: Q =
ν
- j=1
X2
j
with Xj ∼ N(0, 1) fQ(x; ν) =
- 1
2ν/2Γ(ν/2)xν/2−1 exp(−x/2)
x ≥ 0
- therwise
X1 X2 X3 O √Q
X
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Constraints
The constraint
j δj = 0 imposes a linear relation on the
normalized variables:
j σjXj = 0, so that X is contained in the
ν − 1 hyperplane perpendicular to the vector σ = (σ1, σ2, . . . , σν)
X1 X2 X3 O √Q
σ
X ν-dimensional space (ν-1)-dimensional hyperplane
Figure: Geometrical visualization of the linear constraint X · σ = 0.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Definitions
Random and systematic errors (this lecture)
◮ Random (or statistical) errors are those that can be reduced
by increasing the sample size.
◮ Systematic errors are those that are not random.
Type A and B components of uncertainty (GUM 2008, § 0.7)
◮ type A components of uncertainty are those evaluated by
statistical methods (analysis of series of observations).
◮ type B are those evaluated by other means.
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Length measurements
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Invar and elinvar
◮ Discovered by
Charles-Édouard Guillaume
◮ Nobel Prize in Physics in
1920
◮ Invar: low temperature
expansion coefficient
◮ Elinvar: low temperature
variation of the elastic coefficient
/ / 4 r ph
Portrait photo by A. B. Lagrelius & Westphal. Licensed under Public domain via Wikimedia Commons Graph by RicHard-59. Licensed under CC BY-SA 3.0 via Wikimedia Commons
Practical data analysis References Variability Probability Distributions Large Number Theorems Width of a distribution Sampling Chi-squared distribution Errors
Photomultiplier tube
Response as a function of light flux intensity
Photomultiplier tubes basics - 15
Tel: +33 (0)5 55 86 37 00 Fax: +33 (0)5 55 86 37 74 (mA) Ia
- r
Qa (pC) 240 200 160 120 80 40 3 4 5 6 2 1
Φ
Fig.23 Typical current or charge linearity characteristics
- f a PMT operating from a supply with type B voltage
division (photon flux Φ in arbitrary units). To avoid these, the measurement must be made quickly and with a constant mean anode current not exceeding a few microamperes. The measurement should result in determining the anode current at which space charge limiting starts to become evident, avoiding all other causes of linearity limiting. Figure 23 shows a typical linearity curve, in which a slight
- verlinearity appears before saturation. Such overlinearity is
- ften observed with voltage dividers designed for delaying the
- nset of saturation at high current levels. It can be corrected
by adjusting the voltages of the stages immediately preceding the last, but at the cost of lowering the current threshold beyond which saturation occurs. Several methods to measure linearity are described in the Photonis application book).
Stability
The term stability is used to describe the relative constancy of anode sensitivity with time, temperature, mean current, etc. The most important departures from constancy are:
- long-term drift, which is a time-dependent variation of gain
under conditions of constant illumination,
- short-term shift, which is a variation of gain following a
change in mean current.
Long-term drift
Two modes of long-term drift can be distinguished, according to whether the mean anode current is high or low.
High-current drift; operating life.
Certain more or less irreversible effects are observable at mean anode currents larger than about 10 µA. After long storage (e.g. a few months), a photomultiplier exhibits a large drift of gain for the first one or two days of operation. For some thousands of hours after that the gain is relatively stable, then it slowly decreases as a function of the total charge handled, Fig.24. The rate of these variations varies roughly as the anode current of the tube.
- 20
G G (%) 20 40 initial aging Ia = 30 µA t (h) 10 10 10 10 1 10
4 3 2
interruption for a few days
- 1
Fig.24 Relative gain variation of a PMT operating at high average current. Operating life, defined as the time required for anode sensitivity to be halved, appears to be a function of the total charge
- delivered. Values of 300 to 1000 coulombs are typical. For
an XP2012, this means e.g. 30 µA for 5000 h. If the incident flux is reduced (by, say, 90%) or cut off completely, or if the supply voltage is switched off for several days, the following sequence can be observed when the original operating conditions are restored: first, a certain recovery of sensitivity accompanied by a renewed initial drift; then, a tendency to catch up fairly quickly with the slow decline of sensitivity at the point at which it was interrupted. Figure 24 illustrates the relative gain variation of a photomultiplier operating at a mean anode current of 30 µA. The initial drift, which can be considered an ageing period, is between 20% and 40%. The duration of the ageing period depends on the anode current; at 10 µA it is about 24 hours. As long as the mean current does not fall below about 100 nA, ageing is still observable though very slow. In most cases, if the gain is high and the cathode current low, the variations of anode sensitivity reflect variations of gain due to changes in the surface state of the dynodes. When the mean anode current is only a few microamperes, total charge delivered is no longer the decisive factor for
- perating life. Other effects, such as helium migration through
the glass or internal migration and diffusion balances, determine the end of useful life, which is then measured in years and is independent of the mode of operation. The experience of many users indicates that continuous, uninterrupted operation results in better long-term stability of performance characteristics than storage.
Low-current drift
When a photomultiplier is switched on and subjected to more
- r less constant illumination, its gain changes over the first
few hours or days (Fig.25). The amount of change differs from type to type and even from one specimen to another
- f the same type. In most cases, though, the rate of change
quickly decreases to a few per cent a month, and the higher the current the quicker the gain stabilizes. It is sometimes worthwhile to speed the process by operating the tube initially at a current up to ten times higher than that expected in the intended application. It is also advisable to leave the tube switched on even when it is idle.
Graphics from Photomultiplier tubes basics by Photonis.