The DMG 'top down' demographics gives ridiculous results if used for anything other than finding the highest level NPCs in an area - and even then they're poor.
I haven't read MMS:WE but I've put a lot of thought into this area myself. I use a bottom-up approach: 1% of population are PC-class (per EGG in 1e DMG). I take it that 50% are 1st level, with half as many 2nd, 1/4 3rd, 1/8 4th, and so on. This makes high level characters stand out. I can arbitrarily insert (eg) 20th level NPCs if I want.
To work out the likely highest-level NPC (who could be any class) in an area: population
100 - 1st
200 - 2nd
400 - 3rd
800 - 4th
1600 - 5th
etc
Towns & cities normally have a rural hinterland about 4 times the population of the town, which needs to be taken into account - eg a city of 20,000 is the nexus of an area of around 100,000.
There will typically be twice as many characters 1 level lower, 4 times 2 levels lower, and so on. IMC most NPCs are Fighter-types, with spellcasters rare.