class statistics.NormalDist(mu=0.0, sigma=1.0)  
Returns a new NormalDist object where mu represents the arithmetic mean and sigma represents the standard deviation. If sigma is negative, raises StatisticsError.  
mean  
A read-only property for the arithmetic mean of a normal distribution. 
  
median  
A read-only property for the median of a normal distribution. 
  
mode  
A read-only property for the mode of a normal distribution. 
  
stdev  
A read-only property for the standard deviation of a normal distribution. 
  
variance  
A read-only property for the variance of a normal distribution. Equal to the square of the standard deviation. 
  
classmethod from_samples(data)  
Makes a normal distribution instance with mu and sigma parameters estimated from the data using fmean() and stdev(). The data can be any iterable and should consist of values that can be converted to type float. If data does not contain at least two elements, raises StatisticsError because it takes at least one point to estimate a central value and at least two points to estimate dispersion. 
  
samples(n, *, seed=None)  
Generates n random samples for a given mean and standard deviation. Returns a list of float values. If seed is given, creates a new instance of the underlying random number generator. This is useful for creating reproducible results, even in a multi-threading context. 
  
pdf(x)  
Using a probability density function (pdf), compute the relative likelihood that a random variable X will be near the given value x. Mathematically, it is the limit of the ratio P(x <=
X < x+dx) / dx as dx approaches zero. The relative likelihood is computed as the probability of a sample occurring in a narrow range divided by the width of the range (hence the word “density”). Since the likelihood is relative to other points, its value can be greater than 1.0. 
  
cdf(x)  
Using a cumulative distribution function (cdf), compute the probability that a random variable X will be less than or equal to x. Mathematically, it is written P(X <= x). 
  
inv_cdf(p)  
Compute the inverse cumulative distribution function, also known as the quantile function or the percent-point function. Mathematically, it is written x : P(X <= x) = p. Finds the value x of the random variable X such that the probability of the variable being less than or equal to that value equals the given probability p. 
  
overlap(other)  
Measures the agreement between two normal probability distributions. Returns a value between 0.0 and 1.0 giving the overlapping area for the two probability density functions. 
  
quantiles(n=4)  
Divide the normal distribution into n continuous intervals with equal probability. Returns a list of (n - 1) cut points separating the intervals. Set n to 4 for quartiles (the default). Set n to 10 for deciles. Set n to 100 for percentiles which gives the 99 cuts points that separate the normal distribution into 100 equal sized groups. 
  
zscore(x)  
Compute the Standard Score describing x in terms of the number of standard deviations above or below the mean of the normal distribution: (x - mean) / stdev.  New in version 3.9.  
 Instances of NormalDist support addition, subtraction, multiplication and division by a constant. These operations are used for translation and scaling. For example: >>> temperature_february = NormalDist(5, 2.5)             # Celsius
>>> temperature_february * (9/5) + 32                     # Fahrenheit
NormalDist(mu=41.0, sigma=4.5)
 Dividing a constant by an instance of NormalDist is not supported because the result wouldn’t be normally distributed. Since normal distributions arise from additive effects of independent variables, it is possible to add and subtract two independent normally distributed random variables represented as instances of NormalDist. For example: >>> birth_weights = NormalDist.from_samples([2.5, 3.1, 2.1, 2.4, 2.7, 3.5])
>>> drug_effects = NormalDist(0.4, 0.15)
>>> combined = birth_weights + drug_effects
>>> round(combined.mean, 1)
3.1
>>> round(combined.stdev, 1)
0.5
  New in version 3.8.