Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceProbability & MeasureStochastic ModelsMarket MicrostructureGuide
Guide
Derivatives pricing0 / 17
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Options on dividend-paying stocks, indices, currencies and futures14Implied volatility and the volatility smile15Stochastic volatility and the Heston model16Static replication: Breeden–Litzenberger and Carr–Madan17Exotic options: barriers, Asians and digitals
Portfolio & risk0 / 12
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08The Fama–French factor models09Value at Risk and expected shortfall10Systemic risk and contagion11Portfolio constraints and the no-short-sales frontier12Estimating expected returns and covariances
Fixed income0 / 10
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Non-parallel curve moves and key-rate durations06Bond futures and the cheapest-to-deliver07Interest rate swaps08Callable bonds and negative convexity09Credit risk: default probabilities and credit spreads10Real rates, inflation and inflation-linked bonds
Corporate finance0 / 10
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04Project risk: sensitivity, scenarios and Monte Carlo NPV05The weighted average cost of capital06Capital structure and the Modigliani–Miller theorems07Dividends, payout policy and the dividend discount model08Discounted cash flow valuation09Relative valuation with multiples10Real options: the value of flexibility
Probability and measure0 / 13
01Measuring the size of sets02σ-algebras and Borel sets03Lebesgue measure and null sets04Measurable functions05The Lebesgue integral06Convergence theorems07Probability spaces and Kolmogorov's axioms08Random variables and their distributions09Expectation, variance and inequalities10Independence and product measures11Modes of convergence and the law of large numbers12Conditional probability and conditional expectation13Measure theory in option pricing
Stochastic models0 / 17
01Random walks and Brownian motion02The law of large numbers and the central limit theorem03Probability spaces, σ-algebras and random variables04Filtrations, adapted processes and stopping times05Conditional expectation and martingales06Properties of Brownian motion07The reflection principle and first passage times08The Brownian bridge09The Itô integral10Itô's lemma11Kolmogorov equations and the Feynman–Kac formula12Change of measure and Girsanov's theorem13Monte Carlo option pricing14Simulating SDEs: the Euler–Maruyama scheme15Correlated Brownian motions and multi-asset models16Mean reversion: Ornstein–Uhlenbeck and Vasicek17Jumps and the Merton jump-diffusion model
Market microstructure0 / 11
01Market makers and liquidity02The limit order book03Queue position and fill probability04Adverse selection and informed trading05The Glosten–Milgrom model06Measuring and decomposing the bid–ask spread07Informed trading and Kyle's lambda08Price impact and optimal execution09Inventory risk and quote skewing10Optimal quoting: the Avellaneda–Stoikov model11Market making profit and loss attribution
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guides/Probability and measure/01

Measuring the size of sets

Lesson 1 of 13 · 1 min read

People measure sets all the time. A bag of marbles is measured by counting them, a road by its length, a field by its area, a metal bar by its weight. These are four different ways of attaching a number to a collection of things, and they look nothing alike, yet they obey the same few rules. This lesson finds those rules, turns them into the definition of a measure, and explains why one of them, countable additivity, has to be stronger than it first looks. Everything else in this track is built on that definition. The lessons that follow ask which sets can be measured at all, how length itself is constructed, and how to add up values of a function the way we add up sizes of sets.

Four ways to measure a set

A set is a collection of things, called its elements. To measure a set is to attach a number to it that says how big it is. Four examples will be used throughout this track, so they are worth setting up carefully. In each of them there is an underlying set Ω\OmegaΩ that contains everything we may talk about, and a rule μ\muμ that takes a part AAA of Ω\OmegaΩ and returns the number μ(A)\mu(A)μ(A), read "mu of AAA".

Counting on the faces of a die. Let Ω={1,2,3,4,5,6}\Omega = \{1, 2, 3, 4, 5, 6\}Ω={1,2,3,4,5,6} and let μ(A)\mu(A)μ(A) be the number of faces in AAA. The even faces {2,4,6}\{2, 4, 6\}{2,4,6} have μ=3\mu = 3μ=3, and μ(Ω)=6\mu(\Omega) = 6μ(Ω)=6.

Length on the interval $[0, 1]$. Let Ω=[0,1]\Omega = [0, 1]Ω=[0,1] and let μ(A)\mu(A)μ(A) be the length of AAA. The interval [0.1,0.5][0.1, 0.5][0.1,0.5] has length 0.5−0.1=0.40.5 - 0.1 = 0.40.5−0.1=0.4. This measure is written λ\lambdaλ from now on.

