Probability that the numbers on the tags marked $ 1; 2;...; n$ will be consecutive integers. A random box contains tags marked $ 1; 2;...; n$. 

Two tags are chosen at random with replacement. Find the probability that the numbers on the tags will be consecutive integers.
My Attempt

Case I: If the 1st  tag chosen isn't 1 or n: 
$$ P_1 = \frac {1}{n-2} * \frac {2}{n-1} $$

Case II: If the 1st  tag chosen is 1 or n: 
$$ P_2 = \frac {1}{2} * \frac {1}{n-1} $$

Hence, the required probability should be $P_1 + P_2$.

Is this correct? The words 'with replacement' are confusing me.
 A: The total number of choices that you can makes is $n^2$.
The number of choices with consecutive tags is $2(n-1)$.
Therefore, the probability of choosing consecutive tags is $\frac{2(n-1)}{n^2}$.

Consider $n=3$ for example:


*

*$11$

*$12$ - consecutive tags

*$13$

*$21$ - consecutive tags

*$22$

*$23$ - consecutive tags

*$31$

*$32$ - consecutive tags

*$33$


The probability of choosing consecutive tags is $\frac{4}{9}$.
A: The words "with replacement" means that after you pull out the first tag and read the number on it, you put it back ("replace it"), mix the tags up again before you pull out the second one.
Back to the question. Your idea of breaking into cases is a sound one, and the probability is indeed $P_1 + P_2$, but your expressions for those two numbers are not correct.
Case I: The probability that the first one you draw is neither $1$ or $n$ is $\frac{n-2}{n} $. This is then multiplied by the probability that the second number you draw is one of the two adjacent numbers, which is $\frac{2}{n}$ (note that it's not $\frac{2}{n-1}$, since we put the first tag back). We therefore have
$$
P_1 = \frac{n-2}{n}\cdot \frac{2}{n}
$$
Case II: The probability that the first tag is either $1$ or $0$ is $\frac{2}{n}$. The probability that the second tag in that case is the one adjacent tag number (either $2$ or $n-1$, depending on the case) is $\frac{1}{n}$. So we have
$$
P_2 = \frac{2}{n}\cdot \frac{1}{n}
$$
So we get
$$
P_1 + P_2 = \frac{2n-4 + 2}{n^2} = \frac{2n - 2}{n^2}
$$
Alternate approach: (assumes $n \geq 3$, if $n = 2$ the probability is easily seen to be $0.5$) Pretend, for a second, that we also allowed $1$ and $n$ to "connect around", so that drawing those two in any order would also count. Then no matter what you got on the first tag, there would be $2$ possible "good" second tags. So the probability would be $\frac{2}{n}$.
Now, how much probability do we lose by disallowing the $1$-$n$-connection? Well, there are $n^2$ different combinations to draw, and there are two of those possibilities that are $1$ and $n$, in some order. Therefore, the probability that you draw a $1$ and an $n$ is $\frac{2}{n^2}$. That combination is allowed in our hypothetical scenario above, but it is disallowed in the real problem, so our $\frac{2}{n}$ result overshot the target by $\frac{2}{n^2}$. Therefore the probability of drawing two adjacent tags is
$$
\frac{2}{n} - \frac{2}{n^2} = \frac{2n -2}{n^2}
$$
which is the same result.
