Comments (2)
I agree with your statement, the solution provided in the book doesn't make sense in my head.
In my opinion, it's clearer to state the possible outcomes we are expecting and to follow the choosing of the socks step by step:
# K is black
prior = Pmf(1 / 5, ['WW', 'KK', 'RR', 'GG', 'BB'])
likelihood = [1 / 2, 1 / 2, 1 / 3, 1 / 3, 1 / 3]
# draw the first sock
pmf = prior * likelihood
pmf.normalize()
pmf['WW'] # 0.25
# draw the second sock
pmf = pmf * likelihood
pmf.normalize()
pmf['WW'] # 0.3
from thinkbayes2.
I believe the answer in the book is correct under the assumption stated in the problem "For simplicity, letβs assume that there are so many socks in both drawers that removing one sock makes a negligible change to the proportions."
This assumption is not super realistic, but it is intended to simplify the problem so it can be solved by applying the methods in the chapter.
The solution has two steps: first, figuring out the probability that the socks were drawn from the drawer with black and white socks, and then the probability that the socks are white if they were drawn from the black and white drawer.
from thinkbayes2.
Related Issues (20)
- Chapter 8 missing cells in zip file HOT 3
- 'Compile' book from code HOT 1
- Chapter 10 Solutions - Definition / Implementation mismatch for the logistic HOT 1
- Chapter 6 Goblin Exercise HOT 2
- Example 6-8 number of Outperforming Portfolios HOT 2
- Chapter 20 Counting Cells Measurement Error Specification HOT 5
- What is considered to be the "data" in the M&M solution? (Ch 2: Bayes's Theorem) HOT 2
- Chapter 1 download data code isn't working HOT 5
- TypeError: Series.__init__() got an unexpected keyword argument 'normalize' HOT 2
- gss_bayes.csv HOT 2
- Oliver Problem - Chapter 6 - General Question HOT 1
- Lincoln Index - Three parameter model HOT 17
- Linda problem should use conditional probability when it comes to sex. HOT 2
- Formulas Not Displaying Properly in github.io version HOT 3
- Chapter 5 Prison Sentences HOT 7
- Chapter 1: caseid definition in the gss_bayes dataset HOT 1
- Chapter 8 - unexpected overlapping curves HOT 1
- Chapter 2 - nomenclature adjustment HOT 2
- Chapter 4 - Proper Prior Probability Initialisation
- Chapter 4 - Typo in Plot Legend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thinkbayes2.