\documentclass[11pt,letterpaper]{article}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{amsmath,amsfonts,amsthm,amssymb,euscript,mathrsfs,url,bbm}
\usepackage{algorithmic, stmaryrd}
\usepackage[tight]{subfigure}
\usepackage{psfrag}
\usepackage{multirow}
\usepackage{fancyhdr,lastpage}
\usepackage{color, colortbl, xcolor}

% some formatting from http://www.tedpavlic.com/post_homework_tex_example.php:
% In case you need to adjust margins:
\topmargin=-0.45in      %
\evensidemargin=-0.25in     %
\oddsidemargin=-0.25in      %
\textwidth=7in        %
\textheight=9.0in       %
\headsep=0.25in         %
\headheight=30pt

% Setup the header and footer
\pagestyle{fancy}
\lhead{CS68: Bioinformatics \hfill \hmwkTitle\ due Apr 4, 2018}
\cfoot{}
\rfoot{Page\ \thepage\ of\ \protect\pageref{LastPage}}
\renewcommand\headrulewidth{0.4pt}
\renewcommand\footrulewidth{0.4pt}

\newcommand{\sCol}[1]{\mathscr{#1}}
\newcommand{\sCmp}[1]{#1^{\text{c}}}
\newcommand{\sigF}{\sigma\text{-field}}

\newcommand{\iidsim}{\stackrel{\mathrm{iid}}{\sim}}

\newcommand{\probnumber}[1]{\noindent\textbf{(#1)}}

% Homework Specific Information
\newcommand{\hmwkTitle}{Lab 7:}
\begin{document}

\noindent {\bf \underline{Coalescent Theory problem set}} \\

Let $T_i$ be the time (in coalescent units) when there are $i$ lineages (until a coalescent event reduces the number of lineages by 1). The distribution of $T_i$ is exponential:
	
\[ P_{T_i}(t) = \binom{i}{2} e^{-\binom{i}{2}t}, \quad t \in [0, \infty) \]

\begin{enumerate}

	\item Integrate this probability distribution over $t \in [0, \infty)$ to demonstrate that the result is 1 (i.e. that it is a proper probability distribution).  Show all your work clearly.
	
	% uncomment below to put your solution in a different color
	%{\color{blue}{my solution}}
	\vspace{40mm}

	\item The {\em expected value} of $T_i$ in coalescent units is:
	\[ E[T_i] = \frac{1}{\binom{i}{2}} = \frac{2}{i(i-1)} \]
	
	Demonstrate this result by integrating the probability distribution of $T_i$ against $t$ (i.e. multiply by $t$ and then integrate). Show all your work clearly.  {\em (Hint: use integration by parts.)}
	
	\vspace{50mm}
	
	\item Using $E[T_i]$, what is the expected value of $T_{\text{MRCA}}$, the time to most recent common ancestor of the entire sample?  Let the sample size be $n$.  Simplify your result so it does not include a summation.
	
\end{enumerate}

\end{document}
