1

Suppose I have data points distributed over time like a decreasing exponential function but it includes zero mean Gaussian noise with variance of say 20. How would I determine the likelihood function and find MLE's for the parameters? So all I have is the following data: I have fit an exponential curve using python. My attempt:

def func(x):
    return params[0]*(x**params[1])+params[2])
params, cov = curve_fit(f, time, X)

params[0] = A
params[1] = B
params[2] = C
LH_function = A*(x**B)

So I am not sure how to determine the likelihood function given just a dataset. Do I need to assume what distribution the data is in? (with 0 mean noise).

Kyle
  • 21
  • 1
  • 3
  • This is a statistics 101 problem, not Python; your question already contains part of the answer. Data has Gaussian noise but the mean is determined by some function f(x), and the datapoints are iid, then each datapoint is ~N(f(x), sigma), so that the likelihood is p(y1 | x) * p(y2 | x) * p(y3 | x)... or N(f(x1),sigma) * N(f(x2), sigma) * N(f(x3), sigma)...etc. The -log likelihood works out to be sum square residuals. You can find the derivation in any stats text or many places online, e.g. here: http://www.robots.ox.ac.uk/~fwood/teaching/W4315_Fall2011/Lectures/lecture_3/lecture_3.pdf – HappyDog Mar 09 '20 at 17:17
  • I guess to sum up -- if you have Gaussian noise, and the mean of the distribution for any x is given by f(x), then the negative log likelihood is the sum square of residuals (i.e sum (f(x_i) - y_i)**2 ), so to find the MLE, minimize the sum square of residuals. – HappyDog Mar 09 '20 at 17:31

0 Answers0