## Binomial probability function plot(0:40, dbinom(0:40, 40, 0.5), type = "h", xlab = "Number of A preferences", ylab = "Probability") ## Highlighting the observations leading to a discrepancy ## of 8 or more preferences x <- c(0:12, 28:40) segments(x, rep(0, length(x)), x, dbinom(x, 40, 0.5), lwd = 4) }