Lebesgue Integration
Integration by slicing the output into flat levels instead of chopping the input, so wild functions and limits behave.
Why Does This Exist?
Riemann sums fail exactly where ML needs them: limits of functions, expectations of discontinuous losses, indicators of rare events. The Dirichlet function on rationals and elsewhere has no Riemann integral on , yet its Lebesgue integral is because rationals have measure zero.
Lebesgue integration partitions the range, not the domain. Group points by output height, measure each group, multiply height by measure, and add. Limits then pass through under mild control, which is what expectation needs.
This page defines the integral. The ruler behind it is Lebesgue measure, and the limit theorems are in convergence theorems.
The one idea you need first
A simple function takes finitely many values: with measurable . Its integral is . General integrals are suprema of simple ones below .
Think of It Like This
Counting coins by denomination
Riemann counts a cash drawer left to right, adding each coin as found. Lebesgue sorts coins into piles by value first, counts each pile, then multiplies value by count.
Sorting is grouping by output level. Counting a pile is measuring its preimage. Where the analogy stops: coin values are discrete, while function heights form a continuum approximated by ever-finer simple stacks.
How It Actually Works
For non-negative measurable , . For general , split and subtract, requiring at least one part finite. Expectation is .
Linearity, monotonicity and triangle hold. Null sets do not matter: changing on measure zero leaves the integral unchanged.
Worked example
Integrate on irrationals and on rationals over . Simple functions below include on irrationals minus tiny rational cover, integral as covers shrink. Supremum . So . Riemann upper sums stay and lower sums , so no Riemann value exists.
Watch Out For
Integrating a non-measurable function
Symptom: formally writing for a Vitali-type construction and getting order-dependent answers. Fix: verify measurability (preimages of intervals are measurable); every function built from continuous pieces and limits in ML qualifies.
Splitting into positive and negative parts when both diverge
Symptom: for heavy-tailed differences, reported as . Fix: check first; if both parts diverge the integral is undefined, not zero.
The Quick Version
- Lebesgue sums height times measure of level sets, not width times height over domain chops.
- Simple functions are the building blocks; general integrals are suprema over them.
- Null sets are ignored, so Dirichlet on integrates to for the irrational part.
- Expectation is a Lebesgue integral against probability measure.
- Measurability and absolute integrability are the two checks before computing.