Difference of two Bernoulli Random Variable [on hold]

I want to know the distribution of |X−Y||X-Y|, where each of X,Y∼Ber(p)X,Y \sim Ber(p) and they are independent.

=================

=================

1 Answer
1

=================

if XX and YY are independent, Then |X−Y|=1|X-Y|=1 if and of if (X,Y)=(1,0)(X,Y)=(1,0) or (X,Y)=(0,1)(X,Y)=(0,1). Each of these events happens with probability p(1−p)p(1-p). Otherwise |X−Y|=0|X-Y|=0.

Hence |X−Y|∼Ber(2p(1−p))|X-Y| \sim Ber(2p(1-p))