Skip to main content
. Author manuscript; available in PMC: 2021 Jun 1.
Published in final edited form as: Biochim Biophys Acta Gene Regul Mech. 2019 Oct 19;1863(6):194418. doi: 10.1016/j.bbagrm.2019.194418

Figure 1: Scatterplots before and after variable adjustment.

Figure 1:

Figure (a) shows the scatterplot of 1000 measurements between two multivariate normal random variables X and Y. Figure (b) takes into account the effect of a third random variable Z, which is associated with both X and Y. Here, we calculated the residues eX and eY after a linear regression of X with Z and of Y with Z. We observe that the correlation between X and Y in (a) can be entirely explained by variable Z as shown in Figure (b). The corresponding Pearson correlation coefficients are given in the lower right corners. Data were simulated from a three-dimensional multivariate normal distribution, (X, Y, Z)T ~ N(0, Ω−1), where the precision matrix Ω is defined by ω11 = ω22 = ω33 = 1, ω31 = ω32 = ω13 = ω23 = −0.7 and 0 elsewhere, as outlined in the Supplementary File 1.