text:
Binomial distribution

Pascal's triangle; binomial distribution.svg

The probability that a ball in a Galton box with 8 layers ($p = 0.5$ ends up in the central bin ($n = 8$ is $k = 4$.]]

In probability theory and statistics, the binomial distribution with parameters $n$ and $k$ is the discrete probability distribution of the number of successes in a sequence of $n$ independent experiments, each asking a yes–no question, and each with its own Boolean-valued outcome: success (with probability $p$) or failure (with probability $70/256$). A single success/failure experiment is also called a Bernoulli trial or Bernoulli experiment, and a sequence of outcomes is called a Bernoulli process; for a single trial, i.e., $q = 1-p$, the binomial distribution is a Bernoulli distribution. The binomial distribution is the basis for the popular binomial test of statistical significance.

The binomial distribution is frequently used to model the number of successes in a sample of size $n$ drawn with replacement from a population of size $p$. If the sampling is carried out without replacement, the draws are not independent and so the resulting distribution is a hypergeometric distribution, not a binomial one. However, for $n$ much larger than $N$, the binomial distribution remains a good approximation, and is widely used.

Probability mass function
In general, if the random variable $N$ follows the binomial distribution with parameters $n$ ∈ $\mathbb{N}$ and $n = 1$, we write $p ∈ [0, 1]$. The probability of getting exactly $X$ successes in $n$ independent Bernoulli trials (with the same rate $k$) is given by the probability mass function:
 * $$f(k,n,p) = \Pr(X = k) = \binom{n}{k}p^k(1-p)^{n-k}$$

for $X ~ B(n, p)$, where
 * $$\binom{n}{k} =\frac{n!}{k!(n-k)!}$$

