Is there a closed form for $\sum_{k=0}^n \binom{n}{k}^2p^k(1-p)^{n-k}$?

124 Views Asked by At

I have come accross the following sum \begin{align} s_n=\sum_{k=0}^n \binom{n}{k}^2p^k(1-p)^{n-k}. \end{align} Can we obtain some closed-form expression with respect to $p$ for this summation? I found that it may be related to the Legendre polynomials $P_n(x)$, \begin{align} P_n(x) = \frac{1}{2^n} \sum_{k=0}^n \binom{n}{k}^2 (x-1)^{n-k} (x+1)^k. \end{align} However, it is not trivial to apply these Legendre polynomials. Do you have any idea about it? Thanks in adavance.