Skip to content

Commit

Permalink
Update Fig02_06.py
Browse files Browse the repository at this point in the history
Fix for the summation of "s" (s= s+...)
  • Loading branch information
LechGrzelak authored Jun 23, 2022
1 parent 7b8ca25 commit b23b842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PythonCodes/Chapter 02/Fig02_06.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def MLE(dateS,S):

s = 0;
for i in range(0,len(X)-1):
s = np.power(X[i+1]-X[i]-mu*dt,2)
s = s + np.power(X[i+1]-X[i]-mu*dt,2)
sigma = np.sqrt(s/(m*dt))
print('Estimated parameters are: mu = {0} and sigma = {1}'.format(mu,sigma))

Expand Down

0 comments on commit b23b842

Please sign in to comment.