# is it reasonable to consider a plot of 2 separate normal random variables as the geometric representation of a joint probability distribution?

I am plotting 2 normal distribution in Python. if anyone could provide an R version to demonstrate and explain, that would be grateful.

f, a = plt.subplots(figsize=(3,3))
x1 = np.random.normal(loc=3.0, size=1000)
y1 = np.random.normal(loc=2.0, size=1000)
plt.xlim(-5,15)
plt.ylim(-5,15)
a.scatter(x1,y1,color='red', marker='+',s=15, alpha=.05)
plt.show()


x1, y1 are 2 independent(thanks to @mlofton) separate random variables with different normal distributions.

plotting x1, y1, produces this figure

the question is, is it reasonable to consider the red circle as the geometric representation of a joint probability distribution?

if yes, what a math formula is?

• yeah but the covariance matrix has zero on the non-diagonals ( since they are independently drawn. I think. I'm not familiar with that code ) so you are just plotting 2 independent normals whose joint distribution is a product of each of the marginals. if you use covariance matrices with values on the diagonals, it will become more ellipitic shaped. In R, it's easy. Don't know that language you are using. – mlofton May 9 '19 at 3:01
• @mlofton thanks for your comments! this is in Python. an R version to demonstrate and explain this would be grateful. – shi95 May 9 '19 at 3:10
• Perhaps see plts and R code in this Q & A. – BruceET May 9 '19 at 4:13
• @shi95: I'm pretty busy so can you check out the link that Brucet mentioned. Generating bvariate normals in R is pretty straightforward so, if you want to do that, check out that R code and then do "generating bivariate normal random variables in R". That should bring up relevant code. – mlofton May 10 '19 at 2:05
• Here's a link . blog.revolutionanalytics.com/2016/08/… – mlofton May 10 '19 at 2:06