function heads_tails_proportion = cointossesLLN(n)
% cointossesLLN flips a coin n times and returns the number of heads, the
% number of tails, and the proportion of heads that were flipped
flips = zeros(1,n);
% initialize the vector "flips" -- it starts off as a bunch of 0's
for i=1:n
flips(i) = randi(2)-1;
% at each cell of the vector, generator a random integer between 1 and
% 2 and subtract 1 from it (so we have a random integer between 0 and
% 1)
end
heads = sum(flips); % the number of heads
tails = n-heads; % the number of tails
proportion = heads/n; % the proportion of heads
heads_tails_proportion = [heads tails proportion]