Before going further, you need to be familiar with the terms sample and population. These terms are being introduced because it is quite difficult to study an entire population for the purpose of data analysis.
Think about it, if you were to survey the most popular colour of lipstick that is used by the women in a country with a population of 1 billion, then it would amount to a herculean task. Would it not be easier to instead survey a group of 30,000 women whose behaviour is similar to the typical behaviour of the women in that country?
It would, and it is easier to derive actionable insights from a sample that is similar to a population in terms of behaviour.
Let us first learn what a population and a sample are from the below definitions.
Population: All the data points in a data set are collectively known as the population. For example, all the employees working in a software company form the population of that company’s employees.
Sample: A part of the population is known as a sample. For example, if we randomly select 100 employees from every office location of the above software company, then those 100 employees would form a sample of the total population.
You will learn about these concepts in detail in the last session of this module. Nevertheless, for computing the measures of dispersion of a data set, it is imperative to determine whether the data set is a sample or a population.
Depending upon the type of data, an analysis of the variation in a sample can offer you useful insights. For instance, the variation in the value of a share at different times in a day gives you an idea of how volatile its price is in the market. Similarly, having measured the central tendency for a given sample, you can measure how different the actual values are from this measure.
There are two most popular metrics that are used to quantify and represent the spread within the data.
In the upcoming video, Thomas will introduce you to the concepts of dispersion in data.
In the video above, you learnt two metrics that are used to quantify and communicate the spread within the data. They are:
Variance: One way of measuring the variation within a data set can be with respect to a fixed reference value. In the case of variance, this fixed value is the mean. Variance is defined as the mean of the square of the difference between the data points and the mean value of all the data points in a data set.
Standard deviation: It is the square root of the variance. This metric serves the purpose of measuring the variation without exaggerating its magnitude. It is popularly represented using the Greek letter sigma (𝜎). So, the variance is represented as its square, i.e., σ2.
The table below shows the formulae for calculating variance and standard deviation.
Sample | Population | |
Variance | ||
Standard Deviation |
Where,
In the next video, Thomas will demonstrate how to calculate the variance and standard deviation for the delivery partners of a kids' apparel company. He will use the Excel for the kid’s apparel data set, which we discussed earlier.
Background on the kids' apparel company
An online commerce platform is planning a sale event for kids’ ethnic apparel. The platform currently serves West Bengal, but the sourcing needs to be done from Chennai. The sale event is in a few days, and for the platform, getting the inventory within 10 days is critical. On regular days, the platform uses two services to source - Partner 1 and Partner 2. The platform needs to choose one of these and place an order as soon as possible.
So, now that the standard deviation and variance have been calculated, in the forthcoming video, Thomas will use histograms to visualise the distribution of the delivery times of each of the partners.
So, as you learnt, standard deviation and variance help represent how the data points in a data set are spread around the mean or the median value.
Is there any plot that allows you to have a snapshot of a dataset and see if there are any outliers or not? This can be done by calculating something called the ‘interquartile ranges’ and then representing those ranges on a visual called a ‘box plot’.
You will learn more about interquartile ranges in the next segment.