TITLE: how far the distribution from the uniform distribution
QUESTION [5 upvotes]: I have two discrete probability distributions $P$ and $Q$, where $P=(p_1,...,p_n)$ and $Q=(q_1,...,q_n)$, in addition I have uniform distribution $U=(\frac{1}{n},...,\frac{1}{n})$.
The question is how to measure which distribution $P$ or $Q$ is the closest to uniform distribution.
I am not sure if I can use Kullback–Leibler divergence because is not a "correct" distance. Also, I don't know if I can use entropy.

REPLY [5 votes]: What prevents you from using Kullback-Leibler divergence (KL divergence) as a measure of distance from the uniform distribution? I do agree with you on the fact that KL divergence is not a true measure of "distance" because it does not satisfy (a) symmetry, and (b) triangle inequality. 
Nonetheless, it can serve as a criterion for measuring how far/close a distribution is to the uniform distribution. Suppose $\mathcal{X}=\{x_{1},\ldots,x_{n}\}$ is a finite alphabet, and $P=\{p_{1},\ldots,p_{n}\}$ and $U=\{1/n,\ldots,1/n\}$ are two distributions on $\mathcal{X}$, with $U$ being the uniform distribution. Then, the KL-divergence between $P$ and $U$, denoted as $D(P||U)$, is defined to be the following quantity:
\begin{align}
D(P||U)&=\sum\limits_{i=1}^{n}P(x_{i})\log_{2}\left(\frac{P(x_{i})}{U(x_{i})}\right)\\
       &=\sum\limits_{i=1}^{n}p_{i}\log_{2}\left(\frac{p_{i}}{1/n}\right)\\
       &=\log_{2}\left(n\right)+\sum\limits_{i=1}^{n}p_{i}\log_{2}\left({p_{i}}\right)\\
&=\log_{2}(n)-H(P),
\end{align}
where $H(P)=\sum\limits_{i=1}^{n}p_{i}\log_{2}\left(\frac{1}{p_{i}}\right)$ is the (Shannon) entropy of the distribution $P$. Since $D(\cdot||\cdot)\geq 0$, it is clear that the uniform distribution is the most "random" distribution that can be assigned to an alphabet since its entropy is equal to $\log_{2}(n)$ bits. 
If there is another distribution $Q=\{q_{1},\ldots,q_{n}\}$ defined on $\mathcal{X}$, and if $D(P||U)<D(Q||U)$, then $H(P)>H(Q)$, and thus, $P$ is more "random" than $Q$ (which makes sense since $P$ is closer to the uniform distribution than $Q$). 
Thus, closer a distribution is to the uniform distribution (closer in the sense of KL divergence), more "random" it is.