Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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


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: o n = 10, p = 0.5, m = 100 on 10, p = 0.5, m = 1000 = n = 15, p = 0.25, m = 1000 n = 15, p = 0.5, m = 10000 O n = 15, p = 0.75, m = 10000 n = 20, p = 0.5, m = 10000 n = 20, p = n = 20, p = n = 20, p = n = 20, p = 0.95, m = 10000 0.05, m = 10000 0.25, m = 10000 0.75, m = 10000 n = 50, p = 0.05, m = 10000 n = 50, p = 0.25, m = 10000

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_2

Step: 3

blur-text-image_3

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Programming questions

Question

What is denormalization?

Answered: 1 week ago