Probabilities in a game John plays a game with a die. The game is as follows: He rolls a fair six-sided die. If the roll is a $1$ or $2$, he gets $0$ dollars. If he rolls a $3, 4$ or $5$, he gets $5$ dollars. If he rolls a $6$, he wins $X$ dollars where $X$ is a continuous random variable that is uniform on the interval $(10, 30)$. Let $Y$ be the amount of money John wins by playing the game.
(i) Compute the cumulative distribution function (cdf) of $Y$.
(ii) What is the probability that John rolled a $6$ given that he won less than $15$ dollars?
(iii) Compute $E(Y)$.
My attempt:
(i) If $Y > 5$ then $P(Y \leq y) = P(X \leq y)$. Then $P(Y \leq 5) = P(Y = 0) + P(Y = 5) = P(roll = 1 or 2) + P(roll = 3, 4 or 5) = \frac{1}{3} + \frac{1}{2} = \frac{5}{6}$.
Not sure if this is even correct.
(ii) $P(roll = 6 | Y < 15) = \frac{P(roll = 6 \land Y < 15)}{P(Y<15)}$
But by Bayes theorem $P(roll = 6 | Y < 15) = \frac{P(Y < 15 | roll = 6) \cdot P(roll = 6)}{P(Y<15)}$
We know $P(roll = 6) = \frac{1}{6}$.
Given that he rolled a $6$, the probability that he won less than $15$ dollars is equal to $P(X < 15) = \frac{15 - 10}{30 - 10} = \frac{1}{4}$
Lastly, $P(Y < 15) = 1 - P(Y \geq 15)$. However, since the only situation in which John wins $15$ dollars or more is if he rolls a $6$. We may infer that $P(Y \geq 15) = P(X \geq 15) = 1 - P(X < 15) = \frac{3}{4}$. So $P(Y < 15) = 1 - \frac{3}{4} = \frac{1}{4}$.
So $P(roll = 6 | Y < 15) = \frac{\frac{1}{4} \cdot \frac{1}{6}}{\frac{1}{4}} = \frac{1}{6}$
Not sure how to determine the other probabilities.
(iii) We can check $Y$ conditioned on $X = x$: $E(Y|X=x) = (0 \cdot \frac{1}{3}) + (5 \cdot \frac{1}{2}) + (x \cdot \frac{1}{6}) = \frac{5}{2} + \frac{x}{6} = \frac{x + 15}{6}$. But $E(E(Y|X)) = E(Y)$ by the law of iterated expectation.
Applying it we have $E(Y) = E(E(Y|X)) = E(\frac{X + 15}{6}) = \frac{1}{6} E(X) + \frac{15}{6}$
Since $X$ is uniform on $(10, 30)$ we know $E(X) = \frac{1}{2} (10 + 30) = 20$
Therefore $E(Y) = \frac{35}{6}$.
Is this correct? I have a feeling that my attempt for (i) is incorrect, and I am unsure about (ii) and (iii). Any assistance is much appreciated.
 A: In short $Y= 0\mathbf 1_{1\leq X\leq 2}+5\mathbf 1_{3\leq X\leq 5}+Z\mathbf 1_{X=6}$ where $X\sim\mathcal U\{1,2,3,4,5,6\}$ and independently $Z\sim\mathcal U(10..30)$. That means:-
$$Y=\begin{cases}0 &:& 1\leq X\leq 2\\5&:& 3\leq X\leq 5\\Z&:& X=6\\0&:&\textsf{else}\end{cases}$$

(i) The CDF will be a piecewise function.  You need to evaluate the probability in each of the pieces.
So, the cumulative probability equals zero for for all $y<0$. There is a massive step in the CDF at $y=0$, which equals the probability that the die rolls $1$ or $2$; ie $\mathsf P(1\leq X\leq 2)$.  There is another massive step at $y=5$, equal to the probability that the die rolls $3,4,$ or $5$.  At and after $10$ there is no step, but a linear accumulation until $y=30$, when we reach total probability.
$\qquad\begin{align}\mathsf P(Y\leqslant y)&=\begin{cases}0&:&\qquad y<0\\\mathsf P(1\leq X\leq 2)&:&0\leqslant y\lt 5\\\mathsf P(1\leq X\leq 5)&:& 5\leqslant y\lt 10\\\mathsf P(1\leq X\leq 5)+\mathsf P(X=6)\mathsf P(Z\leqslant y)&:& 10\leqslant y< 30\\1&:& 30\leqslant y\end{cases}\end{align}$

(ii) You mostly have this.  Under the condition that $X=6$, there $Y=Z$; and $X\perp Z$, so...
$\qquad\mathsf P(X=6\mid Y\leqslant 15)~{=\dfrac{\mathsf P(X=6, Y\leqslant 15)}{\mathsf P(Y\leqslant 15)}\\=\dfrac{\mathsf P(X=6)\mathsf P(Z\leqslant 15)}{\mathsf P(Y\leqslant 15)}}$

(iii) Expectation is Linear, and the expectation of an indicator equals the probability of the event.  Also, again, $X$ and $Z$ are independent.
$\qquad\mathsf E(Y)~{=\mathsf E(0\mathbf 1_{1\leq X\leq 2}+5\mathbf 1_{3\leq X\leq 5}+Z\mathbf 1_{X=6})\\[1ex]=0\,\mathsf P(1\leq X\leq 2)+5\,\mathsf P(3\leq X\leq 5)+\mathsf E(Z)\,\mathsf P(X=6)}$
A: Here is a simulation of a million iterations of your
process. Possibly except for conditional probabilities, it should
be accurate to a couple of decimal places. Also the ECDF
plot of from the simulation is very nearly the CDF of $Y,$
which you have not drawn.
set.seed(2021)
die =sample(1:6, 10^5, rep=T)
y = runif(10^5, 10, 30)
y[die<=2.1] = 0
y[die>=2.9 & die <=5.1] = 5
[1] 5.838549              # aprx E(Y)
35/6
[1] 5.833333              # exact
mean(die[y<15]==6) 
[1] 0.04736204            # aprx P(Die = 6 | Y < 15)
 
hdr = "ECDF: Mixture of Discrete and Continuous"
plot(ecdf(y), ylab="ECDF", xlab="y", lwd=2, main=hdr)


At the 'jumps', the CDF takes the upper value.
