Can squaring a discrete random variable change the probability distribution?

127 Views Asked by At

let $X$ be a discrete random variable that takes a value of $\{-2,2\}$ and the probability distribution of each is $\{0.5,0.5\}$

with this in mind:

$X^2$ only takes value $\{4\}$ with the probability of $\{1\}\cdots(\%)$

in this case $X$ have 2 values which has a probability of not 0 but $X^2$ has only 1 value which the probability is not 0.

is this correct or am I missing something? I am having trouble understanding the $\mathbb{E}[X^2]$ part of

$\displaystyle\mathbb{V}[X]\equiv \sum_{ x\in\mathcal{X}}(x-\mathbb{E}[X])^2p(x)= \mathbb{E}[X^2]-(\mathbb{E}[X])^2\cdots(\$)$

to avoid confusion, let $Y=X^2$

by definition $\displaystyle\mathbb{E}[X]\equiv\sum_{ x\in\mathcal{X}}x\cdot p(x)$

with this, if we plug in $Y$ into the formula

it becomes $\displaystyle\mathbb{E}[Y]=\sum_{ y\in\mathcal{Y}}y\cdot p(y)$

if we bring back substitute $Y$ back to $X^2$ it should become $\displaystyle\mathbb{E}[X^2]=\sum_{ y\in\mathcal{X^2}}y\cdot p(y)\cdots(@)$

but when I search about it everywhere it seems that everyone is doing this calculation for $X^2$:

$\displaystyle\mathbb{E}[X^2]\equiv\sum_{ x\in\mathcal{X}}x^2\cdot p(x)\cdots(*)$

I am confused because it seems that the process of creating the new distribution for $X^2$ is entirely skipped by most of the explanations I saw. does $(@)$ and$(*)$ produce the same result? $(*)$ is understandable if $X$ is guaranteed to be positive, but for distributions like $(\%)$ it confuses me.

furthermore if I try to compare $(\$)$ left-hand and right-hand side: $ \displaystyle\sum_{ x\in\mathcal{X}}(x-\mathbb{E}[X])^2p(x)= \mathbb{E}[X^2]-(\mathbb{E}[X])^2$

$ =\displaystyle\sum_{ x\in\mathcal{X}}(x^2-x\cdot\mathbb{E}[X]+(\mathbb{E}[X])^2)p(x)= \mathbb{E}[X^2]-(\mathbb{E}[X])^2$

$ =\displaystyle\sum_{ x\in\mathcal{X}}(x^2-x\cdot\mathbb{E}[X])p(x)+\sum_{ x\in\mathcal{X}}(\mathbb{E}[X])^2p(x)= \mathbb{E}[X^2]-(\mathbb{E}[X])^2$

$ =\displaystyle(\mathbb{E}[X])^2+\sum_{ x\in\mathcal{X}}(x^2-x\cdot\mathbb{E}[X])p(x)= \mathbb{E}[X^2]-(\mathbb{E}[X])^2$

$ =\displaystyle(\mathbb{E}[X])^2+\sum_{ x\in\mathcal{X}}(x^2-x\cdot\mathbb{E}[X])p(x)= \mathbb{E}[X^2]-(\mathbb{E}[X])^2$

$ =\displaystyle2(\mathbb{E}[X])^2+\sum_{ x\in\mathcal{X}}(x^2-x\cdot\mathbb{E}[X])p(x)= \mathbb{E}[X^2]$

is this correct? I'm confused.