Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6490

Re: Solve for parameters of a truncated normal

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!news-xxxfer.readnews.com!newsfeeds.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Solve for parameters of a truncated normal
Date Thu, 17 Nov 2011 11:07:36 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <ja2pto$mac$1@smc.vnet.net> (permalink)
References <201111151050.FAA23783@smc.vnet.net>
Reply-To drmajorbob@yahoo.com
Lines 69
NNTP-Posting-Date 17 Nov 2011 10:11:48 GMT
NNTP-Posting-Host dfc7a6ab.news.twtelecom.net
X-Trace DXC=\8fmhMP7dC>B8ck_2OIRd8C_A=>8kQj6==_1NR_H?JP=QBDiL;l98V;EFiONJ7[Go6EGk>V2X0Z[0
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:6490

Show key headers only | View raw


That's a REALLY nice way to look at it... once all the code is given:

X = TruncatedDistribution[{0, \[Infinity]},
    NormalDistribution[\[Mu], \[Sigma]]];
{mean, var} = FullSimplify@Through[{Mean, Variance}@X];
Manipulate[
  Column@{height,
    Show[{ContourPlot[
       mean == height, {\[Mu], 0.01, 3}, {\[Sigma], 0.01, 3},
       ContourStyle -> {Red}],
      ContourPlot[var == height, {\[Mu], 0.01, 3}, {\[Sigma], 0.01, 3},
        ContourStyle -> {Blue}]},
     FrameLabel -> {"\[Mu]", "\[Sigma]"}]}, {{height, 1}, 0.1, 3,
   0.001}]

Bobby

On Wed, 16 Nov 2011 03:44:58 -0600, Barrie Stokes  
<Barrie.Stokes@newcastle.edu.au> wrote:

> Hi Paul
>
> I think this code:
>
> Manipulate[
>  Show[ {ContourPlot[
>     mean == height, {\[Mu], 0.01, 3}, {\[Sigma], 0.01, 3},
>     ContourStyle -> {Red} ],
>    ContourPlot[ var == height, {\[Mu], 0.01, 3}, {\[Sigma], 0.01, 3},
>     ContourStyle -> {Blue} ]},
>   FrameLabel -> {"\[Mu]", "\[Sigma]"} ], {{height, 1}, 0.1, 3,
>   0.001} ]
>
> shows that this can't be done for the common value for the mean and  
> variance of 1.
>
> The minimum value for a solution is around 1.757 (after 30 seconds  
> playing with the above Manipulate).
>
> Cheers
>
> Barrie
>
>>>> On 15/11/2011 at 9:50 pm, in message  
>>>> <201111151050.FAA23783@smc.vnet.net>, paul
> <paulvonhippel@yahoo.com> wrote:
>> I'm trying to solve the following problem:
>> X = TruncatedDistribution[{0, \[Infinity]},
>>   NormalDistribution[\[Mu], \[Sigma]]]
>> Solve[Mean[X] == 1 && Variance[X] == 1, {\[Mu], \[Sigma]}, Reals]
>>
>> I get an error message: "This system cannot be solved with the methods
>> available to Solve." It doesn't help if I replace Solve with NSolve.
>>
>> In case I've made a mistake in defining the problem, I should say that
>> I'm looking for the parameters of a normal distribution so that, if
>> the normal is truncated on the left at zero, the result will be a
>> truncated distribution whose mean and variance are both 1. It seems to
>> me Mathematica should be able to solve this, at least numerically.
>>
>> Many thanks for any suggestions.
>
>
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Solve for parameters of a truncated normal DrMajorBob <btreat1@austin.rr.com> - 2011-11-17 11:07 +0000

csiph-web