# Rademacher distribution

In probability theory and statistics, the Rademacher distribution (which is named after Hans Rademacher) is a discrete probability distribution where a random variate X has a 50% chance of being +1 and a 50% chance of being −1.
A series (that is, a sum) of Rademacher distributed variables can be regarded as a simple symmetrical random walk where the step size is 1.

## Mathematical formulation

The probability mass function of this distribution is
    $f(k)=\left\{{\begin{matrix}1/2&{\text{if }}k=-1,\\1/2&{\text{if }}k=+1,\\0&{\text{otherwise.}}\end{matrix}}\right.$
In terms of the Dirac delta function, as
    $f(k)={\frac {1}{2}}(\delta (k-1)+\delta (k+1)).$

## Bounds on sums of independent Rademacher variables

There are various results in probability theory around analyzing the sum of i.i.d. Rademacher variables, including concentration inequalities such as Bernstein inequalities as well as anti-concentration inequalities like Tomaszewski's conjecture.

### Concentration inequalities

Let {x$_i$} be a set of random variables with a Rademacher distribution. Let {a$_i$} be a sequence of real numbers. Then
    $\Pr \left(\sum _{i}x_{i}a_{i}>t\|a\|_{2}\right)\leq e^{-t^{2}/2}$
where ||a||$_2$ is the Euclidean norm of the sequence {a$_i$}, t > 0 is a real number and Pr(Z) is the probability of event Z.
Let Y = Σ x$_i$a$_i$ and let Y be an almost surely convergent series in a Banach space. The for t > 0 and s ≥ 1 we have
    $\Pr \left(\|Y\|>st\right)\leq \left[{\frac {1}{c}}\Pr(\|Y\|>t)\right]^{cs^{2}}$
for some constant c.
Let p be a positive real number. Then the Khintchine inequality says that
    $c_{1}\left[\sum \left|a_{i}\right|^{2}\right]^{\frac {1}{2}}\leq \left(E\left[\left|\sum a_{i}x_{i}\right|^{p}\right]\right)^{\frac {1}{p}}\leq c_{2}\left[\sum \left|a_{i}\right|^{2}\right]^{\frac {1}{2}}$
where c$_1$ and c$_2$ are constants dependent only on p.
For p ≥ 1, $c_{2}\leq c_{1}{\sqrt {p}}.$

### Tomaszewski’s conjecture

In 1986, Bogusław Tomaszewski proposed a question about the distribution of the sum of independent Rademacher variables. A series of works on this question culminated into a proof in 2020 by Nathan Keller and Ohad Klein of the following conjecture.
Conjecture. Let $X=\sum _{i=1}^{n}a_{i}X_{i}$, where $a_{1}^{2}+\cdots +a_{n}^{2}=1$ and the $X_{i}$'s are independent Rademacher variables. Then
    $\Pr[|X|\leq 1]\geq 1/2.$
For example, when $a_{1}=a_{2}=\cdots =a_{n}=1/{\sqrt {n}}$, one gets the following bound, first shown by Van Zuijlen.
    $\Pr \left(\left|{\frac {\sum _{i=1}^{n}X_{i}}{\sqrt {n}}}\right|\leq 1\right)\geq 0.5.$
The bound is sharp and better than that which can be derived from the normal distribution (approximately Pr > 0.31).

## Applications

The Rademacher distribution has been used in bootstrapping. See Chapter 17 of Testing Statistical Hypotheses for example. The distribution is particularly useful in high-dimensional statistics.
The Rademacher distribution can be used to show that normally distributed and uncorrelated does not imply independent.
Random vectors with components sampled independently from the Rademacher distribution are useful for various stochastic approximations, for example:
* The Hutchinson trace estimator, which can be used to efficiently approximate the trace of a matrix of which the elements are not directly accessible, but rather implicitly defined via matrix-vector products.
* SPSA, a computationally cheap, derivative-free, stochastic gradient approximation, useful for numerical optimization.
Rademacher random variables are used in the Symmetrization Inequality.

## Related distributions

* Bernoulli distribution: If X has a Rademacher distribution, then (X+1)/2{\textstyle (X+1)/2} has a Bernoulli(1/2) distribution.
* Laplace distribution: If X has a Rademacher distribution and Y ~ Exp(λ) is independent from X, then XY ~ Laplace(0, 1/λ).