Gamma distributions over ℝ #
Define the gamma measure over the reals.
Main definitions #
gammaPDFReal: the functiona r x ↦ r ^ a / (Gamma a) * x ^ (a - 1) * exp (-(r * x))for0 ≤ xor0else, which is the probability density function of a gamma distribution with shapeaand rater(whenha : 0 < aandhr : 0 < r).gammaPDF:ℝ≥0∞-valued pdf,gammaPDF a r = ENNReal.ofReal (gammaPDFReal a r).gammaMeasure: a gamma measure onℝ, parametrized by its shapeaand rater.
The pdf of the gamma distribution depending on its scale and rate
Instances For
The pdf of the gamma distribution, as a function valued in ℝ≥0∞
Instances For
theorem
ProbabilityTheory.gammaPDF_eq
(a r x : ℝ)
:
gammaPDF a r x = ENNReal.ofReal (if 0 ≤ x then r ^ a / Real.Gamma a * x ^ (a - 1) * Real.exp (-(r * x)) else 0)
theorem
ProbabilityTheory.gammaPDF_of_nonneg
{a r x : ℝ}
(hx : 0 ≤ x)
:
gammaPDF a r x = ENNReal.ofReal (r ^ a / Real.Gamma a * x ^ (a - 1) * Real.exp (-(r * x)))
The gamma pdf is measurable.
The gamma pdf is strongly measurable
The gamma pdf is positive for all positive reals
The gamma pdf is nonnegative
@[simp]
The pdf of the gamma distribution integrates to 1
Measure defined by the gamma distribution
Instances For
theorem
ProbabilityTheory.cdf_gammaMeasure_eq_integral
{a r : ℝ}
(ha : 0 < a)
(hr : 0 < r)
(x : ℝ)
:
↑(cdf (gammaMeasure a r)) x = ∫ (x : ℝ) in Set.Iic x, gammaPDFReal a r x