Variance Estimation: Definition & Example

Instructor: Betsy Chesnutt

Betsy teaches college physics, biology, and engineering and has a Ph.D. in Biomedical Engineering

Two sets of data can have the same mean, but be distributed very differently. Variance measures how spread out a set of data is. In this lesson, we will learn how to calculate variance and how it is used in hypothesis testing.

What Does Variance Measure?

A pharmaceutical company has developed a new drug that is supposed to lower blood pressure, and a research scientist with the company is conducting a study to measure how effective the drug is. She selects two groups of similar patients. One groups is given the new drug, while the other is given a placebo. The blood pressure of both groups is regularly monitored and recorded. How will the scientist decide if the drug is effective or not? Making decisions like this requires statistics.

There are statistical tests, like the Student's t-test that are used to decide if two sets of data are actually different from each other or not. But before the scientist can perform a t-test to see if the drug is producing a statistically significant difference in blood pressure, she would first need to calculate the variance of each data set.

Variance measures how spread out the data in a sample is. Two data sets with the same mean could be distributed very differently, and variance is a way to quantify this difference. If the variance is small, this means that all the measurements are close to the mean and there is not a lot of variability. If the variance is large, the data is very spread out and highly variable.

How to Calculate Variance

To calculate the variance in a data set, you need to take into account how far each measurement is from the mean and the total number of measurements made.

1. First, take all your data and find the mean. You can do this by adding up all the measurements and then dividing by the total number of measurements.

2. Next, subtract each measurement from the mean and then square these values.

3. Finally, add up all the values you just calculated in (2) and then divide by the total number of measurements. This is the variance of the sample!

Variance: Example Calculation

Let's look at the data the pharmaceutical scientist gathered from patients who were taking the new blood pressure medicine.

blood pressure data table

The mean blood pressure of subjects with and without the drug seem different, but without knowing the variance of the two groups, it is impossible to determine if they are actually statistically different or not. It's possible that the variance of both is large enough that there is a significant amount of overlap between the two sets of data. In that case, the means might NOT be statistically different.

To determine if these groups are truly different, let's first look at the group that received the drug and calculate the variance in the blood pressure measurements.

First, calculate the mean, and then subtract each measurement from the mean. It will help to put these values in a table like the one shown below. To find the variance, square all of those values, add them together, and divide by the total number of measurements.

variance calculation

Variance and T-tests

Now that the variance of the data set is known, how would the scientist use that to determine if the drug is effective or not? A Student's t-test can be performed to answer this question, but it is only valid if the variances of both groups are similar. Is that a valid assumption in this case? We need to calculate the variance of the control group to find out.

control group variance

In this case, the variances are very similar, so it is okay to use the Student's t-test to determine if the groups are actually different. If the variances had been different, another type of t-test, called the Welch's t-test, should be used.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account