Simulation from a multivariate distribution (How does it work in practice?) My textbook says, for a multivariate case, say $f(x_1, x_2, x_3) = f(x_3 |x_2, x_1)f(x_2|x_1)f(x_1)$, we would simulate a value from the density $f(x_1)$, then using this value simulate from $f(x_2|x_1)$ and then $f(x_3 |x_2, x_1)$.. 
My question is, how is this simulation from each distribution done in practice? Do we use the inverse transform for each distribution? (assuming these are from standard distributions)
This is supposed to be setting the foundations for Markov chain's and then moving onto MCMC where sampling from more complicated distributions is required. 
 A: For what you described, I cannot see any direct relationship with MCMC. What you needed is just a forward sampling.
Here is how it works (suppose we have discrete binary random variables):


*

*Step 1. get a sample for $X_1$. In order to do this step, we need to have the distribution $P(X_1)$. (Something like 


$$
    P(X_1)=\left\{
                \begin{array}{ll}
                  0.2, ~~~~~~ X_1=0\\
                  0.8, ~~~~~~ X_1=1\\
                \end{array}
              \right.
$$
, and for these numbers you may guess it is very likely to get a $1$ as a sample in this first step). 


*

*Step 2. get sample for $X_2$. Based on $P(X_2|X_1)$. We need to have the conditional probability table to do this step. (Something like 


$$
    P(X_2|X_1)=\left\{
                \begin{array}{ll}
                  0.2, ~~~~~~ X_1=0, X_2=0\\
                  0.8, ~~~~~~ X_1=0, X_2=1\\
                  0, ~~~~~~~~ X_1=1, X_2=0\\
1, ~~~~~~~~ X_1=1, X_2=1
                \end{array}
              \right.
$$
From this example, you will get the a sample of $X_2$ to be 1.). 


*

*Step 3. get sample for $X_3$. We need to have $P(X_3|X_1,X_2)$. I will ignore the example of the conditional table here (the table will have $2 \times 2 \times 2$ rows).

A: Once you have the form of the PDF, there are various techniques for sampling. Some easy forms can be handled via Inverse Transform Sampling. Some special forms can be handled via methods special methods, e.g. sampling from normal distribution via Box-Müller. Other general methods exist for PDFs with non-easy/non-special forms (i.e. inverse transform sampling is not possible or easy to employ), such as Rejection sampling, or may others under MCMC topic. The discrete cases are easier to handle as described in @Haitao's answer.
