Answer
(a) $\frac{1}{10000}$
(b) $\frac{1}{100}$
Work Step by Step
(a) $10^{4}=10000$
$P( pin )=\frac{1}{10000} $
(Since there are 10 possible numbers $(0-9)$ for each digit of the pin, there are $10^{4}=10000$ possible combinations. Since there is only 1 correct combination, the probability that you correctly guess your pin at random is then $\frac{1}{10000}$)
(b) $10^{2}=100$
$P( pin )=\frac{1}{100} $
( If you remember the first 2 digits of your pin, then you are only guessing 2 digits. Therefore, there are $ 10^{2}=100 $ possible combinations, giving you a probability of $\frac{1}{100}$)