A coin will be tossed, you win a dollar if the percentage of heards is between $40$% and $60$%. Which is better: 10 tosses or 100 tosses.
I feel as though the answer should be 100 tosses. My reasoning for this is that as the number of tosses increases the percentage of heads will approach 0.5
A follow up to this
A coin is tossed, and you win a dollar if there are more than $60$% heads. Which is better: 10 tosses or 100 tosses
Here I feel as though 10 tosses is better, using the reasoning from before, that the proportion of heads will approach 0.5 as the number of tosses is increased.
If anyone could provide a bit of a sounder reasoning than my intuitions here, or explain why my intuitions are false, that would be appreciated.
Edit
Here is a simulation for the tosses:
results = []
N = 10
for t in range(trials):
heads = 0
for n in range(N):
f = flip()
if f == 1:
heads += 1
result = heads/N
results.append(result)
if result <= 0.6 and result >= 0.4:
plt.scatter(t, result, color = "green", s = 45)
else:
plt.scatter(t, result, color = "red", s =45)
r = [x for x in results if x <= 0.6 and x >= 0.4 ]
print(len(r)/trials)
plt.axhline(y=0.6, alpha = 0.3)
plt.axhline(y=0.4, alpha = 0.3)
plt.title("Outcome of a series of 10 simulated coin tosses")
plt.show()
edit 2
In [3]: from math import factorial as f
Compute for 100 rolls, and 61 heads
In [1]: n = 100
In [2]: k = 61
In [4]: ( f(n) * (0.5)**n ) / (f(k) * f(n - k))
Out[4]: 0.00711073226992655
Compute for 10 rolls, and heads
In [5]: n=10
In [7]: k=6
In [8]: ( f(n) * (0.5)**n ) / (f(k) * f(n - k))
Out[8]: 0.205078125