Let $X\in\{-1,0,1\}$ with $\mathbb{P}(X=-1)=\mathbb{P}(X=0)=\mathbb{P}(X=1)=\frac{1}{3}$
and then define $Y=\begin{cases}1,\quad\text{if}\quad X=0\\0,\quad\text{otherwise}\end{cases}$
I want to verify that $\mathbf{X}$ and $\mathbf{Y}$ are uncorrelated but not independent. But I could not write the joint pdf of ($\mathbf{X}$,$\mathbf{Y}$). How can I proceed?
Observe that the definition $Y$ gives $XY=0$. $Cov (X,Y)=E[XY]-(EX)(EY)=0-(0)(EY)=0$. $P(X=0,Y=1)=P(X=0)=\frac 1 3$ and $P(X=0)P(Y=1)=(\frac 1 3 )(\frac 1 3 )=\frac 1 9$, so $X$ and $Y$ are not independent.
Joint pmf: $P(X=-1,Y=0)=P(X=-1)=\frac 1 3, P(X=0,Y=0)=0, P(X=1,Y=0)=P(X=1)=\frac 1 3$ and
$P(X=-1,Y=1)=0, P(X=0,Y=1)=\frac 1 3, P(X=1,Y=1)=0$ and