# Empirical distribution function by sampling from a m.v. distribution

I have mathematically rewritten my problem as a function of multiple iid variables: $$f(X_1, X_2, ..., X_n),$$ where $$X_i \in \mathcal{N}(0,1)$$ I now want to determine the empirical distribution function $$F_n$$ of this function by sampling from the distribution of $$(X_1, ..., X_n)$$ How would I go about this? Can I sample from them individually or from their joint distribution?

• If you know the distribution of the data, what do you need the empirical distribution for?
– Tim
Nov 16, 2022 at 15:26
• If the $X_i$ are iid as per your statement, then sampling from their joint distribution and sampling individually amounts to the same thing. Nov 16, 2022 at 15:34
• @Tim Valid question. I reduced the problem a bit before posting, but the function depends of a few other parameters that I want to optimize by observing the empirical distribution. Does this seem reasonable? Or is it still pointless to use the empirical distribution? Nov 16, 2022 at 15:38
• @ChristophHanck It may be that I've misunderstood the question. In fact, $$Y_i = e^{a+bX_i}$$ are independent, this probably doesn't entail that $$X_i$$ are independent. Nov 16, 2022 at 15:40
• Are $X_i$'s iid?
– Tim
Nov 16, 2022 at 15:44

You answered yourself, so to close this: if $$X_1, X_2, \dots, X_n$$ are independent, then sampling from their marginal distributions independently and sampling from their joint distribution are the same. If they are not independent, sampling them independently means approximating the joint distribution with the distribution of independent variables, so it can get arbitrarily wrong, depending on the nature of the dependence between the variables.