Say I have an urn containing N balls, k blue and N-k red. Observing the colour of the balls is probabilistic: the blue ball will be observed as blue with some probability p, but observed as red with some probability 1-p. The red balls are always observed as red. One has the option to "observe" a drawn ball more than once before discarding it, in order to decrease the chances of mistaking a blue ball for a red one.
Given some fixed number of observations per draw, I want to calculate the probability distribution for the number of draws without replacement required until at least one ball is drawn that is observed to be blue. That is, a blue ball might be drawn but observed to be red - this shouldn't count as "drawing a blue ball" in the conventional sense. If the urn is emptied before a blue ball is observed, all the balls should be replaced and the search process should start over. I can simulate this easily enough, but a closed-form analytic solution would be nice.
What I have so far:
$$ N = \text{total balls in urn} \\ k = \text{blue balls in urn} \\ n = \text{total balls drawn}\\ m = \text{observations made per drawing} $$ $$ P(observation=blue | blue) = p \\ P(observation=red | blue) = 1 - p \\ P(observation=red | red) = 1 \\ P(observation=blue | red) = 0 $$ $$ P(conclusion=blue | blue) = 1 -(1 - p)^m \\ P(conclusion=red | blue) = (1 - p)^m \\ P(conclusion=red | red) = 1 \\ P(conclusion=blue | red) = 0 \\ $$
Right now I'm working on expressing the probability of the nth ball being blue given that the previous balls were concluded to be red. I'm playing around with things along the lines of:
$$ P(firstball=blue) = \frac{k}{N}\\ P(secondball=blue) = \frac{k - P(firstballconclusion=blue)}{N - P(firstballconsultion=red)} $$
but I'm not sure if that makes any sense. For what it's worth, my end goal is to optimize a choice of m given N, k, p.