help for bnormpdf                                              (version 1.1.0) 

Bivariate normal density function

bnormpdf x1_var x2_var [if exp] [in range], density(newvar) [ m1(#) m2(#) s1(#) s2(#) rho(#) replace double ]


bnormpdf generates a new variable with the bivariate normal density for the supplied variables x1 and x2, with the joint distribution:

(X1,X2) ~N( m1, m2, s1^2, s2^2, rho)


m1(#) and m2(#) specify the expected values for X1 and X2. The default for each is 0.

s1(#) and s2(#), the standard deviations for X1 and X2, must be postive numbers. The default for each is 1.

rho(#), the correlation, must be: -1 < rho < 1. The default is 0.

replace allows an existing variable specified by density() to be overwritten.

double specifies an 8 byte (double) storage type for the density() variable. The default storage type is float (4 byte).


Bickel PH, Doksum KA. Mathematical Statistics. p.23-24. Holden-Day. Oakland. 1977.


. bnormpdf x1 x2, dens(pdf_a)

. bnormpdf x1 x2, rho(.2) dens(pdf_b) double

. bnormpdf x1 x2, m1(.5) m2(1) s1(2) s2(1) rho(.2) dens(pdf_b) double replace


Gary Longton, Fred Hutchinson Cancer Research Center, Seattle glongton@fhcrc.org

Also see