Here's one approach that combines randomness and guaranteeing that you end up with a positive result in a predictable range:
You have a target (15 in your case), a counter (initialized to 0) and a flag (initialized to false).
Accept a request. If the counter is 15, reset the counter and the flag. If the flag is true, return negative outcome. Get a random true or false based on one of the methods described in other answers, but use a probability of 1/(15-counter). Increment counter If result is true, set flag to true and return a positive outcome. Else return a negative outcome. Accept next request
This means that the first request has a probability of returning 1/15 of a positive result, but on the 15th request, if a positive result has not been returned, the probability is 1/1 of a positive result.
source share