Area in the unit square. Let Ω=[0,1]×[0,1]\Omega = [0, 1] \times [0, 1]Ω=[0,1]×[0,1] and let μ(A)\mu(A)μ(A) be the area of AAA. The whole square has area 1. A disc of radius 0.10.10.1 inside it has area π⋅0.12≈0.0314\pi \cdot 0.1^2 \approx 0.0314π⋅0.12≈0.0314, and the rectangle [0.2,0.6]×[0.1,0.4][0.2, 0.6] \times [0.1, 0.4][0.2,0.6]×[0.1,0.4] has area 0.4⋅0.3=0.120.4 \cdot 0.3 = 0.120.4⋅0.3=0.12.

Mass on a rod. Picture a thin rod of length 1 that gets thicker towards its right end. At position xxx the rod has density ρ(x)=2x\rho(x) = 2xρ(x)=2x, meaning mass per unit of length. A short piece of length Δ\DeltaΔ near position xxx then weighs about 2x Δ2x\,\Delta2xΔ, and adding up the pieces of a stretch [a,b][a, b][a,b] is the familiar integral

μ([a,b])=∫ab2x dx=b2−a2.\mu([a, b]) = \int_a^b 2x \, dx = b^2 - a^2.μ([a,b])=∫ab​2xdx=b2−a2.

The whole rod has mass 12−02=11^2 - 0^2 = 112−02=1. The left half [0,0.5][0, 0.5][0,0.5] has mass 0.250.250.25 and the right half [0.5,1][0.5, 1][0.5,1] has mass 0.750.750.75: the two halves have the same length, but the right half is three times as heavy.

In all four examples the number belongs to a set of positions and not to one position. The weight of a single point of the rod can be asked for, but the answer is 0; the interesting questions are about stretches, regions and groups of faces.

Rules every size obeys

What do counting, length, area and mass have in common? Only a short list of rules, and three of them are all that is needed.

Sizes are not negative: μ(A)≥0\mu(A) \ge 0μ(A)≥0. Without this rule a bigger set could be smaller than a part of itself.

The empty set has size 0: μ(∅)=0\mu(\emptyset) = 0μ(∅)=0. A set with no elements has nothing to count, no length, no area and no mass. This rule also follows from the next one whenever some set has a finite size, because a set AAA together with the empty set is still AAA, and the two are disjoint, which means they have no element in common. The next rule then gives μ(A)=μ(A)+μ(∅)\mu(A) = \mu(A) + \mu(\emptyset)μ(A)=μ(A)+μ(∅), which forces μ(∅)=0\mu(\emptyset) = 0μ(∅)=0. The rule is stated separately to rule out a silly rival that gives every set, even the empty one, the size ∞\infty∞.

Disjoint pieces add up: if AAA and BBB are disjoint, then

μ(A∪B)=μ(A)+μ(B).\mu(A \cup B) = \mu(A) + \mu(B).μ(A∪B)=μ(A)+μ(B).

This is the rule that makes a measure useful. On the die, the pieces {1,2}\{1, 2\}{1,2} and {5,6}\{5, 6\}{5,6} have sizes 2 and 2, and their union {1,2,5,6}\{1, 2, 5, 6\}{1,2,5,6} has size 4. For length, [0,0.2][0, 0.2][0,0.2] and [0.5,0.6][0.5, 0.6][0.5,0.6] have lengths 0.20.20.2 and 0.10.10.1, and together 0.30.30.3. On the rod, the halves [0,0.5][0, 0.5][0,0.5] and (0.5,1](0.5, 1](0.5,1] weigh 0.250.250.25 and 0.750.750.75, and together 111. Because of additivity, the size of a complicated set follows from the sizes of simple pieces that it can be cut into; without it, a size would be an arbitrary label on each set, and knowing the sizes of the parts would say nothing about the whole. By repeating the rule, it also holds for any finite number of pairwise disjoint sets.

