Python Statistics Module

The statistics module provides functions for mathematical statistics, including measures of central tendency, measures of variability, and probability distributions. It's a useful module for data analysis and scientific computing.

Commonly Used Functions

Example Usage

Python
import statistics

data = [1, 2, 2, 3, 4, 5, 5, 5, 6, 7]

print(statistics.mean(data))  # Arithmetic mean
print(statistics.median(data))  # Median
print(statistics.mode(data))  # Mode
print(statistics.stdev(data))  # Standard deviation