## How to Weight Survey Data

by Henry Mak

Last week we had training with Laura S on working with survey data. Here's a snippet of what we learnt.

One reason why you'd want to weight survey data is because if you don't, you could over or under-represent a certain demographic. For example, if I asked 300 random people if they liked carrots or not and 80% of Males answered 'Yes', is this truly representative of the world? Nope. In order to be able to draw a reasonable conclusion I'd have to weight the results (and also ask waaaaay more people).

In the following example, I will using some mocked data in Excel and walk you through the process of weighting it. You can, of course, translate this method into Alteryx/Tableau Prep but I'll leave that to you.

Firstly, imagine that I asked random people in a town if they played football or not. Here are the results of the survey of people who answered 'Yes'.

For simplicity sake, the number of people who responded 'Yes' was 500 people.

Next we will work out the percentage of the total respondents for each demographic. This is calculated by doing number of respondents in each demographic divided by the total number of respondents. For example, for Male, Under 16 the calculation is 150/500 = 0.3 = 30%. This is called 'Current'

The next step is to draw in the data of the population. So in the example below, 22% of the population in the town are Female and are aged between 16 and 30. This is called 'Target'.

After, we will calculate the weightings. This is done by calculating Target divided by Current. So for example, 8/30 = 0.27 (2 decimal places).

Finally, in order to calculate the weighted number of participants we must now multiply the number of respondents by the weight. So for example, 150 * 0.27 = 40.

There you have it, the survey is now weighted. You are now free to carry out your analysis with this new data.

Tableau Public

Weighting Survey Data in Alteryx - Ben Moss

Henry Mak

Sat 25 Sep 2021

Thu 05 Aug 2021

Mon 02 Aug 2021

Thu 05 Aug 2021