Q: We have a tree node with probability 0.5 to produce a left branch, 0.5 to produce a right branch (independent events), with each branch acting as an own sub-tree, what is the expected height of the tree?
My thought process is as follows: for starting node and each child node, there's equal probability of 0.25 for 4 events: having left but no right branch (LR'), having right but no left branch (L'R), having no branch (L'R'),and having both branches (LR).
Thus, if X = height of the tree, then
$$ \begin{aligned} E[X] &= E[X|LR']*P(LR') + E[X|L'R]*P(L'R)+E[X|L'R']*P(L'R')+E[X|LR]*P(LR)\\ &= (1+E[X])/4 + (1+E[X])/4 + 0 + ??? \end{aligned} $$
I'm stuck at $E[X|LR]$, the expected height given we have a left and right branch. Maybe I should be using the max function here? Or is it still just $(1+E[X])$?