pmf

A family decides to have children until it has three children of the same gender. Assuming P(B) = P(G) = .5, what is the pmf of X = the number of children in the family?
89. Three brothers and their wives decide to have chil- dren until each family has two female children. What is the pmf of X = the total number of male children born to the brothers? What is E(X), and how does it compare to the expected number of male children born to each brother?