DEFINITION MODULE Binomial;

(*
    Title: 	Computations for a binomial distriution.
    LastEdit:	"Tue Aug 20 13:40:36 1985"
    Author: 	Alan Jones,T72,232,322723
		Cambridge University Computer Laboratory
*)

EXPORT QUALIFIED Ordinate, Cumulative ;

PROCEDURE Ordinate (Psuccess : REAL ;
                    n, r : INTEGER) : REAL ;
(* The probability of exactly r successes out of n trials 
   following a binomial distribution *)

PROCEDURE Cumulative (Psuccess : REAL ;
                      n, rmax : INTEGER) : REAL;
(* The cumulative probability of up to and including rmax successes
   out of n trials following a binomial distribution *)

END Binomial.
