https://cosx.org/2013/01/story-of-normal-distribution-1
One day a buddy, maybe a gambler, asked Di Moffer a question related to gambling: two people A and B gamble in the casino, and the probability of A and B winning is p , q = 1 − p p, q=1−p, bet n n games. The two agreed: if the number of games A wins X > n p X> np, then A pays the casino X − n p X−np yuan; if X < n p X<np, then B pays the casino n p − X np−X elements. Ask the casino what is the expected value of making money.
The problem is not complicated, it is essentially a binomial distribution, if n p np is an integer, De Moffer finds the final theoretical result is
2npqb(n,p,np)2npqb(n,p,np)
where b ( n , p , i ) = ( n i ) p i q n − i b(n,p,i)=(ni)piqn−i is a common binomial probability.