Statistics Methods
statistics.NormalDist.from_samples()
Estimate normal-distribution parameters using the sample mean and sample standard deviation of at least two observations. This does not prove the data are normally distributed.
Formal Syntax & Structure
python syntaxpython
statistics.NormalDist.from_samples(data)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| data | iterable of numbers | Observations used by the statistic. |
Return Value
NormalDist
Distribution instance storing mean and standard deviation.
Working Example
Example Snippetpython
import statisticsprint(statistics.NormalDist.from_samples([2, 4, 6]))