Possibilities of 4-digit iphone code To unlock an iPhone, a user must enter the correct 4-digit pin code. How many 4-digit pin codes are possible, and if you get 10 attempts, what is the probability of randomly guessing the correct code in 10 attempts?
I was following this video:
https://www.youtube.com/watch?v=DZacSLax3aM
but I couldn't really understand why the answer is what is is. If I already guessed 1 combination and if it is was wrong, wouldn't the number of possible outcomes (the denominator) decrease by 1 with the subsequent attempt?
 A: for 4 digits there are 10,000 possibilities, going all the natural numbers from 0 to 9999.
If every time you guess a different code, you can cover $\frac{10}{10,000}=\frac{1}{1,000}$ of the options.
You have a uniform distribution so the chances to get the right guess in this 10 times, is 0.1%  
A: Welcome to Stack Exchange!
Unfortunately people on this site are not going to take the time to go away from the site to look at a video, especially if they don’t even know how long it is going to take. 
My answer is therefore based on your question only. But I hope I have guessed the question right!
The number of possible codes is clearly $10000$. You just multiply to get that. 
If you make one guess, your chance of getting it wrong is $\frac{9999}{10000}$, so your chance of getting it right is $\frac{1}{10000}$.
With your second guess there are only $9999$ possibilities left, as you said, so the chance of getting two guesses wrong is $\frac{9999}{10000}\times\frac{9998}{9999}$, which equals $\frac{9998}{10000}$. So your chance of not getting it wrong in two guesses is $\frac{2}{10000}$.
I hope you can take it on from there.

This is the simplest way of looking at it. But you could put it together differently as well. 
Chance of getting first guess right: $\frac{1}{10000}$.
Chance of having to make a second guess: $\frac{9999}{10000}$, which you then multiply by the chance (given that you are making that second guess) of getting that guess right, which is $\frac{1}{9999}$.

You may find it interesting that for such a large number of possibilities and such a small number of guesses, the chance of getting it right from ten random guesses is practically the same as the chance of {getting it right from ten guesses where you take care to make each guess different. Random = $1-(\frac{9999}{10000})^{10}$, which is $0.99955$ chances in a thousand rather than one chance in a thousand. 
A: The question can be rephrased as: 
"If we select randomly a $4$ digit pincode then what is the probability that this pincode will be an element of $\{0000,0001,0002,0003,0004,0005,0006,0007,0008,0009\}$?"
Remark: any other chosen subset of $\{0000,\dots,9999\}$ that has $10$ elements can be used here, and you also can let it be the set of the attempts mentioned in your question.
The answer is: $$\frac{10}{10000}$$because each of the $10$ pincodes in the set has a probability of $\frac1{10000}$ to be the selected pincode.

The trick used here makes the originally fixed pincode random and makes the originally random attempts fixed.
