First of all, thank you for all your responces. I am doing my best to keep up with all the suggestions. However I'm trying to stay on track.
So now I have
s = Table[RandomChoice[{Heads, Tails}, 2 i + 1], {i, 10}];
Next, I want to count the number of "Heads" that occur for each "i".
I can do this for one case....say 5,
n = RandomChoice[{Heads, Tails}, 5];
n1 = Count[n, Heads];
But I am having trouble expanding this....
Thanks again.
p.s. what are down votes? Too easy?
Map (
/@
) the function of counting heads in a list:to each sublist in
s
. Hence:If you are doing a simulation of coin flips, I believe that
BinomialDistribution
is what you want.By the way, the symbol
Heads
is a built-in function and should probably not be used the way you are using it.