Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



error message and speed
Posted:
Sep 25, 1997 1:11 PM


Hi,
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.
=============================================== In[1]:= <<Statistics`ContinuousDistributions`; ldist = LogNormalDistribution[m,s];
LogNormalDistribution::"shdw": 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.
WHY DOES THIS HAPPEN?
My second question is about the speed. I evaluated the following 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
========================== <<Statistics`ContinuousDistributions`;
ldist = LogNormalDistribution[m,s];
logpdf[W_] = PDF[ldist, W];
A1 = (e + b (1+r)  (1ei) Y2 )/(1+c);
U[X_,L_] = Log[X]  ua L^ub;
funEU[e_,b_,r_,c_,i_,rho_,n1_,n2_,ei_,w_,m_,s_,Integrate_]= Integrate[ U[ W (1c)+ei Y2,n2] logpdf[W], {W,0,e}]; =================================



