HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Glossary
  2. /Python and data
  3. /Standard Deviation

What is Standard Deviation?

In short

The standard deviation is a measure of how spread out the values in a data set are around their mean. A small value means the data are close together.

In simple words

For a population, σ=∑(x−μ)2N\sigma = \sqrt{\dfrac{\sum (x - \mu)^2}{N}}σ=N∑(x−μ)2​​. For a sample, divide by n−1n - 1n−1 instead of nnn, and call it sss. It is in the same unit as the data. About 68%68\%68% of values in a bell-shaped distribution lie within one standard deviation of the mean, and about 95%95\%95% within two. In Python, statistics.stdev gives the sample value and statistics.pstdev the population value.

Example

For 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 92,4,4,4,5,5,7,9 the mean is 555, and the population standard deviation is 328=2\sqrt{\dfrac{32}{8}} = 2832​​=2.

Learn it properly

  • Lessons on this topic
  • Test yourself

Related terms

  • Mean, Median and Mode
  • Standard Error

← All glossary terms

Learn it in

  1. Spread
All lessons on this topic →

Practise

  1. A box plot of some test marks has the five numbers: smallest 18, Q1 27, median 34, Q3 40…Medium
  2. The values 2, 6, 10, 14 have a mean of 8…Hard
  3. Class A has the marks 50, 56, 62, 68, 74…Medium
  4. Find the variance and the standard deviation of 4, 6, 7, 9, 14.Hard

Quick questions

  1. The masses of some bags of rice have a standard deviation of 2.5 kg. A shop sells them…Hard
  2. The lengths of some ribbons have a standard deviation of 6 cm. A shop adds 4 cm to every…Medium
  3. The values 2, 5, 8, 11 and 14 have a mean of 8. What is their variance?Hard

More Python and data terms

  1. Cell (in a Python notebook)
  2. Class and Special Methods (in Python)
  3. Dictionary (in Python)
  4. For Loop
  5. Function (in Python)
  6. If Statement (in Python)
All Python and data terms →

Try it yourself

Python labs run in your browser. Type the code, run it and see what happens.

Open a Python lab