Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Alice and Bob have 2n + 1 coins, each with probability of a head equal to 1/2. Bob tosses n + 1 coins, while
Alice and Bob have 2n + 1 coins, each with probability of a head equal to 1/2. Bob tosses n + 1 coins, while Alice tosses the remaining n coins. Assuming independent coin tosses, show that the probability that after all the coins have been tossed, Bob will have gotten more heads than Alice is 1/2. Write a program, in any language, that simulates this experiment with n equal to 100. Perform 1000 trials of this experiment, and compute the relative frequency of Bob tossing more heads than Alice. relative frequency = number of trials in which Bob tossed more heads total number of trials Verify that your relative frequency is very close to 1/2. Now suppose that we do the same sequence of 1000 trials with 2n + 1 loaded coins. In particular, run all 1000 trials of the experiment, but now with the probability of heads equal to p, and do this for each p (0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8} This should be possible by editing just a few lines of code (replacing 1/2 by a variable p which you initialize at the beginning of the program.) Does the probability that Bob tosses more heads than Alice now seem to depend on p, or is it still 1/2? Form a conjecture regarding the probability that Bob tosses more heads than Alice. Create a table giving, for each value of p {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8}, the relative frequency with which Bob throws more heads than Alice. Again you are running each experiment, with n = 100 and doing 1000 trials, for each value of p. Your table should be formatted similarly to the one below, 0.2 0.3 0.4 0.5 0.6 0.7 0.8 relative frequency 0.000 0.000 0.000 0.000 0.000 0.000 0.000 where of course you replace 0.000 with your actual relative frequencies, rounded to 3 decimal places. Once your table is constructed, state your conjecture as to the probability that Bob tosses more heads, and how (or if) that probability depends on p.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The relative frequency is the ratio of the number of trials in which Bob tossed more heads than ...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