🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to AI Notes
Topic #53

Variability

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:

Col 1 Col 2 Col 3 Col 4 Col 5 Col 6 Col 7 Col 8 Col 9 Col 10 Col 11
7 8 8 9 9 9 10 11 14 14 15
// 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;
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).

// 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);

Note: Deviation is a measure of Distance. How far (on average), all values are from the Mean (the Middle).

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

Want to go beyond the notes?

Join CodingNow 2.0's AI course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Variability – FAQs

Quick answers about learning Variability in AI.

This free note from CodingNow 2.0 explains Variability in AI — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every AI topic on CodingNow 2.0, including Variability, is 100% free with no signup required.
With focused practice, most students grasp Variability in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now