int from 0 to 1 (theta^N*(1-theta)^M)d theta