Recall that a Gaussian is expressed as
The log of the likelihood function can be written as
This can then be maximized by setting partial derivatives with respect to and to zero and solving.
For :
Setting to 0 and solving:
which is the sample mean – the mean of the observed values.
For :
This simplifies to:
Setting to zero and solving for :
This is the sample variance measured with respect to the sample mean .