Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose a fair coin is tossed a huge number of times. LetH(n) be the number of heads that occur inn tosses. By the law of
- Suppose a fair coin is tossed a huge number of times. LetH(n) be the number of heads that occur inn
- tosses. By the law of large numbers, we expect heads to occur in about half of the tosses, i.e.,H(n)n.2
- In this problem, we are going to simulate coin tossing in R, and see if this is true.
- (a)Simulate tossing a fair coin 10000 times. Compute the value ofH(n) forn= 1,2, . . . ,10000 for these
- 10000 tosses. Make two plots, one withH(n)nvs.n, and the other withH(n)0.5 vs.n.2n
- (b)Repeat the simulation in part (a) three times, and include those additional six plots (two plots per simulation). Since the outcomes of the tosses are different, theH(n) and the two plots for the three simulations will be different.
- (c)From the 8 plots made in part (a) and (b), asngets large, doesH(n)nseem to approach 0, and2
- doesH(n)0.5 seem to approach 0? What's the right statement of the law of large numbers for coinn
- tossing? If you are not sure, you can make more simulations and/or increase the number of tosses in each simulation.
- (d)Now let's check the law of large numbers for tossing an UNFAIR coin. Simulate tossing an unfair coin with only 0.2 probability to land heads 10000 times, and compute the values ofH(n). This time we expectH(n)0.2n,so please plotH(n)0.2nvs.n, and plotH(n)0.2 vs.n.Repeat thisn
simulation 4 times (so 8 plots in total). Asngets large, doesH(n)0.2nseem to approach 0, and doesH(n)0.2 seem to approach 0? What's the right statement of the law of large numbers when tossing such an unfair coin?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started