Question: PLEASE WRITE PYTHON CODE Problem 1 (2.5 points) Consider flipping n times a coin. The probability for heads is given by p where p is
Problem 1 (2.5 points) Consider flipping n times a coin. The probability for heads is given by p where p is some parameter which can be chosen from the interval (0, 1). Write a Python code to simulate n coin lips with heads probability p and compute the running proportion of heads x, for n running from 1 to 1,000 tials. Plot your results. Your plot should illustrate how the proportion of heads appears to converge to p as n approaches 1,000. In [ ] : |### Insert your code here for simulating the coin flips and for computing the average
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
