ComenzarEmpieza gratis

Varying the number of trials

In the last exercise you tried flipping ten coins with a 30% probability of heads to find the probability at least five are heads. You found that the exact answer was 1 - pbinom(4, 10, .3) = 0.1502683, then confirmed with 10,000 simulated trials.

Did you need all 10,000 trials to get an accurate answer? Would your answer have been more accurate with more trials?

Este ejercicio forma parte del curso

Foundations of Probability in R

Ver curso

Instrucciones del ejercicio

  • Try answering this question with simulations of 100, 1,000, 10,000, 100,000 trials.
  • Which is the closest to the exact answer?

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Here is how you computed the answer in the last problem
mean(rbinom(10000, 10, .3) >= 5)

# Try now with 100, 1000, 10,000, and 100,000 trials
Editar y ejecutar código