In: Math
6. (a).
In a particular town 10% of the families have no children, 30%
have one child, 20% have
two children, 40% have three children, and 0% have four. Let T
represent the total
number of children, and G the number of girls, in a family chosen
at random from this
town. Assuming that children are equally likely to be boys or
girls, find the distribution
of G. Display your answer in a table and sketch the histogram.
(b). Find E(T | G=1) = conditional expectation of number of children T, given 1 girl.
(c). Find the sum over k= 0, , 2, 3 of
E (T | G=k) P( G= k).
HINT: The hard way is to compute both factors of all 4 terms and do the arithmetic. The easy way is to use the R.A.C.E.
a) Let T : Number of child
The probability mass function of T is
| T | 0 | 1 | 2 | 3 | 
| P(T=t) | 0.10 | 0.30 | 0.20 | 0.40 | 
G : Number of girls in family
G take values 0,1,2 and 3
p =P ( A child is a girl) = 0.5
Since Conditional distribution of G given T=t is binomial with parameter n = 3 and p = 0.5
G / T=t ~ Bin ( n=t, p = 0.5)
Hence Joint probability distribution of G and T can be written as

The joint probability table of G and T is
| T | Total | |||||
| 0 | 1 | 2 | 3 | |||
| G | 0 | 0.1 | 0.15 | 0.05 | 0.05 | 0.35 | 
| 1 | 0 | 0.15 | 0.1 | 0.15 | 0.4 | |
| 2 | 0 | 0 | 0.05 | 0.15 | 0.2 | |
| 3 | 0 | 0 | 0 | 0.05 | 0.05 | |
| Total | 0.1 | 0.3 | 0.2 | 0.4 | 1 | |
Hence probability distribution of G is
| G | 0 | 1 | 2 | 3 | 
| P(G=g) | 0.35 | 0.40 | 0.20 | 0.05 | 
To draw histogram, we use R
By using R
> class=seq(-0.5,3.5,1)
> g=0:3
> f=c(35,40,20,5)
> y1=rep(g,f)
> t=0:3
> f1=c(10,30,20,40)
> y2=rep(t,f1)
> par(mfrow=c(1,2))
> hist(y1,breaks=class,main="Number of girls")
> hist(y2,breaks=class,main="Total Number of Childs")
Histogram

b) The conditional distribution T given G =1 is

| T | 0 | 1 | 2 | 3 | 
| P(T/G=1) | 0 | 0.375 | 0.25 | 0.375 | 
| T* P(T/G=1) | 0 | 0.375 | 0.50 | 1.125 | 
E( T / G=1) = 0 + 0.375 + 0.50 + 1.125 = 2
c) Conditional distribution of T given G =0 is
| T | 0 | 1 | 2 | 3 | 
| P(T/G=0) | 2/7 | 3/7 | 1/7 | 1/7 | 
| T* P(T/G=1) | 0 | 3/7 | 2/7 | 3/7 | 
E(T /G=0) = 9/7 = 1.2857
Conditional distribution of T given G=2
| T | 0 | 1 | 2 | 3 | 
| P(T/G=1) | 0 | 0 | 0.25 | 0.75 | 
| T* P(T/G=1) | 0 | 0 | 0.50 | 2.25 | 
E(T / G=2) = 2.75
Conditional distribution of T given G =3
| T | 0 | 1 | 2 | 3 | 
| P(T/G=1) | 0 | 0 | 0 | 1 | 
| T* P(T/G=1) | 0 | 0 | 0 | 3 | 
E(T / G=3) = 3

.