Thursday, 24 October 2013

Binomial Distribution CDF and Quantile Calculator

An implementation of the Binomial Distribution CDF and Quantile function Calculator occurs below. The Binomial Distribution is known as a Probability Mass Function as it describes the distribution of discrete random variables, which are integers from 0 upwards i.e. positive integers. For parameters $n$ (integer, greater than 0) and $p$ (which must lie between 0 and 1) the Binomial distribution function is:-


$\Large {n \choose k}p^k(1-p)^{n-k}$  


Note that $k$ must lie between 0 and $n$ inclusive. We can regard $n$ as the number of trials and $p$ as the probability of success of each trial, while $k$ is the number of successes. The $n$ and $p$ fields have to be filled in, as well as one out of the two fields which are labelled Upper Limit and Probability (the Lower limit is fixed to 0). The upper limit field needs to contain an integer number greater than or equal to 0. The probability field must contain a number between 0 and 1 only.



$n$:
$p$:


Upper limit:
Probablility:



Plot of distribution ($f(x)$) values against $x$ values
$f(x)$
$x$