Note: this is an assignment question
Let $X$ be a discrete random variable with values in $\{1,...,n\}$. $P$ denotes the distribution on $\{1,...,n\}$ when $X$ ~ $bin(n,p)$ and Q denotes the distribution on $\{1,...,n\}$ when $X$ ~ $bin(n,q)$ for $p,q \in (0,1)$. Compute the Kullback-Leibler-distance $D(P || Q)$. We write $X$ ~ $bin(n,p)$ if it is Binomial-distributed with parameters $n,p$, that is
$$P[X=k]=\binom{n}{k} p^k (1-p)^{n-k}$$
I have started to write down the definition of the KL divergence which is :
$$D(P||Q)=\sum_{x \in X}{p(x)*log_2 \frac{p(x)}{q(x)}}.$$
After inserting my values this is:
$$D(P||Q)=\sum_{x \in X}{ \binom{n}{x}p^x(1-p)^{n-x} *log_2 \frac{\binom{n}{x}p^x(1-p)^{n-x}}{\binom{n}{x}q^x(1-q)^{n-x}}}.$$
from which I can factor out $\binom{n}{x}$ in the fraction:
$$D(P||Q)=\sum_{x \in X}{ \binom{n}{x}p^x(1-p)^{n-x} *log_2 \frac{p^x(1-p)^{n-x}}{q^x(1-q)^{n-x}}}.$$
I don't see how I can further simplify this term, can someone give me a hint?