<<

University of Rhode Island DigitalCommons@URI

Nonequilibrium Physics Course Materials

2015 04. Random Variables: Concepts Gerhard Müller University of Rhode Island, [email protected] Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License.

Follow this and additional works at: http://digitalcommons.uri.edu/ nonequilibrium_statistical_physics Part of the Physics Commons Abstract Part four of course materials for Nonequilibrium Statistical Physics (Physics 626), taught by Gerhard Müller at the University of Rhode Island. Entries listed in the table of contents, but not shown in the document, exist only in handwritten form. Documents will be updated periodically as more entries become presentable. Updated with version 2 on 5/3/2016.

Recommended Citation Müller, Gerhard, "04. Random Variables: Concepts" (2015). Nonequilibrium Statistical Physics. Paper 4. http://digitalcommons.uri.edu/nonequilibrium_statistical_physics/4

This Course Material is brought to you for free and open access by the Physics Course Materials at DigitalCommons@URI. It has been accepted for inclusion in Nonequilibrium Statistical Physics by an authorized administrator of DigitalCommons@URI. For more information, please contact [email protected]. Contents of this Document [ntc4]

4. Random Variables: Concepts

• Probability distributions [nln46] • Characteristic function, moments, and cumulants [nln47] • Cumulants expressed in terms of moments [nex126] • Generating function and factorial moments [nln48] • Multivariate distributions [nln7] • Transformation of random variables [nln49] • Sums of independent exponentials [nex127] • Propagation of statistical uncertainty [nex24] • Chebyshev’s inequality [nex6] • Law of large numbers [nex7] • Binomial, Poisson, and Gaussian distribution [nln8] • Binomial to [nex15] • De Moivre - Laplace limit theorem [nex21] • Central limit theorem [nln9] • Multivariate Gaussian distribution • Robust probability distributions [nex19] • Stable probability distributions [nex81] • [nln10] • Waiting time problem [nln11] • Pascal distribution [nex22] [nln46]

Experiment represented by events in a sample space: S = {A1,A2,...}.

Measurements represented by stochastic variable: X = {x1, x2,...}. Maximum amount of information experimentally obtainable is contained in the probability distribution: X PX (xi) ≥ 0, PX (xi) = 1. i Partial information is contained in moments,

n X n hX i = xi PX (xi), n = 1, 2,..., i or cumulants (as defined in [nln47]),

• hhXii = hXi ( value) • hhX2ii = hX2i − hXi2 () • hhX3ii = hX3i − 3hXihX2i + 2hXi3

2 2 The variance is the square of the : hhX ii = σX .

For continuous stochastic variables we have Z Z n n PX (x) ≥ 0, dxPX (x) = 1, hX i = dx x P (x).

In the literature PX (x) is often named ‘probability density’ and the term ‘distribution’ is used for Z x X 0 0 FX (x) = PX (xi) or FX (x) = dx PX (x ) −∞ xi

Z +∞ . ­ ikx® ikx Fourier transform: ΦX (k) = e = dx e PX (x). −∞

Attributes: ΦX (0) = 1, |ΦX (k)| ≤ 1.

Moment generating function:

" ∞ # ∞ Z +∞ X (ik)n X (ik)n Φ (k) = dx P (x) xn = hXni X X n! n! −∞ n=0 n=0

Z +∞ n ¯ n . n n d ¯ ⇒ hX i = dx x PX (x) = (−i) n ΦX (k)¯ . −∞ dk ¯k=0

Cumulant generating function:

∞ n n ¯ . X (ik) n n n d ¯ ln ΦX (k) = hhX ii ⇒ hhX ii = (−i) ln ΦX (k)¯ . n! dkn n=1 ¯k=0

. Cumulants in terms of moments (with ∆X = X − hXi): [nex126]

• hhXii = hXi • hhX2ii = hX2i − hXi2 = h(∆X)2i • hhX3ii = h(∆X)3i • hhX4ii = h(∆X)4i − 3h(∆X)2i2

Theorem of Marcienkiewicz: ln ΦX (k) can only be a polynomial if the degree is n ≤ 2.

