function y = binomial(u)
% compute random variable with binomial distribution B(n,p)
n = u(1);              % number of repetitions
p = u(2);              % probability of success

y = sum(rand(n,1) <= p);
