The full question is:

Consider the following random experiment: Independently, choose two random numbers X,Y uniformly form [0,1]. Let \(Z := YI_{\{X \leq \frac{1}{2}\}} \)

b) Show that Z is neither a discrete random variable nor a continuous random variable.

My attempt: I can see that Z is continuous if \(X \leq \frac{1}{2} \) and discrete if \( X < \frac{1}{2} \) but how do we show that it is neither?

Also I can show that If we calculate the expected value of Z assuming it were discrete, then \(\mathbb{E}Z = 0\) but I dont know how to go about the continuous case.

Is it as simple as saying Z can't be discrete because it can take on uncountably many values --> each with probability 0?

Also, Z cant be continuous because there will be a discontinuity at 0 since it is equally likely to take on each value >0, so there will be a smooth pdf for \( Z > 0 \). But has \( \mathbb{P}(Z = 0) = \frac{1}{2} \), so the pdf would show an infinitely high spike at 0, so not continuous.