Project 21: Binomial cumulative distribution

Suppose we want to calculate the probability that X is less 3.  We would want to add the probabilities from X = 0 to X = 2.

We could add the probabilities for X = 0, X = 1, and X = 2: .343 + .441 + .189 = .973

Project 21: Variables 'n', 'p', 'lower', and 'upper' have been initialized.  There is also a working method available called binomialpdf.

n is the number of trials (3 in the example above)

p is the probability of success on any trial (.3 in the example above)

lower is the lower bound for the number of successes wanted (0 in the example above)

upper is the upper bound for the number of successes wanted (2 in the example above)

Task: Appropriately initialize the value for a variable called 'binomialcdf' that represents the probability that the number of successes obtained is between 'lower' and 'upper' inclusively (with n trials and p as the probability of success).

**If your code works for 5 test cases in a row, you can enter your e-mail address.