Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Understanding Central Tendency & Spread | Probability & Statistics
Mathematics for Data Science

bookUnderstanding Central Tendency & Spread

Mean (Average)

Note
Definition

The mean is the sum of all values divided by the number of values. It represents the "central" or "typical" value in your dataset.

Formula:

Mean=βˆ‘xin\text{Mean} = \frac{\sum x_i}{n}

Example:
If your website had 100, 120, and 110 visitors over three days:

100+120+1103=110\frac{100 + 120 + 110}{3} = 110

Interpretation:
On average, the site received 110 visitors per day.

Variance

Note
Definition

Variance measures how far each number in the set is from the mean. It gives a sense of how "spread out" the data is.

Formula:

Οƒ2=βˆ‘(xiβˆ’ΞΌ)2n\sigma^2 = \frac{\sum (x_i - \mu)^2}{n}

Example (using the previous data):

  • Mean = 110;
  • (100βˆ’110)2=100(100 βˆ’ 110)^2 = 100;
  • (120βˆ’110)2=100(120 βˆ’ 110)^2 = 100;
  • (110βˆ’110)2=0(110 βˆ’ 110)^2 = 0.

Sum = 200

Variance=2003β‰ˆ66.67\text{Variance} = \frac{200}{3} \approx 66.67

Interpretation:
The average squared distance from the mean is about 66.67.

Standard Deviation

Note
Definition

Standard deviation is the square root of the variance. It brings the spread back to the original units of the data.

Formula:

Οƒ=Οƒ2\sigma = \sqrt{\sigma^2}

Example:
If variance is 66.67:

Οƒ=66.67β‰ˆ8.16\sigma = \sqrt{66.67} \approx 8.16

Interpretation:
On average, each day's visitor count is about 8.16 away from the mean.

Real-World Problem: Website Traffic Analysis

Problem:
A data scientist records the number of website visitors over 5 days:

120,150,130,170,140120, 150, 130, 170, 140

Step 1 β€” Mean:

120+150+130+170+1405=142\frac{120 + 150 + 130 + 170 + 140}{5} = 142

Step 2 β€” Variance:

  • (120βˆ’142)2=484(120 - 142)^2 = 484;
  • (150βˆ’142)2=64(150 - 142)^2 = 64;
  • (130βˆ’142)2=144(130 - 142)^2 = 144;
  • (170βˆ’142)2=784(170 - 142)^2 = 784;
  • (140βˆ’142)2=4(140 - 142)^2 = 4.
Variance=484+64+144+784+45=14805=296\text{Variance} = \frac{484+64+144+784+4}{5} = \frac{1480}{5} = 296

Step 3 β€” Standard Deviation:

Οƒ=296β‰ˆ17.2\sigma = \sqrt{296} \approx 17.2

Conclusion:

  • Mean = 142 visitors per day;
  • Variance = 296;
  • Standard Deviation = 17.2.

The website traffic varies by about 17.2 visitors from the average day.

question mark

What is the relationship between variance and standard deviation?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 5. ChapterΒ 7

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain why variance is important in data analysis?

How do I interpret standard deviation in real-world scenarios?

Can you provide more examples of calculating mean, variance, and standard deviation?

Awesome!

Completion rate improved to 1.96

bookUnderstanding Central Tendency & Spread

Swipe to show menu

Mean (Average)

Note
Definition

The mean is the sum of all values divided by the number of values. It represents the "central" or "typical" value in your dataset.

Formula:

Mean=βˆ‘xin\text{Mean} = \frac{\sum x_i}{n}

Example:
If your website had 100, 120, and 110 visitors over three days:

100+120+1103=110\frac{100 + 120 + 110}{3} = 110

Interpretation:
On average, the site received 110 visitors per day.

Variance

Note
Definition

Variance measures how far each number in the set is from the mean. It gives a sense of how "spread out" the data is.

Formula:

Οƒ2=βˆ‘(xiβˆ’ΞΌ)2n\sigma^2 = \frac{\sum (x_i - \mu)^2}{n}

Example (using the previous data):

  • Mean = 110;
  • (100βˆ’110)2=100(100 βˆ’ 110)^2 = 100;
  • (120βˆ’110)2=100(120 βˆ’ 110)^2 = 100;
  • (110βˆ’110)2=0(110 βˆ’ 110)^2 = 0.

Sum = 200

Variance=2003β‰ˆ66.67\text{Variance} = \frac{200}{3} \approx 66.67

Interpretation:
The average squared distance from the mean is about 66.67.

Standard Deviation

Note
Definition

Standard deviation is the square root of the variance. It brings the spread back to the original units of the data.

Formula:

Οƒ=Οƒ2\sigma = \sqrt{\sigma^2}

Example:
If variance is 66.67:

Οƒ=66.67β‰ˆ8.16\sigma = \sqrt{66.67} \approx 8.16

Interpretation:
On average, each day's visitor count is about 8.16 away from the mean.

Real-World Problem: Website Traffic Analysis

Problem:
A data scientist records the number of website visitors over 5 days:

120,150,130,170,140120, 150, 130, 170, 140

Step 1 β€” Mean:

120+150+130+170+1405=142\frac{120 + 150 + 130 + 170 + 140}{5} = 142

Step 2 β€” Variance:

  • (120βˆ’142)2=484(120 - 142)^2 = 484;
  • (150βˆ’142)2=64(150 - 142)^2 = 64;
  • (130βˆ’142)2=144(130 - 142)^2 = 144;
  • (170βˆ’142)2=784(170 - 142)^2 = 784;
  • (140βˆ’142)2=4(140 - 142)^2 = 4.
Variance=484+64+144+784+45=14805=296\text{Variance} = \frac{484+64+144+784+4}{5} = \frac{1480}{5} = 296

Step 3 β€” Standard Deviation:

Οƒ=296β‰ˆ17.2\sigma = \sqrt{296} \approx 17.2

Conclusion:

  • Mean = 142 visitors per day;
  • Variance = 296;
  • Standard Deviation = 17.2.

The website traffic varies by about 17.2 visitors from the average day.

question mark

What is the relationship between variance and standard deviation?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 5. ChapterΒ 7
some-alt