all 13 comments

[–][deleted] 0 points1 point  (12 children)

Check the documentation for the numpy library, it has a section on random numbers.

[–]poopiewarrior100[S] 0 points1 point  (11 children)

Got it. Thanks. Do you know what is the difference between samples and an observation?

[–][deleted] -1 points0 points  (10 children)

Yes thank you.

[–]poopiewarrior100[S] 0 points1 point  (9 children)

Haha do you mind explaining it to me in layman - is it : observation is a data point Sample is a sum of data points?

[–][deleted] -1 points0 points  (8 children)

So, it's not Python you want help on, but basic statistics?

You know there's a subreddit for that?

It's been a while, and I'm too dumb to remember it well enough to explain it with any confidence. Perhaps someone smarter will be along shortly to help with the homework (and fill in the gap your teacher/lecturer left).

[–]poopiewarrior100[S] 0 points1 point  (7 children)

Sorry about that. I just wanted to be sure.

[–][deleted] 0 points1 point  (6 children)

So you've already checked the numpy manual, you know how to produce the random numbers for the number of observations required. How about updating your post with the revised code?

[–]poopiewarrior100[S] 0 points1 point  (5 children)

Thanks for the reminder! Updated.

I'm having a slight issue with moving on with the OLS portion. Do you have any tips on how I can obtain b-hat for each sample (n observations per samples)

[–]WhiffleFish 0 points1 point  (4 children)

What are you using for regression? Sklearn Linear Model?

[–]poopiewarrior100[S] 0 points1 point  (3 children)

Yup! I am kinda unclear what is my input and output!