Learn R: Variance and Standard Deviation
In this module, you will learn how to quantify the spread of the dataset by calculating the variance and standard deviation in R.
StartKey Concepts
Review core concepts you need to learn to master this subject
Interpretation of Variance
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 in R
Lesson 1 of 2
- 2Now that you have learned the importance of describing the spread of a dataset, let’s figure out how to mathematically compute this number. How would you attempt to capture the spread of the data …
- 3We now have five different values that describe how far away each point is from the mean. That seems to be a good start in describing the spread of the data. But the whole point of calculating vari…
- 4We’re almost there! We have one small problem with our equation. Consider this very small dataset: c(-5, 5) The mean of this dataset is 0, so when we find the difference between each point and th…
- 5Well done! You’ve calculated the variance of a data set. The full equation for the variance is as follows: \sigma^2 = \frac{\sum_{i=1}^{N}{(X_i -\mu)^2}}{N} Let’s dissect this equation a bit. * …
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory