# Can a random variable be expressed as a sum of deterministic and random variable?

Say we have a sequence of random variables $$\{X_t:t\geq 0\}$$ following an unknown stochastic process with distribution $$X_t\sim N(\mu_X,\sigma_X^2)$$. This idea came to me from the additive noise model. Say at time $$t$$ we have observed $$x_t$$. Can it, thus, be said that at time $$t$$

$$$$X_t=x_{t}+noise$$$$

The math or the idea may be incorrect. If it is indeed incorrect, I would like to reiterate my question in the title, as to whether the random variable $$X_t$$ can be decomposed in a similar (yet correct) manner as above. Thank you!

• Imagine that the deterministic part of the process is the mean $\mu$, which can be time-varying ($\mu_t$), and the stochastic part is $e_t \sim N(0, \sigma^2)$. Then you've decomposed $X_t$ into the sum of a deterministic part ($\mu_t$) and a stochastic part ($e_t$). Commented Apr 8, 2020 at 16:41
• The answer trivially is yes: define $x_t$ to be whatever you want and subtract it from $X_t.$ Evidently you have some restrictive concepts concerning how $x_t$ might be chosen and what constitutes "noise" (for instance, usually noise terms are centered around zero). Would you like to refine your question to narrow down the possibilities?
– whuber
Commented Feb 3, 2023 at 15:05
• Yes, see the reparamaterization trick used in autoencoders for an example stats.stackexchange.com/questions/199605/… Commented Feb 3, 2023 at 15:17

## 2 Answers

Yes, we can. Consider a random variable $$X$$ with mean $$\mu \in \mathbb{R}$$. (Note that not every random variable has a mean, so there is a loss of generality in this starting point.) If we define the random variable $$\varepsilon \equiv X-\mu$$ as the deviation from the mean then we can write the original random variable as:

$$X = \mu + \varepsilon.$$

The random variables $$\varepsilon$$ has zero mean, by construction. This technique is possible because whenever we have a random variable, adding a constant imposes a location-shift that yields a new random variable. Even for a random variable that does not have a mean, it is possible to write it as a sum of a constant and a location-shifted version of that random variable.

Consider linear regression: $$Y = X\beta + e$$ We decompose a random variable ($$Y \sim N(X\beta, \sigma^2)$$) into a deterministic part ($$X\beta$$) and a random part ($$e \sim N(0, \sigma^2)$$). So the answer is yes, we can decompose a random variable into deterministic and random components.

Though of course note that from a statistical point of view (as opposed to a probabilistic one) we won't be able to recover these components exactly - it's an estimation.