I have come across similar questions like this previously but I just can't get my head around a correct method
Clive catches 50 bees from the beehive and marks each bee with a dye then lets them go.
The next day he catches 40 bees from the hive. 8 of these bees have been marked with dye.
Work out an estimate for the number of bees in the beehive
I has a slight guess that the probability of picking 8 out of the 40 in the second day is the same as the probability of picking 50 out of the total $N$ in the first day so $\frac{8}{40}=\frac{50}{N}$ to give $N=250$ which I think was correct, but I am struggling to convince myself that the logic behind this is true
Also I tried another method using probability but it didn't work and I really don't know why. I used the fact that $ P(B|A)=\frac{P(A and B)}{P(A)}$ so if $N$ was the total population that we tried to find, then the $P(A and B)$ = $\frac{82}{N}$ , $P(A) =\frac{50}{N}$ and the probability of B given A is the 8 out of the total bees so $P(B|A)= \frac{8}{N}$ Hence from this we work out that $N=4.878$ which really cannot be true
Please could someone unpick where I have went wrong and perhaps suggest a better way of tackling these types of animal sampling questions?