pystats_norm.rnorm

Functions

rnorm(n[, mean, sd])

This function generates an array of length n normally distributed

Module Contents

pystats_norm.rnorm.rnorm(n, mean=0, sd=1)[source]

This function generates an 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 (np.float64, optional) – The mean value of the normal distribution. Default is 0.

  • sd (np.float64, optional) – The standard deviation of the normal distribution. Default is 1.

Returns:

A array of length n containing normally distributed random variables with mean equal to mean and sd equal to sd.

Return type:

np.ndarray

Examples

>>> rnorm(2, mean=5, sd=2)
array([6.3245, 4.5983])