The word "disjoint" matters. The sets [0,0.5][0, 0.5][0,0.5] and [0.3,0.8][0.3, 0.8][0.3,0.8] have lengths 0.50.50.5 and 0.50.50.5, but their union [0,0.8][0, 0.8][0,0.8] has length 0.80.80.8, not 111, because the stretch [0.3,0.5][0.3, 0.5][0.3,0.5] belongs to both and may be counted only once. The diameter of a set, the distance between its two farthest points, gives 000 to each of the single points {0.1}\{0.1\}{0.1} and {0.9}\{0.9\}{0.9} but 0.80.80.8 to the pair {0.1,0.9}\{0.1, 0.9\}{0.1,0.9}; it is not a measure in the sense of this lesson.

Consequences of additivity

The three rules have many consequences, and the first few come from one trick: cut a set into disjoint pieces and add. Below, all sets are taken from the collection of sets that is being measured, and it is assumed that this collection contains the unions, intersections and differences that appear. The next lesson, "σ-algebras and Borel sets", says exactly what the collection has to look like.

Monotonicity. Suppose A⊆BA \subseteq BA⊆B, so that AAA is a part of BBB. Then BBB is the union of AAA and the rest, B∖AB \setminus AB∖A, the elements of BBB that are not in AAA, and these two are disjoint:

μ(B)=μ(A)+μ(B∖A)≥μ(A).\mu(B) = \mu(A) + \mu(B \setminus A) \ge \mu(A).μ(B)=μ(A)+μ(B∖A)≥μ(A).

A part is never larger than the whole. If μ(A)\mu(A)μ(A) is finite, the same equation can be solved for the size of the rest:

μ(B∖A)=μ(B)−μ(A)(A⊆B, μ(A)<∞).\mu(B \setminus A) = \mu(B) - \mu(A) \qquad (A \subseteq B,\ \mu(A) < \infty).μ(B∖A)=μ(B)−μ(A)(A⊆B, μ(A)<∞).

The condition on μ(A)\mu(A)μ(A) is needed. The half-line A=[1,∞)A = [1, \infty)A=[1,∞) is part of B=[0,∞)B = [0, \infty)B=[0,∞), both have infinite length, and the rest B∖A=[0,1)B \setminus A = [0, 1)B∖A=[0,1) has length 1. The formula would read ∞−∞\infty - \infty∞−∞, which can be any number you like.

Inclusion–exclusion. Take two overlapping intervals, A=[0.1,0.5]A = [0.1, 0.5]A=[0.1,0.5] and B=[0.3,0.8]B = [0.3, 0.8]B=[0.3,0.8], with lengths μ(A)=0.4\mu(A) = 0.4μ(A)=0.4 and μ(B)=0.5\mu(B) = 0.5μ(B)=0.5. They overlap in A∩B=[0.3,0.5]A \cap B = [0.3, 0.5]A∩B=[0.3,0.5], of length 0.20.20.2. Cut the union into three disjoint pieces: the part only in AAA, the overlap, and the part only in BBB. Then

μ(A)=μ(A∖B)+μ(A∩B),μ(B)=μ(B∖A)+μ(A∩B).\mu(A) = \mu(A \setminus B) + \mu(A \cap B), \qquad \mu(B) = \mu(B \setminus A) + \mu(A \cap B).μ(A)=μ(A∖B)+μ(A∩B),μ(B)=μ(B∖A)+μ(A∩B).

Adding these two equations counts the overlap twice and the other two pieces once each. The union is exactly those three pieces, so

μ(A)+μ(B)=μ(A∪B)+μ(A∩B),that is,μ(A∪B)=μ(A)+μ(B)−μ(A∩B).\mu(A) + \mu(B) = \mu(A \cup B) + \mu(A \cap B), \qquad\text{that is,}\qquad \mu(A \cup B) = \mu(A) + \mu(B) - \mu(A \cap B).μ(A)+μ(B)=μ(A∪B)+μ(A∩B),that is,μ(A∪B)=μ(A)+μ(B)−μ(A∩B).

In words: adding the sizes of AAA and BBB counts the overlap twice, so it has to be subtracted once. With the numbers above, 0.4+0.5−0.2=0.70.4 + 0.5 - 0.2 = 0.70.4+0.5−0.2=0.7, which is the length of [0.1,0.8][0.1, 0.8][0.1,0.8]. The formula is valid when the sizes are finite. On the die, A={2,4,6}A = \{2, 4, 6\}A={2,4,6} and B={4,5,6}B = \{4, 5, 6\}B={4,5,6} have size 3 each and share the two faces {4,6}\{4, 6\}{4,6}, so their union {2,4,5,6}\{2, 4, 5, 6\}{2,4,5,6} has size 3+3−2=43 + 3 - 2 = 43+3−2=4.

Subadditivity. The overlap has a non-negative size, so inclusion–exclusion gives μ(A∪B)≤μ(A)+μ(B)\mu(A \cup B) \le \mu(A) + \mu(B)μ(A∪B)≤μ(A)+μ(B). For the intervals above, 0.7≤0.4+0.5=0.90.7 \le 0.4 + 0.5 = 0.90.7≤0.4+0.5=0.9. The size of a union is at most the sum of the sizes, with equality exactly when the overlap has size 0. This is often called the union bound, and repeating it extends it to any finite number of sets.

Countable additivity

Additivity as stated deals with two sets at a time, and therefore with any finite number of sets. Limits, however, involve infinitely many steps, and it turns out that the rule has to reach that far. Here is an example where infinitely many pieces appear naturally. Cut [0,1)[0, 1)[0,1) at 12\tfrac1221​, then cut what is left at 34\tfrac3443​, then at 78\tfrac7887​, and so on, always keeping the left piece. The kkk-th piece is

[ 1−21−k,  1−2−k),of length 2−k.\Big[\,1 - 2^{1-k},\; 1 - 2^{-k}\Big), \qquad \text{of length } 2^{-k}.[1−21−k,1−2−k),of length 2−k.

The first three pieces are [0,12)[0, \tfrac12)[0,21​), [12,34)[\tfrac12, \tfrac34)[21​,43​) and [34,78)[\tfrac34, \tfrac78)[43​,87​), with lengths 12\tfrac1221​, 14\tfrac1441​ and 18\tfrac1881​. After nnn pieces, finite additivity says that a total length of 1−2−n1 - 2^{-n}1−2−n has been used; for n=10n = 10n=10 that is 0.99900.99900.9990. The pieces never run out, and together they fill all of [0,1)[0, 1)[0,1), whose length is 1. Finite additivity says nothing about "all pieces together", yet the natural thing to ask is that the infinite sum 12+14+18+⋯=1\tfrac12 + \tfrac14 + \tfrac18 + \cdots = 121​+41​+81​+⋯=1 gives the length of the whole.

A measure is therefore required to be countably additive: for every sequence of pairwise disjoint sets A1,A2,A3,…A_1, A_2, A_3, \ldotsA1​,A2​,A3​,…, that is, a list in which there is a first set, a second set and so on,

μ(⋃k=1∞Ak)=∑k=1∞μ(Ak).\mu\Big(\bigcup_{k=1}^{\infty} A_k\Big) = \sum_{k=1}^{\infty} \mu(A_k).μ(k=1⋃∞​Ak​)=k=1∑∞​μ(Ak​).

Is the extra strength necessary, or is finite additivity enough? An example shows that it is not enough. For a set AAA of positive integers, count how many of its elements are among the first nnn integers and divide by nnn. If this fraction settles down to a limit as nnn grows, call the limit the natural density d(A)d(A)d(A). The even numbers have density 12\tfrac1221​: among the first 1,000 integers exactly 500 are even. The multiples of 3 have density 13\tfrac1331​. A single integer such as {7}\{7\}{7} has density 0, since 1/n1/n1/n tends to 0, while the set N\mathbb{N}N of all positive integers has density 1. For sets that have a density, disjoint pieces do add: the even and the odd numbers have densities 12\tfrac1221​ and 12\tfrac1221​, and together they have density 1.

So natural density follows the rules of the previous section, except that not every set has a density. It fails countable additivity badly. The set N\mathbb{N}N is the union of the countably many single-number sets {1},{2},{3},…\{1\}, \{2\}, \{3\}, \ldots{1},{2},{3},…, which are disjoint and each have density 0, but d(N)=1≠0+0+0+⋯d(\mathbb{N}) = 1 \ne 0 + 0 + 0 + \cdotsd(N)=1=0+0+0+⋯. A size like that cannot be trusted with limits: cutting a set into more and more pieces and adding their sizes may give a different answer from the size of the whole. This is why measure theory insists on countable additivity.

A measure takes a whole set as its input. The length of [0,1][0, 1][0,1] is not obtained by adding something attached to each point; in counting and in point masses it is, but in length, area and density it is not, since every single point has length 0.

