Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 3 homework H5 #2

Open
jsevo opened this issue Aug 28, 2017 · 0 comments
Open

Chapter 3 homework H5 #2

jsevo opened this issue Aug 28, 2017 · 0 comments

Comments

@jsevo
Copy link
Collaborator

jsevo commented Aug 28, 2017

I believe that the number of boys in births following a girl is disproportionately high (unlike your answer atm, Rene).

here my R code that requires 10k samples from the posterior if births were independent (the 111 boys out of 200 data)

firstgirls <- sum(birth1==0)
firstwasgirl <- birth2[birth1==0]
firstgirls
boyfirstwasgirl <- sum(firstwasgirl)

simboys <- rbinom(n = 10000, size = firstgirls, prob = samples) #10k samples from posterior if idependent
dens(simboys, adj=1,)
abline(v=boyfirstwasgirl,  ) #what an outlier this number of boys following a girl is! probs engineering of designer babies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant