MathGroup Archive 1997

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

Search the Archive

error message and speed

  • To: mathgroup at
  • Subject: [mg8792] error message and speed
  • From: "H.J. Wang" <hungjen at>
  • Date: Thu, 25 Sep 1997 12:26:27 -0400
  • Organization: University of Michigan
  • Sender: owner-wri-mathgroup at


        I have two questions about Mma 3.0 and its comparison with
V.2.2.2, and I'd appreciate very much if someone can give me a hint
of what's going on.  (operating system: Win95)

        The first question is that when I evaluated the following in
Mma 3.0 with the two lines in the same cell and next to each other, I
got a warning message that doesn't make sense.

        ldist = LogNormalDistribution[m,s];

         Symbol LogNormalDistribution appears in multiple contexts
           {Statistics`ContinuousDistributions`, Global`};
           definitions in context
           Statistics`ContinuousDistributions` may shadow or
           be shadowed by other definitions.

As a consequence the statistical properties of LogNormal are not
available, and functions such as PDF[ldist,W] does not return the
density function.  This erroneous behavior does not happen when the
two lines are separated into two individual cells.


        My second question is about the speed.  I evaluated the
commands in Mma 3.0 and 2.2.2, and found 3.0 is very, very slow in
evaluating the last function involving an integral.  Indeed, it took
Mma 3.0 85.14 seconds to finish while took only 2.294 seconds for
V.2.2.2.  Since I use this type of functions frequently, I'd like to
know why this happens and how to improve it.

        Thanks in advance!

H.J. Wang


 ldist = LogNormalDistribution[m,s];

 logpdf[W_] = PDF[ldist, W];

 A1 = (e + b (1+r) - (1-ei) Y2 )/(1+c);

 U[X_,L_] = Log[X] - ua L^ub;

  Integrate[ U[ W (1-c)+ei Y2,n2] logpdf[W], {W,0,e}];

  • Prev by Date: FindRoot
  • Next by Date: Re: Sound Recording
  • Previous by thread: FindRoot
  • Next by thread: Re: error message and speed