title: How to determine number of coupons to float to achieve target sales in the given duration in realtime?
body: <p>Lets say, I have to achieve a target sales of 100 in 24 hours using coupons.
  Now, as the redemption rate would never be 100% (varies normally from 20-50%), I have to float more number of coupons and track the sales occurred, rate of sales occurring, etc. What is the best algorithm to achieve the same?
  My approach: allocate number of sales expected for each hour (lets day 5 in each of 24hours.) Assume a redemption rate of 20%. So coupons to be floated would be 25. If I get 3 sales in that hour, Then, the target sales for 2nd hour will be 2(previous hour) + 5 = 7. But redemption was less(8%, as only 2 people redeemed) so I will float 7/8% = 88 coupons. 25 -2 = 23 already exist. so i will float 88-23 = 65 coupons and so on.</p>