0

Problem:

There are $7$ keys in a brelok, from which only one opens the door. Find the average number of attempts that we will need in order to open the door and the probability to need exactly $5$ attempts, when everytime we try a key:

a) We remove it from the brelok

b) We dont remove it from the brelok

My solution:

Since we just need the first success i thought that we will use $X$~$Geom(p)$ for b) since its with replacement and $NBinom$~$(r,p)$ for a) since its without replacement (where $r$ the number of successes needed and where $p$ the probability of success).

The issue is though that i get the exact same answers for both. For example the $μ$ for $X$~$Geom(p)$ is $μ=\frac{1}{p}=7$ and for $NBinom$~$(r,p)$ its also $μ=\frac{r}{p}=\frac{1}{p}=7$. Same thing also happens with the $P(X=5)$, i get same results from both distributions.

Am i doing anything wrong or this is indeed the answer?

Than1
  • 331
  • 1
    For the first case (non-replacement), the Geometric distribution is not applicable, as the probability changes at each stage. – lulu Aug 30 '22 at 11:40
  • 1
    this question is more or less a duplicate. – lulu Aug 30 '22 at 11:41
  • Note: I don't understand why or how you are using the binomial distribution for the first one. It's just uniform. The winning key is equally likely to be in any of the position, so the expected position is just $4$. – lulu Aug 30 '22 at 11:52
  • @lulu i have the geometric distribution as an answer to the second case, not the first. Also im not using Binomial but NBinom (Negative Binomial), which takes number of successes needed as parameter (in which i put 1). But i will also try the uniform i guess, is this distribution without replacement? – Than1 Aug 30 '22 at 11:58
  • 1
    The key is equally likely to be in any of the positions, right? That's uniform. If you meant something other than that, you need to be explicit. – lulu Aug 30 '22 at 11:59

0 Answers0