Selected Answers to Problem Set 4


1. The possible outcomes of children for the family:

One boy (50%)
One girl and one boy (25%)
Two girls and one boy (12.5%)
Three girls (12.5%).

b (one boy) occurs 1/2 of the time (b/2)
gb occurs 1/4 of the time (g/4 + b/4)
ggb occurs 1/8 of the time (2g/8 + b/8)
ggg occurs 1/8 of the time (3g/8)

Add the expected values up to get the overall expected value.
E = b/2 + g/4 + b/4 + g/4 + b/8 + 3g/8
  = (4b + 2g + 2b + 2g + b + 3g) / 8
  = (7b + 7g) / 8
  = 7b/8 + 7g/8
Although we will never give birth to 7/8 of a boy, we can see that the ratio of boys to girls is the same. That is, the expected number of boys and girls will be the same. This is true no matter the maximum number of children may be. The royal family is expected to have 1.75 (7/8 + 7/8) children.

Click here for scripts that simulate this family. The first script simulates one family, while the second simulates 10000 families, adds the number of boys and girls, and prints the total result. Notive the final numbers in the second script--they should be around 7/8th of 10000, or about 8750.


2. The probability that a test for k people will be negative will be (1-p)^k, where 1-p is the probability that one person is negative, multiplied k times. The probability that a test for k people will be positive is the compliment, or 1 - (1-p)^k.

The probability that the test for a pooled sample of k people will be positive is the number of tests done for a negative sample times the probability of a negative sample, plus the number of tests done for a positive sample times the probability of a postive sample.

Tests in negative sample: 1
Prob. of negative sample: (1-p)^k

Tests in positive sample: k+1
Prob. of positive sample: 1-(1-p)^k

Total probability (and simplified):

Here's a Maple worksheet (pdf file) demonstrating the answer to part three of the homework.
3.  Taking a smaller game (say, three picks for a total of five marbles) 
we can see the probability and find a correlation or pattern.  We'll use 
red and blue marbles.

Drawing three blue marbles:
1/2 * 2/3 * 3/4 = 1/4
Total chance: 1/4

Drawing two blue marbles and one red marble:
1/2 * 2/3 * 1/4 = 1/20
1/2 * 1/3 * 2/4 = 1/20
1/2 * 1/3 * 2/4 = 1/20
Total chance: 1/4

Drawing two red marbles and one blue marble:
1/2 * 2/3 * 1/4 = 1/20
1/2 * 1/3 * 2/4 = 1/20
1/2 * 1/3 * 2/4 = 1/20
Total chance: 1/4

Drawing three red marbles:
1/2 * 2/3 * 3/4 = 1/4
Total chance: 1/4

Click here to see the programs I have written for this problem. The first is the simple version, the second is the summation of multiple games, the third is used to derive a histogram. The polyaurn.txt is written from the polyaurn3.pl file, which is 250 trials of the game (I rounded each value to the hundreds digit to get a better graph). Each number is the number of white balls in each game. Here is a histogram of these values.

A better graph can be seen here. This time, the axes are constrained.


As you can see, the values are all spread out. There is no correlation between any values.
4. The expected value is calcualated as (50 * 1/9) + (25 * 3/9) + (10 * 5/9) = 175/9 = 19.44. The standard deviation is calculated as:
SD = sqrt((50 - 175/9)² * 1/9 + (25 - 175/9)² * 3/9 + (10 - 175/9)² * 5/9)
   = sqrt(103.7380 + 10.2881 + 49.5542)
   = sqrt(163.5802)
   = 12.7898

Let us assume that the ratio of yes to no will stabilize as the number of people reaches infinity. Therefore, for some number p of people, yp will hear yes, and np will hear no. Let y and n be the percentage of people hearing yes and no. The number of people who will hear yes at time t+1 will be 80% of the people who heard yes at time t, plus 40% of the people who heard no. 20% of the people who heard yes will say no at time t+1, and 60% of the people who heard no will say no as well. Also, let us assume that as the line gets very large, the percentage of people who hear yes will remain the same (it will reach a stability point).
y at time t+1 = 0.8(y at time t) + 0.4(n at time t)
n at time t+1 = 0.2(y at time t) + 0.6(n at time t)
---
Therefore,
y = 0.8y + 0.4n
n = 0.2y + 0.6n

We can solve for y and n in these equations.

0 = -0.2y + 0.4n
0 =  0.2y - 0.4n

Therefore:
0.2y = 0.4n
y = 2n

And since we know that y + n = 1 (and n = 1 - y):
y = 2 - 2y
3y = 2
y = 2/3
2/3, or 67% of the people in line will hear yes, while 1/3, or 33% of the fans will hear no.

Using Markov Matrices

From the above equation, we can write the formulas as:
| y |   | 0.8 0.4 | | y |
|   | = |         | |   |
| n |   | 0.2 0.6 | | n |

We know that (1) this is a Markov matrix because all the columns add up to 
1, and (2) this will reach a stability point, since there are no zeroes in 
the matrix.  If we take the matrix to a high-enough power k, then:

| 0.8 0.4 |k   | 0.66 0.66 |
|         |  = |           |
| 0.2 0.6 |    | 0.33 0.33 |

Were these answers helpful?
Yes
No
Name (optional):