Question: MATLAB...do not use the Matlab functions. Make your own. The Binomial Distribution is a probability distribution defined only at discrete values of r. It describes

MATLAB...do not use the Matlab functions. Make your own.

MATLAB...do not use the Matlab functions. Make your own. The Binomial Distribution

The Binomial Distribution is a probability distribution defined only at discrete values of r. It describes a so-called Bernoulli process whereby an experiment consists of n repeated trials each of which has only two possible outcomes. One possible outcome labeled a success and the other a failure. The probability of success of any one trial is denoted as p and the probability of failure is given as q 1-p. The random variable r is an integer and describes the number of successful trials. The Binomial Distribution describes the probability of obtaining x successes out of n trials each with a p probability of success, and is given by: where n! is the binomial coefficient that is often spoken as 'n choose x (a) Write a short computer program to evaluate the Binomial Distribution for arbi- trary values of n and p using the equation for f(r;n, p). (Hint: Most program ming languages have special functions to evaluate the binomial coefficient that works better for large integers than a direct evaluation of the factorial terms.) The program should calculate f(r;n,p) for integer values of z ranging from 0 to n, inclusive. Verify that your computer program is correct by comparing the output of your program to values of the f(x;5,0.5) you obtain by making the calculations independently (i.e. by hand or with a calculator) (b) Plot the discrete probability distribution for f(x; 20,0.5) and f(x;55,0.5) as bar graphs. (c) The mean, X, of the Binomial Distribution is known to be X-np and the variance, 2, is known to be 2-np(1-P). The continuous Normal Distribution has function form: for-oo

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!