Question: array to work out the total heads and tails total_no_heads = sum(trials 1) total_no_tails = sum(trials == 0) cuml_no_heads = cumsum(trials 1) cuml_no_tails =
array to work out the total heads and tails total_no_heads = sum(trials 1) total_no_tails = sum(trials == 0) cuml_no_heads = cumsum(trials 1) cuml_no_tails = cumsum(trials == 0) Simulate a fair coin toss over 1000 trials Plot the frequency of heads and the frequency of tails per trial. b. Plot the relative frequency of heads and the frequency of tails per trial. c. Simulate an unfair coin toss with P(X = H) = 0.7, P(X = T) = 0.3 .
Step by Step Solution
3.53 Rating (153 Votes )
There are 3 Steps involved in it
To address the problem of simulating coin tosses follow these outlined steps using Python Step 1 Simulate a Fair Coin Toss Lets start by simulating 10... View full answer
Get step-by-step solutions from verified subject matter experts
