Question: Simulate four coins being flipped by generating four random numbers and rounding them to 0 ( tails ) or 1 ( heads ) : >
Simulate four coins being flipped by generating four random numbers and rounding them to tails or heads:nums roundrand;
a Wite a for loop to evaluate the number of coin ips evaluated in a nested while loop required to achieve an outcome ofthree heads and one tail in runs.
bCalculate the mean and standard deviation of the number of flips.Store the results according to the list below:
the number of coin flips on each run in a row vector as variable CountVectorthe mean number of coin flips as variable MeanCount
the standard deviation of coin flips variable stdcount
Note: Do not include any clc or clear all commands in your MATLAB Grader code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
