7

I was wondering about the distribution of the square of a Bernoulli RV. My background in statistics is not too good, so maybe this doesn't even make sense, or it is a trivial problem.

Let, $Z\sim X^2$, where $X\sim \text{Ber}(p)$.

$F_Z(z)=\Pr(X^2\leq z)$

$=\Pr(-z^{1/2}\leq X\leq z^{1/2})$

$=F_X(z^{1/2})-F_X(-z^{1/2})$

At this point I'm pretty confused I mean the CDF is right-continuous while I know $Z$ is a discrete RV.

$\implies P_Z(z)=\frac{ d}{dz}\{F_X(z^{1/2})-F_X(-z^{1/2})\}$

I guess you can define the derivative to be:

$\frac{d}{dx}f(x)=\frac{f(x+1)-f(x)}{1}$ or something... and we have

$F_X(x)=\begin{cases} 0, & \text{if }x<0 \\ 1-p, & \text{if }0\leq x\lt 1 \\ 1, & \text{if } x\geq1 \end{cases}$

Any help is appreciated (is my approach correct?)

  • 6
    do you mean Bernoulli or Binomial? The square of a ber(p) is just ber(p) as the square of a bernoulli maps back to itself. I.e. $0^2=0, 1^2=1$ –  Jan 08 '14 at 19:31
  • OK so I guess this isn't true if I shift the mean to be 0 so that $P_X(x)=\begin{cases} 1-p &\text{if } x=-p\p & \text{if } x=1-p \end{cases} $. How can you handle it then? – Simon Sehayek Jan 08 '14 at 19:42
  • 1
    Exactly, for example, in the case of P(X=1)=.5=P(X=-1), it doesn't work because $(-1)^2 = 1, 1^2 = 1$ so $P(X^2=1)=1$ –  Jan 08 '14 at 19:49
  • The basic deal is that whatever mass you assign to each X value, you just transfer to the value $X^2$, if they map to the same value, then you've defined a degenerate distribution. –  Jan 08 '14 at 19:51

1 Answers1

8

If $X$ is Bernoulli, then $X^2=X$.${}{}{}{}{}{}$

André Nicolas
  • 507,029
  • Is this still the case if the distribution is not defined on the points {0,1} anymore? For example, if I shift the mean to be 0 so that $P_X(x)=\begin{cases} 1-p &\text{if } x=-p\p & \text{if } x=1-p \end{cases} $ – Simon Sehayek Jan 08 '14 at 19:38
  • 1
    If the shifted Bernoulli takes values in two points $A,B$, then the squared variable is another Bernoulli taking balues in $A^2$ and $B^2$, with the same probabilities (it can happen that $A^2=B^2$, if $A=-B$. of course. This is quite trivial. – leonbloy Jan 08 '14 at 19:49
  • Alright thanks a lot. – Simon Sehayek Jan 08 '14 at 19:49
  • 2
    @Atreyu: You are welcome. The fact that $X^2=X$, though simple, is useful. For example, it makes it easy to show that if $Y$ has binomial distribution, then $Y$ has variance $np(1-p)$. We just express $Y$ as a sum $X_1+\cdots+X_n$ of independent Bernoulli, and square. – André Nicolas Jan 08 '14 at 19:54