Problem 2. Consider n flips of a coin. A run is a sequence of consecutive tosses...
Problem 2. Consider n flips of a coin. A run is a sequence of consecutive tosses with the same result. For k<n, let Ek be the event that a run is completed at time k; this means that the results of the kth and (k1)st flips are different. For example, if 10 and the outcomes of the first 10 flips are HHHTTHHTTH then runs are completed at times 3,5,7,9 (a) Show that if the coin is fair, then the events...
Question 2 In a series of 100 fair coin flips, on average, what is the longest consecutive run of either heads or tails? What about for 1000 fair coin flips? Perform a Monte Carlo simulation to answer this question. Hint: look at function rle(). For example, suppose in 10 coin flips we observe {H,H,H,T,T,H,T,T,T,T},{H,H,H,T,T,H,T,T,T,T}, then the longest run is four. use rstudio do this.
Problem 5. Indicator variables S points possible (graded) Consider a sequence of n 1 independent tosses of a biased coin, at times k = 0,1,2,...,n On each toss, the probability of Heads is p, and the probability of Tails is 1 -p {1,2,.., at time for E resulted in Tails and the toss at time - 1 resulted in A reward of one unit is given if the toss at time Heads. Otherwise, no reward is given at time Let...