Sums of 0s and 1s

1 view (last 30 days)
sepideh pourgholami
sepideh pourgholami on 8 Apr 2015
Commented: James Tursa on 8 Apr 2015
_Modify a new copy of your program to simulate the addition of an arbitrary number of independent random numbers, {nj |j = 1, . . . , N}, each of which can take on the value 1 with probability P(1) = p and 0 with probability P(0) = 1 − p. Have the program print the histogram of values generated. Include a calculation of the theoretical probability from the binomial distribution, using the identity you proved at the beginning of this assignment.calculate the mean, variance, and standard deviation. _Run your program for the following cases, using a reasonable number of trials. 1. N = 10, p = 0.5 2. N = 30, p = 0.85 3. N = 150, p = 0.03
  1 Comment
James Tursa
James Tursa on 8 Apr 2015
Please make an attempt and post your code, and then we can make comments and suggestions.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!