AI agent for statisticians
Survey Weighting and Sample Check Agent
Produce weighted survey estimates that are stable and well documented.
What it does
A survey that over-represents one age group or region gives misleading results, and the skew often goes unnoticed. This agent reads survey responses and compares the sample with population benchmarks for age, region, income and other traits. It builds weights to correct the gaps, then tests whether the key results hold under different weighting choices. If one weight is very large and swings a result, it trims the weight and reruns. It also checks the effective sample size after weighting. It then writes a short method note with the results before and after weighting. The economist approves the method and the published numbers.
How it works
Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.
Read the steps as a list
- Survey wave closes
- Load responses and population benchmarks
- Compare sample shares with benchmarks by trait
- Build weights
- Calculate key results with and without weights
- Are results stable across alternative weighting methods?If not: trim large weights and rebuild. Back to step 3.
- Is the effective sample size above the minimum?If not: collapse small groups and rebuild. Back to step 3.
- Write the method note and comparison table
- Economist approves the method and published numbersThe agent waits here for your OK.
- Weighted results with documentation
How it decides
It accepts weights that bring the sample within tolerance of benchmarks and keep results stable across weighting choices.
- Flag a group more than 5 points from its benchmark share
- Trim weights above 5 times the average
- Require an effective sample size of at least 400
- Report results as unstable if they move more than 2 points between methods
Make it yours
Every agent is a starting point. You choose these settings for your own situation.
- Benchmarks and traits to weight on
- Weight cap (default 5 times average)
- Minimum effective sample (default 400)
- Stability limit in points
What keeps you in control
It always asks you first
- Economist approves the weighting method
- Economist approves the published numbers
Hard limits
- Never publishes results
- Shows weighted and unweighted results side by side
It stops when
- Done: weights stable and note approved
- Stop: benchmarks for key traits are not available
Set it up
We guide you through the set-up, step by step
Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.
- One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
- The agent then walks you through connecting your own data, one source at a time
- A downloadable copy with the flow chart, the rules and the full guide