Moments and moment-generating function #
Main definitions #
- ProbabilityTheory.moment X p μ:- pth moment of a real random variable- Xwith respect to measure- μ,- μ[X^p]
- ProbabilityTheory.centralMoment X p μ:- pth central moment of- Xwith respect to measure- μ,- μ[(X - μ[X])^p]
- ProbabilityTheory.mgf X μ t: moment-generating function of- Xwith respect to measure- μ,- μ[exp(t*X)]
- ProbabilityTheory.cgf X μ t: cumulant-generating function, logarithm of the moment-generating function
Main results #
- ProbabilityTheory.IndepFun.mgf_add: if two real random variables- Xand- Yare independent and their moment-generating functions are defined at- t, then- mgf (X + Y) μ t = mgf X μ t * mgf Y μ t
- ProbabilityTheory.IndepFun.cgf_add: if two real random variables- Xand- Yare independent and their cumulant-generating functions are defined at- t, then- cgf (X + Y) μ t = cgf X μ t + cgf Y μ t
- ProbabilityTheory.measure_ge_le_exp_cgfand- ProbabilityTheory.measure_le_le_exp_cgf: Chernoff bound on the upper (resp. lower) tail of a random variable. For- tnonnegative such that the cumulant-generating function exists,- ℙ(ε ≤ X) ≤ exp(- t*ε + cgf X ℙ t). See also- ProbabilityTheory.measure_ge_le_exp_mul_mgfand- ProbabilityTheory.measure_le_le_exp_mul_mgffor versions of these results using- mgfinstead of- cgf.
Moment of a real random variable, μ[X ^ p].
Instances For
Central moment of a real random variable, μ[(X - μ[X]) ^ p].
Equations
Instances For
Moment-generating function of a real random variable X: fun t => μ[exp(t*X)].
Instances For
Cumulant-generating function of a real random variable X: fun t => log μ[exp(t*X)].
Equations
- ProbabilityTheory.cgf X μ t = Real.log (ProbabilityTheory.mgf X μ t)
Instances For
Alias of ProbabilityTheory.exp_cgf.
The moment-generating function is monotone in the random variable for t ≥ 0.
The moment-generating function is antitone in the random variable for t ≤ 0.
This is a trivial application of IndepFun.comp but it will come up frequently.
Chernoff bound on the upper tail of a real random variable.
Chernoff bound on the lower tail of a real random variable.
Chernoff bound on the upper tail of a real random variable.
Chernoff bound on the lower tail of a real random variable.