I have a work problem that seems to match pretty much exactly the "drawing balls from urns" type of problem, and it must be a pretty common type of problem, but my googling didn't find a solution. I will convert my problem to a ball-drawing one to semi-conceal my employer.
We have two samples, and we need to predict one-sided confidence intervals on the second sample purely from information gathered from the first sample.
So, in one case, I have drawn 197 balls, of which 194 of them were white, and 3 of them were red. (in the case of my employer, determining the colour of each ball is a costly proposition, but we performed it on that sample). I then draw a second sample of 432 balls. I want to know the maximum number of red balls I can expect, with 99% confidence.
I think the answer is 18, with the following logic: The worst case is that we drew an abnormally small number of balls on the first sample and then we draw an abnormally large number of balls on the second sample. According to the binomial distribution, if we have a red-ball rate of 3.36%, we have a 10% chance of getting 3 or fewer balls on the first sample of 197. Also with a 3.36% rate, we have a 9.6% chance of getting 19 or more balls on the second sample of 432. The chances of both happening is the product, or 0.96%, so 18 is within the 99% confidence interval but 19 is not.
Is my logic correct or did I miss something important?