I have two questions about transformation functions in probability theory. I wrote my answers to them but I'm not sure if I am right.
Let's look at the theorem below (I took it from here (the last)).
Theorem. Let \(\displaystyle X\) be an absolutely continuous random variable with probability density function \(\displaystyle f_X(x)\) and support \(\displaystyle R_X = \{x \in \mathbb{R}: f(x) > 0 \}\). Let \(\displaystyle g: \mathbb{R} \to \mathbb{R}\) be one-to-one and differentiable on the support of \(\displaystyle X\). If
\(\displaystyle \frac{dg^{-1}(y)}{dy} \ne 0, \qquad \forall y \in g(R_X)\)
then the probability density of \(\displaystyle Y\) is
\(\displaystyle f_Y(y) = f_X(g^{-1}(y)) \left|{\frac{dg^{-1}(y)}{dy}}\right|, \qquad \forall y \in g(R_X).\)
Questions.
1) Can I choose any open subset \(\displaystyle A, ~R_X \subseteq A \subseteq \mathbb{R}\) which contains support \(\displaystyle R_X\) as the domain of \(\displaystyle g\) in the thorem?
As I understood \(\displaystyle \mathbb{R}\) is a "natural domain" (i.e. the largest possible domain) for \(\displaystyle g\) but we can always limit it for a specific function \(\displaystyle g\) on practice. I think set \(\displaystyle A\) must be open to ensure the existence of the derivative of \(\displaystyle g\) in all points of \(\displaystyle R_X\) (set \(\displaystyle R_X\) can be closed).
For example it will be convenient to choose \(\displaystyle A = (0,\infty)\) as the domain for a function \(\displaystyle g:A \to \mathbb{R},~ g(x) = \ln(x)\) if \(\displaystyle X\) can have only positive values.
Or I have to choose \(\displaystyle \mathbb{R}\) as the domain and somehow define function \(\displaystyle g\) on \(\displaystyle (-\infty,0]\) ?
2) Why the theorem requires function \(\displaystyle g\) to be one-to-one instead of to be invertible?
I think that the domain of a function \(\displaystyle g^{-1}\) is exactly the set \(\displaystyle R_Y = g(R_X)\). Hence if \(\displaystyle g\) is one-to-one then \(\displaystyle g\) will be invertible function. Even if \(\displaystyle g\) is formally not an onto function (not all points in \(\displaystyle \operatorname{codomain} g = \mathbb{R}\) have pre-images).
Please correct me if I'm wrong. Thanks.
Let's look at the theorem below (I took it from here (the last)).
Theorem. Let \(\displaystyle X\) be an absolutely continuous random variable with probability density function \(\displaystyle f_X(x)\) and support \(\displaystyle R_X = \{x \in \mathbb{R}: f(x) > 0 \}\). Let \(\displaystyle g: \mathbb{R} \to \mathbb{R}\) be one-to-one and differentiable on the support of \(\displaystyle X\). If
\(\displaystyle \frac{dg^{-1}(y)}{dy} \ne 0, \qquad \forall y \in g(R_X)\)
then the probability density of \(\displaystyle Y\) is
\(\displaystyle f_Y(y) = f_X(g^{-1}(y)) \left|{\frac{dg^{-1}(y)}{dy}}\right|, \qquad \forall y \in g(R_X).\)
Questions.
1) Can I choose any open subset \(\displaystyle A, ~R_X \subseteq A \subseteq \mathbb{R}\) which contains support \(\displaystyle R_X\) as the domain of \(\displaystyle g\) in the thorem?
As I understood \(\displaystyle \mathbb{R}\) is a "natural domain" (i.e. the largest possible domain) for \(\displaystyle g\) but we can always limit it for a specific function \(\displaystyle g\) on practice. I think set \(\displaystyle A\) must be open to ensure the existence of the derivative of \(\displaystyle g\) in all points of \(\displaystyle R_X\) (set \(\displaystyle R_X\) can be closed).
For example it will be convenient to choose \(\displaystyle A = (0,\infty)\) as the domain for a function \(\displaystyle g:A \to \mathbb{R},~ g(x) = \ln(x)\) if \(\displaystyle X\) can have only positive values.
Or I have to choose \(\displaystyle \mathbb{R}\) as the domain and somehow define function \(\displaystyle g\) on \(\displaystyle (-\infty,0]\) ?
2) Why the theorem requires function \(\displaystyle g\) to be one-to-one instead of to be invertible?
I think that the domain of a function \(\displaystyle g^{-1}\) is exactly the set \(\displaystyle R_Y = g(R_X)\). Hence if \(\displaystyle g\) is one-to-one then \(\displaystyle g\) will be invertible function. Even if \(\displaystyle g\) is formally not an onto function (not all points in \(\displaystyle \operatorname{codomain} g = \mathbb{R}\) have pre-images).
Please correct me if I'm wrong. Thanks.