What is the joint probability distribution of two same variables Let $f\left(x\right)$ be the probability density function of the
random variable $X$. What is the joint probability distribution of
$f_{X,Y}\left(x,y\right)$ if $Y=X$? 
Thanks for any helpful answer.
 A: $X$ is not jointly continuous with itself in the sense that there is no joint density 
function (pdf) $f_{X,X}(s,t)$ that has positive value over a region of positive area 
in the plane
with coordinate axes $s$ and $t$.  All the probability mass lies on the straight line of slope $1$ through the origin (a region of zero area) and the joint cumulative
probability distribution
function CDF is
$$F_{X,X}(s,t) = P\{X \leq s, X \leq t\} = P\{X \leq \min(s,t)\} = F_X(\min(s,t)).$$
As whuber points out in the comments on another answer, 
$\frac{\partial^2F_{X,X}(s,t)}{\partial s\partial t}$ is not
defined for $s=t$. 
A: $F_{(X,X)}(t,s) = P[X \le t,X \le s] = P[X \le \inf(s,t)]$
$f(s,t) = \frac{ \partial ^2F_{(X,X)}}{\partial s \partial t}(t,s) =  \frac{\partial^2 (P[X \le t] \Large{1_{\{s=t\}}})}{\partial^2  t } $
Where 
$\frac{\partial  \Large{1_{\{s=t\}}}}{\partial t}$
$= lim_{\sigma \mapsto 0} \frac{1}{\sqrt{2\sigma \pi}} e^{\frac{-s^2}{\sigma^2}}$
More info about the indicator function derivation are here
A: Random Discrete Variables Case: 
For Y=X, 
then pij = 0 as xi and Xj are always exclusive
for i=j and pij=pi for i=j. as xi and xi to happen in the same time has pi chance.
So E[X^2] = E[XX] = Sum (xi^2*pi) for both cases
