[R] family question

Duncan Murdoch murdoch at stats.uwo.ca
Mon Aug 28 21:46:28 CEST 2000

On Wed, 30 Aug 2000 15:38:35 -0400 (EDT), you wrote in message
<Pine.LNX.4.10.10008301511240.1977-100000 at bolker.zoo.ufl.edu>:

>  Seems like a very odd setup but it does seem as though the code would do
>what you wanted.  Also seems as though you could do some combinatorics to
>get the answer much more efficiently if you wanted to ... (i.e., write
>down the probabilities of having families that were (1 boy, 0 girl = 50%)
>(2 boy, 1 girl = dbinom(2,3,0.5) = 3/8), (3 boys, 2 girls), (4 boys, 3
>girls), etc., and then divide by the sum.  

You've got the probabilities wrong.  For example, to get 2 boys and 1
girl, the first child must be a girl (or there would be no more
children), and the last 2 both boys.  So the probability is 1/8, not
3/8.  To get 3 boys and 2 girls, the first is a girl, the second could
be either, the third depends on the first two.  It's messy.

Duncan Murdoch
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list