Let’s say there’s 1 ball hidden in N boxes. You can open $n<N$ boxes. What’s the probability of finding the ball?
My approach: the way of choosing $n$ from $N$ boxes $$ \binom{N}{n}$$ Choosing the one that has the ball there are $N-1$ boxes left and $n-1$ to pick so $$\binom{N-1}{n-1}$$ ways to do it. Then the probability is $$\frac{\binom{N-1}{n-1}}{\binom{N}{n}}=\frac{n}{N}$$ Probability is not my forte. I think I’m wrong… am I?
Edit: I wasn't wrong thanks to all, but the logic would be the same if there were $k<n$ balls hidden? (one ball per box only)
Your answer is right. There's a couple ways of thinking about it; the comments on your post talk about a simple equivalent problem (think about why there's a bijection between the 2 ways of counting!).
You could even just brute force it. Either you find it on the first try, the second try, ..., the nth try. This probability comes to
$\frac{1}{N} + \frac{N-1}{N} \cdot \frac{1}{N-1} + \frac{N-1}{N} \cdot \frac{N-2}{N-1} \cdot \frac{1}{N-2} + ... + \frac{N-1}{N} \cdot \frac{N-2}{N-1} \cdot ... \cdot \frac{N-(n-1)}{N-(n-2)} \cdot \frac{1}{N-(n-1)}$
and that's equal to $\frac{1}{N} + \frac{1}{N} + ... + \frac{1}{N} = \frac{n}{N}.$
Your original answer also works well and is quite elegant :)