Closed rhuselid closed 5 years ago
It looks like there might be a couple errors. However, there is definitely one here:
epsilon = df.TIRE - expectation
prob_col = norm.pdf(epsilon)
This is the wrong definition of epsilon. We don't actually observe a single value for epsilon---rather a range of possible values for epsilon. This is explained in this section of the notes:
Also, note that Phi is supposed to be the cumulative distribution function of a standard normal. This is a typo and I have just fixed it in the GitHub repo.
Hope that helps!
I am getting incorrect returns from my optimizer, which suggests to me that I am setting up the problem in a wrong way. Moreover, when I try to minimize the negative log likelihoods I get an infinite loop, but when I minimize the regular log likelihoods I converge to an incorrect answer.
My guess is that the part of the problem I am thinking about incorrectly is in the following chunk of code. Is that the case?
Thanks!