Turning a Bounded Range into Finitely Many Values
A bounded measurable function can take infinitely many values, so it need not itself be a simple function. A direct way to produce a finite-valued approximation is to divide an interval containing its range into finitely many smaller intervals, then replace each function value by a selected value from the interval containing it. This is called range quantization. The construction applies to negative as well as nonnegative values, and its error can be bounded at every point of the domain.
We work first on an arbitrary measure space \((X,\mathcal{M},\mu)\), with no assumption that \(\mu\) is finite, sigma-finite, or complete. A real-valued function \(f:X\to\mathbb{R}\) is measurable if \(f^{-1}(B)\in\mathcal{M}\) for every Borel set \(B\subseteq\mathbb{R}\). A finite-valued measurable function is a measurable function whose range is a finite set; it is a simple function. The bounds used below are pointwise bounds on all of \(X\), not merely bounds almost everywhere.
The Quantization Theorem
Proof. For \(k=0,\ldots,N-1\), define $$ E_k=\{x\in X:a+kh\le f(x)<a+(k+1)h\}, $$ and define \(E_N=\{x\in X:f(x)=b\}\). Each interval in the definition of \(E_k\), and the singleton \(\{b\}\), is a Borel subset of \(\mathbb{R}\). Since \(f\) is measurable, all these sets belong to \(\mathcal{M}\). The sets \(E_0,\ldots,E_N\) are pairwise disjoint and their union is \(X\): each value \(f(x)<b\) belongs to exactly one of the consecutive half-open intervals, while \(f(x)=b\) belongs to \(E_N\). Define $$ q=\sum_{k=0}^{N-1}(a+kh)\chi_{E_k}+b\chi_{E_N}. $$ This is a finite linear combination of indicators of measurable sets, so \(q\) is measurable and has only finitely many values. If \(x\in E_k\) with \(k<N\), then \(a+kh\le f(x)<a+(k+1)h\), and \(q(x)=a+kh\); hence \(0\le f(x)-q(x)<h\). If \(x\in E_N\), then \(f(x)=q(x)=b\), so the error is zero. This proves the assertion at every point. \(\square\)
The endpoint convention matters. The half-open intervals assign every value below \(b\) to exactly one interval, and the separate set \(E_N\) assigns the upper endpoint. The approximant always rounds down, so it never exceeds \(f\). Other choices of representative are possible, but their error estimates and endpoint rules must be checked separately.
Worked Example: Quantizing a Linear Function on an Interval
Let \(X=[0,1]\) with its Lebesgue sigma-algebra and Lebesgue measure \(m\). Define the real-valued measurable function \(f(x)=2x-1\), whose values lie in \([-1,1]\). Take \(N=4\). The width of each range interval is $$ h=\frac{1-(-1)}{4}=\frac12. $$ The intervals are \([-1,-\tfrac12)\), \([-\tfrac12,0)\), \([0,\tfrac12)\), and \([\tfrac12,1)\), with the singleton \(\{1\}\) handled separately.
Solving the interval conditions for \(x\) gives the corresponding sets $$ E_0=[0,\tfrac14),\quad E_1=[\tfrac14,\tfrac12),\quad E_2=[\tfrac12,\tfrac34),\quad E_3=[\tfrac34,1),\quad E_4=\{1\}. $$ For example, \(f(x)\in[-\tfrac12,0)\) means \(-\tfrac12\le2x-1<0\), so \(\tfrac14\le x<\tfrac12\), as stated. The quantized function is therefore $$ q(x)=-1\chi_{E_0}(x)-\frac12\chi_{E_1}(x)+0\chi_{E_2}(x) +\frac12\chi_{E_3}(x)+1\chi_{E_4}(x). $$ It is measurable because all five sets are Lebesgue measurable. At \(x=\tfrac35\), \(f(\tfrac35)=\tfrac15\), which lies in \([0,\tfrac12)\); thus \(q(\tfrac35)=0\) and the error is \(\tfrac15\). At \(x=1\), \(f(1)=1=q(1)\), so the endpoint error is zero.
Check: For \(x\in E_2=[\tfrac12,\tfrac34)\), the value \(2x-1\) lies in \([0,\tfrac12)\), so \(0\le f(x)-q(x)<\tfrac12\). The same interval-width check holds on each of the other four sets, with equality of \(f\) and \(q\) at \(x=1\). The values of \(q\) are precisely among \(-1,-\tfrac12,0,\tfrac12,1\), as the construction predicts.
Negative Values and Arbitrary Measurable Sets
Nothing in the construction requires the range interval to start at zero. In particular, one should not shift a function to be nonnegative unless there is a reason to do so: partitioning an interval that includes negative values works directly. Also, the quantization is performed in the range, not by subdividing the domain. The sets in the domain are just the measurable preimages of the chosen range intervals, and they need not be intervals or have positive measure.
Worked Example: Quantizing a Function Defined by a Measurable Set
Let \((X,\mathcal{M},\mu)\) be any measure space and let \(A\in\mathcal{M}\). Define \(f:X\to\mathbb{R}\) by \(f=-\tfrac74\) on \(A\) and \(f=\tfrac56\) on \(A^c\). This function is measurable: for any Borel set \(B\subseteq\mathbb{R}\), its preimage is one of \(\varnothing,A,A^c,X\), all of which are in \(\mathcal{M}\). Its values lie in \([-2,1]\). Use \(N=6\), so $$ h=\frac{1-(-2)}{6}=\frac12. $$ The range intervals are \([-2,-\tfrac32)\), \([-\tfrac32,-1)\), \([-1,-\tfrac12)\), \([-\tfrac12,0)\), \([0,\tfrac12)\), and \([\tfrac12,1)\), followed by the singleton \(\{1\}\).
For the value on \(A\), the offset from the lower endpoint is $$ -\frac74-(-2)=\frac14, $$ so \(-\tfrac74\in[-2,-\tfrac32)\), and the approximating value is \(-2\). Its error is \(-\tfrac74-(-2)=\tfrac14\). For the value on \(A^c\), the offset is $$ \frac56-(-2)=\frac{17}{6}. $$ This lies in \([\tfrac52,3)\), the last interval \([\tfrac12,1)\), so the approximating value is \(\tfrac12\). The error is $$ \frac56-\frac12=\frac13. $$ Consequently \(q=-2\chi_A+\tfrac12\chi_{A^c}\). Both coefficients and both sets are explicit, so \(q\) is finite-valued and measurable.
Check: On \(A\), the error \(\tfrac14\) is nonnegative and is less than \(h=\tfrac12\). On \(A^c\), the error \(\tfrac13\) is also nonnegative and less than \(\tfrac12\). Thus the pointwise estimate holds whether or not either set has measure zero, and no finiteness assumption on \(\mu(X)\) is involved.
Arbitrarily Accurate Uniform Approximation
Proof. Since \(f\) is bounded, choose real numbers \(a<b\) with \(a\le f(x)\le b\) for every \(x\in X\). If \(f\) is constant, take \(q=f\), which is already finite-valued and measurable. Otherwise, choose an integer \(N\ge1\) large enough that \((b-a)/N<\varepsilon\); such an integer exists by the Archimedean property of the real numbers. Apply the theorem with this \(N\). It gives a finite-valued measurable \(q\) satisfying \(0\le f(x)-q(x)<(b-a)/N<\varepsilon\) for every \(x\), hence \(|f(x)-q(x)|<\varepsilon\) everywhere. Applying this construction for each \(\varepsilon=1/n\), \(n\ge1\), gives a sequence \(q_n\) with \(|f(x)-q_n(x)|<1/n\) for all \(x\); this is uniform convergence by its definition. \(\square\)
The corollary only requires boundedness of the actual values of \(f\). If \(f\) is bounded only almost everywhere, the theorem does not immediately apply as written: the exceptional set may contain points where \(f\) is unbounded. Changing \(f\) on a null set is a separate operation, and changing a measurable function on an arbitrary subset of a null set need not preserve measurability unless the measure space is complete or the change is otherwise known to be measurable.
Worked Example: Quantizing on a Finite Counting Space
Let \(X=\{1,2,3,4\}\), let \(\mathcal{M}\) be the set of all subsets of \(X\), and let \(\mu\) be counting measure. Define \(f:X\to\mathbb{R}\) by $$ f(1)=-\frac65,\qquad f(2)=\frac1{10},\qquad f(3)=\frac{99}{100},\qquad f(4)=\frac65. $$ Every function on this measurable space is measurable. The range is contained in \([-\tfrac32,\tfrac32]\). Choose \(N=5\), giving \(h=3/5\) and interval representatives \(-\tfrac32,-\tfrac9{10},-\tfrac3{10},\tfrac3{10},\tfrac9{10}\), with \(\tfrac32\) reserved for the upper endpoint.
For \(x=1\), the offset is \(-\tfrac65+\tfrac32=\tfrac3{10}\), and \((\tfrac3{10})/(\tfrac35)=\tfrac12\); the value lies in the first interval, so \(q(1)=-\tfrac32\) and the error is \(\tfrac3{10}\). For \(x=2\), the offset is \(\tfrac1{10}+\tfrac32=\tfrac85\), and \((\tfrac85)/(\tfrac35)=\tfrac83\); the value lies in the third interval, so \(q(2)=-\tfrac3{10}\) and the error is \(\tfrac1{10}+\tfrac3{10}=\tfrac25\). For \(x=3\), the offset is \(\tfrac{99}{100}+\tfrac32=\tfrac{249}{100}\), and \((\tfrac{249}{100})/(\tfrac35)=\tfrac{83}{20}\); the value lies in the fifth interval, so \(q(3)=\tfrac9{10}\) and the error is \(\tfrac{99}{100}-\tfrac9{10}=\tfrac9{100}\). For \(x=4\), the offset is \(\tfrac65+\tfrac32=\tfrac{27}{10}\), and \((\tfrac{27}{10})/(\tfrac35)=\tfrac92\); the value lies in the fifth interval, so \(q(4)=\tfrac9{10}\) and the error is \(\tfrac65-\tfrac9{10}=\tfrac3{10}\).
Check: The four errors are \(\tfrac3{10},\tfrac25,\tfrac9{100},\tfrac3{10}\), each nonnegative and less than \(h=\tfrac35\). The values of \(q\) are \(-\tfrac32,-\tfrac3{10},\tfrac9{10},\tfrac9{10}\), a finite set. Counting measure plays no role in the pointwise error calculation.
Endpoint Pitfalls and What the Bound Says
A frequent mistake is to use intervals that exclude both endpoints, then assume they still cover the range. For instance, on \(X=[0,1]\) with Lebesgue measure, consider \(f(x)=x\) and the proposed intervals \([0,\tfrac12)\) and \([\tfrac12,1)\). Their union is \([0,1)\), not \([0,1]\). The value \(f(1)=1\) belongs to neither interval, so a function defined by choosing a representative on those two sets is not defined at \(x=1\). The correction is to include the upper endpoint, for example by using \([\tfrac12,1]\) as the last interval, or by treating \(\{1\}\) separately as in the theorem. A single missing endpoint matters even though \(\{1\}\) has Lebesgue measure zero: the theorem’s bound is pointwise, not merely almost everywhere.
There is a second distinction between a pointwise strict bound and a strict bound on the supremum. The theorem gives \(f(x)-q(x)<h\) at every point, but the supremum of these errors can equal \(h\), because errors may approach \(h\) without attaining it. Thus one should safely conclude \(\sup_{x\in X}|f(x)-q(x)|\le h\), not always a strict inequality. For a requested tolerance \(\varepsilon\), choose \(h<\varepsilon\); then the supremum is at most \(h\), hence strictly below \(\varepsilon\). This is why the corollary chooses the interval width strictly smaller than the desired tolerance.
Finite-valued approximations are useful because they reduce questions about a bounded measurable function to finitely many measurable level sets and assigned values. The range partition provides that reduction while preserving a pointwise error estimate, including on exceptional points and at the endpoints. No integration theorem or assumption about the size of the underlying measure is needed for the construction.
Check Your Understanding
In each question, distinguish pointwise statements from statements that hold only almost everywhere.
- Suppose \(f:X\to\mathbb{R}\) is measurable and \(a\le f\le b\) everywhere, where \(a<b\). Write the partition sets for \(N=2\), including the upper endpoint, and state the error bound.
- Let \(f\) take the value \(-3\) on a measurable set \(A\) and the value \(1\) on \(A^c\). Choose a range interval and a partition width, then compute the quantized value on each set.
- Why is the preimage of each range interval measurable when \(f\) is measurable?
- Give an example showing why the intervals \([a+kh,a+(k+1)h)\) need a separate convention for the upper endpoint of the full range.
- If the pointwise errors are all strictly less than \(h\), what bound on their supremum follows without further information, and how should \(h\) be chosen to guarantee a prescribed uniform tolerance \(\varepsilon\)?