is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: $k = 0, 1, 2, ..., n$ is the probability of obtaining the sequence of $n$ Bernoulli trials in which the first $p$ trials are “successes“ and the remaining (last) $pk qn-k$ trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence of $n$ trials with $k$ successes (and $n-k$ failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are $\binom{n}{k}$ such sequences, since the binomial coefficient $\binom{n}{k}$  counts the number of ways to choose the positions of the $n$ successes successes among the $k$ trials. The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them ($n-k$) must be added $\binom{n}{k}$ times, hence $\Pr(X = k) = \binom{n}{k} p^k (1-p)^{n-k}$.

In creating reference tables for binomial distribution probability, usually the table is filled in up to $pk qn-k$ values. This is because for $n/2$, the probability can be calculated by its complement as
 * $$f(k,n,p)=f(n-k,n,1-p). $$

Looking at the expression $k > n/2$ as a function of $k$, there is a $n$ value that maximizes it. This $k$ value can be found by calculating
 * $$ \frac{f(k+1,n,p)}{f(k,n,p)}=\frac{(n-k)p}{(k+1)(1-p)} $$

and comparing it to 1. There is always an integer $k$ that satisfies
 * $$(n+1)p-1 \leq M < (n+1)p.$$

$f(k, n, p)$ is monotone increasing for $f(k, n, p)$ and monotone decreasing for $k < M$, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which $k$ is maximal: $k > M$ and $(n + 1) p$. $M$ is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode.

Equivalently, $$M-p < np \leq M + 1-p$$. Taking the floor function, we obtain $(n + 1) p - 1$.

Example
Suppose a biased coin comes up heads with probability 0.3 when tossed. The probability of seeing exactly 4 heads in 6 tosses is

 * $$f(4,6,0.3) = \binom{6}{4}0.3^4 (1-0.3)^{6-4}= 0.059535.$$

Cumulative distribution function
The cumulative distribution function can be expressed as:

 * $$F(k;n,p) = \Pr(X \le k) = \sum_{i=0}^{\lfloor k \rfloor} {n\choose i}p^i(1-p)^{n-i},$$

where $$\lfloor k\rfloor$$ is the "floor" under k, i.e. the greatest integer less than or equal to k.

It can also be represented in terms of the regularized incomplete beta function, as follows:

 * $$\begin{align}

F(k;n,p) & = \Pr(X \le k) \\ &= I_{1-p}(n-k, k+1) \\ & = (n-k) {n \choose k} \int_0^{1-p} t^{n-k-1} (1-t)^k \, dt. \end{align}$$

which is equivalent to the cumulative distribution function of the $f$-distribution:

 * $$F(k;n,p) = F_{F\text{-distribution}}\left(x=\frac{1-p}{p}\frac{k+1}{n-k};d_1=2(n-k),d_2=2(k+1)\right).$$

Some closed-form bounds for the cumulative distribution function are given below.

Expected value and variance
If $M = floor(np)$, that is, X is a binomially distributed random variable, $M$ being the total number of experiments and p the probability of each experiment yielding a successful result, then the expected value of X is:

 * $$ \operatorname{E}[X] = np.$$

This follows from the linearity of the expected value along with the fact that $F$ is the sum of $n$ identical Bernoulli random variables, each with expected value $X$. In other words, if $$X_1, \ldots, X_n$$ are identical (and independent) Bernoulli random variables with parameter $n$, then $$X = X_1 + \cdots + X_n$$ and
 * $$\operatorname{E}[X] = \operatorname{E}[X_1 + \cdots + X_n] = \operatorname{E}[X_1] + \cdots + \operatorname{E}[X_n] = p + \cdots + p = np.$$

The variance is:
 * $$ \operatorname{Var}(X) = npq = np(1 - p).$$

This similarly follows from the fact that the variance of a sum of independent random variables is the sum of the variances.

Higher moments
The first 6 central moments, defined as $$ \mu _{c}=\operatorname {E} \left[(X-\operatorname {E} [X])^{c}\right] $$, are given by
 * $$\begin{align}

\mu_1 &= 0, \\ \mu_2 &= np(1-p),\\ \mu_3 &= np(1-p)(1-2p),\\ \mu_4 &= np(1-p)(1+(3n-6)p(1-p)),\\ \mu_5 &= np(1-p)(1-2p)(1+(10n-12)p(1-p)),\\ \mu_6 &= np(1-p)(1-30p(1-p)(1-4p(1-p))+5np(1-p)(5-26p(1-p))+15n^2 p^2 (1-p)^2). \end{align}$$

The non-central moments satisfy
 * $$\begin{align}

\operatorname {E}[X] &= np, \\ \operatorname {E}[X^2] &= np(1-p)+n^2p^2, \end{align}$$ and in general

\operatorname {E}[X^c] = \sum_{k=0}^c \left\{ {c \atop k} \right\} n^{\underline{k}} p^k, $$ where $$\textstyle \left\{{c\atop k}\right\}$$ are the Stirling numbers of the second kind, and $$n^{\underline{k}} = n(n-1)\cdots(n-k+1)$$ is the $$k$$th falling power of $$n$$. A simple bound follows by bounding the Binomial moments via the higher Poisson moments:

\operatorname {E}[X^c] \le \left(\frac{c}{\log(c/(np)+1)}\right)^c \le (np)^c \exp\left(\frac{c^2}{2np}\right). $$ This shows that if $$c=O(\sqrt{np})$$, then $$\operatorname {E}[X^c]$$ is at most a constant factor away from $$\operatorname {E}[X]^c$$

Mode
Usually the mode of a binomial B(n, p) distribution is equal to $$\lfloor (n+1)p\rfloor$$, where $$\lfloor\cdot\rfloor$$ is the floor function. However, when (n + 1)p is an integer and p is neither 0 nor 1, then the distribution has two modes: (n + 1)p and (n + 1)p − 1. When p is equal to 0 or 1, the mode will be 0 and n correspondingly. These cases can be summarized as follows:
 * $$\text{mode} =

\begin{cases} \lfloor (n+1)\,p\rfloor & \text{if }(n+1)p\text{ is 0 or a noninteger}, \\ (n+1)\,p\ \text{ and }\ (n+1)\,p - 1 &\text{if }(n+1)p\in\{1,\dots,n\}, \\ n & \text{if }(n+1)p = n + 1. \end{cases}$$

Proof: Let

 * $$f(k)=\binom nk p^k q^{n-k}.$$

For $$p=0$$ only $$f(0)$$ has a nonzero value with $$f(0)=1$$. For $$p=1$$ we find $$f(n)=1$$ and $$f(k)=0$$ for $$k\neq n$$. This proves that the mode is 0 for $$p=0$$ and $$n$$ for $$p=1$$.

Let $$0 < p < 1$$. We find

 * $$\frac{f(k+1)}{f(k)} = \frac{(n-k)p}{(k+1)(1-p)}$$.

From this follows

 * $$\begin{align}

k > (n+1)p-1 \Rightarrow f(k+1) < f(k) \\ k = (n+1)p-1 \Rightarrow f(k+1) = f(k) \\ k < (n+1)p-1 \Rightarrow f(k+1) > f(k) \end{align}$$

So when $$(n+1)p-1$$ is an integer, then $$(n+1)p-1$$ and $$(n+1)p$$ is a mode. In the case that $$(n+1)p-1\notin \Z$$, then only $$\lfloor (n+1)p-1\rfloor+1=\lfloor (n+1)p\rfloor$$ is a mode.

Median
In general, there is no single formula to find the median for a binomial distribution, and it may even be non-unique. However, several special results have been established:
 * If $$np $$ is an integer, then the mean, median, and mode coincide and equal $$np$$.
 * Any median m must lie within the interval $$\lfloor np \rfloor\leq m \leq \lceil np \rceil$$.
 * A median m cannot lie too far away from the mean:$$|m-np|\leq \min\{{\ln2}, \max\{p,1-p\}\}$$.
 * The median is unique and equal to m = round(np) when $$|m-np|\leq \min \{p, 1-p\}$$ (except for the case when $$p= \frac{1}{2} $$and n is odd).
 * When p is a rational number (with the exception of $$p= \frac{1}{2} $$ and n odd) the median is unique.
 * When $$p= \frac{1}{2} $$ and n is odd, any number m in the interval $$ \frac{1}{2} \bigl(n-1\bigr)\leq m \leq \frac{1}{2}  \bigl(n+1\bigr)$$  is a median of the binomial distribution. If $$p= \frac{1}{2}  $$ and n is even, then  $$m= \frac{n}{2} $$ is the unique median.

Tail bounds
For k ≤ np, upper bounds can be derived for the lower tail of the cumulative distribution function $$F(k;n,p) = \Pr(X \le k)$$, the probability that there are at most k successes. Since $$\Pr(X \ge k) = F(n-k;n,1-p) $$, these bounds can also be seen as bounds for the upper tail of the cumulative distribution function for k ≥ np.

Hoeffding's inequality yields the simple bound

 * $$ F(k;n,p) \leq \exp\left(-2 n\left(p-\frac{k}{n}\right)^2\right), \!$$

which is however not very tight. In particular, for p = 1, we have that F(k;n,p) = 0 (for fixed k, n with k < n), but Hoeffding's bound evaluates to a positive constant.

A sharper bound can be obtained from the Chernoff bound:

 * $$ F(k;n,p) \leq \exp\left(-nD\left(\frac{k}{n}\parallel p\right)\right) $$

where D(a || p) is the relative entropy (or Kullback-Leibler divergence) between an a-coin and a p-coin (i.e. between the Bernoulli(a) and Bernoulli(p) distribution):

 * $$ D(a\parallel p)=(a)\log\frac{a}{p}+(1-a)\log\frac{1-a}{1-p}. \!$$

Asymptotically, this bound is reasonably tight; see for details.

One can also obtain lower bounds on the tail $$F(k;n,p) $$, known as anti-concentration bounds. By approximating the binomial coefficient with Stirling's formula it can be shown that
 * $$ F(k;n,p) \geq \frac{1}{\sqrt{8n\tfrac{k}{n}(1-\tfrac{k}{n})}} \exp\left(-nD\left(\frac{k}{n}\parallel p\right)\right),$$

which implies the simpler but looser bound
 * $$ F(k;n,p) \geq \frac1{\sqrt{2n}} \exp\left(-nD\left(\frac{k}{n}\parallel p\right)\right).$$

For p = 1/2 and k ≥ 3n/8 for even n, it is possible to make the denominator constant:

 * $$ F(k;n,\tfrac{1}{2}) \geq \frac{1}{15} \exp\left(- 16n \left(\frac{1}{2} -\frac{k}{n}\right)^2\right). \!$$

Estimation of parameters
When n is known, the parameter p can be estimated using the proportion of successes:
 * $$ \widehat{p} = \frac{x}{n}.$$

This estimator is found using maximum likelihood estimator and also the method of moments. This estimator is unbiased and uniformly with minimum variance, proven using Lehmann–Scheffé theorem, since it is based on a minimal sufficient and complete statistic (i.e.: x). It is also consistent both in probability and in MSE.

A closed form Bayes estimator for p also exists when using the Beta distribution as a conjugate prior distribution. When using a general $$\operatorname{Beta}(\alpha, \beta)$$ as a prior, the posterior mean estimator is:
 * $$ \widehat{p}_b = \frac{x+\alpha}{n+\alpha+\beta}.$$

The Bayes estimator is asymptotically efficient and as the sample size approaches infinity (n → ∞), it approaches the MLE solution. The Bayes estimator is biased (how much depends on the priors), admissible and consistent in probability.

For the special case of using the standard uniform distribution as a non-informative prior, $$\operatorname{Beta}(\alpha=1, \beta=1) = U(0,1)$$, the posterior mean estimator becomes:
 * $$ \widehat{p}_b = \frac{x+1}{n+2}.$$

(A posterior mode should just lead to the standard estimator.) This method is called the rule of succession, which was introduced in the 18th century by Pierre-Simon Laplace.

When relying on Jeffreys prior, the prior is $$\operatorname{Beta}(\alpha=\frac{1}{2}, \beta=\frac{1}{2})$$, which leads to the estimator:
 * $$ \widehat{p}_{Jeffreys} = \frac{x+\frac{1}{2}}{n+1}.$$

When estimating p with very rare events and a small n (e.g.: if x=0), then using the standard estimator leads to $$ \widehat{p} = 0,$$ which sometimes is unrealistic and undesirable. In such cases there are various alternative estimators. One way is to use the Bayes estimator $$ \widehat{p}_b$$, leading to:
 * $$ \widehat{p}_b = \frac{1}{n+2}.$$

Another method is to use the upper bound of the confidence interval obtained using the rule of three:
 * $$ \widehat{p}_{\text{rule of 3}} = \frac{3}{n}.$$

Confidence intervals
Even for quite large values of n, the actual distribution of the mean is significantly nonnormal. Because of this problem several methods to estimate confidence intervals have been proposed.

In the equations for confidence intervals below, the variables have the following meaning:
 * n1 is the number of successes out of n, the total number of trials
 * $$ \widehat{p\,} = \frac{n_1}{n}$$ is the proportion of successes
 * $$z$$ is the $$1 - \tfrac{1}{2}\alpha$$ quantile of a standard normal distribution (i.e., probit) corresponding to the target error rate $$\alpha$$. For example, for a 95% confidence level the error $$\alpha$$ = 0.05, so $$1 - \tfrac{1}{2}\alpha$$ = 0.975 and $$z$$ = 1.96.

Wald method

 * $$ \widehat{p\,} \pm z \sqrt{ \frac{ \widehat{p\,} ( 1 -\widehat{p\,} )}{ n } } .$$

A continuity correction of 0.5/n may be added.

Agresti–Coull method

 * $$ \tilde{p} \pm z \sqrt{ \frac{ \tilde{p} ( 1 - \tilde{p} )}{ n + z^2 } }$$

Here the estimate of p is modified to

 * $$ \tilde{p}= \frac{ n_1 + \frac{1}{2} z^2}{ n + z^2 } $$

This method works well for $$n>10$$ and $$n_1\neq 0,n$$. See here for $$n\leq 10$$. For $$n_1 = 0,n$$ use the Wilson (score) method below.

Arcsine method

 * $$\sin^2 \left(\arcsin \left(\sqrt{\widehat{p\,}}\right) \pm \frac{z}{2\sqrt{n}} \right).$$

Wilson (score) method
The notation in the formula below differs from the previous formulas in two respects:
 * Firstly, zx has a slightly different interpretation in the formula below: it has its ordinary meaning of 'the xth quantile of the standard normal distribution', rather than being a shorthand for 'the (1 − x)-th quantile'.
 * Secondly, this formula does not use a plus-minus to define the two bounds. Instead, one may use $$z = z_{\alpha / 2}$$ to get the lower bound, or use $$z = z_{1 - \alpha/2}$$ to get the upper bound. For example: for a 95% confidence level the error $$\alpha$$ = 0.05, so one gets the lower bound by using $$z = z_{\alpha/2} = z_{0.025} = - 1.96$$, and one gets the upper bound by using $$z = z_{1 - \alpha/2} = z_{0.975} = 1.96$$.

 * $$\frac{

\widehat{p\,} + \frac{z^2}{2n} + z   \sqrt{ \frac{\widehat{p\,}(1 - \widehat{p\,})}{n} + \frac{z^2}{4 n^2} } }{   1 + \frac{z^2}{n} }$$

Comparison
The so-called "exact" (Clopper–Pearson) method is the most conservative. (Exact does not mean perfectly accurate; rather, it indicates that the estimates will not be less conservative than the true value.)

The Wald method, although commonly recommended in textbooks, is the most biased.

Sums of binomials
If X ~ B(n, p) and Y ~ B(m, p) are independent binomial variables with the same probability p, then X + Y is again a binomial variable; its distribution is Z=X+Y ~ B(n+m, p):

 * $$\begin{align}

\operatorname P(Z=k) &= \sum_{i=0}^k\left[\binom{n}i p^i (1-p)^{n-i}\right]\left[\binom{m}{k-i} p^{k-i} (1-p)^{m-k+i}\right]\\ &= \binom{n+m}k p^k (1-p)^{n+m-k} \end{align}$$

A Binomial distributed random variable X ~ B(n, p) can be considered as the sum of n Bernoulli distributed random variables. So the sum of two Binomial distributed random variable X ~ B(n, p) and Y ~ B(m, p) is equivalent to the sum of n + m Bernoulli distributed random variables, which means Z=X+Y ~ B(n+m, p). This can also be proven directly using the addition rule.

However, if X and Y do not have the same probability p, then the variance of the sum will be smaller than the variance of a binomial variable distributed as $$B(n+m, \bar{p}).\,$$

Poisson binomial distribution
The binomial distribution is a special case of the Poisson binomial distribution, which is the distribution of a sum of n independent non-identical Bernoulli trials B(pi).

Ratio of two binomial distributions
This result was first derived by Katz and coauthors in 1978.

Let X ~ B(n, p1) and Y ~ B(m, p2) be independent. Let T = (X/n) / (Y/m).

Then log(T) is approximately normally distributed with mean log(p1/p2) and variance ((1/p1) − 1)/n + ((1/p2) − 1)/m.

Conditional binomials
If X ~ B(n, p) and Y | X ~ B(X, q) (the conditional distribution of Y, given X), then Y is a simple binomial random variable with distribution Y ~ B(n, pq).

For example, imagine throwing n balls to a basket UX and taking the balls that hit and throwing them to another basket UY. If p is the probability to hit UX then X ~ B(n, p) is the number of balls that hit UX. If q is the probability to hit UY then the number of balls that hit UY is Y ~ B(X, q) and therefore Y ~ B(n, pq).

Since $$ X \sim B(n, p) $$ and $$ Y \sim B(X, q) $$, by the law of total probability,
 * $$\begin{align}

\Pr[Y = m] &= \sum_{k = m}^{n} \Pr[Y = m \mid X = k] \Pr[X = k] \\[2pt] &= \sum_{k=m}^n \binom{n}{k} \binom{k}{m} p^k q^m (1-p)^{n-k} (1-q)^{k-m} \end{align}$$ Since $$\tbinom{n}{k} \tbinom{k}{m} = \tbinom{n}{m} \tbinom{n-m}{k-m},$$ the equation above can be expressed as
 * $$ \Pr[Y = m] = \sum_{k=m}^{n} \binom{n}{m} \binom{n-m}{k-m} p^k q^m (1-p)^{n-k} (1-q)^{k-m} $$

Factoring $$ p^k = p^m p^{k-m} $$ and pulling all the terms that don't depend on $$ k $$ out of the sum now yields
 * $$\begin{align}

\Pr[Y = m] &= \binom{n}{m} p^m q^m \left( \sum_{k=m}^n \binom{n-m}{k-m} p^{k-m} (1-p)^{n-k} (1-q)^{k-m} \right) \\[2pt] &= \binom{n}{m} (pq)^m \left( \sum_{k=m}^n \binom{n-m}{k-m} \left(p(1-q)\right)^{k-m} (1-p)^{n-k} \right) \end{align}$$ After substituting $$ i = k - m $$ in the expression above, we get
 * $$ \Pr[Y = m] = \binom{n}{m} (pq)^m \left( \sum_{i=0}^{n-m} \binom{n-m}{i} (p - pq)^i (1-p)^{n-m - i} \right) $$

Notice that the sum (in the parentheses) above equals $$ (p - pq + 1 - p)^{n-m} $$ by the binomial theorem. Substituting this in finally yields
 * $$\begin{align}

\Pr[Y=m] &= \binom{n}{m} (pq)^m (p - pq + 1 - p)^{n-m}\\[4pt] &= \binom{n}{m} (pq)^m (1-pq)^{n-m} \end{align}$$ and thus $$ Y \sim B(n, pq) $$ as desired.

Bernoulli distribution
The Bernoulli distribution is a special case of the binomial distribution, where n = 1. Symbolically, X ~ B(1, p) has the same meaning as X ~ Bernoulli(p). Conversely, any binomial distribution, B(n, p), is the distribution of the sum of n independent Bernoulli trials, Bernoulli(p), each with the same probability p.

Normal approximation

If n is large enough, then the skew of the distribution is not too great. In this case a reasonable approximation to B(n, p) is given by the normal distribution

 * $$ \mathcal{N}(np,\,np(1-p)),$$

and this basic approximation can be improved in a simple way by using a suitable continuity correction. The basic approximation generally improves as n increases (at least 20) and is better when p is not near to 0 or 1. Various rules of thumb may be used to decide whether n is large enough, and p is far enough from the extremes of zero or one:

 * One rule is that for n > 5 the normal approximation is adequate if the absolute value of the skewness is strictly less than 0.3; that is, if
 * $$\frac{|1-2p|}{\sqrt{np(1-p)}}=\frac1{\sqrt{n}}\left|\sqrt{\frac{1-p}p}-\sqrt{\frac{p}{1-p}}\,\right|<0.3.$$

This can be made precise using the Berry–Esseen theorem.

 * A stronger rule states that the normal approximation is appropriate only if everything within 3 standard deviations of its mean is within the range of possible values; that is, only if
 * $$\mu\pm3\sigma=np\pm3\sqrt{np(1-p)}\in(0,n).$$
 * This 3-standard-deviation rule is equivalent to the following conditions, which also imply the first rule above.
 * $$n>9 \left(\frac{1-p}{p} \right)\quad\text{and}\quad n>9\left(\frac{p}{1-p}\right).$$

The rule $$ np\pm3\sqrt{np(1-p)}\in(0,n)$$ is totally equivalent to request that
 * $$np-3\sqrt{np(1-p)}>0\quad\text{and}\quad np+3\sqrt{np(1-p)}3\sqrt{np(1-p)}\quad\text{and}\quad n(1-p)>3\sqrt{np(1-p)}.$$

Since $$09 \left(\frac{1-p}p\right) \quad\text{and}\quad n>9 \left(\frac{p}{1-p}\right).$$

Notice that these conditions automatically imply that $$n>9$$. On the other hand, apply again the square root and divide by 3,
 * $$\frac{\sqrt{n}}3>\sqrt{\frac{1-p}p}>0 \quad \text{and} \quad \frac{\sqrt{n}}3 > \sqrt{\frac{p}{1-p}}>0.$$

Subtracting the second set of inequalities from the first one yields:
 * $$\frac{\sqrt{n}}3>\sqrt{\frac{1-p}p}-\sqrt{\frac{p}{1-p}}>-\frac{\sqrt{n}}3;$$

and so, the desired first rule is satisfied,
 * $$\left|\sqrt{\frac{1-p}p}-\sqrt{\frac{p}{1-p}}\,\right|<\frac{\sqrt{n}}3.$$

 * Another commonly used rule is that both values $$np$$ and $$n(1-p)$$ must be greater than or equal to 5. However, the specific number varies from source to source, and depends on how good an approximation one wants. In particular, if one uses 9 instead of 5, the rule implies the results stated in the previous paragraphs.

Assume that both values $$np$$ and $$n(1-p)$$ are greater than 9. Since $$0< p<1$$, we easily have that
 * $$np\geq9>9(1-p)\quad\text{and}\quad n(1-p)\geq9>9p.$$

We only have to divide now by the respective factors $$p$$ and $$1-p$$, to deduce the alternative form of the 3-standard-deviation rule:
 * $$n>9 \left(\frac{1-p}p\right) \quad\text{and}\quad n>9 \left(\frac{p}{1-p}\right).$$

The following is an example of applying a continuity correction. Suppose one wishes to calculate Pr(X ≤ 8) for a binomial random variable X. If Y has a distribution given by the normal approximation, then Pr(X ≤ 8) is approximated by Pr(Y ≤ 8.5). The addition of 0.5 is the continuity correction; the uncorrected normal approximation gives considerably less accurate results.

This approximation, known as de Moivre–Laplace theorem, is a huge time-saver when undertaking calculations by hand (exact calculations with large n are very onerous); historically, it was the first use of the normal distribution, introduced in Abraham de Moivre's book The Doctrine of Chances in 1738. Nowadays, it can be seen as a consequence of the central limit theorem since B(n, p) is a sum of n independent, identically distributed Bernoulli variables with parameter p. This fact is the basis of a hypothesis test, a "proportion z-test", for the value of p using x/n, the sample proportion and estimator of p, in a common test statistic.

For example, suppose one randomly samples n people out of a large population and ask them whether they agree with a certain statement. The proportion of people who agree will of course depend on the sample. If groups of n people were sampled repeatedly and truly randomly, the proportions would follow an approximate normal distribution with mean equal to the true proportion p of agreement in the population and with standard deviation
 * $$\sigma = \sqrt{\frac{p(1-p)}{n}}$$

Poisson approximation
The binomial distribution converges towards the Poisson distribution as the number of trials goes to infinity while the product np converges to a finite limit. Therefore, the Poisson distribution with parameter λ = np can be used as an approximation to B(n, p) of the binomial distribution if n is sufficiently large and p is sufficiently small. According to rules of thumb, this approximation is good if n ≥ 20 and p ≤ 0.05 such that np ≤ 1, or if n > 50 and p < 0.1 such that np < 5, or if n ≥ 100 and np ≤ 10.

Concerning the accuracy of Poisson approximation, see Novak, ch. 4, and references therein.

Limiting distributions

 * Poisson limit theorem: As n approaches ∞ and p approaches 0 with the product np held fixed, the Binomial(n, p) distribution approaches the Poisson distribution with expected value λ = np.
 * de Moivre–Laplace theorem: As n approaches ∞ while p remains fixed, the distribution of

 * $$\frac{X-np}{\sqrt{np(1-p)}}$$

 * approaches the normal distribution with expected value 0 and variance 1. This result is sometimes loosely stated by saying that the distribution of X is asymptotically normal with expected value 0 and variance 1. This result is a specific case of the central limit theorem.

Beta distribution
The binomial distribution and beta distribution are different views of the same model of repeated Bernoulli trials. The binomial distribution is the PMF of $p$ successes given $p$ independent events each with a probability $k$ of success. Mathematically, when $p = 0$ and $X ~ B(n, p)$, the beta distribution and the binomial distribution are related by a factor of $α = k + 1$:
 * $$\operatorname{Beta}(p;\alpha;\beta) = (n+1)B(k;n;p)$$

Beta distributions also provide a family of prior probability distributions for binomial distributions in Bayesian inference:
 * $$P(p;\alpha,\beta) = \frac{p^{\alpha-1}(1-p)^{\beta-1}}{\operatorname{Beta}(\alpha,\beta)}.$$

Given a uniform prior, the posterior distribution for the probability of success $n$ given $p$ independent events with $p$ observed successes is a beta distribution.

Random number generation
Methods for random number generation where the marginal distribution is a binomial distribution are well-established. One way to generate random variates samples from a binomial distribution is to use an inversion algorithm. To do so, one must calculate the probability that $β = n − k + 1$ for all values $n$ from $n + 1$ through $k$. (These probabilities should sum to a value close to one, in order to encompass the entire sample space.) Then by using a pseudorandom number generator to generate samples uniformly between 0 and 1, one can transform the calculated samples into discrete numbers by using the probabilities calculated in the first step.

History
This distribution was derived by Jacob Bernoulli. He considered the case where p = r/(r + s) where p is the probability of success and r and s are positive integers. Blaise Pascal had earlier considered the case where p = 1/2, tabulating the corresponding binomial coefficients in what is now recognized as Pascal's triangle.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Binomial distribution


text:
Biostatistics

Biostatistics (also known as biometry) is a branch of statistics that applies statistical methods to a wide range of topics in biology. It encompasses the design of biological experiments, the collection and analysis of data from those experiments and the interpretation of the results.

Biostatistics and genetics
Biostatistical modeling forms an important part of numerous modern biological theories. Genetics studies, since its beginning, used statistical concepts to understand observed experimental results. Some genetics scientists even contributed with statistical advances with the development of methods and tools. Gregor Mendel started the genetics studies investigating genetics segregation patterns in families of peas and used statistics to explain the collected data. In the early 1900s, after the rediscovery of Mendel's Mendelian inheritance work, there were gaps in understanding between genetics and evolutionary Darwinism. Francis Galton tried to expand Mendel's discoveries with human data and proposed a different model with fractions of the heredity coming from each ancestral composing an infinite series. He called this the theory of "Law of Ancestral Heredity". His ideas were strongly disagreed by William Bateson, who followed Mendel's conclusions, that genetic inheritance were exclusively from the parents, half from each of them. This led to a vigorous debate between the biometricians, who supported Galton's ideas, as Raphael Weldon, Arthur Dukinfield Darbishire and Karl Pearson, and Mendelians, who supported Bateson's (and Mendel's) ideas, such as Charles Davenport and Wilhelm Johannsen. Later, biometricians could not reproduce Galton conclusions in different experiments, and Mendel's ideas prevailed. By the 1930s, models built on statistical reasoning had helped to resolve these differences and to produce the neo-Darwinian modern evolutionary synthesis.

Solving these differences also allowed to define the concept of population genetics and brought together genetics and evolution. The three leading figures in the establishment of population genetics and this synthesis all relied on statistics and developed its use in biology.
 * Ronald Fisher worked alongside statistician Betty Allan developing several basic statistical methods in support of his work studying the crop experiments at Rothamsted Research, published in Fisher's books Statistical Methods for Research Workers (1925) and The Genetical Theory of Natural Selection (1930), as well as Allan's scientific papers. Fisher went on to give many contributions to genetics and statistics. Some of them include the ANOVA, p-value concepts, Fisher's exact test and Fisher's equation for population dynamics. He is credited for the sentence "Natural selection is a mechanism for generating an exceedingly high degree of improbability".
 * Sewall G. Wright developed F-statistics and methods of computing them and defined inbreeding coefficient.
 * J. B. S. Haldane's book, The Causes of Evolution, reestablished natural selection as the premier mechanism of evolution by explaining it in terms of the mathematical consequences of Mendelian genetics. He also developed the theory of primordial soup.

These and other biostatisticians, mathematical biologists, and statistically inclined geneticists helped bring together evolutionary biology and genetics into a consistent, coherent whole that could begin to be quantitatively modeled.

In parallel to this overall development, the pioneering work of D'Arcy Thompson in On Growth and Form also helped to add quantitative discipline to biological study.

Despite the fundamental importance and frequent necessity of statistical reasoning, there may nonetheless have been a tendency among biologists to distrust or deprecate results which are not qualitatively apparent. One anecdote describes Thomas Hunt Morgan banning the Friden calculator from his department at Caltech, saying "Well, I am like a guy who is prospecting for gold along the banks of the Sacramento River in 1849. With a little intelligence, I can reach down and pick up big nuggets of gold. And as long as I can do that, I'm not going to let any people in my department waste scarce resources in placer mining."

Research planning
Any research in life sciences is proposed to answer a scientific question we might have. To answer this question with a high certainty, we need accurate results. The correct definition of the main hypothesis and the research plan will reduce errors while taking a decision in understanding a phenomenon. The research plan might include the research question, the hypothesis to be tested, the experimental design, data collection methods, data analysis perspectives and costs involved. It is essential to carry the study based on the three basic principles of experimental statistics: randomization, replication, and local control.

Research question
The research question will define the objective of a study. The research will be headed by the question, so it needs to be concise, at the same time it is focused on interesting and novel topics that may improve science and knowledge and that field. To define the way to ask the scientific question, an exhaustive literature review might be necessary. So the research can be useful to add value to the scientific community.

Hypothesis definition
Once the aim of the study is defined, the possible answers to the research question can be proposed, transforming this question into a hypothesis. The main propose is called null hypothesis (H0) and is usually based on a permanent knowledge about the topic or an obvious occurrence of the phenomena, sustained by a deep literature review. We can say it is the standard expected answer for the data under the situation in test. In general, HO assumes no association between treatments. On the other hand, the alternative hypothesis is the denial of HO. It assumes some degree of association between the treatment and the outcome. Although, the hypothesis is sustained by question research and its expected and unexpected answers.

As an example, consider groups of similar animals (mice, for example) under two different diet systems. The research question would be: what is the best diet? In this case, H0 would be that there is no difference between the two diets in mice metabolism (H0: μ1 = μ2) and the alternative hypothesis would be that the diets have different effects over animals metabolism (H1: μ1 ≠ μ2).

The hypothesis is defined by the researcher, according to his/her interests in answering the main question. Besides that, the alternative hypothesis can be more than one hypothesis. It can assume not only differences across observed parameters, but their degree of differences (i.e. higher or shorter).

Sampling
Usually, a study aims to understand an effect of a phenomenon over a population. In biology, a population is defined as all the individuals of a given species, in a specific area at a given time. In biostatistics, this concept is extended to a variety of collections possible of study. Although, in biostatistics, a population is not only the individuals, but the total of one specific component of their organisms, as the whole genome, or all the sperm cells, for animals, or the total leaf area, for a plant, for example.

It is not possible to take the measures from all the elements of a population. Because of that, the sampling process is very important for statistical inference. Sampling is defined as to randomly get a representative part of the entire population, to make posterior inferences about the population. So, the sample might catch the most variability across a population. The sample size is determined by several things, since the scope of the research to the resources available. In clinical research, the trial type, as inferiority, equivalence, and superiority is a key in determining sample size.

Experimental design
Experimental designs sustain those basic principles of experimental statistics. There are three basic experimental designs to randomly allocate treatments in all plots of the experiment. They are completely randomized design, randomized block design, and factorial designs. Treatments can be arranged in many ways inside the experiment. In agriculture, the correct experimental design is the root of a good study and the arrangement of treatments within the study is essential because environment largely affects the plots (plants, livestock, microorganisms). These main arrangements can be found in the literature under the names of "lattices", "incomplete blocks", "split plot", "augmented blocks", and many others. All of the designs might include control plots, determined by the researcher, to provide an error estimation during inference.

In clinical studies, the samples are usually smaller than in other biological studies, and in most cases, the environment effect can be controlled or measured. It is common to use randomized controlled clinical trials, where results are usually compared with observational study designs such as case–control or cohort.

Data collection
Data collection methods must be considered in research planning, because it highly influences the sample size and experimental design.

Data collection varies according to type of data. For qualitative data, collection can be done with structured questionnaires or by observation, considering presence or intensity of disease, using score criterion to categorize levels of occurrence. For quantitative data, collection is done by measuring numerical information using instruments.

In agriculture and biology studies, yield data and its components can be obtained by metric measures. However, pest and disease injuries in plats are obtained by observation, considering score scales for levels of damage. Especially, in genetic studies, modern methods for data collection in field and laboratory should be considered, as high-throughput platforms for phenotyping and genotyping. These tools allow bigger experiments, while turn possible evaluate many plots in lower time than a human-based only method for data collection. Finally, all data collected of interest must be stored in an organized data frame for further analysis.

Descriptive tools
Data can be represented through tables or graphical representation, such as line charts, bar charts, histograms, scatter plot. Also, measures of central tendency and variability can be very useful to describe an overview of the data. Follow some examples:

Frequency tables
One type of table is the frequency table, which consists of data arranged in rows and columns, where the frequency is the number of occurrences or repetitions of data. Frequency can be:

Absolute: represents the number of times that a determined value appear;

$$N = f_1 + f_2 + f_3 + ... + f_n$$

Relative: obtained by the division of the absolute frequency by the total number;

$$n_i = \frac{f_i}{N}$$

In the next example, we have the number of genes in ten operons of the same organism.

Line graph

Line graphs represent the variation of a value over another metric, such as time. In general, values are represented in the vertical axis, while the time variation is represented in the horizontal axis.

Bar chart
A bar chart is a graph that shows categorical data as bars presenting heights (vertical bar) or widths (horizontal bar) proportional to represent values. Bar charts provide an image that could also be represented in a tabular format.

In the bar chart example, we have the birth rate in Brazil for the December months from 2010 to 2016. The sharp fall in December 2016 reflects the outbreak of Zika virus in the birth rate in Brazil.

Histograms
The histogram (or frequency distribution) is a graphical representation of a dataset tabulated and divided into uniform or non-uniform classes. It was first introduced by Karl Pearson.

Scatter plot
A scatter plot is a mathematical diagram that uses Cartesian coordinates to display values of a dataset. A scatter plot shows the data as a set of points, each one presenting the value of one variable determining the position on the horizontal axis and another variable on the vertical axis. They are also called scatter graph, scatter chart, scattergram, or scatter diagram.

Mean
The arithmetic mean is the sum of a collection of values ($${x_1+x_2+x_3+\cdots +x_n}$$) divided by the number of items of this collection ($${n}$$).

 * $$\bar{x} = \frac{1}{n}\left (\sum_{i=1}^n{x_i}\right ) = \frac{x_1+x_2+\cdots +x_n}{n}$$

Median
The median is the value in the middle of a dataset.

Mode
The mode is the value of a set of data that appears most often.

Box plot
Box plot is a method for graphically depicting groups of numerical data. The maximum and minimum values are represented by the lines, and the interquartile range (IQR) represent 25–75% of the data. Outliers may be plotted as circles.

Correlation coefficients
Although correlations between two different kinds of data could be inferred by graphs, such as scatter plot, it is necessary validate this though numerical information. For this reason, correlation coefficients are required. They provide a numerical value that reflects the strength of an association.

Pearson correlation coefficient
Pearson correlation coefficient is a measure of association between two variables, X and Y. This coefficient, usually represented by ρ (rho) for the population and r for the sample, assumes values between −1 and 1, where ρ = 1 represents a perfect positive correlation, ρ = −1 represents a perfect negative correlation, and ρ = 0 is no linear correlation.

Inferential statistics
It is used to make inferences about an unknown population, by estimation and/or hypothesis testing. In other words, it is desirable to obtain parameters to describe the population of interest, but since the data is limited, it is necessary to make use of a representative sample in order to estimate them. With that, it is possible to test previously defined hypotheses and apply the conclusions to the entire population. The standard error of the mean is a measure of variability that is crucial to do inferences.
 * Hypothesis testing

Hypothesis testing is essential to make inferences about populations aiming to answer research questions, as settled in "Research planning" section. Authors defined four steps to be set:

 * 1) The hypothesis to be tested: as stated earlier, we have to work with the definition of a null hypothesis (H0), that is going to be tested, and an alternative hypothesis. But they must be defined before the experiment implementation.
 * 2) Significance level and decision rule: A decision rule depends on the level of significance, or in other words, the acceptable error rate (α). It is easier to think that we define a critical value that determines the statistical significance when a test statistic is compared with it. So, α also has to be predefined before the experiment.
 * 3) Experiment and statistical analysis: This is when the experiment is really implemented following the appropriate experimental design, data is collected and the more suitable statistical tests are evaluated.
 * 4) Inference: Is made when the null hypothesis is rejected or not rejected, based on the evidence that the comparison of p-values and α brings. It is pointed that the failure to reject H0 just means that there is not enough evidence to support its rejection, but not that this hypothesis is true.
 * Confidence intervals

A confidence interval is a range of values that can contain the true real parameter value in given a certain level of confidence. The first step is to estimate the best-unbiased estimate of the population parameter. The upper value of the interval is obtained by the sum of this estimate with the multiplication between the standard error of the mean and the confidence level. The calculation of lower value is similar, but instead of a sum, a subtraction must be applied.

Power and statistical error
When testing a hypothesis, there are two types of statistic errors possible: Type I error and Type II error.

 * The type I error or false positive is the incorrect rejection of a true null hypothesis
 * The type II error or false negative is the failure to reject a false null hypothesis.

The significance level denoted by α is the type I error rate and should be chosen before performing the test. The type II error rate is denoted by β and statistical power of the test is 1 − β.

p-value
The p-value is the probability of obtaining results as extreme as or more extreme than those observed, assuming the null hypothesis (H0) is true. It is also called the calculated probability. It is common to confuse the p-value with the significance level (α), but, the α is a predefined threshold for calling significant results. If p is less than α, the null hypothesis (H0) is rejected.

Multiple testing
In multiple tests of the same hypothesis, the probability of the occurrence of falses positives (familywise error rate) increase and some strategy are used to control this occurrence. This is commonly achieved by using a more stringent threshold to reject null hypotheses. The Bonferroni correction defines an acceptable global significance level, denoted by α* and each test is individually compared with a value of α = α*/m. This ensures that the familywise error rate in all m tests, is less than or equal to α*. When m is large, the Bonferroni correction may be overly conservative. An alternative to the Bonferroni correction is to control the false discovery rate (FDR). The FDR controls the expected proportion of the rejected null hypotheses (the so-called discoveries) that are false (incorrect rejections). This procedure ensures that, for independent tests, the false discovery rate is at most q*. Thus, the FDR is less conservative than the Bonferroni correction and have more power, at the cost of more false positives.

Mis-specification and robustness checks
The main hypothesis being tested (e.g., no association between treatments and outcomes) is often accompanied by other technical assumptions (e.g., about the form of the probability distribution of the outcomes) that are also part of the null hypothesis. When the technical assumptions are violated in practice, then the null may be frequently rejected even if the main hypothesis is true. Such rejections are said to be due to model mis-specification. Verifying whether the outcome of a statistical test does not change when the technical assumptions are slightly altered (so-called robustness checks) is the main way of combating mis-specification.

Model selection criteria
Model criteria selection will select or model that more approximate true model. The Akaike's Information Criterion (AIC) and The Bayesian Information Criterion (BIC) are examples of asymptotically efficient criteria.

Developments and big data
Recent developments have made a large impact on biostatistics. Two important changes have been the ability to collect data on a high-throughput scale, and the ability to perform much more complex analysis using computational techniques. This comes from the development in areas as sequencing technologies, Bioinformatics and Machine learning (Machine learning in bioinformatics).

Use in high-throughput data
New biomedical technologies like microarrays, next-generation sequencers (for genomics) and mass spectrometry (for proteomics) generate enormous amounts of data, allowing many tests to be performed simultaneously. Careful analysis with biostatistical methods is required to separate the signal from the noise. For example, a microarray could be used to measure many thousands of genes simultaneously, determining which of them have different expression in diseased cells compared to normal cells. However, only a fraction of genes will be differentially expressed.

Multicollinearity often occurs in high-throughput biostatistical settings. Due to high intercorrelation between the predictors (such as gene expression levels), the information of one predictor might be contained in another one. It could be that only 5% of the predictors are responsible for 90% of the variability of the response. In such a case, one could apply the biostatistical technique of dimension reduction (for example via principal component analysis). Classical statistical techniques like linear or logistic regression and linear discriminant analysis do not work well for high dimensional data (i.e. when the number of observations n is smaller than the number of features or predictors p: n < p). As a matter of fact, one can get quite high R2-values despite very low predictive power of the statistical model. These classical statistical techniques (esp. least squares linear regression) were developed for low dimensional data (i.e. where the number of observations n is much larger than the number of predictors p: n >> p). In cases of high dimensionality, one should always consider an independent validation test set and the corresponding residual sum of squares (RSS) and R2 of the validation test set, not those of the training set.

Often, it is useful to pool information from multiple predictors together. For example, Gene Set Enrichment Analysis (GSEA) considers the perturbation of whole (functionally related) gene sets rather than of single genes. These gene sets might be known biochemical pathways or otherwise functionally related genes. The advantage of this approach is that it is more robust: It is more likely that a single gene is found to be falsely perturbed than it is that a whole pathway is falsely perturbed. Furthermore, one can integrate the accumulated knowledge about biochemical pathways (like the JAK-STAT signaling pathway) using this approach.

Bioinformatics advances in databases, data mining, and biological interpretation
The development of biological databases enables storage and management of biological data with the possibility of ensuring access for users around the world. They are useful for researchers depositing data, retrieve information and files (raw or processed) originated from other experiments or indexing scientific articles, as PubMed. Another possibility is search for the desired term (a gene, a protein, a disease, an organism, and so on) and check all results related to this search. There are databases dedicated to SNPs (dbSNP), the knowledge on genes characterization and their pathways (KEGG) and the description of gene function classifying it by cellular component, molecular function and biological process (Gene Ontology). In addition to databases that contain specific molecular information, there are others that are ample in the sense that they store information about an organism or group of organisms. As an example of a database directed towards just one organism, but that contains much data about it, is the Arabidopsis thaliana genetic and molecular database – TAIR. Phytozome, in turn, stores the assemblies and annotation files of dozen of plant genomes, also containing visualization and analysis tools. Moreover, there is an interconnection between some databases in the information exchange/sharing and a major initiative was the International Nucleotide Sequence Database Collaboration (INSDC) which relates data from DDBJ, EMBL-EBI, and NCBI.

Nowadays, increase in size and complexity of molecular datasets leads to use of powerful statistical methods provided by computer science algorithms which are developed by machine learning area. Therefore, data mining and machine learning allow detection of patterns in data with a complex structure, as biological ones, by using methods of supervised and unsupervised learning, regression, detection of clusters and association rule mining, among others. To indicate some of them, self-organizing maps and k-means are examples of cluster algorithms; neural networks implementation and support vector machines models are examples of common machine learning algorithms.

Collaborative work among molecular biologists, bioinformaticians, statisticians and computer scientists is important to perform an experiment correctly, going from planning, passing through data generation and analysis, and ending with biological interpretation of the results.

Use of computationally intensive methods
On the other hand, the advent of modern computer technology and relatively cheap computing resources have enabled computer-intensive biostatistical methods like bootstrapping and re-sampling methods.

In recent times, random forests have gained popularity as a method for performing statistical classification. Random forest techniques generate a panel of decision trees. Decision trees have the advantage that you can draw them and interpret them (even with a basic understanding of mathematics and statistics). Random Forests have thus been used for clinical decision support systems.

Public health
Public health, including epidemiology, health services research, nutrition, environmental health and health care policy & management. In these medicine contents, it's important to consider the design and analysis of the clinical trials. As one example, there is the assessment of severity state of a patient with a prognosis of an outcome of a disease.

With new technologies and genetics knowledge, biostatistics are now also used for Systems medicine, which consists in a more personalized medicine. For this, is made an integration of data from different sources, including conventional patient data, clinico-pathological parameters, molecular and genetic data as well as data generated by additional new-omics technologies.

Quantitative genetics
The study of population genetics and statistical genetics in order to link variation in genotype with a variation in phenotype. In other words, it is desirable to discover the genetic basis of a measurable trait, a quantitative trait, that is under polygenic control. A genome region that is responsible for a continuous trait is called a quantitative trait locus (QTL). The study of QTLs become feasible by using molecular markers and measuring traits in populations, but their mapping needs the obtaining of a population from an experimental crossing, like an F2 or recombinant inbred strains/lines (RILs). To scan for QTLs regions in a genome, a gene map based on linkage have to be built. Some of the best-known QTL mapping algorithms are Interval Mapping, Composite Interval Mapping, and Multiple Interval Mapping.

However, QTL mapping resolution is impaired by the amount of recombination assayed, a problem for species in which it is difficult to obtain large offspring. Furthermore, allele diversity is restricted to individuals originated from contrasting parents, which limit studies of allele diversity when we have a panel of individuals representing a natural population. For this reason, the genome-wide association study was proposed in order to identify QTLs based on linkage disequilibrium, that is the non-random association between traits and molecular markers. It was leveraged by the development of high-throughput SNP genotyping.

In animal and plant breeding, the use of markers in selection aiming for breeding, mainly the molecular ones, collaborated to the development of marker-assisted selection. While QTL mapping is limited due resolution, GWAS does not have enough power when rare variants of small effect that are also influenced by environment. So, the concept of Genomic Selection (GS) arises in order to use all molecular markers in the selection and allow the prediction of the performance of candidates in this selection. The proposal is to genotype and phenotype a training population, develop a model that can obtain the genomic estimated breeding values (GEBVs) of individuals belonging to a genotype and but not phenotype population, called testing population. This kind of study could also include a validation population, thinking in the concept of cross-validation, in which the real phenotype results measured in this population are compared with the phenotype results based on the prediction, what used to check the accuracy of the model.

As a summary, some points about the application of quantitative genetics are:
 * This has been used in agriculture to improve crops (Plant breeding) and livestock (Animal breeding).
 * In biomedical research, this work can assist in finding candidates gene alleles that can cause or influence predisposition to diseases in human genetics

Expression data
Studies for differential expression of genes from RNA-Seq data, as for RT-qPCR and microarrays, demands comparison of conditions. The goal is to identify genes which have a significant change in abundance between different conditions. Then, experiments are designed appropriately, with replicates for each condition/treatment, randomization and blocking, when necessary. In RNA-Seq, the quantification of expression uses the information of mapped reads that are summarized in some genetic unit, as exons that are part of a gene sequence. As microarray results can be approximated by a normal distribution, RNA-Seq counts data are better explained by other distributions. The first used distribution was the Poisson one, but it underestimate the sample error, leading to false positives. Currently, biological variation is considered by methods that estimate a dispersion parameter of a negative binomial distribution. Generalized linear models are used to perform the tests for statistical significance and as the number of genes is high, multiple tests correction have to be considered. Some examples of other analysis on genomics data comes from microarray or proteomics experiments. Often concerning diseases or disease stages.

Other studies

 * Ecology, ecological forecasting
 * Biological sequence analysis
 * Systems biology for gene network inference or pathways analysis.
 * Clinical research and pharmaceutical development
 * Population dynamics, especially in regards to fisheries science.
 * Phylogenetics and evolution
 * Pharmacodynamics
 * Pharmacokinetics
 * Neuroimaging

Tools
There are a lot of tools that can be used to do statistical analysis in biological data. Most of them are useful in other areas of knowledge, covering a large number of applications (alphabetical). Here are brief descriptions of some of them:
 * ASReml: Another software developed by VSNi that can be used also in R environment as a package. It is developed to estimate variance components under a general linear mixed model using restricted maximum likelihood (REML). Models with fixed effects and random effects and nested or crossed ones are allowed. Gives the possibility to investigate different variance-covariance matrix structures.
 * CycDesigN: A computer package developed by VSNi that helps the researchers create experimental designs and analyze data coming from a design present in one of three classes handled by CycDesigN. These classes are resolvable, non-resolvable, partially replicated and crossover designs. It includes less used designs the Latinized ones, as t-Latinized design.
 * Orange: A programming interface for high-level data processing, data mining and data visualization. Include tools for gene expression and genomics.
 * R: An open source environment and programming language dedicated to statistical computing and graphics. It is an implementation of S language maintained by CRAN. In addition to its functions to read data tables, take descriptive statistics, develop and evaluate models, its repository contains packages developed by researchers around the world. This allows the development of functions written to deal with the statistical analysis of data that comes from specific applications. In the case of Bioinformatics, for example, there are packages located in the main repository (CRAN) and in others, as Bioconductor. It is also possible to use packages under development that are shared in hosting-services as GitHub.
 * SAS: A data analysis software widely used, going through universities, services and industry. Developed by a company with the same name (SAS Institute), it uses SAS language for programming.
 * PLA 3.0: Is a biostatistical analysis software for regulated environments (e.g. drug testing) which supports Quantitative Response Assays (Parallel-Line, Parallel-Logistics, Slope-Ratio) and Dichotomous Assays (Quantal Response, Binary Assays). It also supports weighting methods for combination calculations and the automatic data aggregation of independent assay data.
 * Weka: A Java software for machine learning and data mining, including tools and methods for visualization, clustering, regression, association rule, and classification. There are tools for cross-validation, bootstrapping and a module of algorithm comparison. Weka also can be run in other programming languages as Perl or R.
 * Python (programming language) image analysis, deep-learning, machine-learning
 * SQL databases
 * NoSQL
 * NumPy numerical python
 * SciPy
 * SageMath
 * LAPACK linear algebra
 * MATLAB
 * Apache Hadoop
 * Apache Spark
 * Amazon Web Services

Scope and training programs
Almost all educational programmes in biostatistics are at postgraduate level. They are most often found in schools of public health, affiliated with schools of medicine, forestry, or agriculture, or as a focus of application in departments of statistics.

In the United States, where several universities have dedicated biostatistics departments, many other top-tier universities integrate biostatistics faculty into statistics or other departments, such as epidemiology. Thus, departments carrying the name "biostatistics" may exist under quite different structures. For instance, relatively new biostatistics departments have been founded with a focus on bioinformatics and computational biology, whereas older departments, typically affiliated with schools of public health, will have more traditional lines of research involving epidemiological studies and clinical trials as well as bioinformatics. In larger universities around the world, where both a statistics and a biostatistics department exist, the degree of integration between the two departments may range from the bare minimum to very close collaboration. In general, the difference between a statistics program and a biostatistics program is twofold: (i) statistics departments will often host theoretical/methodological research which are less common in biostatistics programs and (ii) statistics departments have lines of research that may include biomedical applications but also other areas such as industry (quality control), business and economics and biological areas other than medicine.

Specialized journals

 * Biostatistics
 * International Journal of Biostatistics
 * Journal of Epidemiology and Biostatistics
 * Biostatistics and Public Health
 * Biometrics
 * Biometrika
 * Biometrical Journal
 * Communications in Biometry and Crop Science
 * Statistical Applications in Genetics and Molecular Biology
 * Statistical Methods in Medical Research
 * Pharmaceutical Statistics
 * Statistics in Medicine

title: Biostatistics


text:
Talk:Bisexual (disambiguation)

Hermaphrodite and Androgynous (botany)
The edit comment discussions are so much more fun, but tragically I don't have an edit to go with my comment this time. To answer User:Marshman's query: when I say that "hermaphroditic" and "androgynous" are still used as synonyms for "bisexual" in botanical terminology I'm basing this on fairly technical, recently published books I have perused that use these terms, as well as widespread use on the WWW. Botanical use of hermaphrodite is also supported be MerWeb. MerWeb also basically indicates that bisexual, hermaphrodite, and androgynous are generally synonymous (including allowing "hemaphrodite" as an adjective :p). I said "popular" use because you suggested they are no longer preferred by professional botanists; I wouldn't know; MerWeb is not a very technical source. --Chinasaur 01:05, 8 Sep 2004 (UTC)

Article title
Surely this should be at Bisexual (disambiguation), as bisexuality is a much more frequent use of the term. Also, the third bullet point (including the point about bonobo monkeys), isn't a separate term, merely a paragraph that should be added to the article bisexuality, surely? — OwenBlacker 23:48, July 24, 2005 (UTC)

 * I was thinking the same thing. I am going to go ahead and move it, it has no sense being here. --Waterspyder 20:30, 3 December 2005 (UTC)

 * I agree. Moving it now. -- OliverL 10:43, 6 January 2006 (UTC)

title: Talk:Bisexual (disambiguation)