In C++ language please, using looping/ functions or anything. recursive or itera
ID: 3761908 • Letter: I
Question
In C++ language please, using looping/ functions or anything. recursive or iterate functions
The binomial distribution consists of the probabilities of each of the possible numbers of successes on N trials for independent events that each have a probability of p of occurring. For the coin flip example, N = 2 and p = 0.5. The formula for the binomial distribution is shown below:
P(x)= (N!/(x!(N-x)!))((p^x)(1-p)^(N-x))
Requirement 1: Write a C++ program to compute the binomial probability: when the user types in a value for N (an integer), x (an integer which can be between 0 and N), and p (a positive real number between 0 and 1).
Requirement 2: The program should compute the sum of probabilities within a given range typed in by the user (i.e. the program can ask the user to input the low end of the value of x and high end of the value of x). For example P(0<=x<=3) = P(x=0)+P(x=1)+P(x=2)+P(x=3).