function phat = polling(p, population, n)


k = floor(p*population);
people = [ones(1,k) zeros(1,population-k)];


for i = 1:n
    poll(i) = people(randi(population));
end

phat = sum(poll)/n;




