{"id":7566,"date":"2023-11-02T10:40:36","date_gmt":"2023-11-02T05:10:36","guid":{"rendered":"https:\/\/python-programs.com\/?p=7566"},"modified":"2023-11-10T12:13:48","modified_gmt":"2023-11-10T06:43:48","slug":"python-program-to-calculate-the-standard-deviation","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-calculate-the-standard-deviation\/","title":{"rendered":"Python Program to Calculate the Standard Deviation"},"content":{"rendered":"

Standard Deviation:<\/strong><\/p>\n

In statistics, the standard deviation is a measure of spread. It’s a metric for quantifying the spread or variance of a group of data values. It is quite similar to variance in that it delivers the deviation measure, whereas variance offers the squared value.<\/p>\n

A low Standard Deviation value implies that the data are more evenly distributed, whereas a high number suggests that the data in a set are dispersed from their mean average values. The standard deviation has the advantage of being expressed in the same units as the data, unlike the variance.<\/p>\n

Given a list of numbers , the task is to calculate the standard deviation of the given list in python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given list = [34, 14, 7, 13, 26, 22, 12, 19,29, 33, 31, 30, 20, 10, 9, 27, 31, 24]<\/pre>\n

Output:<\/strong><\/p>\n

The given list of numbers : \r\n34 14 7 13 26 22 12 19 29 33 31 30 20 10 9 27 31 24 \r\nStandard deviation of the given list = 9.008529001520827<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given list = [4, 7, 1, 2, 17, 19, 11, 19, 18, 13, 5, 3, 17]<\/pre>\n

Output:<\/strong><\/p>\n

The given list of numbers : \r\n4 7 1 2 17 19 11 19 18 13 5 3 17 \r\nStandard deviation of the given list = 7.042908781360447<\/pre>\n

Example3:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given list = [12, 1, 4, 5, 19, 11, 13, 11, 12, 5, 5, 6, 7, 10, 15, 14]<\/pre>\n

Output:<\/strong><\/p>\n

The given list of numbers : \r\n12 1 4 5 19 11 13 11 12 5 5 6 7 10 15 14 \r\nStandard deviation of the given list = 4.8425200051213<\/pre>\n

Python Program to Calculate standard deviation in Python<\/h2>\n

There are several ways to calculate the standard deviation in python some of them are:<\/p>\n