Machine Learning - Standard Deviation

What is Standard Deviation?

Standard deviation is a number that describes how spread out the values are.

A low standard deviation means that most of the numbers are close to the mean (average) value.

A high standard deviation means that the values are spread out over a wider range.

Example: This time we have registered the speed of 7 bikes are

In a computer sense, a data set is any data collection. It can be anything from a program to a complete website.

Example of an array:

speed = [32,111,138,28,59,77,97]

The standard deviation is:

0.9

Meaning that most of the values are within the range of 0.9 from the mean value, which is 86.4./p>

The NumPy module has a method to calculate the standard deviation:

Example

import numpy

speed = [86,87,88,86,87,85,86]

x = numpy.std(speed)

print(x)

Variance

Variance is another number that indicates how spread out the values are.

Example

import numpy

speed = [32,111,138,28,59,77,97]

x = numpy.var(speed)

print(x)

Standard Deviation

Example

import numpy

speed = [32,111,138,28,59,77,97]

x = numpy.std(speed)

print(x)