Probability of population to go extinct If I have $1$ fish in the beginning, and each fish can do the following things:


*

*Dies with a probability of $1/3$.

*Gives a birth to $1$ fish and dies with a probability of $1/3$.

*Gives birth to $2$ fishes and dies with a probability of $1/3$.


The question is: The population goes extinct if none remains in the $i$ generation.
What is the  exact probability that the population goes extinct ?.

So I thought about the following:
in the first step, if the fish dies, then its over. $1/3$ probability
if it dies in the second step, then the first fish dies and gave a birth to 1 fish so its $1/3$ * $1/3$
if it dies in the third then we have a couple of options so i got confused here..
it can either give birth to 1 each time and then die
or can give birth to 2 fishes and then in the second step 1 dies and 1 gives birth to 1 and dies
so we will have 1 fish, and then it will die.
but it can also be couple of other options (such as we have 2 fishes and all of them just die)
Would like to get some help with that because i feel like i got lost. Thanks!
 A: What you have here is an example of a random walk: In each step the number of fish either decreases by 1, stays the same, or increases by one, all with the same probability.
A very similar random walk is described in the wikipedia artikle linked: There the number always changes by +1 or -1 (staying the same is not possible). They also mention the effect you are interested in: No matter with how many fish you start, you will reach $0$ fish and thus stop with probability $1$. 
Your example is not really different, as the "stay the same" outcome doesn't change anything. If you remove the "stay the same" outcomes, you get a random walk as described in wikipedia, which will reach $0$ fish with probability $1$ at some time. If you reinsert the "stay the same" outcomes, the sequence will not fundamentally change, you just have repeats of the prevuious numbers for each such outcome. So you also reach $0$ with probability $1$, it will just take (on average) 50% more time.
A: The first step is to find a mathematical model for your problem. Denote by $X_k$ the number of fishes in the $k$-th generation. By assumption, we have
$$X_1=1.$$
Now in the $k$-th generation each of the fishes is giving birth to zero, one or two fishes (each with probability $1/3$) and we can model this with independent random variables
$$\xi_{k,i}$$
i.e. $\xi_{k,i}$ is the number of baby fishes of the $i$-th fish in the $k$-th generation and $$\mathbb{P}(\xi_{k,i}=0) = \mathbb{P}(\xi_{k,i}=1) = \mathbb{P}(\xi_{k,i}=2) = \frac{1}{3}. \tag{1}$$ This means that
$$X_{k+1} = X_k + \sum_{i=1}^{X_k} (\xi_{k,i}-1) = \sum_{i=1}^{X_k} \xi_{k,i}$$
(here the $-1$ in the sum is due to the fact that the fish dies after giving birth); in particular we see that $(X_k)_{k \geq 1}$ is a branching process. The first generation the population goes extinct is
$$\tau := \inf\{k \in \mathbb{N}; X_k = 0\}$$
and therefore we need to find $\mathbb{P}(\tau<\infty)$. This is a classical problem in the theory of branching processes. It is well-known that the population goes extinct with probability $1$ if
$$\mu := \mathbb{E}(\xi_{k,i}) \leq 1.$$
Since, in your case, $\mu=1$, it follows that the population goes extinct with probability $1$.
