正在加载图片...
6.042/18.] Mathematics for Computer Science May4,2005 Srini devadas and Eric Lehman Notes for Recitation 21 Problem 1. A couple decides to have children until they have both a boy and a girl. What is the expected number of children that they'll end up with? Assume that each child is equally likely to be a boy or a girl and genders are mutually independent Solution. There are many ways to solve this problem. We'll do it from first principles Suppose that a couple has children until they have both a boy and a girl. a tree dia gram for this experiment is shown below #t kids prob 112 B 112 G 3 1/8 112 1/2 1/2 112 B 112 Let the random variable r be the number of children the couple has. From the definition Ex(R ∑R(m)Pr() 2.-+3·-+4·+ +3·-+4 2(2·+3 The only difficulty is evaluating the sum. We can use the general formula6.042/18.062J Mathematics for Computer Science May 4, 2005 Srini Devadas and Eric Lehman Notes for Recitation 21 Problem 1. A couple decides to have children until they have both a boy and a girl. What is the expected number of children that they’ll end up with? Assume that each child is equally likely to be a boy or a girl and genders are mutually independent. Solution. There are many ways to solve this problem. We’ll do it from first principles. Suppose that a couple has children until they have both a boy and a girl. A tree dia￾gram for this experiment is shown below. B B B B B G G G G G # kids prob 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 3 2 2 3 1/4 1/8 1/4 1/8 . . . . . . Let the random variable R be the number of children the couple has. From the definition of expectation, we have: � Ex (R) = R(w) · Pr (w) w∈S � � � � 1 1 1 1 1 1 = 2 · � 4 + 3 · 8 + 4 · 16 + . . . + 2 · � 4 + 3 · 8 + 4 · 16 + . . . = 2 2 · 1 4 + 3 · 1 8 + 4 · 1 16 + . . . . (1) The only difficulty is evaluating the sum. We can use the general formula 1 3 1 + 2r + 3r 2 + 4r + . . . = (1 − r)2
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有