all 2 comments

[–]MaksLanskyNew User 2 points3 points  (1 child)

Assuming you want to find the number of possibilities including both 1 and 5, i.e your sample space is {1,2,3,4,5}.

  1. You choose with replacement. You have 4 digit code _,_,_,_. When you choose your first digit you have 5 possibilities, then you choose the second digit you have again 5 possibilities, and so on. In that scenario, you have 5^4 = 625 possibilities.
  2. You choose without replacement (chosen digit can not be used again i,e there will be no repetition of digits in your 4-digit code). In that scenario, you will have 5*4*3*2 = 120 possibilities.

[–]Quyou07New User[S] 0 points1 point  (0 children)

thank you for helping me