The rule stops at countable families, and has to. The interval [0,1][0, 1][0,1] is the union of its points, and each point has length 0, but the length of [0,1][0, 1][0,1] is 1. A family of pieces that cannot be listed one after another, called uncountable, can add up to something that the sizes of the pieces do not predict. Countable additivity is the strongest form of the rule that length, area and mass satisfy.

The definition of a measure

Everything so far fits into one definition. A measure on a set Ω\OmegaΩ is a function μ\muμ, defined on a collection of subsets of Ω\OmegaΩ, whose values lie in [0,∞][0, \infty][0,∞], such that

  • μ(∅)=0\mu(\emptyset) = 0μ(∅)=0, and
  • μ\muμ is countably additive: μ(⋃kAk)=∑kμ(Ak)\mu\big(\bigcup_k A_k\big) = \sum_k \mu(A_k)μ(⋃k​Ak​)=∑k​μ(Ak​) for every sequence of pairwise disjoint sets A1,A2,…A_1, A_2, \ldotsA1​,A2​,… of the collection.

Non-negativity is built into the range [0,∞][0, \infty][0,∞], and finite additivity is a special case of the second rule: for disjoint AAA and BBB, take the sequence A,B,∅,∅,…A, B, \emptyset, \emptyset, \ldotsA,B,∅,∅,… and use the first rule on the empty sets,

μ(A∪B)=μ(A)+μ(B)+μ(∅)+μ(∅)+⋯=μ(A)+μ(B).\mu(A \cup B) = \mu(A) + \mu(B) + \mu(\emptyset) + \mu(\emptyset) + \cdots = \mu(A) + \mu(B).μ(A∪B)=μ(A)+μ(B)+μ(∅)+μ(∅)+⋯=μ(A)+μ(B).

The value ∞\infty∞ is allowed because it is needed. The counting measure of the positive integers is infinite, and so is the length of the whole real line. Arithmetic with it follows the obvious rule that ∞\infty∞ plus anything is ∞\infty∞, and a series of non-negative terms that does not converge has the sum ∞\infty∞.

The phrase "a collection of subsets" hides a real question: which sets get a size? When Ω\OmegaΩ is finite, the answer is simple, every subset. On [0,1][0, 1][0,1] it is not, and for the moment it is enough to know that the collection contains the intervals and everything that can be built from them by taking complements, differences and countable unions. The lesson "σ-algebras and Borel sets" turns this into a precise definition and shows why we cannot always allow every subset.

Examples of measures

The measures of the first section fit the definition, and there are others.

  • Counting measure. μ(A)\mu(A)μ(A) is the number of elements of AAA, and ∞\infty∞ if there are infinitely many. Countable additivity is clear, since the elements of a union of disjoint sets are counted once each.
  • Dirac measure. Fix a point xxx of Ω\OmegaΩ. The measure δx\delta_xδx​ puts all its mass at that one point: δx(A)=1\delta_x(A) = 1δx​(A)=1 if x∈Ax \in Ax∈A and δx(A)=0\delta_x(A) = 0δx​(A)=0 otherwise. On [0,1][0, 1][0,1], δ0.5([0.4,0.6])=1\delta_{0.5}([0.4, 0.6]) = 1δ0.5​([0.4,0.6])=1 and δ0.5([0.6,0.9])=0\delta_{0.5}([0.6, 0.9]) = 0δ0.5​([0.6,0.9])=0. On the die, δ3({1,2,3})=1\delta_3(\{1, 2, 3\}) = 1δ3​({1,2,3})=1 and δ3({2,4,6})=0\delta_3(\{2, 4, 6\}) = 0δ3​({2,4,6})=0. Disjoint sets cannot both contain xxx, so additivity holds.
  • Weighted point masses. Put weights w1,w2,…w_1, w_2, \ldotsw1​,w2​,… on points x1,x2,…x_1, x_2, \ldotsx1​,x2​,… and set μ=∑iwiδxi\mu = \sum_i w_i \delta_{x_i}μ=∑i​wi​δxi​​, which means that μ(A)\mu(A)μ(A) is the sum of the weights of the points that lie in AAA. Counting measure is the case where all weights equal 1. A loaded die, with weight 0.50.50.5 on the face 6 and 0.10.10.1 on each other face, has μ({2,4,6})=0.1+0.1+0.5=0.7\mu(\{2, 4, 6\}) = 0.1 + 0.1 + 0.5 = 0.7μ({2,4,6})=0.1+0.1+0.5=0.7 and μ(Ω)=1\mu(\Omega) = 1μ(Ω)=1.
  • Length and area. The measures λ\lambdaλ on [0,1][0, 1][0,1] and area on the unit square. Showing that they are countably additive on all the sets one would like to measure is not trivial, and a later lesson of this track does it; until then only intervals, rectangles and discs are needed.
  • A measure with a density. Given a function ρ≥0\rho \ge 0ρ≥0 on [0,1][0, 1][0,1], set μ(A)=∫Aρ(x) dx\mu(A) = \int_A \rho(x)\,dxμ(A)=∫A​ρ(x)dx. The rod of the first section has ρ(x)=2x\rho(x) = 2xρ(x)=2x, and length is the case ρ=1\rho = 1ρ=1. Unlike a point mass, a measure with a density gives every single point the mass 0: the mass is spread out thinly instead of being concentrated.

