AI Glossary / Mathematics and optimization / Intermediate
Lebesgue integral
Definition
The Lebesgue integral is a way to add up a measurable function's values with respect to a measure. The measure specifies how much weight different sets receive. This framework includes integration by length and expectation under a probability distribution, and it handles many functions that ordinary Riemann integration cannot.
What it means
In elementary calculus, integration is often introduced through thin vertical rectangles under a curve. Lebesgue integration starts from a broader question: how much measure belongs to the sets on which a function takes particular values? This allows the domain to be more general than an interval on a number line.
The notation ∫f dμ means integrate f with respect to the measure μ. With ordinary length measure on the real line, it describes a familiar kind of total. With a probability measure, it describes an expected value. The same function can have different integrals under different measures because the weighting changes.
This is a mathematical definition, not a specific numerical integration algorithm. A computer may approximate an integral using samples, quadrature, or other methods, each with its own assumptions and errors.
How it works
Start with an indicator function: its integral is the measure of the set it indicates. A nonnegative simple function takes finitely many values on measurable sets, so its integral is a weighted sum of those values and set measures.
For a general nonnegative measurable function, define the integral through the supremum of integrals of nonnegative simple functions lying below it. The result may be infinite. For a signed function, separate positive and negative parts and subtract their integrals when this does not require the undefined expression infinity minus infinity.
A function is integrable in the usual finite sense when the integral of its absolute value is finite. This condition ensures that both positive and negative contributions are finite. Changing a function only on a set of measure zero leaves its integral unchanged.
Three practical examples
- Probability theory defines the expected loss of a prediction model as an integral with respect to the data distribution.
- A model with both discrete outcomes and continuous measurements can use one general expectation framework rather than treating them as unrelated kinds of averaging.
- Mathematical analysis of learning methods uses integration and convergence results to justify some exchanges of limits and expectations, when their required conditions hold.
Think of it this way
Think of grouping items by value and multiplying each value by the amount of weight assigned to its group. This captures the simple-function calculation. The analogy stops short of the full theory: the groups may be infinite measurable sets, and a limiting construction is needed for functions with more than finitely many values.
Worked example
Consider an original function on the interval [0,1]. Let f(x)=2 on [0,0.25), f(x)=5 on [0.25,0.75), and f(x)=1 on [0.75,1]. Under ordinary length measure, the three sets have measures 0.25, 0.5, and 0.25. Therefore ∫f dx=2×0.25+5×0.5+1×0.25=3.25.
Now change the measure. Suppose a random variable takes only the values 0.1 and 0.9, with probabilities 0.6 and 0.4. Then the integral of this same f under that probability distribution is E[f(X)]=2×0.6+1×0.4=1.6. The middle interval contributes nothing because this distribution assigns it no probability.
Next, modify f at the single point x=0.1, replacing its value 2 with 100. Under length measure, one point has measure zero, so the integral remains 3.25. Under the discrete probability measure, that point has mass 0.6, so the expectation changes to 100×0.6+1×0.4=60.4.
The lesson is that a measure-zero change must be judged relative to the measure actually being used. A point that is negligible for length need not be negligible for probability. Neither weighting is inherently the correct one for every application; the intended quantity determines which measure belongs in the calculation.
Illustrative case study
In a fictional reliability-modeling project, an analyst represents a process with a positive probability of no activity and a continuous distribution of positive activity levels. A reviewer notices that an expectation calculation includes only the continuous part and omits the point mass at zero.
The team writes the distribution and the quantity being averaged explicitly, then includes both parts with their proper weights. The hypothetical case shows the value of a common integration framework. It does not claim that all mixed distributions require advanced software or that a particular operational outcome improved.
Common misconceptions and mistakes
Do not assume every measurable function has a finite integral. Do not treat an infinity-minus-infinity expression as cancellation that produces a valid answer. Also, not every improper Riemann integral that converges conditionally is a finite Lebesgue integral.
For bounded Riemann-integrable functions on a bounded interval, the Lebesgue integral agrees with the Riemann integral. The broader framework does not change those established answers. Finally, interchanging a limit and an integral requires appropriate conditions; the existence of Lebesgue integration does not make every such interchange legitimate.
Business use
Most business users will encounter the idea through expected values rather than direct measure-theoretic calculations. The practical question is what weighting the average represents. A customer-weighted expectation, a transaction-weighted expectation, and a time-weighted expectation can answer different questions even when they involve related records.
When reviewing analytical work, ask which population or distribution supplies the weights, whether exceptional outcomes have been omitted, and whether the expected quantity is finite. These questions connect the mathematical definition to interpretation without requiring every user to implement the formal construction.
People also ask
Is a Lebesgue integral always an area?
No. It is integration with respect to a measure, which can represent probability or another weighting rather than geometric length.
Does one point always contribute zero?
No. It contributes zero under length measure, but a probability measure can assign a point positive mass.
Does it replace numerical integration?
No. It defines the quantity; numerical methods approximate that quantity when an exact calculation is unavailable.
Check your understanding
A probability distribution gives mass 0.7 to a point where f=3 and mass 0.3 to a point where f=8. What is ∫f dP?
Answer: 0.7×3+0.3×8=4.5.
Related terms
- Indicator function
- Simple function
- Expected value
- Measure
- measurable function
- probability measure
- Riemann integral
- almost everywhere
- dominated convergence
Learn next
Next, calculate the same simple function under two different probability distributions. Then study integrability and dominated convergence to understand why the existence of an expectation and the passage to a limit require separate checks.
More in Mathematics and optimization
- Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
- Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
- Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
- Σ-algebra
- Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
- Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.
Sources
Primary reference: Amir Dembo, Probability Theory: STAT310/MATH230, section 1.3.1 on Lebesgue integration and expectation: https://stanford.edu/~montanar/TEACHING/Stat310A/lnotes.pdf . The three-interval and two-point probability calculations are original illustrations.
Previous: Leave-one-out cross-validation Next: Legal Extension