Question:
Let $X$ and $Y$ be two random variables. The relationship between the two is as follows. If $Y$ is less than or equal to $1$, then $X$ is equal to $Y$; If $Y$ is more than $1$, then $X$ can be equal to $Y$ or $Y-1$. Then what is the conditional probability of $X$ being equal to $Y$ given $Y$, i.e. $\mathbb P(X=y|Y=y)$?
Here is how I consider this question. First I get the following result. $$\mathbb P(X=y|Y=y)=\frac{\mathbb P(X=y, Y=y)}{\mathbb P(Y=y)}.$$ Then in order to find the numerator, I think I can use the law of total probability as follows. $$\mathbb P(X=y, Y=y)=\mathbb P(X=y, Y=y|Y\leq 1)\mathbb P(Y\leq 1)+\mathbb P(X=y, Y=y|Y>1)\mathbb P(Y>1).$$ Does this make sense in general, please? It looks odd to me to condition on $Y$ again. Otherwise, is there a better way to find this conditional probability, please? In addition, I have difficulty in finding $\mathbb P(X=y, Y=y|Y>1)$.
By definition, $$P(X=Y\mid Y)=\mathbf 1_{Y\leqslant1}+p(Y)\mathbf 1_{Y\gt1}=1-q(Y)\mathbf 1_{Y\gt1}$$ where, for each $y\gt1$, $p(y)$ denotes the (unspecified) probability that $X=Y$ conditionally on $Y=y$, and $q(y)=1-p(y)$ denotes the probability that $X=Y-1$ conditionally on $Y=y$ (note that one needs the function $p$ to be measurable).