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

Bayes' theorem applied

Let's actually solve out a pretty straightforward, yet typical Bayes' theorem interview problem. You have two coins in your hand. Out of the two coins, one is a real coin (heads and tails) and the other is a faulty coin with tails on both sides.

You are blindfolded and forced to choose a random coin and then toss it in the air. The coin lands with tails facing upwards. Find the probability that this is the faulty coin.

Bu egzersiz

Practicing Statistics Interview Questions in Python

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

Egzersiz talimatları

  • Print the probability of the coin landing tails.
  • Print the probability of the coin being faulty.
  • Print the probability of the coin being faulty and landing tails.
  • Print and solve for the probability that the coin is faulty, given it came down on tails.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Print P(tails)
print(____)

# Print P(faulty)
print(____)

# Print P(tails and faulty)
print(____)

# Print P(faulty | tails)
print(____)
Kodu Düzenle ve Çalıştır