Re: Can anyone help me Thanks

• To: mathgroup at smc.vnet.net
• Subject: [mg75758] Re: Can anyone help me Thanks
• From: dh <dh at metrohm.ch>
• Date: Thu, 10 May 2007 05:07:09 -0400 (EDT)
• References: <f1s05f\$9q5\$1@smc.vnet.net>

```
Hi Alice,

there were syntax errors in the definition od pf2:

pf2[A1_/;NumericQ[A1],A2_/;NumericQ[A2]]:=

PDF[ndist2,{(Log[A1/S1]-(s1^2/2))/s1,(Log[A2/S2]-(s2^2/2))/s2}];

unfortunately, as fn,s1,s2 are not known, your code can not be executed.

hope this helps, Daniel

ä½³ç?²chialing wrote:

> My question is as follow,

>   'S1,s1,S2,s2 is constant, fn is a function with variable A1, A2

> << Statistics`MultinormalDistribution`;

> rr = {{1, 0.75}, {0.75, 1}};

> ndist2 = MultinormalDistribution[{0, 0}, rr];

> pf2[A1_, A2_] : = {PDF[ndist2,{(Log[A1/S1]-(s1^2/2))/s1,((Log[A2/S2]-(s2^2/2))/s2}]}[[1]];

> z = NIntegrate[1/(A1 A2)*(fn[A1, A2]pf2[A1, A2]), {A1, 0, Infinity}, {A2, 0, Infinity}, MinRecursion -> 5, MaxRecursion -> 10];

>

> I want to extend the 36 dimensional MultinormalDistribution, could you help me?

> i.e.

> << Statistics`MultinormalDistribution`;

> 36r = {{1, 0.75,........................}, {0.75, 1,..............}.........................};

> ndist36 = MultinormalDistribution[{0, 0,...................}, 36r];

> pf36[A1_, A2_,A3_...............] : = {PDF[ndist36,{(Log[A1/S1]-(s1^2/2))/s1,((Log[A2/S2]-(s2^2/2))/s2},..........]}[[1]];

> z = NIntegrate[1/(A1 A2 .........)*(fn[A1, A2,...........]pf36[A1, A2,.........]), {A1, 0, Infinity}, {A2, 0, Infinity},................ MinRecursion -> 5, MaxRecursion -> 10];

>

>   Thank you again.

>   Sincerely,

>

>   Alice

>

>

```

• Prev by Date: Re: Simplify by Recurrence Relations
• Next by Date: Re: Reading coordinates from a 2D Plot
• Previous by thread: Can anyone help me Thanks
• Next by thread: Re: Can anyone help me Thanks