1Applet for coin flipping Use the Simulating the Probability
1.Applet for coin flipping Use the Simulating the Probability of Head With a Fair Coin (one coin with the probability of heads = 0.5) applet on StatCrunch or online software to illustrate the long-run definition of probability by simulating short-term and long-term results of flipping a balanced coin. Using the default set up;
a.Run the applet for 1 run 10 times, and record the cumulative proportion of heads for the 10 simulations.
b.Using the reset button, run the applet 10 times for 5 runs, and record the 50 cumulative proportions of heads for the separate sets. Do they vary much?
Repeat the process for 1000 runs, and record the 10,000 cumulative proportions of heads. Do they vary more, or less, than the proportions in part b based on 50 total trials?
d.Summarize the effect of the number of trials n on the variability of the proportion. How does this reflect what\'s implied by the law of large numbers?
Solution
The statcrunch coin flipping applet has been designed to allow users to repeatedly experiment with counting the number of heads in a specified number of coin flips.This applet takes the standard classroom example of coin flipping and offers the ability to easily find long-run relative frequencies of events as well as the expected values of the number of heads under various scenarios.
Click on StatCrunch>Applets>Simulation>Coin flipping to get to the dialogue shown.The prob. of heads option allows user to chane the probability of a head for each of the virtual coin flips so that the underlying coins are not necessarily fair.The # of tosses determines how many coins are tossed in each run of the experiment.In the dialog window above, the probability of a head is 0.5 for each coin and # of a coin tossed in each replication of the experiment is 1.As with most StatCrunch applets, there is an optional custom title for the applet.
Coin flipping Simulation:
In the resulting applet shown above, the top menu offers buttons to replicate the specified coin flipping experiment 1 time, 5 times or 1000 times.The bar plot shown in the applet displays the distribution of number of heads across each run of the simulation. the green arrow below the x-axis represents average # of heads across all of the simulation runs.Clicking on the arrow will display this average value along with the standard deviation of the number of heads across all simulation runs.An event of interest may be specified above the plot by changing a reference point and inequality relative to the number of heads.Next to the event are the Count column , which displays the number of times the event has occurred and the proportion column which shows the proportion of simulations where the event occurred.The latter can be used to estimate the probability of the specified event as the number of simulations become large.
On the left side of the resulting applet is a table that lists each individual simulation run in sequential fashion.If an index in this list is coloured red, then it meets the specified event criteria.Clicking a number in the listing will display the data generated in terms of heads and tails from the corresponding simulation run.the data will be sorted with all the heads at the top if the Samples column header is clicked making manual verification a bit easier.At the bottom of the sample data column provides the # of heads in this simulated set of coin flips.The Reset button clears everything from the applet results so that the simulation can be restarted from the scratch.
Each coin flip is a binary outcome making the number of heads in the coin flips a binomial outcome.The long-run relative frequencies and expected values found through simulation run can then be compared with the theoretical values by applying the binomial distribution if appropriate for the class level.The applet can also be used to show that the distribution of the # of heads is approximately normal as the number of coins flipped in each run of the experiment increases.
