#math/linear-algebra #math/probability #TODO
%%--%%
The Cauchy-Schwarz Inequality states
%%?%%
$
\begin{gather*}
a_i, b_i \in \mathbb{R} \quad \text{for } i = 1, \dots, n \\
(a_{1}b_{1} + \dots + a_{n}b_{n})^2 \leq (a_{1}^2 + \dots + a_{n}^2)(b_{1}^2 + \dots + b_{n}^2)\\ \\
\text{or} \\
\\
\left( \sum_{i=1}^{n} a_i b_i \right)^2 \leq \left( \sum_{i=1}^{n} a_i^2 \right) \left( \sum_{i=1}^{n} b_i^2 \right) \\
\\
\text{or}\\
\\
u, v \in \mathrm{R}^n \\
\lvert u \cdot v \rvert^2 \leq (u \cdot u)(v \cdot v) \\
\end{gather*}
$
%%--%%
Square-rooting both sides gives you
$
\begin{gather*}
u, v \in \mathrm{R}^n \\
\lvert u \cdot v \rvert \leq \lvert \lvert u \rvert \rvert \text{ } \lvert \lvert v \rvert \rvert
\end{gather*}
$
Note that the two sides are equal if and only if $u$ and $v$ are [[Linearly Dependent]].
## Applied to Probability
%%--%%
The trick to use Cauchy-Schwarz in a probability setting is to %%?%%assign one vector, $p$, to the probabilities of the outcome space and another vector, $b$, to a ones vector.
$
\begin{align}
(p_{1} + \dots + p_{n})^{2} &\leq (p_{1}^2 + \dots + p_{n}^2)(1^2 + \dots + 1^2) \\
1 &\leq (p_{1}^2 + \dots + p_{n}^2)(n)\\
\frac{1}{n} &\leq (p_{1}^2 + \dots + p_{n}^2)
\end{align}
$
Using a feature from Cauchy-Schwarz, when the two vectors, $p$ and $b$, are not scalar multiples of one another, i.e. when $p$ is non-uniform, we can drop the equality.
$
\begin{gather*}
\exists{} p_{i}, p_{j} \mid p_{i} \neq p_{j} \\
\frac{1}{n} < (p_{1}^2 + \dots + p_{n}^2)
\end{gather*}
$
%%--%%