Skip to content

Comments

feat(Probability/Distributions/Exponential): add MGF, moments, and memoryless property#35504

Open
JoaBjo wants to merge 3 commits intoleanprover-community:masterfrom
JoaBjo:exponential-distribution
Open

feat(Probability/Distributions/Exponential): add MGF, moments, and memoryless property#35504
JoaBjo wants to merge 3 commits intoleanprover-community:masterfrom
JoaBjo:exponential-distribution

Conversation

@JoaBjo
Copy link

@JoaBjo JoaBjo commented Feb 18, 2026

feat(Probability/Distributions/Exponential): add MGF, moments, and memoryless 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)

The MGF is computed by reducing to the known improper integral ∫ exp(c * x) on Ioi,
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 from
the exponential identity exp(-(r(s+t))) = exp(-rt) * exp(-rs).


Open in Gitpod

…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)`
@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Feb 18, 2026
@github-actions
Copy link

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 awaiting-author tag, or another reason described in the Lifecycle of a PR.

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.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

PR summary cde919c85c

Import changes for modified files

Dependency changes

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 relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-measure-probability Measure theory / Probability theory label Feb 18, 2026
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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These show ... by rfl can be exchanged for [Set.Ioi.eq_1], which I think would be cleaner!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be misunderstanding you, but I don't think that works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-measure-probability Measure theory / Probability theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants