Funny(?) Probability Problem So I ran accross the following problem today on a forum:

"In an attempt to reduce male birth rates, feminists have passed a law
  which forces families to stop having children after their first male
  child. After this law is passed, what is the expected ratio of male
  children to female children?"

It's unclear whether families are supposed to continue having children until their first male child or if they may stop at any earlier point, but let's assume the former. Let's also assume that everybody obeys the law, and that either sex has an equal chance of being born.
I thought I had a simple solution, because the problem is logically equivalent to the following process:

  
*
  
*Generate N infinite random sequences of boys and girls
  
*Cut each sequence after the first occurrence of a boy
  
*Concatenate the results and measure the ratio of boys to girls
  

This is equivalent to generating a random sequence of boys and girls by stopping at each boy but then continuing again (up to N times), so the only difference from a normal random sequence is that this sequence always ends with a boy. However, if N grows to infinity, it seems like this last element (which can never be reached) becomes irrelevant, so the ratio of boys and girls should be 1:1 like in a normal infinite random sequence. This seems perfectly logical to me, but a few people kept insisting that it is wrong, ranting about "biased estimators" and claiming that the real ratio will be biased in favor of females.
Is my reasoning flawed? If so, why?
[EDIT]
Contrary to some suggestions, I don't think this question is a duplicate. It asks about the validity of a particular approach to solving the problem, not just for a solution.
 A: A birth is either a new male or a new female, each with probability $1/2$. This is clearly the case regardless of laws or policies, so by linearity of expectation the expected ratio of males to females in the population will remain $1:1$.

Edit:
If you disagree with the minor simplifying assumption that boys and girls are equally likely, just replace $1/2$ with some fixed $p$ and $1-p$, and $1:1$ with $p:(1-p)$. 
Here is some JavaScript code to simulate this for $1$ million families:
var heads = 0;
var tails = 0;
for(var i=0; i<1E6; i++){
   var gotTails = false;
   while(!gotTails){
      if(Math.random() < 0.5){ 
         heads++ 
      }
      else{
         tails++;
         gotTails = true;
      }
   }
}
console.log(heads + "," + tails);

A: The law will change the sexual habits of people and the number of children born, but it will not change the laws of nature. In the assumed model these are as follows: The sex of a child is determined at the moment of conception, and if conception takes place the probability that the child is a boy is ${1\over2}$, independently of social circumstances.
A: I understand the instinct to argue against you but you are right, the ratio should remain 1:1. For an intuitive reason why: consider the before and after for families with three children.
Options before


*

*bbb

*bbg , bgb, gbb

*bgg , gbg, ggb

*ggg


Total is 12 boys, 12 girls
Options after the law


*

*b

*b , b, gb

*b , gb, ggb

*ggg


Total is 7 girls, 7 boys.
Two children gives:


*

*bb

*bg, gb

*gg


vs 


*

*b

*b, gb

*gg


