# Doob martingale

(Redirected from McDiarmid's inequality)

A Doob martingale (also known as a Levy martingale) is a mathematical construction of a stochastic process which approximates a given random variable and has the martingale property with respect to the given filtration. It may be thought of as the evolving sequence of best approximations to the random variable based on information accumulated up to a certain time.

When analyzing sums, random walks, or other additive functions of independent random variables, one can often apply the central limit theorem, law of large numbers, Chernoff's inequality, Chebyshev's inequality or similar tools. When analyzing similar objects where the differences are not independent, the main tools are martingales and Azuma's inequality.[clarification needed]

## Definition

A Doob martingale (named after Joseph L. Doob)[1] is a generic construction that is always a martingale. Specifically, consider any set of random variables

${\displaystyle {\vec {X}}=X_{1},X_{2},...,X_{n}}$

taking values in a set ${\displaystyle A}$ for which we are interested in the function ${\displaystyle f:A^{n}\to {\mathbb {R}}}$ and define:

${\displaystyle B_{i}=E_{X_{i+1},X_{i+2},...,X_{n}}[f({\vec {X}})|X_{1},X_{2},...X_{i}]}$

where the above expectation is itself a random quantity since the expectation is only taken over

${\displaystyle X_{i+1},X_{i+2},...,X_{n},}$

and

${\displaystyle X_{1},X_{2},...X_{i}}$

are treated as random variables. It is possible to show that ${\displaystyle B_{i}}$ is always a martingale regardless of the properties of ${\displaystyle X_{i}}$.[citation needed]

The sequence ${\displaystyle {B_{i}}}$ is the Doob martingale for f.[2]

## Application

Thus if one can bound the differences

${\displaystyle |B_{i+1}-B_{i}|}$,

one can apply Azuma's inequality and show that with high probability ${\displaystyle f({\vec {X}})}$ is concentrated around its expected value

${\displaystyle E[f({\vec {X}})]=B_{0}.}$

## McDiarmid's inequality

One common way of bounding the differences and applying Azuma's inequality to a Doob martingale is called McDiarmid's inequality.[3]

Suppose ${\displaystyle X_{1},X_{2},\dots ,X_{n}}$ are independent and assume that ${\displaystyle f}$ satisfies

${\displaystyle \sup _{x_{1},x_{2},\dots ,x_{n},{\hat {x}}_{i}}|f(x_{1},x_{2},\dots ,x_{n})-f(x_{1},x_{2},\dots ,x_{i-1},{\hat {x}}_{i},x_{i+1},\dots ,x_{n})|\leq c_{i}\qquad {\text{for}}\quad 1\leq i\leq n\;.}$

(In other words, replacing the ${\displaystyle i}$-th coordinate ${\displaystyle x_{i}}$ by some other value changes the value of ${\displaystyle f}$ by at most ${\displaystyle c_{i}}$.)

It follows that

${\displaystyle |B_{i+1}-B_{i}|\leq c_{i}}$

and therefore Azuma's inequality yields the following McDiarmid inequalities for any ${\displaystyle \varepsilon >0}$:

${\displaystyle \Pr \left\{f(X_{1},X_{2},\dots ,X_{n})-E[f(X_{1},X_{2},\dots ,X_{n})]\geq \varepsilon \right\}\leq \exp \left(-{\frac {2\varepsilon ^{2}}{\sum _{i=1}^{n}c_{i}^{2}}}\right)}$

and

${\displaystyle \Pr \left\{E[f(X_{1},X_{2},\dots ,X_{n})]-f(X_{1},X_{2},\dots ,X_{n})\geq \varepsilon \right\}\leq \exp \left(-{\frac {2\varepsilon ^{2}}{\sum _{i=1}^{n}c_{i}^{2}}}\right)}$

and

${\displaystyle \Pr \left\{|E[f(X_{1},X_{2},\dots ,X_{n})]-f(X_{1},X_{2},\dots ,X_{n})|\geq \varepsilon \right\}\leq 2\exp \left(-{\frac {2\varepsilon ^{2}}{\sum _{i=1}^{n}c_{i}^{2}}}\right).\;}$