Variance And Standard deviation in Python

Variance

Measurement of spread of between numbers in a data set. That is,it measures how far each number in the data set from mean and therefore from other numbers in the set

Key Takeaways

  • In investing, variance is used to compare the relative performance of each asset in a portfolio.
  • Because the results can be difficult to analyze, standard deviation is often used instead of variance.
  • In either case, the goal for the investor is to improve asset allocation.

How to Use Variance

A large variance indicates that numbers in the set are far from the mean and from each other, while a small variance indicates the opposite.

Variance and Standard deviation in Python

Standard Deviation

The standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance.

Key Takeaways

  • A volatile stock has a high standard deviation, while the deviation of a stable blue-chip stock is usually rather low.
  • As a downside, it calculates all uncertainty as risk, even when it’s in the investor’s favor — such as above average returns.