(popbinheight^sampbinheight) (popcount - popbinheight) ^ (sampcount - sampbinheight) (sampcount C sampbinheight) Is the combinations still looking ok, now that the system is describsd differently? The question is whether or not the expression counts all the possible different decision sets, without duplication, that result in exactly sampbinheight samples from popbinheight population portions. Remember to simulate to find more mistakes.