ПочатиПочніть безкоштовно

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?

Ця вправа є частиною курсу

Foundations of Probability in R

Переглянути курс

Інструкції до вправи

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

Інтерактивна практична вправа

Спробуйте виконати цю вправу, доповнивши цей зразок коду.

# 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
Редагувати та запускати код