improved max_likelihood, fixed get_statistics bug for 1d data