We could continue this to all possible sets and the results would be the same.
However, this is ignoring the possibility that there may be some genetic component (none that I've heard of but possibly the case) which says some couples are more likely to produce a particular sex. This may be the bias people are talking about.
A: Since the probability of $k$ girls then $1$ male is $2^{-k-1}$, the expected number of $(\text{female},\text{male})$ births
$$
\sum_{k=0}^\infty(k,1)2^{-k-1}=\left(1,1\right)
$$
We are ignoring multiple births, or families that cannot have children. Esentially, we are assuming that all families have children and that they keep having children until they have a male.

Note that this is the same as answering the question "flip a fair coin until we get heads; how many heads and how many tails do we expect to see?"
A: So to take this to a mathematical model and ignore all biological facts, we have the probability space $\Omega = \{g,b\}^{\mathbb{N}}$ with the product sigmaalgebra of the components and product probability measure ($p_i = \frac{1}{2}$). An element of the probability space represents the sequence of children of a single family.
For example take a set $A = \{\alpha \in \Omega : \alpha_i = \beta_i \text{ for } i=1,\dots,n\}$ for a fixed values $\beta_i$ then the probability is $P(A) = \frac{1}{2^{n}}$.
We want a random variable $G_n :\Omega \to \mathbb{R}$ that tells us if the $n$-th child is a girl if there is a $n$-th child according to our rules. So $G_n$ is either $1$ or $0$.
\begin{align}
G_n(\alpha) = \begin{cases}1 & \text{if } \alpha_i = g \text{ for } i\leq n \\ 0 & \text{else.} \end{cases}
\end{align}
The expected value of $G_n$ can be calculated by $P(G_n=1) = \frac{1}{2^n}$.
The number of girls in a family is represented by the random variable $G = \sum_{n=1}^\infty G_n$. So we want the expected value of $G$:
\begin{align}
\mathbb{E}(G) = \mathbb{E}\Big(\sum_{n=1}^\infty G_n\Big) = \sum_{n=1}^\infty \mathbb{E}(G_n) = \sum_{n=1}^\infty \frac{1}{2^n} = 1
\end{align}
Since the $G_n$ are highly dependent it is easy to verify the swap of integral and sum or just use fubini for positive functions. 
Now to the boys: Let $B_n$ be the random variable that tells us if the $n$-th child is a boy
\begin{align}
B_n(\alpha) = \begin{cases}1 & \text{if } \alpha_n = b \text{ and }\alpha_i = g \text{ for } i<n \\ 0 & \text{else.} \end{cases}
\end{align}
The expected value of $B_n$ is again $P(B_n=1) = \frac{1}{2^n}$. Hence the same game again: the number of boys in a family is $B = \sum_{n=1}^\infty B_n$.
\begin{align}
\mathbb{E}(B) = \mathbb{E}\Big(\sum_{n=1}^\infty B_n\Big) = \sum_{n=1}^\infty \mathbb{E}(B_n) = \sum_{n=1}^\infty \frac{1}{2^n} = 1
\end{align}
By the way we also showed that the expected number of children is $2$ with this rule.
However we do have more than one family. So we have to multiply the whole result with the number of families but this doesn't change the ratio.
A: Consider a slightly different law, which allows families to have as many children as they want, but in which all children with an older brother are sent away. 
This law is equivalent to the one proposed, because in each family only the children up to the first boy remain.
Of all the children born, the proportion of girls is $\frac12$.
Of all the children sent away, the proportion of girls is $\frac12$. (Children born in families in which already one boy has been born are from both sexes with equal probabilities.)
In conclusion, the proportion of girls in the remaining population must also be $\frac12$.
A: Here's an answer that assumes couples continued having children until they're no longer allowed to:
$$
\begin{array}{ccccccc|c}
& & & & & & & \text{probability} & \%\text{ male}/100 \\
\hline
m & & & & & & & 1/2 & 1 \\
f & m & & & & & & 1/4 & 1/2 \\
f & f & m & & & & & 1/8 & 1/3 \\
f & f & f & m & & & & 1/16 & 1/4 \\
f & f & f & f & m & & & 1/32 & 1/5 \\
\vdots & \vdots & \vdots & \vdots & \vdots & \ddots & & \vdots & \vdots
\end{array}
$$
The expected proportion of male children in a family is therefore
\begin{align}
& \sum_{n=1}^\infty \frac 1 n \left(\frac 1 2 \right)^n = \sum_{n=1}^\infty \frac {x^n} n = \sum_{n=1}^\infty \int_0^x u^{n-1} \, du \\[10pt]
= {} & \int_0^x \sum_{n=1}^\infty u^{n-1} \, du = \int_0^x \frac 1 {1-u}  \, du = \int_{1/2}^1 \frac1u\, du \\[10pt]
= {} & \log(1)-\log \left(\frac12\right) = \log(2) \approx 0.69 \quad \text{(where $\log(\cdot)$ means $\log_e(\cdot)$)}
\end{align}
The interchange of the integral and the sum is justified because the function is everywhere positive. (It is only when the positive and negative parts both diverge to infinity that one can get two different answers by changing the order.)
However (as pointed out below by "Paul") the fact that the average family has $69\%$ boys doesn't mean $69\%$ of all births will be boys because families with more girls than boys will be larger. If all couples get equal weight then the average is $69\%$ but if all babies get equal weight then it's $50\%$.
A: This is a geometric distribution, with $p=0.5$. Let's call $X$ the number of children a family has.
The answer is going to be $\frac{1}{\mathbb{E}(X)-1}= \frac{1}{\frac{1}{0.5}-1}.$
For a proof of why $\mathbb{E}(X)=\frac{1}{p}$, see https://en.wikipedia.org/wiki/Geometric_distribution#Moments_and_cumulants
A: 
families are supposed to continue having children until their first male child


Possible families
b (p = 0.5)
gb (p = 0.25)
ggb (p = 0.125)
gggb (p = 0.0625)
ggggb (p = 0.03125)
gg.... (p = 0.5^length)

So every family will always have exactly óne boy for sure (total_p=1). But let's prove that.
Girls
The amount of girls you have is basically:
0.5 * 0
0.25 * 1
0.125 * 2
0.0625 * 3
0...... * 4

The extra amount of girl per n is 0.5^(n+1) * n. Summing this formula: 

Boys
The amount of boys you have is similar:
0.5 * 1
0.25 * 1
0.125 * 1
0.0625 * 1
0...... * 1

So the extra amount of boy per n is 0.5^(n+1). Summing this formula:

So the ratio is 1:1!
A: I like to model such problems as a finite state machine.  Just for fun I'll generalize by making the sex ratio at birth variable; let's call the probability of a daughter $r$.  Also, let's not assume that every couple keeps on making babies until they have a son; let $q$ be the probability of stopping after a daughter.
A couple begin in state $A$ (fertile), and with each child —


*

*with probability $rq$, they have a daughter and move to state $B$ (infertile).

*with probability $r(1-q)$, they have a daughter and remain in state $A$.

*with probability $1-r$, they have a son and move to state $B$.


In state $B$ the expected number of future daughters ($d_B$) or sons ($s_B$) is obviously zero.
In state $A$, the expected number of future daughters is
$$d_A = r(1-q)(1+d_A) + rq(1+d_B) + (1-r)(0+d_B)$$
because in returning to state $A$ you add one to your daughters.  Simplifying,
$$d_A = r+rd_A-rqd_A $$
$$(1-r+rq)d_A = r$$
$$d_A = r/(1-r+rq)$$
The expected number of future sons in state $A$ is
$$s_A = r(1-q)(0+s_A) + rq(0+s_B) + (1-r)(1+s_B)$$
$$s_A = r(1-q)s_A + 1-r $$
$$s_A(1-r+rq) = 1-r$$
$$s_A = (1-r)/(1-r+rq)$$
So the sex ratio is $r : 1-r$, independent of $q$ (to my mild surprise; intuitively I expected fewer boys when $q>0$).
A: Here is another way to think about it - although you have already had a lot of ways.
First observe that the average size of a family is 2. Hopefully this is obvious, it follows from the rule that you have to wait an average of 1/pattempts to succeed where probability is p.
Second observe that all families will have exactly one boy.
Hence the average number of girls must also be one.
A: Lets rearrange the problem as a coin toss game.
For the purposes of visualisation, there is just one coin.
Each family gets a turn tossing the coin.
As long as they toss a head, they can keep playing and toss the coin again.
When they toss a tail, they have to hand the coin on to the next family.
The family can also choose to stop playing at any point and hand the coin on.
Since we are now simply talking about a long series of coin tosses, it becomes obvious that the ratio of heads:tails will be approximately 1:1
It doesn't matter if there is only one coin that is handed one from one family to the next, or every family has their own coin that they toss, the final ratio will be the same.
