bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/AI/Statistics
AI•Statistics

Statistic Variability (Spread)

Descriptive Statistics is broken down into Tendency and Variability .

Variability uses these measures

  • Min and Max
  • Variance
  • Deviation
  • Distribution
  • Skewness
  • Kurtosis

The Variance

In statistics, the Variance is the average of the squared differences from the Mean Value .

In other words, the variance describes how far a set of numbers is Spread Out from the mean (average) value.

Mean value is described in the previous chapter.

This table contains 11 values

7889991011141415

Runnable example

// Calculate the Mean (m)
let m = (7+8+8+9+9+9+10+11+14+14+15)/11;
// Calculate the Sum of Squares (ss)
let ss = (7-m)**2 + (8-m)**2 + (8-m)**2 + (9-m)**2 + (9-m)**2 + (9-m)**2 + (9-m)**2 + (10-m)**2 + (11-m)**2 + (14-m)**2 + (15-m)**2;
// Calculate the Variance
let variance = ss / 11;

Runnable example

const values = [7,8,8,9,9,9,10,11,14,14,15];
let variance = math.variance(values, "uncorrected");

Standard Deviation

Standard Deviation is a measure of how spread out numbers are.

The symbol is σ (Greek letter sigma).

The formula is the √ variance (the square root of the variance).

Runnable example

// Calculate the Mean (m)
let m = (7+8+8+9+9+9+10+11+14+15)/11;
// Calculate the Sum of Squares (ss)
let ss = (7-m)**2 + (8-m)**2 + (8-m)**2 + (9-m)**2 + (9-m)**2 + (9-m)**2 + (9-m)**2 + (10-m)**2 + (11-m)**2 + (14-m)**2 + (15-m)**2;
// Calculate the Variance
let variance = ss / 11;
// Calculate the Standard Deviation
let std = Math.sqrt(variance);

Deviation is a measure of Distance .

How far (on average), all values are from the Mean (the Middle).

Runnable example

const values = [7,8,8,9,9,9,9,10,11,14,15];
let std = math.std(values, "uncorrected");

Previous

Descriptive Statistics

Next

Distribution

This chapter

Overview
5

Lessons

14m

Read time

1. Machine Learning Statistics2. Descriptive Statistics3. Statistic Variability (Spread)4. Distribution5. Probability

On this page

The VarianceStandard Deviation