Question: This is a matlab question a) Create a function to generate a random outcome of n Bernoulli Trials where the probability of success for each
This is a matlab question 
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) 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. 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. Generate results for each of the following scenarios: b) c) d) n = 10, p = 0.5, m = 100 n = 10, p 05, m = 1000 n 10, p 0.5, m = 10000 o 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) 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. 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. Generate results for each of the following scenarios: b) c) d) n = 10, p = 0.5, m = 100 n = 10, p 05, m = 1000 n 10, p 0.5, m = 10000 o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
