Tools › Statistics › Surveys and Sampling › Survey Weighting (Raking) › Example
Raking by hand: forty respondents, sex by age, four iterations
| Tool | Survey Weighting (Raking) |
| Source | original |
| Level | Undergraduate |
Problem
Forty respondents fall in four groups: 8 women under 50, 16 women aged 50 and over, 3 men under 50 and 13 men aged 50 and over. The population is half women and 45 % under 50. Find the raking weight of each group and the design effect.
Inputs to Enter
- Respondent rows: 40 rows (id, sex, age, yes) with the four counts 8, 16, 3, 13; 15 of the 40 answer yes
- Population targets: sex female 50, male 50; age under 50 45, 50 and over 55
Answers
- Pass over sex: women × 0.50 × 40 / 24 = 0.8333, men × 0.50 × 40 / 16 = 1.2500; the weighted count under 50 is then 8 × 0.8333 + 3 × 1.25 = 10.42 where the target is 18
- Pass over age: under 50 × 18 / 10.42 = 1.728, 50 and over × 22 / 29.58 = 0.7437; women are now 53.59 % of the weighted sample, a gap of 3.59 points
- Gap after iterations 1 to 4: 3.5887, 0.1290, 0.0047, 0.0002 points
- Final weights: women under 50 1.361, women 50 and over 0.569, men under 50 2.370, men 50 and over 0.991; 8 × 1.361 + 16 × 0.569 = 20.0 women and 8 × 1.361 + 3 × 2.370 = 18.0 under 50
- Design effect = 40 × 49.64 / 40² = 1.241; effective sample size 32.2; yes: 37.5 % unweighted, 43.4 % weighted
Notes
Open this case in the tool: /analysis-tools/statistics/surveys/survey-weighting-raking/?try=two-by-two-by-hand. Original numbers chosen so that every step can be followed with a calculator. The first two passes are checked by hand in the tool's test script, the rest against an independent numpy computation.
More Examples for This Tool
- Raking a poll short on young respondents: weights on age, sex and education move the answer six points
- Weight trimming after raking: five men under 35 among 400 respondents, weights held to 5 times the mean
- Raking a sample that already matches the population: design effect 1.02
- A target that cannot be met: an online panel with no respondent aged 65 or over