Week 20 : calculating E[S²]

I’m stuck with a doubt that we were given an exercise to sample 3 values from a N(0,1)

Do we need to sample randomly any numbers in between [-3.5, 3.5] or what? I already feel like it’s a dumb question but please help. How do we sample 3 values from a Normal distribution?

You can use numpy.random.randn(). It generates sample(or samples) from N(0, 1)
Check its documentation for more information.

1 Like