Skip to Content
Codecademy Logo

Learn R: Variance and Standard Deviation

Print Cheatsheet

Interpretation of Variance

A larger variance means the data is more spread out and values tend to be far away from the mean. A variance of 0 means all values in the dataset are the same.

Variance

Variance is a measure of spread. It is calculated by finding the average of the squared differences between every observation and the mean. The resulting value is in units squared.

Standard Deviation

The standard deviation is a measure of a dataset’s spread. It is calculated by taking the square root of the variance of a data set. The resulting value has the same units as the original data.

Standard Deviation Units

Because standard deviation is in the same units as the original data set, it is often used to provide context for the mean of the dataset. For example, if the data set is [3, 5, 10, 14], the standard deviation is 4.301 units, and the mean is 8.0 units. By using the standard deviation, we can fairly easily see that the data point 14 is more than one standard deviation away from the mean.

Related Courses

Course

Learn R

Beginner friendly

16 Lessons
Course

Learn Statistics with R

Intermediate

9 Lessons
Skill Path

Analyze Data with R

Beginner friendly

19 Lessons