pystats.rnorm
Functions
|
This function generates a vector (NumPy array) of length n normally distributed |
Module Contents
- pystats.rnorm.rnorm(n, mean=0, sd=1)[source]
This function generates a vector (NumPy array) of length n normally distributed random variables with mean equal to the mean and sd equal to the sd.
- Parameters:
n (int) – The number of random variables to be simulated.
mean (float, optional) – The mean value of the normal distribution. Default is 0.
sd (float, optional) – The standard deviation of the normal distribution. Default is 1.
- Returns:
A NumPy array of length n containing normally distributed random variables with mean equal to mean and sd equal to sd.
- Return type:
numpy.ndarray
Examples
>>> rnorm(2, mean=5, sd=2) array([6.3245, 4.5983])