Probability with combinatrics and distribution (big question)

Click For Summary

Homework Help Overview

The discussion revolves around a probability problem involving a digital security code and the attempts of a thief to guess it. The problem covers various aspects of probability, combinatorics, and distributions, specifically focusing on the likelihood of guessing the correct code and the implications of different guessing strategies.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants explore the probability of entering the correct code and the implications of getting one or more digits correct. There is discussion on identifying the correct distribution for the number of attempts until the correct code is entered, with some uncertainty about geometric versus exponential distributions. Questions arise regarding the correct calculation of probabilities and the potential for double counting in certain scenarios.

Discussion Status

Some participants have provided guidance on the distribution type and how to approach the probability calculations, while others are questioning the accuracy of previous answers and seeking clarification on specific points. The discussion is ongoing, with multiple interpretations being explored without a clear consensus.

Contextual Notes

Participants are grappling with the nuances of combinatorial reasoning and probability adjustments, particularly in relation to overlapping cases in their calculations. There is also a focus on the implications of sampling with and without replacement in the context of the problem.

hb2325
Messages
19
Reaction score
0
Q. The digital security code needed to open a safe in a bank is 7835. A thief tries to open the safe by entering a randomly chosen sequence of 4 digits ( each digit is independent and equally likely to be any number from 0 to 9 )

A. Find the probability that the thief enters the correct code.

B. Find P that the thief gets first or 2nd digit right (or both)

C. Thief carries on entering digits till he gets it right, forgets which sequences he entered so all sequences are equally likely and successive attempts are independent. Let Y be the number of attempts till he enters the correct code. Name the distribution of Y and find P ( y>= 200)

D. Suppose thief knows that the code is composed of digits 2,5,7,8, he enteres them in random orders.

i) find P of thief entering right code.
ii) Find p of entering exactly 2 of 4 digits in correct position.
Attempt at Ansers :

A: Probability of entering correct code = (1/10)^4 = 1/10,000

B: P of getting first digit right = 1/10, second = 1/10 so first or 2nd = 2/10 or 1/5, getting both right = 1/10*1/10 = 1/100 so, B = 20/100 + 1/100 = 21/100

C: I'm not sure what to call this distribution. Not uniform, binomial, exponential? Geometric I think but I can't explain why, I kind of don't understand exponential/geometric distributions.

P(y>=200) erm I'm stumped. I know in a geometric is p x=k is q^k-1 * p where q is probability of first trial failing but I don't know how to go from x=k to x>k or x<k.Very confused and any input would be appreciated, thank you.D i) Correct code = 1/4! = 1/24
ii) Exactly 2 in correct order = ( 1/4 * 1/3 ) * 2, because you can arrange any 2 numbers in 2 ways. = 1/6.
 
Last edited:
Physics news on Phys.org
A,B,D look correct.
C. it is the geometric distribution. To find P(y>=200), you have to find 1 - F(199), where F is the cdf of the geometric distribution.
 
I think B is incorrect. The 1/10 of guesses that are right for the first digit include those that are also right for the second digit. Same for second digit right including first digit correct case. Thus, both right is double counted if you just add these. Further, the 1/10 probability includes cases of all digits correct, etc.

What I would say, based on this, is that the probability of getting at least one of the first two digits correct is .1 + .1 - .01 = .19. This includes the possibility of getting more than two correct. If you want to exclude those, you need more adjustments.
 
Note, for C, your definition that prior sequences are forgotten, so the same might be chosen twice, makes this a problem 'sampling with replacement'. The key difference, is 'with replacement', after 10,000 tries, it is still possible the key has not been found (and some wrong keys will have been found multiple times). 'Without replacement', it is certain that you have the key in 10,000 tries.

So p(y>=200) is simply 1-.9999^199
 
I think D)ii) is also incorrect. Consider that there are 6 choices for which two digits are in the correct positions. For each of these, the 'correct digits' must be placed in the correct positions (one choice), and the incorrect digits must be placed incorrectly (also one choice - the other way is correct). Thus of the 24 permutations, 6 are correct in exactly two positions. Thus p=1/4, not 1/6.
 
PAllen thanks for taking the time to look at this I really appreciate it.

For B so If I subtract the probability of getting both of the first two correct from the addition of first or second, that's it but it's still double counting three and four? What would be the further adjustments if you could please help me with them?

For D)ii) Ok what you say makes sense and after writing the 4 numbers down in sequences of 2 I can see that you are correct, but I don't understand still how even though we are looking at permutations since order matters, why do I have to take combinations of the 2 numbers :S.

Thanks again.

For C
 
hb2325 said:
PAllen thanks for taking the time to look at this I really appreciate it.

For B so If I subtract the probability of getting both of the first two correct from the addition of first or second, that's it but it's still double counting three and four? What would be the further adjustments if you could please help me with them?

For D)ii) Ok what you say makes sense and after writing the 4 numbers down in sequences of 2 I can see that you are correct, but I don't understand still how even though we are looking at permutations since order matters, why do I have to take combinations of the 2 numbers :S.

Thanks again.


For C

To correct B to a precise answer is actually easy. Just: .19 *.9 *.9

As for better explaining D)ii, I will have to punt. I actually thought quite a bit how to explain it, and couldn't come up with anything better than what I wrote. Hopefully, someone else might help with an explanation, or just continue thinking about it and playing around with similar problems.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 35 ·
2
Replies
35
Views
6K
Replies
2
Views
2K
Replies
2
Views
1K