I want to create a probability tree using either tikzpicture or forest. I have experimented a little bit with both, but I'm running into some trouble with both of the programs.
First, I have my code for tikzpicture that I want to create:
![\begin{tikzpicture}\[grow=right, sloped\]
\node\[bag\] {(1, 1)}
child {
node\[bag\] {($\frac{1}{2}$, $\frac{1}{2}$)}
child {
node\[\] {($\frac{1}{4}$, $\frac{1}{4}$)}
edge from parent
node\[above\] {$T$}
node\[below\] {$\frac{1}{2}$}
}
child {
node\[\] {(1, 1)}
edge from parent
node\[above\] {$H$}
node\[below\] {$\frac{1}{2}$}
}
edge from parent
node\[above\] {$T$}
node\[below\] {$\frac{1}{2}$}
}
child {
node\[bag\] {(2, 2)}
child {
node\[\] {(1, 1)}
edge from parent
node\[above\] {$T$}
node\[below\] {$\frac{1}{2}$}
}
child {
node\[\] {(4, 4)}
edge from parent
node\[above\] {$H$}
node\[below\] {$\frac{1}{2}$}
}
edge from parent
node\[above\] {$H$}
node\[below\] {$\frac{1}{2}$}
};
\end{tikzpicture}][1]
Next, I have my forest code:
\begin{forest}
for tree={grow=0,l=3cm,anchor=west,child anchor=west}
[{$(1, 1)$}
[{$(\frac{1}{2}, \frac{1}{2})$}
[{$(\frac{1}{4}, \frac{1}{4})$}]
[{$(1,1)$}]
]
[{$(2, 2)$}
[{$(1,1)$}]
[{$(4,4)$}]
]
]
\end{forest}
I like the tikzpicture style and spacing very much, except I would love to be able to have labels along the bottom that say "$t=0$", "$t=1$", "$t=2$", etc. that are in a single horizontal line? Is there a way to do this in tikzpicture? I want the labels like in the answer to this question.
Regarding the forest code, I think that the diagram is too condensed and squished together. Is there a way to make it more spread out, like the tikzpicture? Also, is there a method to create labels "$t=0$", "$t=1$", "$t=2$", etc. as above?

The above graph is my tikzpicture and the below is my forest.

forestso you can adapt that to do the labelling. Tryfit=rectangleorfit=bandfor a less compact tree. (Page 29.) – cfr Jul 29 '14 at 23:02