All resources referenced in this post can be found here.
I have obtained salary information for a large number of people and it can be used to answer the important question in the title
![]() |
| Created with married_couple_salary_diff.py |
- If money is excluded how does the balance look in your relationship?
- What is the probability of finding a couple with an equal or worse imbalance? The direction is important here, whether the man or woman is the "winner".
If there where only 10 couples with the following imbalances
... the probabilities would look like this.
c1 probability = 1 / 10 = 0.1
c2 probability = 2 / 10 = 0.2
c4 probability = 7 / 10 = 0.7
c6 probability = 5 / 10 = 0.5 - Locate the probability found in step 2 on the y-axis and read out the factor on the x-axis
How did I get hold of the data? The information originally comes from the Swedish tax authorities but to get hold of it in large quantities you need to buy it in book form, "Taxeringskalendern". To save space in the book people with low income have been filtered out, but the limits are pretty low so almost everyone working should be in there.
To use the information for anything more sophisticated than checking how much money your neighbor makes you need the data in digital form. To do this I shot a movie while flipping through the book and ran Tesseract (OCR software) on every frame (parse_tax_records.py). This approach worked pretty poorly but I managed to collect enough information to do the analysis in this post. I think the poor performance was mainly due to the book's content not being in Tesseract's dictionary and the font being really dense.
As a bonus I give you the salary distribution in the Malmö/Lund area, derived from the same data.
![]() |
| Created with salary_distribution.py |


No comments:
Post a Comment