/* Computing Binomial Probabilities in SAS */ data; p1 = probbnml(0.2,25,6); p2 = probbnml(0.2,25,6) - probbnml(0.2,25,5); put p1 p2; datalines; run; * Discussion: * The above SAS code computes the binomial cumulative probability * distribution. So p1 is the probability of getting 6 or fewer * successes in 25 trials and p2 is the probability of getting * exactly 6 successes in 25 trials. The output is printed in the * Log window. * Note: In Excel, p1 would be calculated by BINOMDIST(6,25,0.2,TRUE) * and p2 by BINOMDIST(6,25,0.2,FALSE). ;