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

NameTypeDescription
dataiterable of numbersObservations 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]))
Python Reference