Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6476 > unrolled thread
| Started by | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| First post | 2011-11-16 09:51 +0000 |
| Last post | 2011-11-16 09:51 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Solve for parameters of a truncated normal distribution Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-11-16 09:51 +0000
| From | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| Date | 2011-11-16 09:51 +0000 |
| Subject | Re: Solve for parameters of a truncated normal distribution |
| Message-ID | <ja012j$64d$1@smc.vnet.net> |
On 15 Nov 2011, at 11:50, paul 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.
>
>
Your first mistake is to use functions (Solve and NSolve) which are not intended for such purposes at all. NSolve can only solve (numerically) polynomial equations and systems of such. Your equations are certainly not of this kind. Solve (in version 8) can also solve certain univariate transcendental equations but not systems of such. So again, there is no point at all of trying either of these functions on your system.
The only function that might work is FindRoot. However, before one even starts, one has to have some reason for believing such a solution exists. Now, looking at the graphs below, I see no such reason. So do you have one?
X = TruncatedDistribution[{0, \[Infinity]},
NormalDistribution[\[Mu], \[Sigma]]];
m = Mean[X];
v = Variance[X];
Plot3D[{m, v, 1}, {\[Mu], 0.1, 2}, {\[Sigma], 0.1, 2},
PlotStyle -> {Blue, Green, Black}]
Andrzej Kozlowski
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web