public static double binomialProb(double p, int n, int k) {
		if (p < 0.0D || p > 1.0D) throw new IllegalArgumentException("\np must lie between 0 and 1");
		if (k < 0 || n < 0) throw new IllegalArgumentException("\nn and k must be greater than or equal to zero");
		if (k > n) throw new IllegalArgumentException("\nk is greater than n");
		return Stat.regularisedBetaFunction(k, n - k + 1, p);
	}