Ok, so how does the shop algorithm actually work?

So I had a casual run today. My shop pool was: 3 elite items, and 5 basic items (and zero quest items). The catch: I prepared the "Quest Items" Bezaar preparation! I have been feeling quite clueless regarding the shop pool especially in the context of the dailies, and so I'm now trying to pay closer attention to what spawns, and well I'm even more clueless than I was before... 
Does anyone have any idea how the shop pool is populated? Any experiments / educated guesses / generous developer infoshare?
I did some searching and found an old post by Wald0, saying he was doing repeat runs to document item drop rates, but I don't think he ever publicly shared anything...
It would be so cool to know at least rule of thumb probabilities of what governs shop spawn...

Does anyone have any idea how the shop pool is populated? Any experiments / educated guesses / generous developer infoshare?

It would be so cool to know at least rule of thumb probabilities of what governs shop spawn...
