Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose that installing the abdominal window in mice has a 55% chance of being successful. This time, we try to install the abdominal imaging window

Suppose that installing the abdominal window in mice has a 55% chance of being successful. This time, we try to install the abdominal imaging window in 10 mice. 1 Lets see if we can get a binomial distribution using the computer to simulate this binomial experiment. A Bernoulli trial is a trial that produces only two mutually exclusive and exhaustive outcomes. A Bernoulli process is an experiment that consists of several identicals yet independent Bernoulli trials performed in succession. (a) Write a function that outputs the number of successes with the probability p and the total number of Bernoulli trials Ntrial as inputs. 1. Lets simulate a Bernoulli trial. 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. Count the number of success for each trial. 2. Repeat this for Ntrial Bernoulli trials. This repetition makes a Bernoulli process. 3. Keep track of the total number of successes obtained for a Bernoulli process and return that number as the function output. (b) Make a nested function using the function written in 1(a) that simulates a Bernoulli process. The nested function takes p, Ntrial and the total number of Bernoulli processes Nprocess as inputs. The function performs Nprocess independent Bernoulli processes (characterized by p and Ntrial). Then the function logs the number of successes for each Bernoulli process, and produces an array whose index corresponds to each k (number of successes) where k = 0, 1, ..., n, and values of each array corresponds to the count for each k. (c) For p, Ntrial given by the problem (written in blue font), 1. Run the nested function written in 1(b) for Nprocess = 100. 2. Compute the probability for each k (number of successes) where k = 0, 1, ..., n. 3. Plot Probability vs k using bar command. (d) For p, Ntrial given by the problem (written in blue font), 1. Run the nested function written in 1(b) for Nprocess = 10000. 2. Compute the probability for each k (number of successes) where k = 0, 1, ..., n. 3. Plot Probability vs k using bar command. (e) Make double bar graphs for 1(c) and 1(d). (i.e., Place the bars next to each other for each number of successes, not on top of each other.) Use different colors for 1(c) and 1(d). What is the effect of increasing the number of processes?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

2. Do you find change a. invigorating? b. stressful? _______

Answered: 1 week ago

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago