MulaiMulai sekarang secara gratis

Calculating the variance

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

Latihan ini adalah bagian dari kursus

Foundations of Probability in R

Lihat Kursus

Petunjuk latihan

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

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Calculate the variance using the exact formula


# Confirm with a simulation using rbinom
Edit dan Jalankan Kode