• n = 1: ln ΦX (k) = ika ⇒ PX (x) = δ(x − a) µ 2 ¶ 1 2 1 (x − a) • n = 2: ln ΦX (k) = ika − bk ⇒ PX (x) = √ exp − 2 2πb 2b Consequence: any probability distribution has either one, two, or infinitely many non-vanishing cumulants. [nex126] Cumulants expressed in terms of moments

The characteristic function ΦX (k) of a probability distribution PX (x), obtained via Fourier trans- form as described in [nln47], can be used to generate the moments hXni and the cumulants hhXnii via the expansions

∞ ∞ X (ik)n X (ik)n Φ (k) = hXni, ln Φ (k) = hhXnii. X n! X n! n=0 n=1 Use these relations to express the first four cumulants in terms of the first four moments. The results are stated in [nln47]. Describe your work in some detail.

Solution: Generating function [nln48]

The generating function GX (z) is a representation of the characteristic func- tion ΦX (k) that is most commonly used, along with factorial moments and factorial cumulants, if the stochastic variable X is valued.

. x Definition: GX (z) = hz i with |z| = 1. Application to continuous and discrete (integer-valued) stochastic variables: Z x X n GX (z) = dx z PX (x),GX (z) = z PX (n). n

Definition of factorial moments:

m . 0 . hX if = hX(X − 1) ··· (X − m + 1)i, m ≥ 1; hX if = 0.

Function generating factorial moments:

∞ m m ¯ X (z − 1) m m d ¯ GX (z) = hX if , hX if = GX (z)¯ . m! dzm m=0 ¯z=1

Function generating factorial cumulants:

∞ m m ¯ X (z − 1) m m d ¯ ln GX (z) = hhX iif , hhX iif = ln GX (z)¯ . m! dzm m=1 ¯z=1

Applications:

B Moments and cumulants of the Poisson distribution [nex16] B Pascal distribution [nex22] B Reconstructing probability distributions [nex14] Multivariate Distributions [nln7]

Let X = (X1,...,Xn) be a random vector variable with n components.

Joint probability distribution: P (x1, . . . , xn). Marginal probability distribution: Z P (x1, . . . , xm) = dxm+1 ··· dxn P (x1, . . . , xn).

Conditional probability distribution: P (x1, . . . , xm|xm+1, . . . , xn).

P (x1, . . . , xn) = P (x1, . . . , xm|xm+1, . . . , xn)P (xm+1, . . . , xn).

m1 mn R m1 mn Moments: hX1 ··· Xn i = dx1 ··· dxn x1 ··· xn P (x1, . . . , xn). Characteristic function: Φ(k) = heik·Xi.

∞ m1 mn X (ik1) ··· (ikn) expansion: Φ(k) = hXm1 ··· Xmn i. m ! . . . m ! 1 n 0 1 n

∞ 0 m1 mn X (ik1) ··· (ikn) Cumulant expansion: ln Φ(k) = hhXm1 ··· Xmn ii. m ! . . . m ! 1 n 0 1 n (prime indicates absence of term with m1 = ··· = mn = 0).

Covariance matrix: hhXiXjii = h(Xi − hXii)(Xj − hXji)i. (i = j: , i 6= j: ).

hhXiXjii Correlations: C(Xi,Xj) = p . hhXiiihhXjii

Statistical independence of X1,X2: P (x1, x2) = P1(x1)P2(x2). Equivalent criteria for statistical independence:

m1 m2 m1 m2 • all moments factorize: hX1 X2 i = hX1 ihX2 i;

• characteristic function factorizes: Φ(k1, k2) = Φ1(k1)Φ2(k2);

m1 m2 • all cumulants hhX1 X2 ii with m1m2 6= 0 vanish.

If hhX1X2ii = 0 then X1,X2 are called uncorrelated. This property does not imply statistical independence. Transformation of Random Variables [nln49]

Consider two random variables X and Y that are functionally related: Y = F (X) or X = G(Y ). If the probability distribution for X is known then the probability distribu- tion for Y is determined as follows: Z PY (y)∆y = dxPX (x) y