The figure puts one pair of sets through four of these measures. It measures two intervals A=[a1,a2]A = [a_1, a_2]A=[a1​,a2​] and B=[b1,b2]B = [b_1, b_2]B=[b1​,b2​] of [0,1][0, 1][0,1] under length, under counting on the ten points 0.05,0.15,…,0.950.05, 0.15, \ldots, 0.950.05,0.15,…,0.95, under weighted points with mass 0.50.50.5 at 0.20.20.2, 0.30.30.3 at 0.450.450.45 and 0.20.20.2 at 0.90.90.9, and under the rod density 2x2x2x. Choose the measure with the buttons, move the four sliders to change AAA and BBB, and compare the readouts. With the default A=[0.1,0.5]A = [0.1, 0.5]A=[0.1,0.5] and B=[0.3,0.8]B = [0.3, 0.8]B=[0.3,0.8], length gives 0.40.40.4, 0.50.50.5, 0.20.20.2 and 0.70.70.7, as computed above. Counting gives 444, 555, 222 and 777: AAA contains the points 0.15,0.25,0.35,0.450.15, 0.25, 0.35, 0.450.15,0.25,0.35,0.45, and BBB contains 0.35,0.45,…,0.750.35, 0.45, \ldots, 0.750.35,0.45,…,0.75. Weighted points give 0.80.80.8, 0.30.30.3, 0.30.30.3 and 0.80.80.8, because AAA contains the masses at 0.20.20.2 and 0.450.450.45 and BBB only the one at 0.450.450.45. The rod gives 0.240.240.24, 0.550.550.55, 0.160.160.16 and 0.630.630.63. In every case the last readout equals μ(A∪B)\mu(A \cup B)μ(A∪B).

Two things are worth trying. Move BBB to the right until it no longer touches AAA: the overlap has size 0 and the sizes simply add. Then set both ends of AAA to 0.20.20.2, so that AAA is a single point: length, counting and the rod all give 0, while the weighted points still give 0.50.50.5. Some measures see single points and some do not.

One pair of sets, measured four waysOpen in Lebesgue Measure
0.10
01
0.50
01
0.30
01
0.80
01
00.250.50.751
μ(A)
0.40
μ(B)
0.50
μ(A ∩ B)
0.20
μ(A ∪ B)
0.70
μ(A) + μ(B) − μ(A ∩ B)
0.70

Whatever the measure, μ(A) + μ(B) − μ(A ∩ B) equals μ(A ∪ B): inclusion–exclusion is a consequence of additivity.

Finite, infinite and probability measures

The size of the whole space, μ(Ω)\mu(\Omega)μ(Ω), is the total mass of the measure. A measure is finite if its total mass is finite and infinite otherwise. Counting on the die has total mass 6, length on [0,1][0, 1][0,1] has total mass 1, and the rod has total mass 1. Counting on N\mathbb{N}N and length on the real line have total mass ∞\infty∞.

A finite measure with positive total mass can always be rescaled so that its total mass is exactly 1: divide every size by the total. Counting on the die divided by 6 gives each face the size 16\tfrac1661​, and the even faces 36=12\tfrac36 = \tfrac1263​=21​. The rescaled version is again a measure, because dividing by a constant keeps every rule, and it has total mass 1. A measure of total mass 1 is called a probability measure. The loaded die of the previous section, the rod and length on [0,1][0, 1][0,1] are already probability measures. In the probability part of this track, μ(A)\mu(A)μ(A) is read as the chance that something lands in AAA, and the whole subject is measure theory with this one extra normalisation. For now, a probability measure is just a measure whose total mass happens to be 1.

Finite measures allow subtraction, μ(B∖A)=μ(B)−μ(A)\mu(B \setminus A) = \mu(B) - \mu(A)μ(B∖A)=μ(B)−μ(A) for any A⊆BA \subseteq BA⊆B, since every size is finite; with infinite measures, subtraction and limits need care, as the next section shows.

Continuity from below and above

Countable additivity has a consequence for sequences of growing and shrinking sets. Start with sets that grow, A1⊆A2⊆A3⊆⋯A_1 \subseteq A_2 \subseteq A_3 \subseteq \cdotsA1​⊆A2​⊆A3​⊆⋯, and let AAA be their union. To use countable additivity, cut AAA into disjoint rings: D1=A1D_1 = A_1D1​=A1​, and Dk=Ak∖Ak−1D_k = A_k \setminus A_{k-1}Dk​=Ak​∖Ak−1​ for k≥2k \ge 2k≥2, the part that the kkk-th set adds. The rings are disjoint, their union is AAA, and the first nnn of them make up AnA_nAn​. Therefore

μ(A)=∑k=1∞μ(Dk)=lim⁡n→∞∑k=1nμ(Dk)=lim⁡n→∞μ(An).\mu(A) = \sum_{k=1}^{\infty} \mu(D_k) = \lim_{n \to \infty} \sum_{k=1}^{n} \mu(D_k) = \lim_{n \to \infty} \mu(A_n).μ(A)=k=1∑∞​μ(Dk​)=n→∞lim​k=1∑n​μ(Dk​)=n→∞lim​μ(An​).

This is continuity from below: the sizes of growing sets grow to the size of the limit set. For example, An=[1/n,1]A_n = [1/n, 1]An​=[1/n,1] grows as nnn grows, and its union is (0,1](0, 1](0,1]. The lengths are 1−1/n1 - 1/n1−1/n, which are 0.90.90.9 for n=10n = 10n=10 and 0.990.990.99 for n=100n = 100n=100, and they tend to 1=λ((0,1])1 = \lambda((0, 1])1=λ((0,1]). The missing point 0 has length 0, so it makes no difference.

Shrinking sets, B1⊇B2⊇⋯B_1 \supseteq B_2 \supseteq \cdotsB1​⊇B2​⊇⋯ with intersection BBB, behave the same way, provided the first set has finite size. Apply the previous argument to the growing sets B1∖BnB_1 \setminus B_nB1​∖Bn​, whose union is B1∖BB_1 \setminus BB1​∖B, and subtract from the finite number μ(B1)\mu(B_1)μ(B1​). This gives continuity from above: μ(Bn)→μ(B)\mu(B_n) \to \mu(B)μ(Bn​)→μ(B) when μ(B1)<∞\mu(B_1) < \inftyμ(B1​)<∞. For example, Bn=[0,1/n]B_n = [0, 1/n]Bn​=[0,1/n] has length 1/n1/n1/n, which tends to 0, the length of the intersection {0}\{0\}{0}.

The condition of finiteness cannot be dropped. The sets Bn=[n,∞)B_n = [n, \infty)Bn​=[n,∞) shrink and every one of them has length ∞\infty∞, but nothing lies in all of them: the intersection is empty and has length 0, while the limit of the lengths is ∞\infty∞.

The same trick of cutting into disjoint rings also gives the union bound for countably many sets that overlap. Let A1,A2,…A_1, A_2, \ldotsA1​,A2​,… be arbitrary, and cut the union into the disjoint parts Dk=Ak∖(A1∪⋯∪Ak−1)D_k = A_k \setminus (A_1 \cup \cdots \cup A_{k-1})Dk​=Ak​∖(A1​∪⋯∪Ak−1​). Each DkD_kDk​ is part of AkA_kAk​, so μ(Dk)≤μ(Ak)\mu(D_k) \le \mu(A_k)μ(Dk​)≤μ(Ak​) by monotonicity, and countable additivity gives μ(⋃kAk)=∑kμ(Dk)≤∑kμ(Ak)\mu\big(\bigcup_k A_k\big) = \sum_k \mu(D_k) \le \sum_k \mu(A_k)μ(⋃k​Ak​)=∑k​μ(Dk​)≤∑k​μ(Ak​).

