# How to measure (estimate) conditional independence?

I've been reading a few papers on causal inference with the PC algorithm and other things proposed;

They always use conditional independencies in their algorithm. So given a graph (let us assume directed edges and no cycles) we can say if it is Markovian:

X is independent of its non-descendants given its parents

or more formally:

$$X\perp \! \! \! \perp \text{nd}(X) \ | \ \text{pa}(X)$$

However, what I do not really understand is how to estimate this;

So I would be thankful for an idea regarding this very easy example: Assume we have a graph, given by:

$X_1\rightarrow X_2 \rightarrow X_3$

So just imagine I have three nodes and the direction as seen above;

Now I define some probability distribution according to the DAG:

E.g. I could say:

$$X_1=Z_1, \ \ \ X_2=X_1+Z_2, \ \ \ X_3=X_1+X_2+Z_3,$$

where $Z_i$ are some random noise variables, independent from each other and non-gaussian.

Then we should obviously have

$$X_1\perp \! \! \! \perp X_3 \ | \ X_2$$

So if I generate data according to the equations I should be able to estimate their independence - but given this data of let's say n independent (3-dimensional) observations - how could I have a test testing their conditional independence?