# Estimating the joint distribution of continuous and categorical variables

I would like to estimate the moments of the joint distribution of continuous and categorical variables in order to draw a synthetic sample from it, and was wondering the correct way to do so.

As an example, if i have vector of continuous variables describing some characteristics of a sample and wanted to estimate their joint distribution i could assume joint normality, and calculate their variance/covariance matrix and means. A random sample could then be drawn from this estimated distribution. If, however, i would like to allow the simulated sample to vary by gender and ethnicity i cannot simply assume normality (not that it's a terrific assumption in the first place) and continue in the same manner i.e by "adding them on" and calculating the new var/covar matrix and mean vector.

Does anyone know of the best way to carry out such a procedure, or of any resources that might help me understand how to do so?

Off the top of my head, you can perhaps use the conditional argument? Let $X$ the binary variable and $Y$ the continuous one then $P(X, Y) = P(Y|X)P(X)$
You can set the marginal probability $\pi=P(X=1)$ and parametrize $P(Y|X)$ e.g. $Y|X \sim N(\alpha + \beta x, \sigma^2)$. Now you have your joint distribution that you can use to draw from.