Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: TransformedDistribution -- odd problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120532] Re: TransformedDistribution -- odd problem
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Wed, 27 Jul 2011 06:15:02 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j0gh7s$bd7$1@smc.vnet.net> <201107251129.HAA25540@smc.vnet.net> <4E2EA04E.813B.006A.0@newcastle.edu.au> <201107261106.HAA09233@smc.vnet.net>

On 7/26/2011 6:06 AM, Paul von Hippel wrote:
> Thanks -- that fixes it!
>
> Bonus question: if we don't specify v2>2, why doesn't Mathematica return a two part solution:
>   k v2 / (v2-2) v2>2
>
>   Indeterminate True
>
> That's what it does if we request the mean of F -- why doesn't it do the same if we request the mean of k*F.
>
>
>
>
> ________________________________
> From: Barrie Stokes<Barrie.Stokes at newcastle.edu.au>
> To: mathgroup at smc.vnet.net; paulvonhippel at yahoo<paulvonhippel at yahoo.com>
> Sent: Monday, July 25, 2011 8:09 PM
> Subject: Re: TransformedDistribution -- odd problem
>
> Hi Paul
>
> There are conditions on the v1 and v2, the degrees of freedom of the F distribution:
>
> Assuming[v2>  2,
> Mean[TransformedDistribution[F ,
>    F \[Distributed] FRatioDistribution[v1, v2]]]]
>
> {Assuming[v2>  2,
>   Mean[TransformedDistribution[k*F ,
>    F \[Distributed] FRatioDistribution[v1, v2]]]], k*v2/(-2 + v2)}
>
> {Assuming[v2>  2,
>    Mean[TransformedDistribution[k + F ,
>     F \[Distributed] FRatioDistribution[v1, v2]]]],
>   k + v2/(-2 + v2)} // FullSimplify
>
> which shows precisely what you expect for k*F and k+F.
>
> Cheers
>
> Barrie
>
>>>> On 25/07/2011 at 9:29 pm, in message<201107251129.HAA25540 at smc.vnet.net>,
> paulvonhippel at yahoo<paulvonhippel at yahoo.com>  wrote:
>> A little more experimenting shows that the TransformedDistribution
>> function will also not provide the mean of k+F where k is a constant
>> and F has an F distribution -- i.e.,
>>    Mean[TransformedDistribution[k*F ,  F \[Distributed]
>> FRatioDistribution[v, v]]]
>>
>> If I changce the distribution of F to NormalDistribution or
>> ChiSquareDistribution, I can get a mean for k*F or k+F. So the problem
>> only occurs when I define a simple function of an F variable using the
>> TransformedDistribution function.
>> This all strikes me as very strange, and I'd be curious to know if
>> others can reproduce my results. If you can't reproduce my results,
>> I'd be interested in theories about why my results differ from yours.
>> E.g., is there a setting I should change in the software?
>>
>> I am using version 8.0.0.0 and looking to upgrade to 8.0.1, if that
>> makes a difference.
>>
>> Many thanks for any pointers.
>>
>> On Jul 24, 2:22 am, paulvonhippel at yahoo<paulvonhip... at yahoo.com>
>> wrote:
>>> I'm having a very strange problem with TransformedDistribution, where
>>> I can calculate the mean of an F distribution but I cannot calculate
>>> the mean of a constant multiplied by an F distribution. That is, if I
>>> type
>>>
>>>    Mean[TransformedDistribution[F, F \[Distributed]
>>> FRatioDistribution[v, v]]]
>>>
>>> Mathematica gives me an answer. But if I type
>>>
>>>    Mean[TransformedDistribution[k*F ,  F \[Distributed]
>>> FRatioDistribution[v, v]]]
>>>
>>> Mathematica just echoes the input. I swear I got an answer for the
>>> second expression earlier today. What am I doing wrong?

The reason is internal processing in the general moment/expectation code. The result for mean of FRatioDistribution is hard-coded, while TransformDistribution has to go through more general code. In simple cases like shifting or rescaling by a constant, correctly propagating indeterminacies and infinities is fairly straightforward, but for more complicated transforms this may not be as easy. This is an area we will look at for improvement in the future.

Darren Glosemeyer
Wolfram Research






  • Prev by Date: Re: FinancialData still broken
  • Next by Date: Re: Roots of a Jacobi polynomial
  • Previous by thread: Re: TransformedDistribution -- odd problem
  • Next by thread: NDSolve in matrix form