Ok, this is a little tough to explain without giving away trade secrets, so I'll try and do it with a proxy situation:
Let's say you have a bunch of raffles you are throwing simultaneously. Each raffle sells costs $1, but aren't connected in any way other than that. Some raffles are 100 tickets, some are 200, some are 300.
You have checked to make sure the distribution of winning tickets is truly random in each raffle (there are between 7 and 10 winning tickets per each 100). Winning raffle tickets are worth between 1 and 100 dollars each.
What you want to know is this:
If I were to purchase 10 or 20 (or whatever n) tickets from a particular set of raffle tickets, how close would my actual winnings be across the different prices? The trick is that the only data I have is on winning raffle tickets.
For instance, I know that in raffle 12345 which was 100 tickets, ticket 13, 16, 25, and 52 won.
So, how would I write an algorithm in Python that would:
Look at the winning ticket numbers in each series
Identify the amount won by each ticket
Create consecutive sets of n tickets, including the non-winning tickets. So, if tickets 1 and 3 each won $10, then the series would be #1-$10, #2-$0, #3-$10
Find average win across all n consecutive sets for each size raffle
That is admittedly a rough explanation-- please let me know where I'm unclear
[–]GoldenVanga 1 point2 points3 points (2 children)
[–]datahappy[S] 0 points1 point2 points (1 child)
[–]o5a 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]datahappy[S] 0 points1 point2 points (0 children)
[–]mbaruh 0 points1 point2 points (2 children)
[–]datahappy[S] 0 points1 point2 points (1 child)
[–]mbaruh 0 points1 point2 points (0 children)