Appendix: Details on Likelihood calculation and maximization