Mean square quantization error

Mean square quantization error (MSQE) is a figure of merit for the process of analog to digital conversion.

In this conversion process, analog signals in a continuous range of values are converted to a discrete set of values by comparing them with a sequence of thresholds. The quantization error of a signal is the difference between the original continuous value and its discretization, and the mean square quantization error (given some probability distribution on the input values) is the expected value of the square of the quantization errors.

Mathematically, suppose that the lower threshold for inputs that generate the quantized value $$q_i$$ is $$t_{i-1}$$, that the upper threshold is $$t_i$$, that there are $$k$$ levels of quantization, and that the probability density function for the input analog values is $$p(x)$$. Let $$\hat x$$ denote the quantized value corresponding to an input $$x$$; that is, $$\hat x$$ is the value $$q_i$$ for which $$t_i-1\le x<t_i$$. Then

\begin{align} \operatorname{MSQE}&=\operatorname{E}[(x-\hat x)^2]\\ &=\int_{t_0}^{t_k} (x-\hat x)^2 p(x)\, dx\\ &= \sum_{i=1}^k \int_{t_{i-1}}^{t_i} (x-q_i)^2 p(x) \,dx. \end{align} $$