# If $f$ is any function and $X_1 … X_n$ are IID, are $f(X_1), f(X_2), …, f(X_n)$ IID?

Suppose that $f : \mathbb{R} \rightarrow \mathbb{R}$ be any function and let $X_1, X_2, ..., X_n$ be IID real-valued random variables drawn from any arbitrary distribution. Is it guaranteed that $f(X_1), f(X_2), ..., f(X_n)$ are IID as well?

This came up when discussing randomized algorithms that generate IID variables - if an algorithm generates IID variables and then uses them deterministically to build up some real number, I was curious about whether those real numbers were necessarily IID as well.

Thanks!

It isn't difficult to prove, and you might like to try it for yourself. A useful observation is that an event of the form $\{f(X) \in B\}$ can be written $\{X \in f^{-1}(B)\}$.