From: Pratim Vakish on 31 Dec 2006 05:13 Hello, I have the following optimization problem: a minimization subject to a few linear constraints and one chance constarint formulated using CDF[] Needs["Statistics`MultinormalDistribution`"]; r={{0.01,-0.016},{-0.016,0.018}}; ndist=MultinormalDistribution[{1,3},r]; NMinimize[{2x1+x2, x1�0.8, x2�2.5, x1�0, x2�0, x1+x2==y, CDF[ndist,{x1,y}]�0.9, PrecisionGoal -> 3}, {x1,x2,y}] I keep getting the following error message. I do not understand why. Any advice is welcome. NMinimize::"bcons": "The following constraints are not valid: y == x1 + x2, x1 � 0, x2 � 0, CDF[(MultinormalDistribution[({1, 3},({0.01,-0.016},{-0.016, 0.018}, {x1, y}] � 0.9, x1 � 0.8, x2 � 2.5}. Constraints should be equalities, inequalities, or domain specifications involving the variables. ---------------------------------------- > Date: Sat, 25 Nov 2006 09:53:24 -0500 > From: hanlonr(a)cox.net > To: pratim_usc(a)hotmail.com; mathgroup(a)smc.vnet.net > Subject: Re: Numerical vaule of multinormal distribution > > Needs["Statistics`MultinormalDistribution`"]; > r = {{0.8, 0.1}, {0.1, 0.2}}; > ndist = MultinormalDistribution[{1, 0.4}, r]; > CDF[ndist, {-1, 1}] > > 0.0124156 > > I would guess that you tried to use to use CDF or MultinormalDistribution before loading the package. Evaluate after starting with a fresh kernel. > > > Bob Hanlon > > ---- Pratim Vakish <pratim_usc(a)hotmail.com> wrote: > > > > I have a basic question. > > I want toobtain the numerical value of the cumulative normal probability distribution function at some points. > > I have the following code to do this : > > > > Off[General::spell1]; > > Needs["Statistics`MultinormalDistribution`"]; > > r = {{0.8, 0.1}, {0.1, 0.2}}; > > ndist = MultinormalDistribution[{1, 0.4}, r]; > > CDF[ndist, {-1, 1}] > > > > > > The output I obtain is: > > > > CDF[MultinormalDistribution[{1, 0.4}, {{0.8, 0.1}, {0.1, 0.2}}], {-1, 1}] > > > > I would like to have the numerical value of this expression. > > How could I do? > > > > > > Pratim > _________________________________________________________________ Get the Live.com Holiday Page for recipes, gift-giving ideas, and more. www.live.com/?addtemplate=holiday
|
Pages: 1 Prev: webMathematica problem Next: speed of multiplying polynomials |