Question
In the context of this exercise, what does the np.random.normal()
function return?
Answer
The np.random.normal()
function returns a list of random samples drawn from a normal distribution.
The distribution is dependent on the values of the keyword arguments loc
, scale
, and size
.
The number of samples in this returned list will be equal to the value of the size
argument.
Furthermore, each time you run this function, the results will be slightly different each time, due to the randomness, but will follow the same distribution and general shape. To ensure that the result is more accurate, it is good to choose a large size value, which usually is around 10000
.