Consider an experiment that flips a fair coin 100 times. Define an indicator random variable (B_{n}) so
Question:
Consider an experiment that flips a fair coin 100 times. Define an indicator random variable \(B_{n}\) so that
\[B_{k}= \begin{cases}1 & \text { if the } k^{\text {th }} \text { flip is heads } \\ 0 & \text { if the } k^{\text {th }} \text { flip is tails. }\end{cases}\]
The proportion of heads up to the \(n^{\text {th }}\) flip is then
\[\hat{p}_{n}=n^{-1} \sum_{k=1}^{n} B_{k}\]
Run a simulation that will repeat this experiment 25 times. On the same set of axes, plot \(\hat{p}_{n}\) versus \(n\) for \(n=1, \ldots, 100\) with the points connected by lines, for each replication of the experiment. For comparison, plot a horizontal line at \(\frac{1}{2}\), the true probability of flipping heads. Comment on the outcome of the experiments. What results are being demonstrated by this set of experiments? How do these results related to what is usually called the frequency method for computing probabilities?
Step by Step Answer: