Kernel: Python 3
Think Bayes
This notebook presents example code and exercise solutions for Think Bayes.
Copyright 2018 Allen B. Downey
MIT License: https://opensource.org/licenses/MIT
In [5]:
Exercise: This exercise is from one of my favorite books, David MacKay's "Information Theory, Inference, and Learning Algorithms":
Elvis Presley had a twin brother who died at birth. What is the probability that Elvis was an identical twin?"
To answer this one, you need some background information: According to the Wikipedia article on twins: "Twins are estimated to be approximately 1.9% of the world population, with monozygotic twins making up 0.2% of the total---and 8% of all twins.''
In [6]:
Out[6]:
Pmf({'fraternal': 0.92, 'identical': 0.08})
In [7]:
Out[7]:
fraternal 0.8518518518518517
identical 0.14814814814814814