YouTip LogoYouTip

Ref Stat Stdev

Python statistics.stdev() Method

-- Learn More Than Just Technology!

Python statistics.stdev() Method

This article is part of the Python3 Tutorial.

Table of Contents

Python3 Statistics Module

The statistics module in Python provides functions for calculating mathematical statistics of numerical data.

stdev() Function

The stdev() function calculates the standard deviation of a sample.

import statistics

data = [1, 2, 3, 4, 5]
std_dev = statistics.stdev(data)
print(std_dev)

The output will be:

1.4142135623730951
← Ref Stat VarianceRef Stat Mode β†’