Consider two random variables X1,X2 with a joint probability distribution

P12(x1, x2).

The probability distribution of the Y = X1 + X2 is then determined as Z Z Z PY (y) = dx1 dx2 P12(x1, x2)δ(y − x1 − x2) = dx1P12(x1, y − x1),

and the probability distribution of the random variable Z = X1X2 as Z Z Z dx1 PZ (z) = dx1 dx2 P12(x1, x2)δ(z − x1x2) = P12(x1, z/x1). |x1|

If the two random variables X1,X2 are statistically independent we can sub- stitute P12(x1, x2) = P1(x1)P2(x2) in the above .

Applications:

B Transformation of statistical uncertainty [nex24] B Chebyshev inequality [nex6] B Robust probability distributions [nex19] B Statistically independent or merely uncorrelated? [nex23] B Sum and product of uniform distributions [nex96] B Exponential distribution [nex79] B Generating exponential and Lorentzian random numbers [nex80] B From Gaussian to exponential distribution [nex8] B Transforming a pair of random variables [nex78] [nex127] Sums of independent exponentials

Consider n independent random variable X1,...,Xn with range xi ≥ 0 and identical exponential distributions, 1 P (x ) = e−xi/ξ, i = 1, . . . , n. 1 i ξ Use the transformation relation from [nln49], Z Z Z P2(x) = dx1 dx2 P1(x1)P1(x2)δ(x − x1 − x2) = dx1P1(x1)P1(x − x1), inductively to calculate the probability distribution Pn(x), n ≥ 2 of the stochastic variable

X = X1 + ··· + Xn.

2 Find the mean value hXi, the variance hhX ii, and the value xp where Pn(x) has its peak value.

Solution: [nex24] Transformation of statistical uncertainty.

From a given stochastic variable X with probability distribution PX (x) we can calculate the prob- ability distribution of the stochastic variable Y = f(X) via the relation Z PY (y) = dx PX (x)δ (y − f(x)) .

Show by systematic expansion that if PX (x) is sufficiently narrow and f(x) sufficiently smooth, then the mean values and the standard deviations of the two stochastic variables are related to each other as follows: 0 hY i = f(hXi), σY = |f (hXi)|σX .

Solution: [nex6] Chebyshev’s inequality

p 2 2 Chebyshev’s inequality is a rigorous relation between the standard deviation σX = hX i − hXi of the random variable X and the probability of deviations from the mean value hXi greater than a given magnitude a. σ 2 P [(x − hXi)2 > a2] ≤ X a Prove Chebyshev’s inequality starting from the following relation, commonly used for the trans- formation of stochastic variables (as in [nln49]): Z 2 PY (y) = dx δ(y − f(x))PX (x) with f(x) = (x − hXi) .

Solution: [nex7] Law of large numbers

Let X1,...,XN be N statistically independent random variables described by the same probability p 2 2 distribution PX (x) with mean value hXi and standard deviation σX = hX i − hXi . These ran- dom variables might represent, for example, a series of measurements under the same (controllable) conditions. The law of large numbers states that the uncertainty (as measured by the standard deviation) of the stochastic variable Y = (X1 + ··· + XN )/N is

σX σY = √ . N Prove this result.

Solution: Binomial, Poisson, and Gaussian Distributions [nln8]

Consider a set of N independent experiments, each having two possible out- comes occurring with given probabilities.

events A + B = S probabilities p + q = 1 random variables n + m = N

Binomial distribution: N! P (n) = pn(1 − p)N−n. N n!(N − n)! Mean value: hni = Np. Variance: hhn2ii = Npq. [nex15]]

In the following we consider two different asymptotic distributions in the limit N → ∞.

Poisson distribution: Limit #1: N → ∞, p → 0 such that Np = hni = a stays finite [nex15]. an P (n) = e−a. n!

Cumulants: hhnmii = a.

m Factorial cumulants: hhn iif = aδm,1. [nex16] Single : hni = hhn2ii = a.

