If you flip a fair coin 4
times, what is the probability that you will get exactly 2
tails?
Hi Melody,
here is the code:
\documentclass[7pt,a4paper,landscape]{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{qtree}
\begin{document} \Tree [ [ [ [[ F\\F\\F\\F ].($\frac{1}{2}$)\\F [ F\\F\\F\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ F\\F\\B\\F ].($\frac{1}{2}$)\\F [ \fbox{ \textcolor[rgb]{1,0,0}{FFBB}} ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [ [[ F\\B\\F\\F ].($\frac{1}{2}$)\\F [ \fbox{ \textcolor[rgb]{1,0,0}{FBFB}} ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ \fbox{ \textcolor[rgb]{1,0,0}{FBBF}} ].($\frac{1}{2}$)\\F [ F\\B\\B\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [ [ [[ B\\F\\F\\F ].($\frac{1}{2}$)\\F [ \fbox{ \textcolor[rgb]{1,0,0}{BFFB}} ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ \fbox{ \textcolor[rgb]{1,0,0}{BFBF}} ].($\frac{1}{2}$)\\F [ B\\F\\B\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [ [[\fbox{ \textcolor[rgb]{1,0,0}{BBFF}} ].($\frac{1}{2}$)\\F [ B\\B\\F\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ B\\B\\B\\F ].($\frac{1}{2}$)\\F [ B\\B\\B\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].Start\\(F=Front\\B=Back) \end{document}
heureka
6/16
To see this notice that a tail could occur on the first flip and then on any of the next three flips. So there are three ways that can happen.
Or, it could occur on the second flip and then on any of the two remaining flips. That's two more ways.
Or, it could occur on the third and on the 4th flips.
So, 3 + 2 + 1 = 6
And there are 2 outcomes possible on each flip, so the total number of outcomes is just 2*2*2*2 = 16
Thus, 6/16
6 times you have exactly two tails: FFBB, FBFB, FBBF, BFFB, BFBF, BBFF
And the Probability is 6∗(12×12×12×12)
Hi Heureka,
Your tree is very impressive!
What program did you use to draw it? Can you draw one from left to right as well?
Hi Melody,
I use Latex \usepackage{qtree}
Sorry, i can't answer your second question.
Please see: http://www.essex.ac.uk/linguistics/external/clmt/latex4ling/trees/qtree/
My program lines:
Bye
heureka
Thank you very much Heureka!
Could you please copy the actual code in here so I can copy it into Texmaker and play with it.
Besides being lazy my eyes are not that good and I am having a hard time reading it off the screen.
Also, I have reference your last post in the Latex thread in the Sticky Notes.
Thank you.
Hi Melody,
here is the code:
\documentclass[7pt,a4paper,landscape]{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{qtree}
\begin{document} \Tree [ [ [ [[ F\\F\\F\\F ].($\frac{1}{2}$)\\F [ F\\F\\F\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ F\\F\\B\\F ].($\frac{1}{2}$)\\F [ \fbox{ \textcolor[rgb]{1,0,0}{FFBB}} ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [ [[ F\\B\\F\\F ].($\frac{1}{2}$)\\F [ \fbox{ \textcolor[rgb]{1,0,0}{FBFB}} ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ \fbox{ \textcolor[rgb]{1,0,0}{FBBF}} ].($\frac{1}{2}$)\\F [ F\\B\\B\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [ [ [[ B\\F\\F\\F ].($\frac{1}{2}$)\\F [ \fbox{ \textcolor[rgb]{1,0,0}{BFFB}} ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ \fbox{ \textcolor[rgb]{1,0,0}{BFBF}} ].($\frac{1}{2}$)\\F [ B\\F\\B\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [ [[\fbox{ \textcolor[rgb]{1,0,0}{BBFF}} ].($\frac{1}{2}$)\\F [ B\\B\\F\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\F [[ B\\B\\B\\F ].($\frac{1}{2}$)\\F [ B\\B\\B\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].($\frac{1}{2}$)\\B ].Start\\(F=Front\\B=Back) \end{document}
heureka