# How do I find probability function?

Let $X$ be a discrete random variable. The probability function is given in the following table

$$\begin{array}{c|cccc} x&-10&1&5&10\\ \hline f(x)&0.1&0.3&0.4&0.2 \end{array}$$

How do I find the probability function of the discrete random variable $Y$ such that $Y=g(X)=X^2$?

You just need to square the $x$ values. The probabilities stay the same. The probability mass function of $Y$ is

$$\begin{array}{c|cccc} y&100&1&25&100\\ \hline f(x)&0.1&0.3&0.4&0.2 \end{array}$$

but since $10^2 = -10^2 =100$, this becomes

$$\begin{array}{c|ccc} y&100&1&25\\ \hline f(x)&0.3&0.3&0.4 \end{array}$$

An alternative way to express this

$$P_{Y}(y)= \begin{cases} 0.3 & y =1 \\ 0.4 & y=25 \\ 0.3 & y=100 \\ 0 & \text{otherwise} \end{cases}$$

• Can you add more details? I do not understand. – user548718 Apr 4 '18 at 5:09
• What I do not understand is that why when you square $x$ values, the probabilities do not change? – user548718 Apr 4 '18 at 5:14