Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLN and CLT #67

Closed
oyamad opened this issue Aug 28, 2014 · 4 comments
Closed

LLN and CLT #67

oyamad opened this issue Aug 28, 2014 · 4 comments

Comments

@oyamad
Copy link
Member

oyamad commented Aug 28, 2014

Hi,
I (re)started a study group with students on quant-econ.
Today we found the following:

Regarding illustrates_lln.py, lines 44-46, if I am not mistaken,

    sample_mean = np.empty(n)
    for i in range(1,n):
        sample_mean[i] = np.mean(data[:i])

should be

    sample_mean = np.empty(n)
    for i in range(n):  # range(1,n) -> range(n)
        sample_mean[i] = np.mean(data[:i+1])  # data[:i] -> data[:i+1]

http://nbviewer.ipython.org/gist/oyamad/4789a8bcaf5aa867e92d

(Should I submit a pull request myself?)

In the code shown in Simulation 1, the following lines are missing:

import numpy as np
from scipy.stats import expon, norm, poisson

Compare the original code.

@sglyon
Copy link
Member

sglyon commented Aug 28, 2014

Yep, good catch on that one. Thanks for reporting.

If you would like to submit a PR for the mistake you found in illustrates_lln.py that would be great.

I will fix the problems in the website now -- although I'm not sure when the updates will appear online.

@sglyon
Copy link
Member

sglyon commented Aug 28, 2014

closed by #68

@sglyon sglyon closed this as completed Aug 28, 2014
@jstac
Copy link
Contributor

jstac commented Aug 28, 2014

@oyamad Much appreciated

@spencerlyon2 Please go ahead and merge the fix-lln-clt branch into master in the private repo and close the issue.

@sglyon
Copy link
Member

sglyon commented Aug 28, 2014

Done, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants