Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Mode of InverseChiSquareDistribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128651] Re: Mode of InverseChiSquareDistribution
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Wed, 14 Nov 2012 01:27:46 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121113050258.8E2766992@smc.vnet.net>

D is a reserved word and cannot be used for a variable name. The mode
is the value of x for which the derivative of the PDF is zero.

dist = InverseChiSquareDistribution[d - 1];

mode = x /. Solve[
    Simplify[
     D[PDF[dist, x], x] == 0,
     x > 0],
    x][[1]]

1/(1 + d)


Bob Hanlon


On Tue, Nov 13, 2012 at 12:02 AM, paul <paulvonhippel at yahoo.com> wrote:
> As a first step toward solving a more complicated problem, I would like to calculate the mode of the InverseChiSquareDistribution with D-1 degrees of freedom. The answer is 1/(D+1) but I am having trouble getting that expression from Mathematica.
>
> First I type
>  PDF[InverseChiSquareDistribution[D - 1]]
> And then I cut and paste the function into ArgMax, imposing appropriate constraints:
>  modeInverseChiSquare = ArgMax[{(2^((1 - D)/2) (1/x)^(1 + 1/2 (-1 + D)) E^(-(1/(2 x))))/ Gamma[1/2 (-1 + D)], x > 0, D > 0, Element[D, Integers]}, x, Reals]
>
> But all ArgMax does is echo the input. If I evaluate the mode at a particular value of D I get the right answer -- e.g., modeInverseChiSquare /. D -> 10 returns 1/11. But what I'd like Mathematica to do is tell me that the answer in general is 1/(D+1).
>
> Suggestions most welcome.
>
>
>
>
>



  • Prev by Date: Re: Is there a way to do comment with just one keystroke at the start
  • Next by Date: Re: Mode of InverseChiSquareDistribution
  • Previous by thread: Mode of InverseChiSquareDistribution
  • Next by thread: Re: Mode of InverseChiSquareDistribution