Here is a short example:
(* Maximum likelihood example *)
(* Set data values *)
n = 50; v = 5; n0 = 13; m = 144;
(* Log likelihood *)
logL = (n0 Log[1 - psi + psi (1 - p)^v] + (n - n0) Log[psi] +
m Log[p] + (v (n - n0) - m) Log[1 - p])
(* First order partials *)
DlogL = D[logL, {{psi, p}}]
(* Find values of psi and p that result in the partial derivatives \
being zero *)
(* But note that in this case there are values of n0 and m that \
result in maximum likelihood estimates not having the partials equal \
to zero so NMaximize directly on the log likelihood is more \
appropriate in such cases *)
solution1 =
NSolve[DlogL == {0, 0} && 0 < psi <= 1 && 0 < p <= 1, {psi, p}]
solution2 = NMaximize[{logL, 0 < psi <= 1 && 0 < p <= 1}, {psi, p}]
(* Now to estimate the variances (and this only works if the mle \
estimates of psi and p are both not zero or one) *)
D2logL = Flatten[D[DlogL, {{psi, p}}] /. solution1, 1]
v = -Inverse[D2logL];
MatrixForm[v]