\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}
\title{Maximum likelihood estimate example}

\maketitle
\begin{abstract}

Write formally MLE and use it to compute the single parameter $\pi$ of a coin given
observation x = H H H, where H means heads. Recall that coin flipping probability
function is the Bernoulli function:
f(k,$\pi$) = $\pi^k * (1-\pi)^{1-k}$, where k = 1 is probability of Heads, therefore
f(1,$\pi$) = $\pi$.


Result: 
MLE: L(x$|\pi$) = $\arg\max_w \displaystyle\prod\limits_{i=1}^n f(x_i,\pi) $ 
and the optimal value of $\pi$, which maximizes the likelihood, is 1, solvable either
by reasoning (e.g. if we have only seen the coin flip heads, the most likely explanation
is that it has heads on both sides, therefore the probability of flipping heads
is 1) or by derivation of log likelihood: $\frac{\partial \log L(x|\pi)}{\partial \pi}  = 
\frac{\partial \arg\max_w \displaystyle\sum\limits_{i=1}^n \log f(x_i,\pi)}{\partial \pi}$ = 
$\displaystyle\sum\limits_{i=1}^n \frac{x_i - \pi}{\pi * (1 - \pi)} = 0$ iff 
$\pi = \sum\limits_{i=1}^n \frac{x_i}{n}$ which in our case is $\frac{3}{3} = 1$



\end{abstract}




\end{document}