Conditional multivariate sampling

Thank you for your answer.

Let’s say that X1 is a random variable describing a person’s age, X2 is the annual revenue and X3 represents this person’s number of children.

The objective of the first code snippet was to model these variables with a multivariate normal distribution. Now, I would like to have the normal multivariate distribution of say X1 and X2 given that X3=3 children. Would that be possible ?

x = [X1, X2, X3]

Thank you in advance,

Maxime.

1 Like