MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Bug in PDF[MultinormalDistribution[..],..]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54735] Bug in PDF[MultinormalDistribution[..],..]
  • From: Mark Fisher <mark at markfisher.net>
  • Date: Mon, 28 Feb 2005 03:27:37 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

There appears to be a bug in PDF[MultinormalDistribution[..],..]. In 
what follows, sigma is a valid covariance matrix as long as b is not 0. 
However, negative b produces a negative value for the PDF, which is 
incorrect.

Clear[b,f,sigma]
sigma = {{2b^2, b}, {b, 1}}
Det[sigma] == b^2
f[b_] = PDF[MultinormalDistribution[{0, 0}, sigma], {0, 0}]
f[-1] < 0

I believe the source of the error is an inapropriate PowerExpand in line 
707 of MultinormalDistribution.m in the Statistics directory.

I am using version 5.1 for Windows.

BTW, after poking around in MultinormalDistribution.m, I discovered that 
MultinormalDistribution[{0,0}, sigma] acquires a third (hidden) part 
where the CholeskyDecomposition of sigma is stored:

mvn = MultinormalDistribution[{0,0}, sigma];
Simplify[mvn[[3]].Transpose[mvn[[3]]] == mvn[[2]], b \[Element] Reals]

--Mark


  • Prev by Date: Re: RSolve and complex solutions
  • Next by Date: Re: RSolve and complex solutions
  • Previous by thread: Bug in Import?
  • Next by thread: Re: Print graphics in smaller size