I see it to be obnoxiously random; at A,B and (at times) E ranks there's a very good chance that you will get one of the lesser prizes, Rare Candy (talking by what I have observed so far) is usually got when you obtain a C or D rank.
Then again it's a comment and not an answer because I'm not quite sure, I might just have been unlucky.