MathGroup Archive 2002

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

Search the Archive

Re: ContinuousDistributions bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38394] Re: ContinuousDistributions bug?
  • From: Direct Connection <king at dircon.co.uk>
  • Date: Fri, 13 Dec 2002 04:10:47 -0500 (EST)
  • References: <at4aqi$eb6$1@smc.vnet.net>
  • Reply-to: Tom Burton <tburton at brahea.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks Tom for your input, responses below; >> There seems to be a bug 
here due to the fact that ContinuousDistributions.m >> (4.0.0) does not 
check that q is numeric. >>  >> Quantile[NoncentralChiSquareDistribution[
2, 10], q] >> Produces a load of errors and some incorrect results when 
used in LogPlot. >>  >> LogPlot[Quantile[NoncentralChiSquareDistribution[
2, 10], q], {q, .1, .9}] >>  >> This is of course a pain. What is the 
best way to correct this? Is it to >> copy the particular function from 
ContinuousDistribution.m and re-include it >> in a little add on or is 
there an updated version.
 > I cannot reproduce your difficulty in 4.2. 
LogPlot there has attribute > HoldFirst,  Yes so does 4.0 Attributes[
LogPlot]
{HoldFirst} I do not understand why this is insufficient to 
hold off the evaluation until q gets a value. I suspect that it is 
something to do with the complexity of LogPlot's calls to scaledplot etc.

> so no attempt is made to evaluate Quantile[...] before a numeric > 
value is substituted for q. If this is not true in version 4.0, then you
> might try >  > LogPlot[Unevaluated[Quantile[
NoncentralChiSquareDistribution[2, 10], q]], > {q, .1, .9}] I was 
unfamiliar with Unevaluated. One would expect it to do the trick but it 
doesn't stop the Nintegrate ::nlim error >  > Tom Burton >  > PS I am 
unfamiliar with this distribution and would not notice "some > incorrect 
results". TB I am reasonably certain the the incorrect results are 
caused by premature evaluation since I have rebuilt the function outside 
ContinuousDistributions and got what I believe are correct results. > 
Would I be right in presuming that 4.2 has this problem fixed in which 
case it would be nice to be able to get hold of the 4.2 version of 
ContinuousDistributions.m
 My other possibility is to call my version 
which then rewrites the offending piece. In order to do that I think 
that I will need to  Set the context to 
Statistics`ContinuousDistributions`Private` Clear[Quantile[
NoncentralChiSquareDistribution]] Reprogram with the q_?NumericQ in 
place.

-- 
Nigel


  • Prev by Date: Numeric Integration of Tabulated Integrand Function: Part I
  • Next by Date: Re: Question on factor group calculations
  • Previous by thread: ContinuousDistributions bug?
  • Next by thread: Re: ContinuousDistributions bug?