Full name
statistics.NormalDist.variance
Library
statistics
Syntax
statistics.NormalDist.variance
Description
The variance attribute of an object of type statistics.NormalDist returns the variance of the distribution.
Parameters
The statistics.NormalDist.variance attribute accepts no arguments.
Result
The statistics.NormalDist.variance attribute returns a value of type float.
Examples
If we start from the following normal distribution:
dist = statistics.NormalDist(mu = 5, sigma = 2)
...we can obtain its variance with the following code:
dist.variance
4.0