Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Asap please!!! Im not sure if I need to ask users to enter N,x,p Thanks in advance! The binomial distribution consists of the probabilities
C++
The binomial distribution consists of the probabilities of each of the possible numbers of successes x on N trials for independent events that each have a probability of p of occurring. The formula for the binomial distribution is shown below: N! P(x) = p For the coin flip example, N-2 and -0.5. The possibility of getting no head (ie, x-0), one head (x-1) and getting two heads (x-2) is calculated as 2! P(0)=0!(2-0)! 2! 2-1 2! 2)= (.52)(1-5)2-2--(-25)(1)= 0.25 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 between0 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 Asap please!!!
Im not sure if I need to ask users to enter N,x,p
Thanks in advance!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started