Skip to content
AI360Xpert
Beta

Lebesgue Integration

Integration by slicing the output into flat levels instead of chopping the input, so wild functions and limits behave.

Lebesgue integration slices by height: flat simple functions stack to match the area under a curve
Lebesgue integration slices by height: flat simple functions stack to match the area under a curve

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 11 on rationals and 00 elsewhere has no Riemann integral on [0,1][0,1], yet its Lebesgue integral is 00 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: s=∑ck1Eks = \sum c_k \mathbf{1}_{E_k} with measurable EkE_k. Its integral is ∑ckm(Ek)\sum c_k m(E_k). General integrals are suprema of simple ones below ff.

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 ff, ∫f dm=sup⁡{∫s dm:0≤s≤f,s simple}\int f \, dm = \sup \{\int s \, dm : 0 \le s \le f, s \text{ simple}\}. For general ff, split f=f+−f−f = f^+ - f^- and subtract, requiring at least one part finite. Expectation is E[X]=∫X dP\mathbb{E}[X] = \int X \, dP.

Linearity, monotonicity and triangle ∣∫f∣≤∫∣f∣|\int f| \le \int |f| hold. Null sets do not matter: changing ff on measure zero leaves the integral unchanged.

Worked example

Integrate f=1f = 1 on irrationals and 00 on rationals over [0,1][0,1]. Simple functions below ff include s=1s = 1 on irrationals minus tiny rational cover, integral 0.99,0.999,0.99990.99, 0.999, 0.9999 as covers shrink. Supremum 11. So ∫f=1×m(irrationals)+0×m(rationals)=1\int f = 1 \times m(\text{irrationals}) + 0 \times m(\text{rationals}) = 1. Riemann upper sums stay 11 and lower sums 00, so no Riemann value exists.

Watch Out For

Integrating a non-measurable function

Symptom: formally writing ∫f\int f 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: ∞−∞\infty - \infty for heavy-tailed differences, reported as 00. Fix: check ∫∣f∣<∞\int |f| < \infty 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 [0,1][0,1] integrates to 11 for the irrational part.
  • Expectation is a Lebesgue integral against probability measure.
  • Measurability and absolute integrability are the two checks before computing.