Worked example

Mass on a rod with density 2x

  1. The left half of the rod, [0,0.5][0, 0.5][0,0.5]:

    0.52−02\displaystyle 0.5^2 - 0^20.52−02=0.25
  2. The right half, [0.5,1][0.5, 1][0.5,1], is three times as heavy:

    12−0.52\displaystyle 1^2 - 0.5^212−0.52=0.75
  3. The stretch A=[0.1,0.5]A = [0.1, 0.5]A=[0.1,0.5]:

    0.52−0.12\displaystyle 0.5^2 - 0.1^20.52−0.12=0.24
  4. The stretch B=[0.3,0.8]B = [0.3, 0.8]B=[0.3,0.8]:

    0.82−0.32\displaystyle 0.8^2 - 0.3^20.82−0.32=0.55
  5. The overlap A∩B=[0.3,0.5]A \cap B = [0.3, 0.5]A∩B=[0.3,0.5]:

    0.52−0.32\displaystyle 0.5^2 - 0.3^20.52−0.32=0.16
  6. Inclusion–exclusion gives the mass of A∪B=[0.1,0.8]A \cup B = [0.1, 0.8]A∪B=[0.1,0.8], which agrees with 0.82−0.120.8^2 - 0.1^20.82−0.12:

    0.24+0.55−0.16\displaystyle 0.24 + 0.55 - 0.160.24+0.55−0.16=0.63
  7. Continuity from below: the mass of [1/10,1][1/10, 1][1/10,1] is already close to the total,

    1−1/102\displaystyle 1 - 1/10^21−1/102=0.99
  8. and the mass of [1/n,1][1/n, 1][1/n,1] tends to the mass of (0,1](0, 1](0,1], the whole rod:

    lim⁡n→∞(1−1/n2)\displaystyle \lim_{n \to \infty} \big(1 - 1/n^2\big)n→∞lim​(1−1/n2)=1

What this lesson leaves open

A measure is a number attached to sets, obeying three rules that every size obeys, with additivity strengthened to countable families. The definition leaves three questions, and the following lessons of this track answer them one by one. Which collections of sets can carry a measure? The next lesson, "σ-algebras and Borel sets", answers this. Does a countably additive length exist on all those sets? And can a measure be used to add up not just sizes of sets, but values of a function? Each of these needs the definition above, which is why it comes first.

Summary

  • Counting, length, area and mass are measures: rules μ\muμ that give a set AAA a number μ(A)∈[0,∞]\mu(A) \in [0, \infty]μ(A)∈[0,∞].
  • The rules are μ(∅)=0\mu(\emptyset) = 0μ(∅)=0 and additivity for disjoint sets; they give monotonicity, μ(B∖A)=μ(B)−μ(A)\mu(B \setminus A) = \mu(B) - \mu(A)μ(B∖A)=μ(B)−μ(A) for finite μ(A)\mu(A)μ(A), inclusion–exclusion and the union bound.
  • Additivity is demanded for countably many disjoint sets, because natural density is finitely additive but fails for N={1}∪{2}∪⋯\mathbb{N} = \{1\} \cup \{2\} \cup \cdotsN={1}∪{2}∪⋯; it cannot be demanded for uncountably many, since [0,1][0, 1][0,1] is the union of its points of length 0.
  • Examples: counting measure, the Dirac measure δx\delta_xδx​, weighted points ∑wiδxi\sum w_i \delta_{x_i}∑wi​δxi​​, length, area and a measure with a density ρ\rhoρ; a measure of total mass 1 is a probability measure.
  • Countable additivity gives continuity from below, and from above when the first set has finite size; the sets [n,∞)[n, \infty)[n,∞) show why finiteness is needed.
Try itOpen the Lebesgue measure lab
Next · 02σ-algebras and Borel sets
Connections

Measuring the size of sets

Open the full graph
Leads to
05.02σ-algebras and Borel sets05.03Lebesgue measure and null sets05.04Measurable functions05.05The Lebesgue integral05.06Convergence theorems05.07Probability spaces and Kolmogorov's axioms05.08Random variables and their distributions05.10Independence and product measures05.13Measure theory in option pricing
See it in the knowledge graph
Labs for this lesson
Lebesgue Measure