I noticed a very similar relationship between weighted $L^p$ space (denoted $L_w^p$) and normed vector space of random variables. I want to unify these two spaces but there always seems to be a difference, or are they actually different?
Recall that $L_w^p$-norm is defined if the following integral exists: $$ \left\| f \right\|_{L_w^p} := \left( \int |f(x)|^p w(x) \, \mathrm{d}x \right)^{\frac{1}{p}}. $$ The $p$-norm of a real-valued R.V. $X: \Omega \to \mathbb{R}$ is defined to be: $$ \left\| X \right\|_p := \mathbb{E}[|X|^p]^{\frac{1}{p}} = \left(\int_\Omega |X|^p \, \mathrm{d}\mathbb{P}\right)^{\frac{1}{p}} = \left(\int_\mathbb{R} |x|^p f_X(x) \, \mathrm{d}x\right)^{\frac{1}{p}} \label{1}\tag{1} $$ where $(\Omega, \mathscr{A}, \mathbb{P})$ is a probability space and $f_X(x)$ is the p.d.f. of R.V. $X$.
You can prove that these two norms are indeed norms with triangle inequality: $$ \left\| f+g \right\|_{L_w^p} \le \left\| f \right\|_{L_w^p} + \left\| g \right\|_{L_w^p} \label{2}\tag{2} $$ and $$ \left\| X+Y \right\|_p \le \left\| X \right\|_p + \left\| Y \right\|_p. \label{3}\tag{3} $$ Note that $f_X(x)$ in equation \eqref{1} can be viewed as the "weight" of $|X|^p$. Therefore, (using weighted norm in $L_w^p$ space), the triangle inequality \eqref{3} can be written as: $$ \left\| Z \right\|_{L_{h_Z(z)}^p} \le \left\| X \right\|_{L_{f_X(x)}^p} + \left\| Y \right\|_{L_{g_Y(y)}^p} $$ where $Z=X+Y$ is another R.V., $f_X(x)$, $g_Y(y)$ and $h_Z(z)$ is the p.d.f. of R.V. $X$, $Y$ and $Z$ respectively.
However, this is NOT the triangle inequality in $L_w^p$ space since the norm operation was done in three different spaces: $L_{h_Z(z)}^p$, $L_{f_X(x)}^p$, $L_{g_Y(y)}^p$. But it really resembles equation \eqref{2}. How could I understand this?