0
$\begingroup$

Say you have a passcode $135790$ and a burglar knows exactly what digits it is made up of and that there no duplicates, but not the correct ordering.

How do you calculate the probability that he gets exactly $4$ of the digits in their correct location?

I was initially thinking it would be like a binomial distribution, but because you cannot re-use a number each choice is not independent and the number of possible digits decreases each time you pick a digit.

$\endgroup$
1
$\begingroup$

Count the ways to select four from the six to put in their correct place, and put the other two in the incorrect place. That is the count of favoured outcomes.

The count for total outcomes is that of all the ways to arrange the six digits.

Divide and calculate.

$\endgroup$
  • $\begingroup$ So that makes me think $6C4*(1/6)^4*(5/6)^2$? $\endgroup$ – Tiernan Watson Apr 24 at 2:09
  • $\begingroup$ No. It is not a binomial distribution. The success rates of the tumblers are not independent because repeatition is disallowed. @TiemanWatson $\endgroup$ – Graham Kemp Apr 24 at 2:15
  • $\begingroup$ I can see there are 15 ways to select 4 from the 6. What you've said just makes me think of writing down all 15 of those, which is what I can do and I understand how to get the right answer from that. Was that the method you were alluding to? I just feel like there should be a quicker way, and I'm still not seeing it, unless there isn't. $\endgroup$ – Tiernan Watson Apr 24 at 2:20
  • $\begingroup$ There are indeed $15$ ways to arrange the digits so that exactly four are correct, or $6!\div (4!2!)$. There are, in total, $6!$ ways to arrange the six digits. So... $\endgroup$ – Graham Kemp Apr 24 at 2:31
  • $\begingroup$ I basically spelt it out to myself in the last comment haha. Thanks. $\endgroup$ – Tiernan Watson Apr 24 at 2:36
0
$\begingroup$

It would be derangement. Select 4 out of n and there is only one way for them . So $C_4^n $ Now rest $n-4$ are such that no one is in it's correct position. Using derangement formula: $(n-4)!(1-\frac 1 {1!} + \frac 1 {2!} - \frac 1 {3!} + ..... + (-1)^{n-4} \frac 1 {(n-4)!} )$ The total required ways can be found by multiplying these two. And the total ways are obviously,$ n!$. Then we can find the probability.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.