Hi all,

I want to bring the below equation into differentiable form when $k = n-1$ so that I can differential it w.r.t $p$ to get the optimal value of $Ps$.

$P_s = p(1-p) \sum^{k-1}_{i=0} {{n-2} \choose {i}} p^i (1-p)^{n-2-i} $

Any help would be highly appreciated.

Thanks

Shan