1. Learn
  2. /
  3. Courses
  4. /
  5. Foundations of Probability in R

Exercise

Calculating the variance

What is the variance of a binomial distribution where 25 coins are flipped, each having a 30% chance of heads?

Instructions

100 XP
  • Calculate this using the exact formula you learned in the lecture: the variance of the binomial is size * p * (1 - p). Print this result to the screen.
  • Confirm with a simulation of 10,000 trials.