Flash cards
Review the key moves
1/3
Core idea
What is the main idea behind Python statistics Module?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Order
Put the learning moves in the order that makes the concept easiest to apply.
Python has a built-in module that you can use to calculate mathematical statistics of numeric data.
Statistics Methods
Python statistics Module
Python has a built-in module that you can use to calculate mathematical statistics of numeric data.
The statistics module was new in Python 3.4.
Statistics Methods
| Method | Description |
|---|---|
| statistics.harmonic_mean() | Calculates the harmonic mean (central location) of the given data |
| statistics.mean() | Calculates the mean (average) of the given data |
| statistics.median() | Calculates the median (middle value) of the given data |
| statistics.median_grouped() | Calculates the median of grouped continuous data |
| statistics.median_high() | Calculates the high median of the given data |
| statistics.median_low() | Calculates the low median of the given data |
| statistics.mode() | Calculates the mode (central tendency) of the given numeric or nominal data |
| statistics.pstdev() | Calculates the standard deviation from an entire population |
| statistics.stdev() | Calculates the standard deviation from a sample of data |
| statistics.pvariance() | Calculates the variance of an entire population |
| statistics.variance() | Calculates the variance from a sample of data |