# Is this a partition of a sample space?

Suppose I have a random variable $$X: \Omega \longrightarrow R$$. Where $$\Omega$$ is the sample space.

Suppose then that I have another random variable $$Y$$ which is some function of $$X$$, $$Y=f(X)$$.

What is the sample space of $$Y$$? Is it $$\Omega$$ or $$R$$?

If the sample space is still $$\Omega$$ can I also say that $$A_1: X<0 , A_2: X \geq 0$$ is a partition of $$\Omega$$ ?, or is it only a partition of $$R$$ since $$X$$ is real valued?

I am asking this question because I want to apply the law of total expectations on $$Y$$, i.e. I want to express $$E[Y]$$ as

$$E[Y]=E[Y|X<0]P(X<0) + E[Y|X \geq 0]P(X \geq 0)$$

The sample space is normally still $$\Omega$$ in that $$Y:=f\circ X :\Omega \to \mathbb{R}$$. Furthermore $$A_1$$ and $$A_2$$ are disjoint subsets of $$\Omega$$ in that $$A_1 = (X<0) = X^{-1}((-\infty,0)) = \{\omega\in\Omega: X(\omega)<0\} \subseteq \Omega,$$ and $$A_1 = (X\geq 0) =X^{-1}([0,\infty)) = \{\omega\in\Omega: X(\omega)\geq 0\} \subseteq \Omega,$$ for which it holds that $$A_1\cap A_2 = \{\omega\in\Omega:X(\omega)<0, X(\omega)\geq 0\} = \emptyset.$$ They also cover the entire of our sample space, that is $$A_1 \cup A_2 = \{\omega\in\Omega: X(\omega)\in \mathbb{R}\} = \Omega.$$ Thus this is a partition of $$\Omega$$ if we don't require a partition not to include the empty set. Otherwise you have to include more information about $$X$$ not being strictly negative or non-negative.
To use the formula you use you need $$P(A_1),P(A_2)>0$$, implying that they indeed are non-empty. However given they have positive probability you can indeed use the law of total expectation.