Gaussian distribution: √ Limit #2: N  1, p > 0 with Np  Npq. 1  (n − hni)2  PN (n) = exp − . p2πhhn2ii 2hhn2ii

Derivation: DeMoivre-Laplace limit theorem [nex21]. Two : hni = Np, hhn2ii = Npq. Special case of central limit theorem [nln9]. [nex15] Binomial to Poisson distribution

Consider the for two events A, B that occur with probabilities P (A) ≡ p, P (B) = 1 − p ≡ q, respectively:

N! P (n) = pnqN−n, N n!(N − n)! where N is the number of (independent) experiments performed, and n is the stochastic variable that counts the number of realizations of event A. (a) Find the mean value hni and the variance hhn2ii of the stochastic variable n. (b) Show that for N → ∞, p → 0 with Np → a > 0, the binomial distribution turns into the Poisson distribution an P (n) = e−a. ∞ n!

Solution: [nex21] De Moivre−Laplace limit theorem.

Show that for large Np and large Npq the binomial distribution turns into the Gaussian distribution with the same mean value hni = Np and variance hhn2ii = Npq:

 2  N! n N−n 1 (n − hni) PN (n) = p q −→ PN (n) ' exp − . n!(N − n)! p2πhhn2ii 2hhn2ii

Solution: Central Limit Theorem [nln9]

The central limit theorem is a major extension of the law of large numbers. It explains the unique role of the Gaussian distribution in statistical physics.

Given are a large number of statistically independent random variables Xi, i = 1,...,N with equal probability distributions PX (xi). The only restriction on n n the shape of PX (xi) is that the moments hXi i = hX i are finite for all n.

Goal: Find the probability distribution PY (y) for the random variable Y = (X1 − hXi + ··· + XN − hXi)/N. N ! Z Z 1 X P (y) = dx P (x ) ··· dx P (x )δ y − [x − hXi] . Y 1 X 1 N X N N i i=1

Characteristic function: Z 1 Z Φ (k) ≡ dy eikyP (y),P (y) = dk e−ikyΦ (k). Y Y Y 2π Y

N ! Z Z k X ⇒ Φ (k) = dx P (x ) ··· dx P (x ) exp i [x − hXi] Y 1 X 1 N X N N i i=1 = Φ(¯ k/N)N , !  k  Z 1  k 2 Φ¯ = dx ei(k/N)(x−hXi)P (x) = exp − hhX2ii + ··· N X 2 N 1  k 2  k3  = 1 − hhX2ii + O , 2 N N 3 where we have performed a cumulant expansion to leading order.

 k2hhX2ii  k3 N  k2hhX2ii ⇒ Φ (y) = 1 − + O N−→→∞ exp − . Y 2N 2 N 3 2N N z where we have used limN→∞(1 + z/N) = e .

s  2  N Ny 1 −y2/2hhY 2ii ⇒ PY (y) = exp − = e 2πhhX2ii 2hhX2ii p2πhhY 2ii with variance hhY 2ii = hhX2ii/N

Note that regardless of the form of PX (x), the average of a large number of (independent)√ measurements of X will be a Gaussian with standard deviation σY = σX / N. [nex19] Robust probability distributions

Consider two independent stochastic variables X1 and X2, each specified by the same probability distribution PX (x). Show that if PX (x) is either a Gaussian, a Lorentzian, or a Poisson distribution,

n 1 −x2/2σ2 1 a a −a (i) PX (x) = √ e , (ii) PX (x) = , (iii) PX (x = n) = e . 2πσ π x2 + a2 n! then the probability distribution PY (y) of the stochastic variable Y = X1 + X2 is also a Gaussian, a Lorentzian, or a Poisson distribution, respectively. What property of the characteristic function ΦX (k) guarantees the robustness of PX (x)?

Solution: [nex81] Stable probability distributions

