Moments and moment generating function #
Main definitions #
ProbabilityTheory.moment X p μ:pth moment of a real random variableXwith respect to measureμ,μ[X^p]ProbabilityTheory.centralMoment X p μ:pth central moment ofXwith respect to measureμ,μ[(X - μ[X])^p]ProbabilityTheory.mgf X μ t: moment generating function ofXwith 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 variablesXandYare independent and their mgfs are defined att, thenmgf (X + Y) μ t = mgf X μ t * mgf Y μ tProbabilityTheory.IndepFun.cgf_add: if two real random variablesXandYare independent and their cgfs are defined att, thencgf (X + Y) μ t = cgf X μ t + cgf Y μ tProbabilityTheory.measure_ge_le_exp_cgfandProbabilityTheory.measure_le_le_exp_cgf: Chernoff bound on the upper (resp. lower) tail of a random variable. Fortnonnegative such that the cgf exists,ℙ(ε ≤ X) ≤ exp(- t*ε + cgf X ℙ t). See alsoProbabilityTheory.measure_ge_le_exp_mul_mgfandProbabilityTheory.measure_le_le_exp_mul_mgffor versions of these results usingmgfinstead ofcgf.
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.