Binomial Distributions for Testing Chemical Concentrations

Hi all,

I have a rather unique question that I'm having a hard time getting my head around and how best to approach - any help at all would be greatly appreciated!

Let's suppose I have a test, with a binary outcome, that is dependent on how much of a chemical is present. With a little bit of this chemical present, the test has a high probability of succeeding. With more chemical present, that probability goes down. These probabilities for various concentrations have been mathematically calculated. With repeated trials of the same unknown sample, this probabilistic dependency might be used to experimentally determine whether the concentration of chemical present is below a certain concentration. This probably seems like an odd test, and though the nitty-gritty details aren't particularly relevant, the only alternative is extremely labor intensive/expensive and gathering multiple repeated trials of this test isn't a huge obstacle, thus the potential appeal.

What I'm hoping to calculate is for a given number of trials and the probability of test success at certain concentrations, how many positive tests must be acquired to statistically say with some level of confidence that true chemical concentration is below a certain level?

e.g. Given the probabilities listed below, if I run this test 10 times, and receive 9 positives, with gut instinct, I can say that the chemical concentration is likely below 500 g/L. But is it below 400 g/L with 95% confidence? Below 300? How does this change if I run it 100 times and get 90 positives?

Concentration/probability values:
200 grams/liter - 100% success rate
300 grams/liter - 50% success rate
400 grams/liter - 6% success rate
500 grams/liter - 0.75% success rate
600 grams/liter - 0.1% success rate

More than happy to try and elaborate a little more if necessary.

Thank you,