Binomial Distribution
Implementation
I made the following function for the pdf based on the equation given
above. Used the lisp code for the binomial coefficient.
(defun binomial-pdf (n k p) (* (choose n k) (expt p k) (expt (- 1 p) (- n k))))
I made the following function for the pdf based on the equation given
above. Used the lisp code for the binomial coefficient.
(defun binomial-pdf (n k p) (* (choose n k) (expt p k) (expt (- 1 p) (- n k))))