Question: ) Write a function that performs the following tasks. 1. Use the MATLAB uniform random number generator rand to generate a random number x between

) Write a function that performs the following tasks. 1. Use the MATLAB uniform random number generator rand to generate a random number x between 0 and 1. If x p, assign it as a success. If x > p, assign it as a failure of a Bernoulli trial. 2. Repeat this for n = 10 trials. This simulation experiment involving several identical Bernoulli trials performed in succession is called a Bernoulli process. 3. Keep track of the number of successes obtained for a Bernoulli process and return that number as the function output.

(b) Using the function written in (a), 1. Repeat this for Nprocess = 100, where Nprocess is the total number of Bernoulli processes. 2. Compute the probability for each k (number of successes) where k = 0, 1, ..., n.

I have a for loop for part a, but im not sure how to program in matlab to repeat the Bernoulli process N times

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!