Suppose we interviewed 60 men and 40 women. The population we want to describe is equally composed of men and women. To correct this, each time we run counts on a question, instead of adding 1 for each man, we will add 50/60, or 0.8333, and for each woman we will add 1.25. In other words, the under-represented categories will have a stronger effect than the over-represented ones.
The process gets more complicated when more than one variable is involved. The following example describes how the weighting algorithm works.
Imagine that you want to apply a weighting on two variables: gender and social grade (A,B,C1). If you have the information on how the gender is defined for each social grade (so you are creating a new variable with six cells), we can fall back on single variable weighting. But if we increase the number of questions and responses in the weighting, the target population frequency in each of the sub-cells may not be known.
Another alternative would be to assume that gender and social grade are independent and therefore we should observe on each social grade a 50-50 split on gender. This hypothesis is very restrictive and would very likely skew the results. Therefore the algorithm is an iterative process.
After a few iterations, the weights should converge to an acceptable solution.