feat(Probability/Distributions/Exponential): add MGF, moments, and memoryless property#35504
feat(Probability/Distributions/Exponential): add MGF, moments, and memoryless property#35504JoaBjo wants to merge 3 commits intoleanprover-community:masterfrom
Conversation
…moryless property Add the main analytic results for the exponential distribution: - moment-generating function `mgf id (expMeasure r) t = r / (r - t)` for `t < r` - mean `∫ x, x ∂(expMeasure r) = r⁻¹` - variance `Var[id; expMeasure r] = r⁻¹ ^ 2` - `ℒp` membership for all `p` - tail probability `P(X > x) = exp (-(r * x))` - memoryless property `P(X > s + t | X > s) = P(X > t)`
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary cde919c85c
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Probability.Distributions.Exponential | 2584 | 2617 | +33 (+1.28%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.Probability.Distributions.Exponential |
33 |
Declarations diff
+ Iio_subset_integrableExpSet_id_expMeasure
+ integrable_exp_mul_expMeasure
+ integral_expMeasure_eq_integral_density
+ integral_exp_mul_expMeasure
+ integral_id_expMeasure
+ integral_sq_expMeasure
+ measure_Ioi_expMeasure
+ memLp_id_expMeasure
+ memoryless_expMeasure
+ mgf_id_expMeasure
+ variance_id_expMeasure
+ variance_integral_expMeasure
+ zero_mem_interior_integrableExpSet_id_expMeasure
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for scripts/declarations_diff.sh contains some details about this script.
No changes to technical debt.
You can run this locally as
./scripts/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
| lemma memoryless_expMeasure (hr : 0 < r) {s t : ℝ} (hs : 0 ≤ s) (ht : 0 ≤ t) : | ||
| (expMeasure r) {x | x > s + t} * ((expMeasure r) {x | x > s})⁻¹ = | ||
| (expMeasure r) {x | x > t} := by | ||
| rw [show {x : ℝ | x > s + t} = Ioi (s + t) by rfl, |
There was a problem hiding this comment.
These show ... by rfl can be exchanged for [Set.Ioi.eq_1], which I think would be cleaner!
There was a problem hiding this comment.
I might be misunderstanding you, but I don't think that works
feat(Probability/Distributions/Exponential): add MGF, moments, and memoryless property
Add the main analytic results for the exponential distribution:
mgf id (expMeasure r) t = r / (r - t)fort < r∫ x, x ∂(expMeasure r) = r⁻¹Var[id; expMeasure r] = r⁻¹ ^ 2ℒpmembership for allpP(X > x) = exp (-(r * x))P(X > s + t | X > s) = P(X > t)The MGF is computed by reducing to the known improper integral
∫ exp(c * x)onIoi,and integrability is deduced by contradiction from the positive closed-form value.
The mean and variance are computed via the Gamma function integral
∫₀^∞ x^(n-1) exp(-r x) dx = Γ(n) / rⁿ. The memoryless property follows fromthe exponential identity
exp(-(r(s+t))) = exp(-rt) * exp(-rs).