Random Variable Problems? Can someone show me how to work this out? I can't get the answers in the boxes. 
 A: Let's $Y$ be the number of spots on the dice.
Then:
$$Y = 1 \Rightarrow X = (1 - 4)^2 = 9$$
$$Y = 2 \Rightarrow X = (2 - 4)^2 = 4$$
$$Y = 3 \Rightarrow X = (3 - 4)^2 = 1$$
$$Y = 4 \Rightarrow X = (4 - 4)^2 = 0$$
$$Y = 5 \Rightarrow X = (5 - 4)^2 = 1$$
$$Y = 6 \Rightarrow X = (6 - 4)^2 = 4$$
You can write that:
$$P(X = 0) = \frac{1}{6}$$
$$P(X=1) = \frac{1}{6} + \frac{1}{6} = \frac{2}{6}$$
$$P(X=4) = \frac{1}{6} + \frac{1}{6} = \frac{2}{6}$$
$$P(X=9) = \frac{1}{6}$$
Also, $P(X = k) = 0$ for all $k \not \in \{0, 1, 4, 9\}$.
Now you have all the ingredients you need to finish the exercise yourself.
A: First, consider the domain of the random variable $X$. It can take on any values in the set
$$\Omega = \{(i - 4)^2 \mid i = 1,...,6\}\,\,.$$
Thus, for part (a), since there are two ways to get $X = 4$ ($i=2,6$ will do the trick) and $6$ possible dice rolls that are equally likely by virtue of the dice, the probability $\mathbb{P}(X = 4) = \frac{2}{6} = \frac{1}{3}$.
Now, part (b) does not define the function $p$ but I am assuming it is the probability mass function of $X$, so that $p(4) = \mathbb{P}(X = 4) = \frac{1}{3}$, as computed in part (a). For part (c), again the function $F$ is not defined, but I assume this is the cumulative distribution function of $X$, so we want
$$F(5) = \mathbb{P}(X \leq 5) = 1 - \mathbb{P}(X = 9)\,\,,$$
because $9 \in \Omega$ is the only element greater than $5$ and you should know how to determine $\mathbb{P}(X = 9)$ by the methods from part (a), where we computed $\mathbb{P}(X = 4)$. Finally, I will help you work out part (d), and then for part (e), you will notice that since expectation is a linear function, $$\mathbb{E}(4X - 3) = 4\,\mathbb{E}(X) - 3\,\,.$$
Using the definition of expectation, we have
$$\begin{align} \mathbb{E}(X) &= \sum_{\{i \mid x_i \in \Omega\}} x_i \, \mathbb{P}(X = x_i) \\&= \sum_{i = 1}^6 (i - 4)^2 \cdot \frac{1}{6} \\&= \frac{1}{6} \sum_{i = 1}^6 (i - 4)^2 \\&= \frac{1}{6}\left((1-4)^2 + (2-4)^2 +\, ... \,+ \,(6-4)^2\right) \\&= \frac{19}{6} \,.\end{align}$$
A: A fair die has $i$ appear with probability $\frac{1}{6}$.
If you roll a 1, $X=(1-4)^2=9$.
If you roll a 2, $X=(2-4)^2 = 4$.
If you roll a 3, $X=(3-4)^2 = 1$. 
If you roll a 4, $X=(4-4)^2 = 0$.
If you roll a 5, $X=(5-1)^2 = 1$.
If you roll a 6, $X=(6-4)^2 = 4$. 
Thus, $X$ takes on $9$ w.p. $\frac{1}{6}$, $4$ w.p. $\frac{2}{6}$, $1$ w.p. $\frac{2}{6}$ and $0$ w.p. $\frac{1}{6}$ (by summing over the die rolls which give you each value $X$ can take). 
Now, use the definitions of $E$, $F$. 
