BaşlayınÜcretsiz Başlayın

Take the binomial distribution for a spin

It turns out that the generative model you ran last exercise already has a name. It's called the binomial process or the binomial distribution. In R you can use the rbinom function to simulate data from a binomial distribution. The rbinom function takes three arguments:

  • n The number of times you want to run the generative model
  • size The number of trials. (For example, the number of zombies you're giving the drug.)
  • prob The underlying proportion of success as a number between 0.0 and 1.0.

Bu egzersiz

Fundamentals of Bayesian Data Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Try out rbinom
rbinom(n = 1, size = ___, prob = ___)
Kodu Düzenle ve Çalıştır