This would be much more efficient using OperandsAndPartials coded the same way the log probability function is coded.

If you're not going to write custom derivatives, you should at least use square() instead of multiplying a number by itself.  

Although not your issue to deal with now, we really need log CDFs.  This is going to underflow if N is large as will our other CDFs.