Find the probability distribution. A game is to choose a random real number $x$ between 0 and 10. The earnings are given by $|5-X|$ being X the number chosen.
(a) - Find the earning distribution and (b) - If you play twice with $X_1$ $X_2$ and $X = max\{X_1,X_1\}$, what it's the earning distribution?.
Here's what i tried:
(a) - $f_X(x) = \left\{
     \begin{array}{lr}
       2-x & : x \leq \theta \\
       x-8 & : x > \theta \\ 0&: otherwise
\end{array}
   \right.$ , then
$F_X(\alpha <X < \beta) = \displaystyle\int_{\alpha}^{\beta}f_X(x)dx= 
\left\{\begin{array}{lr}
       2x-\frac{1}{2}x^2|_a^{\beta} & : 0 \leqq \alpha < \beta \leq 2 \\
       2x-\frac{1}{2}x^2|_a^2 & : 0 \leq \alpha \leq 2 \leq \beta \\ \frac{1}{2}x^2-8x|_a^{\beta}&: 8 \leq \alpha < \beta \leq 10 \ \\ \frac{1}{2}x^2-8x|_8^{\beta}&: \alpha \leq 8 \leq \beta \leq 10 \\ 0 &: 2 \leq \alpha < \beta \leq 8
\end{array}\right.$.
It's ok?.
Also, im not sure how to do (b).
 A: We interpret "at random" to mean with uniform distribution. In principle, however, "at random" could here mean any distribution with support $[0,10]$. 
We change the notation slightly. Let $U_1$, $U_2$ be independent continuous uniform on $[0,10]$. Let $Y_i=|5-U_i|$. It is almost obvious that the $Y_i$ are uniform on $[0,5]$.
Parenthetically, note that in the discrete case, things are marginally more complicated, since then $\Pr(Y_i=0)$ is half of $\Pr(Y_i=k)$ where $k\ne 0$.
Now let $X=\max(Y_1,Y_2)$. We find the cdf $F_X(x)$ of $X$.
Of course the cdf is $0$ before $0$ and $1$ after $5$. Now we deal with $0\lt x\lt 5$.
The larger of $Y_1$ and $Y_2$ is $\le x$ iff they are both $\le x$. The probability of this is $\frac{x}{5}\cdot\frac{x}{5}=\frac{x^2}{25}$. If you want the density function, differentiate. 
Added: For completeness we find the distribution of the $Y_i$. For $0\le y\le 5$, we have $Y_i\le y$ if and only if $|X-5| \le y$ if and only if $5-y\le X\le 5+y$. The length of this interval is $2y$, so the probability is $\frac{2y}{10}=\frac{y}{5}$. Thus the cdf of the $Y_i$ is $\frac{y}{5}$ on the interval $[0,5]$, and therefore the density is $\frac{1}{5}$. Thus $Y_i$ is uniform on $[0,5]$.
