HTML5 Canvas+Javascript demonstration of Bernoulli distribution with varying n and p