The paradox of random occurrence the family problem we have 100 families: 10 families have no children, 40 families have 1 child for each one, 30 families have 2 children for each one, 10 families have 3 children for each one and 10 families have 4 children for each one 
A- suppose we selected a family randomly, what is the expected number of children in that family?
B-suppose we selected a child randomly, what is the expected number of children in his family?
is it the same?
I've tried the expectation to solve it but only for "A" , for "B" I didn't know how to solve it
the answer for A is 1.7 children but it is wrong because prof said the correct one is 3.
 A: For (B), the mean is $S/T$ where 
$S = 10(0^2) + 40(1^2) + 30(2^2) + 10(3^2) + 10(4^2) = 410$
$T = 10(0) + 40(1) + 30(2) + 10(3) + 10(4) = 170$
so the mean is $410/170 = 2.412$
The idea is, for example, a kid from a $3$ child family contributes a count of $3$ to the sum of family sizes, and that is the case for all $10*3$ such children. So those kids contribute a total of $10(3^2)$ to the total. Etc. Denominator is the total number of kids.
A: Intuitively, the expected number of children must be higher when you select a child because you are more likely to select a family with lots of children.  In particular, if you select a child, you will never select the families with no children.  
For each question, you just add up the product of the number of children and the probability of selecting a family of that size.  For A, you have $0.1$ chance of selecting a family with no children, $0.4$ chance of selecting a family with $1$ child and so on.  The expected number is then $$0.1\cdot 0 + 0.4 \cdot 1 +0.3 \cdot 2 + 0.1 \cdot 3 + 0.1 \cdot 4=1.7$$ 
For B, what fraction of the children are in families of $4$ children?  That is the probability you select a family of $4$.  The approach is the same as part A, but the probabilities are different.  Over to you.
A: I got the same for part A
for part B I made  chart and pooled the number of children for each family grouping, then I calculated what percentage of the total child pool a certain family made up, then I multiplied the number of families in the grouping by the percentage, then I added up all the numbers.
*family grouping refers to the number of families with a certain number of children
format: family grouping, # of children in grouping, percentage of total child pool, family grouping multiplied by percentage
10,  0,     0%,      0
40, 40, 23.53%,  9.412
30, 60, 35.29%, 10.587
10, 30, 17.65%,  1.765
10, 40, 23.53%,  2.353
otal 170, 100%  24.117  
10<< 24.117-family grouping <30
30-family group= 2 kids
from part a)
1<< 1.7 kids <2
2 kids
so the number of kids is the same in A) and B) even though the probabilities change slightly
