WILD 502 schedule

The binomial distribution is a finite discrete distribution. The binomial distribution arises in situations where one is observing a sequence of what are known as Bernoulli trials. A Bernoulli trial is an experiment which has exactly two possible outcomes: success and failure. Further the probability of success is a fixed number \(p\) which does not change no matter how many times we conduct the experiment. A binomial distributed variable counts the number of successes in a sequence of \(N\) independent Bernoulli trials. The probability of a success (head) is denoted by \(p\). For \(N\) trials we can obtain between \(0\) and \(N\) successes.

Binomial probability density function

A representative example of a binomial probability density function (pdf) is plotted below for a case with \(p = 0.3\) and \(N = 12\), and provides the probability of observing -1, 0, 1, …, 11, or 12 heads. Note, as expected, there is 0 probability of obtaining fewer than 0 heads or more than 12 heads. The probability density is at a peak for the case where we observe 3 or 4 heads in 12 trials. For this discrete distribution, the heights of the bars represent the probability of observing each of the outcomes and sum to 1.

x1  <- -1:13
df <- data.frame(x = x1, y = dbinom(x1, 12, 0.3))
ggplot(df, aes(x = x, y = y)) + 
  geom_bar(stat = "identity", col = "gray", fill = "gray") + 
  scale_y_continuous(expand = c(0.01, 0)) + 
  xlab("") + 
  ylab("Probability Density Function") + 
  scale_x_continuous("", limits = c(-1, 13), breaks = seq(-1, 13, by = 1)) +
  theme_bw()