Question: MATLAB Assignment: Complete the following tasks and submit three files on blackboard. The files to be submitted should include a Matlab function, Matlab script, and

MATLAB Assignment: Complete the following tasks and submit three files on blackboard. The files to be
submitted should include a Matlab function, Matlab script, and one doc or pdf file with the results figures.
You can use the code from Lecture 6 as a starting point.
a) Create a function to generate a random outcome of n Bernoulli Trials where the probability of
success for each individual trial is defined as p(i.e., the function should take parameters n and p).
b) Create a script that repeats the function|from part a)m times (or modify the function to output
the outcome of m repetitions of the original function) and counts the number of successes in each
repetition.
c) In your script, add code to generate a histogram that shows the number of times you end up with
k successes out of n trials when repeating m times. The values for k should range from 0 to n.
d) Generate results for each of the following scenarios:
n=10,p=0.5,m=100
n=10,p=0.5,m=1000
n=15,p=0.25,m=1000
n=15,p=0.5,m=10000
n=15,p=0.75,m=10000
n=20,p=0.5,m=10000
n=20,p=0.05,m=10000
n=20,p=0.25,m=10000
n=20,p=0.75,m=10000
n=20,p=0.95,m=10000
n=50,p=0.05,m=10000
n=50,p=0.25,m=10000
 MATLAB Assignment: Complete the following tasks and submit three files on

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!