5 Programming 5.1 Consider the coins from problem 4. We will simulate flipping a coin 100 times to try to guess which coin we've picked, refining our estimate of the likelihood after each flip's outcome. 5(a). Write a function that takes in 2 parameters: the type of coin (fair or biased), and the number of flips; and returns the resulting simulated sequence of outcomes. Generate 10 sequences of 40 flips. each: 5 sequences for a fair coin and 5 sequences for a biased coin. 5(b). Modify that function to also calculate the likelihood that the coin is biased after each successive flip, given the conditions of problem 4(c). 5(e). Generate a properly labeled graph plotting the likelihood of having picked a biased coin as it evolves after each of 100 simulated flips of a fair coin. Overlay 5 independent simulations on the same graph. 5(d). Generate a similar graph, this time plotting 5 independent runs of simulating 100 flips of a biased coin. 5 Programming 5.1 Consider the coins from problem 4. We will simulate flipping a coin 100 times to try to guess which coin we've picked, refining our estimate of the likelihood after each flip's outcome. 5(a). Write a function that takes in 2 parameters: the type of coin (fair or biased), and the number of flips; and returns the resulting simulated sequence of outcomes. Generate 10 sequences of 40 flips. each: 5 sequences for a fair coin and 5 sequences for a biased coin. 5(b). Modify that function to also calculate the likelihood that the coin is biased after each successive flip, given the conditions of problem 4(c). 5(e). Generate a properly labeled graph plotting the likelihood of having picked a biased coin as it evolves after each of 100 simulated flips of a fair coin. Overlay 5 independent simulations on the same graph. 5(d). Generate a similar graph, this time plotting 5 independent runs of simulating 100 flips of a biased coin