We are trying to build a system in which the winners of prizes are selected on a daily basis and their relevant contact details (address, phone #, name) are pulled from database. The number of prizes is fixed, but can change on a daily basis if new prizes are added to the db. This is part of a quiz system, so we have determined that a user's odds of winning a getting daily prize is the:
# of sessions they have completed/ # of total sessions completed by all the users
Once a user has won a prize, their # of completed sessions is reset to 1. This is to ensure that people that have not won before have a greater chance of winning. Users are only eligible to win a daily prize if they have participated that day and attempted a certain amount of questions (10).
Is the proposed logic flawed? If not, how does one implement this logic into our automated system?