R Tutorial: What are survey weights?

Kelly McConville explains survey weights using the Consumer Expenditure Survey. Each sampled household represents thousands of others in the U.S. population, so an unweighted mean of household income ($62,480) misses the real picture. You need to multiply income by its weight to get an accurate population estimate.
Chapters
Hi, I'm Kelly McConville, a survey statistician and professor. Welcome to my course on analyzing survey data. Now, I'm wondering if you've ever found yourself in the following situation. You have a question you want to answer. You found a great data set to answer that question. And then there's this column in the data set that represents survey weights. And you ask yourself, what are those? Can I ignore those? Well, let's pretend we have found ourselves in this situation. We want to estimate the average household income in the U.S. we find that the Bureau of Labor Statistics provides a public use data set. And this data set includes the variable think B tax given in the second column here, which is the amount of household income before taxes in 2016. But the first column in the data set is a survey weight variable final weight 21. How should these weights impact our analyses? First, we should ask, what are survey weights? Survey weights result from data that were collected under a complex sampling design. The weights tell us the number of individuals in the population that each sampled individual represents. Returning to the BLS sample, the first weight equals 25,985, which means that the first sampled household in the Data set represents 25,985 households in the population. The second represents 6,581 households. Now that we know what survey weights are, the question remains, how will they impact our analyses? Let's consider a common goal for survey data to estimate a population quantity. Suppose that this picture reflects all households in the US where each green box is an individual household and we want to estimate the average household income. Then Y sub I is the income for the I th household, U represents all US Households, and capital n is the total number of households. Then the fancy notation can be read to say that mu the average household income equals the sum of all incomes divided by the total number of households. Of course, we can only calculate mu if we have income data for every household. But we don't. Instead, BLS takes a sample of households represented by the blue squares. Using a complex sampling design, we call that sample S. They only collect income data for the N households in the sample. Now, to estimate mu, we can calculate the sample average, which is called Y bar. Y bar is the average income for the households in BLS's sample. To calculate the sample mean for the BLS survey, we must insert the income variable think B tax from the consumer expenditure data set, denoted by ce, into the mean function. Remember, we can call a variable using the syntax data set variable, name the average household income for the consumer expenditure sample is is $62,480. Is this a good estimate of the average income of all US Households? Probably not. The problem is that the sample mean assumes all households in the sample represent the same number of households in the population. But when we looked at the survey weights, we learned that just isn't true. And remember, for the sampled households, we have both the income data and the survey weights. To properly estimate the mean income, we need to use both when constructing our estimator. But how do I incorporate the sampling design into my estimates, my data visualizations, my models? Well, that's exactly what we'll learn to do in this course. But first, let's practice exploring the weights themselves.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







