function S =  getBinomial(n,p)
% Simulate n-trial binomial draws for each probability in vector p

S = zeros(length(p),1);

for s=1:length(S)

    x = 0;
    for i = 0:n-1
        if rand() < p
          x = x+1;
        end
    end
    S(s) = x;
end