Question: 8. You did (or will do) this problem in section on 10/6 : FPP.16.A.4 and will now use R to the problem again: (a) A

8. You did (or will do) this problem in section on 10/6 : FPP.16.A.4 and will now use R to the problem again: (a) A coin is tossed, and you win a dollar if there are more than 60% heads. Which is b or 100? Explain. (b) As in (a), but you win the dollar if there are more than 40% heads. (c) As in (a), but you win the dollar if there are between 40% and 60% heads. (d) As in (a), but you win the dollar if there are exactly 50% heads. Now, using R to do this problem: (a) First create a vector called coin. Then sample from this 10 times with replacem tossing the coin) and count how many heads you got. Did you get more than 6 h check this using sum (x>6) where "x>6" returns TRUE or FALSE. Repeat this (san and counting the number of heads, and seeing if the number of heads in 10 tosses wa 1000 times and collect the sum of heads in a vector called tosses10. Count how sum of heads was more than 6. Compute the fraction of times it was more than 6. (b) Now repeat this entire procedure with 100 tosses. Call the resultant vector toss compute the fraction of times that the number of heads was over 60%. How will answer problem 1(a) above? (c) Repeat the procedure as in (a) but now you are looking to estimate the chance that heads is more than 40% (d) Repeat the procedure as in (a) but now you are looking to estimate the chance that heads is more than 40% but not more than 60%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
