НачатьНачать бесплатно

Calculating the expected value

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

Это упражнение является частью курса

Foundations of Probability in R

Посмотреть курс

Инструкции к упражнению

  • Calculate this using the exact formula you learned in the lecture: the expected value of the binomial is size * p. Print this result to the screen.
  • Confirm with a simulation of 10,000 draws from the binomial.

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Calculate the expected value using the exact formula


# Confirm with a simulation using rbinom
Редактировать и запускать код