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

Updating for other outcomes

In the last exercise, you solved for the probability that the coin is fair if it results in 11 heads out of 20 flips, assuming that beforehand there was an equal chance of it being a fair coin or a biased coin. Recall that the code looked something like:

probability_fair <- dbinom(11, 20, .5)
probability_biased <- dbinom(11, 20, .75)
probability_fair / (probability_fair + probability_biased)

Now you'll find, using the dbinom() approach, the posterior probability if there were two other outcomes.

Bu egzersiz

Foundations of Probability in R

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

Egzersiz talimatları

  • Find the probability that a coin resulting in 14 heads out of 20 flips is fair.
  • Find the probability that a coin resulting in 18 heads out of 20 flips is fair.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Find the probability that a coin resulting in 14/20 is fair


# Find the probability that a coin resulting in 18/20 is fair
Kodu Düzenle ve Çalıştır