Consider N independent random variables X1,...,XN , each having the same probability distri- bution PX (x). If the probability distribution of the random variable YN = X1 + ··· + XN can be written in the form PY (y) = PX (y/cN +γN )/cN , then PX (x) is stable. The multiplicative constant 1/α must be of the form cN = N , where α is the index of the . PX (x) is strictly stable if γN = 0. Use the results of [nex19] to determine the indices α of the Gaussian and Lorentzian distributions, both of which are both strictly stable. Show that the Poisson distribution is not stable in the technical sense used here.

Solution: Exponential distribution [nln10]

Busses arrive randomly at a bus station. The average interval between successive bus arrivals is τ. f(t)dt: probability that the interval is between t and t + dt. Z ∞ 0 0 P0(t) = dt f(t ): probability that the interval is larger than t. t dP Relation: f(t) = − 0 . dt Z ∞ Normalizations: P0(0) = 1, dt f(t) = 1. 0 Z ∞ Mean value: hti ≡ dt tf(t) = τ. 0 Start the clock when a bus has arrived and consider the events A and B. Event A: the next bus has not arrived by time t. Event B: a bus arrives between times t and t + dt. Assumptions: 1. P (AB) = P (A)P (B) (statistical independence). 2. P (B) = cdt with c to be determined. ¯ ¯ Consequence: P0(t + dt) = P (AB) = P (A)P (B) = P0(t)[1 − cdt]. d ⇒ P (t) = −cP (t) ⇒ P (t) = e−ct ⇒ f(t) = ce−ct. dt 0 0 0 Adjust mean value: hti = τ ⇒ c = 1/τ. 1 Exponential distribution: P (t) = e−t/τ , f(t) = e−t/τ . 0 τ

Find the probability Pn(t) that n busses arrive before time t.

0 0 0 First consider the probabilities f(t )dt and P0(t − t ) of the two statistically independent events that the first bus arrives between t0 and t0 + dt0 and that no futher bus arrives until time t. Probability that exactly one bus arrives until time t: Z t 0 0 0 t −t/τ P1(t) = dt f(t )P0(t − t ) = e . 0 τ

Then calculate Pn(t) by induction. Z t n 0 0 0 (t/τ) −t/τ Poisson distribution: Pn(t) = dt f(t )Pn−1(t − t ) = e . 0 n! Waiting Time Problem [nln11]

Busses arrive more or less randomly at a bus station. Given is the probability distribution f(t) for intervals between bus arrivals. Z ∞ Normalization: dt f(t) = 1. 0 Z ∞ 0 0 Probability that the interval is larger than t: P0(t) = dt f(t ). t Z ∞ Z ∞ Mean time interval between arrivals: τB = dt tf(t) = dtP0(t). 0 0

Find the probability Q0(t) that no arrivals occur in a randomly chosen time interval of length t.

0 First consider the probability P0(t + t) for this to be the case if the interval 0 0 starts at time t after the last bus arrival. Then average P0(t + t) over the range of elapsed time t0. Z ∞ 0 0 ⇒ Q0(t) = c dt P0(t + t) with normalization Q0(0) = 1. 0 Z ∞ 1 0 0 ⇒ Q0(t) = dt P0(t ). τB t Passengers come to the station at random times. The probability that a passenger has to wait at least a time t before the next bus is then Q0(t): Probabilty distribution of passenger waiting times: d 1 g(t) = − Q0(t) = P0(t). dt τB Z ∞ Z ∞ Mean passenger waiting time: τP = dt tg(t) = dtQ0(t). 0 0

The relationship between τB and τP depends on the distribution f(t). In general, we have τP ≤ τB. The equality sign holds for the exponential distri- bution. [nex22] Pascal distribution.

Consider the quantum harmonic oscillator in thermal equilibrium at temperature T . The energy levels (relative to the ground state) are En = n~ω, n = 0, 1, 2,... (a) Show that the system is in level n with probability

n P (n) = (1 − γ)γ , γ = exp(−~ω/kBT ). P (n) is called Pascal distribution or . m m (b) Calculate the factorial moments hn if and the factorial cumulants hhn iif of this distribution. (c) Show that the Pascal distribution has a larger variance hhn2ii than the Poisson distribution with the same mean value hni.

Solution: