# Binomial Distribution >[!Abstract] The Normal Distribution, sometimes called the Gaussian, is a form of [[Probability Distributions]] takes the following form: > > > >$f_X(x) = \binom{n}{x}p^xq^{n-x} = \frac{n!}{x!(n-x)!}p^xq^{n-x} $ > >- Models discrete data >- Collection of curves and their shape is deetermined by two variables: > - Probability of success > - Total number of trials >- An example: the number of clicks on a certain website ## The Negative Binomial Distribution - Represents the number of successes before a specified number of failures occur - Success and failure are arbitrary terms, you can define them however you choose - Eg. number of heads that come up before the 10th tail comes up ## Examples of Binomial Distributions What is the probability of 3 successes in 20 trials of rolling a die? ```R # dbinom # P(X=3) dbinom(x=3, size=20, prob=1/6) ``` `[1] 0.2378866` What is the probability that you have 3 successes or less? ```R # P(X=0) & P(X=1) & ... & P(X=3) res <- dbinom(x=0:3, size=20, prob=1/6) sum(res) # or pbinom(q=3, size=20, prob=1/6, lower.tail=T) ```