[SciPy-user] Bias in numpy.random.multivariate_normal?

Bryan Nollett bryan.nollett@gmail....
Sat Nov 10 20:26:48 CST 2007

The covariance matrix provided in sigma is not symmetric.  Forcing
symmetry by changing the definition of sigma to
  sigma = inv(precision)
  sigma[1,0] = sigma[0,1]
yields behavior that I suspect is in line with your expectations.

Perhaps a check for symmetry in the cov argument would be desirable
addition to multivariate_normal?


On Nov 10, 2007 12:55 PM, John Reid <j.reid@mail.cryst.bbk.ac.uk> wrote:
> In a multivariate normal (MVN) the covariance is  E(X.X') - E(X).E(X').
> I sample many times from a MVN with given mean and covariance. I then
> calculate the covariance of the sample. This covariance matrix should
> show no bias to be larger or smaller than the distribution's covariance
> but I see that some entries are always larger and others are smaller.

More information about the SciPy-user mailing list