The standard idea seems to be that comps are based on average
bet and hours played (forgetting for now skill rating).
But in practice, it seems winning and losing are often very
important to amount of comps actually received. Of course casinos
love losers. Some time ago, the first time I played a healthy
all black session, 2 hrs, I lost a bundle (seemingly to me) almost
4k in 2 hrs. I'd taken 6k with me, being aware of deviation, and
was determined to play for a decent period of time win or lose.
After that loss, the casino sent me comps much much more valuable
than when I was playing their green tables for much longer times
-- several free room nights and cash back coupons.
Since then, I've played the same game at least 4 times as many
hrs and at a slightly bigger bet level, and received little in
the way of mailers (yes, mostly winning these hrs).
The question is how does this "losing comps" determination happen?
It probably must involve an interaction between the pit and the
marketing person.

