Coin toss experiment
In this experiment, determine the number of heads and tails
after flipping a coin...
80.2K
Verified Solution
Link Copied!
Question
Electrical Engineering
Coin toss experiment
In this experiment, determine the number of heads and tailsafter flipping a coin for 1000 times. Use two different methods tofind number of heads and tails:
Use for loops.
Use vectors in MATLAB.
Repeat this experiment to find running average of flipping acoin for 200 and 2000 times. Plot the running average for twoexperiments using subplot functions.
Answer & Explanation
Solved by verified expert
3.7 Ratings (602 Votes)
Assume head 1 tail 0 Using for loopheadloop 0 initialze no of headstailloop 0 initialize no of headsfor i11000m1 roundrand1if m11headloop headloop1elsetailloop tailloop1endend Using vectorsm2
See Answer
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
Unlimited Question Access with detailed Answers
Zin AI - 3 Million Words
10 Dall-E 3 Images
20 Plot Generations
Conversation with Dialogue Memory
No Ads, Ever!
Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!