Aan de slagGa gratis aan de slag

Calculating the variance

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

Deze oefening maakt deel uit van de cursus

Foundations of Probability in R

Cursus bekijken

Oefeninstructies

  • 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.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Calculate the variance using the exact formula


# Confirm with a simulation using rbinom
Code bewerken en uitvoeren