how to find PMF of (X,Y) Flip a coin twice. On each flip, the probability of heads equals $p$. Let $X_i$ equal the number of
heads (either $0$ or $1$) on flip $i$. Let $W = 2X_1 – X_2$ and $Y = X_1 + 3X_2$ . Find $p_{W,Y}(w,y)$, $p_{W|Y}(w|y)$ and
$p_{Y|W}(y|w)$.
this is the question I'm trying to solve.
As I understand $P(X_1)=p$ and $P(X_2)=p$ and i need to find something like this :
I'm bloody beginner in probability,and I'm trying to understand this $p_{X,Y}(x,y)$ 
just help me to find $p_{W,Y}(w,y)$ i think i can find rest of it
 A: Note that $W$ can only take on values $-1$, $0$, $1$, and $2$, and $Y$ can only take on values $0$, $1$, $3$, and $4$. So the ordered pair $(W,Y)$ cannot take on too many values. There are at most $16$, and many of them have probability $0$. 
In principle we list these $16$ ordered pairs, and compute the associated probabilities. In practice, it is easier to work directly with $X_1$ and $X_2$, which we assume are independent.
(i) With probability $(1-p)(1-p)$, we get $2$ tails. In that case, $W=0$ and $Y=0$. 
(ii) With probability $(1-p)p$ we get tail on the first toss, and head on the second. In that case, $W=-1$ and $Y=3$. 
(iii) With probability $p(1-p)$ we have $W=2$, $Y=1$.
(iv) With probability $p^2$ we have $W=1$, $Y=4$. 
The sentences (i) to (iv) give the joint pmf of $W$ and $Y$. If we want to use more notation, we can write $p_{W,Y}(0,0)=(1-p)^2$, $p_{W,Y}(-1,3)=(1-p)p$, and so on. We probably should add that $p_{W,Y}=0$ for all other values of $(w,y)$. 
Alternately, we can say that $p_{W,Y}(w,y)=(1-p)^2$ if $(w,y)=(0,0)$, and so on. 
