Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4639 > unrolled thread
| Started by | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| First post | 2011-08-28 08:14 +0000 |
| Last post | 2011-08-28 08:14 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: TransformedDistribution -- odd problem Bill Rowe <readnews@sbcglobal.net> - 2011-08-28 08:14 +0000
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Date | 2011-08-28 08:14 +0000 |
| Subject | Re: TransformedDistribution -- odd problem |
| Message-ID | <j3ctdv$5oj$1@smc.vnet.net> |
On 8/26/11 at 5:26 AM, paulvonhippel@yahoo.com (paulvonhippel at
yahoo) wrote:
>Here is a variant of the same difficulty. In the input I specify
>that v2>2, yet in the output I get two solutions, one of which only
>applies if v2<=2. Many thanks if you can tell me what I'm doing
>wrong. I believe my mistake here may be causing more serious
>problems in more complicated input.
>In[3]:= Assuming[v2 > 2,
>Mean[TransformedDistribution[ w, {w \[Distributed]
>FRatioDistribution[v1, v2]}]]] // InputForm
>Out[3]//InputForm= Piecewise[{{v2/(-2 + v2), v2 > 2}},
>Indeterminate]
Asking Mathematica to Simplify the result from Mean solves the
issue. That is,
In[3]:= Assuming[v2 > 2, Simplify[Mean[TransformedDistribution[w,
{w \[Distributed] FRatioDistribution[v1, v2]}]]]]
Out[3]= v2/(v2 - 2)
But why use TransformedDistribution at all here? There is
nothing to transform since the result of the expression using
the random variable is the random variable. So, the same result
can be obtained more directly/simply as follows:
In[4]:= Assuming[v2 > 2, Simplify@Mean[FRatioDistribution[v1, v2]]]
Out[4]= v2/(v2 - 2)
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web