Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 =

 

 

  TO WORK OUT THE TOTAL OF HEADS AND TAILS 





TO WORK OUT THE CUMULATIVE HEADS AND 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

Step: 1

CODE Text a Fair coin tossing experiment defining Tri... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

System Dynamics

Authors: William Palm III

3rd edition

73398063, 978-0073398068

More Books

Students also viewed these Mathematics questions