How will you Generate an Array of 100 Random Numbers using Numpy from a Standard Normal Distributions?

Question(s):

How will you Generate an Array of 100 Random Numbers using Numpy from a Standard Normal Distributions?

Generate an Array of 100 Random Numbers Samples from a Standard Normal Distribution

Sample Answer:

We can use the following code to create 100 random numbers with mean 0 and standard deviation 1, that are generated from standard normal distributions:

np.random.rand(100)

The np.random.rand creates an array of given shape and generate it with random samples.

Related Posts