To compute the probability of a certain number of outcomes (k) of a
certain number of attempts (n), given that the probability of that
outcome is p, is:
nCk *
pk * (1-p)(n - k)
Where nCk means the number of combinations
of n taken k at a time. This is:
n! k! (n - k)!
Using Javascript to Compute
It is easy to compute a small number of possible outcomes
by adding together the probability of each.
Type the values of n, k and p:
See if you can use your web page to answer question 25 of the
Chapter 4 Quiz