MathGroup Archive 2011

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

Search the Archive

Re: Expectation function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120288] Re: Expectation function
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Sat, 16 Jul 2011 05:43:59 -0400 (EDT)
  • References: <201107150119.VAA23653@smc.vnet.net>

On 7/14/2011 8:19 PM, paulvonhippel at yahoo wrote:
> I'm having a little trouble with the Expectation function in
> Mathematica. I'd like to calculate the expectation of the product of
> two independent variables. One has a standard normal distribution, the
> other is distributed F. It's obvious that the expectation is zero, but
> when I put the problem to Mathematica, all it does is echo the input.
> Here's the simplest way I've put the question:
>
>   Expectation[Z* F, F \[Distributed] FRatioDistribution[df, df], Z \
> [Distributed] NormalDistribution[0, 1]]
>
> Mathematica just echoes the input. I try adding some assumptions to
> ensure that the variance of the F distribution is defined.
>
>   Assuming[{df>= 3, df \[Element] Integers}, %]
>
> And Mathematica just echoes the input again.
>
> The other way to do this is to use TransformedDistribution and then
> use Mean. I get the same result that way.
>
> The problem I actually want to solve is more complicated, of course,
> but today I'll settle for solving the easier version. Many thanks for
> any pointers.
>

The \[Distributed] statements need to be given in a list. With that 
modification, you'll get a correct result:

In[1]:= Expectation[Z*F, {F \[Distributed] FRatioDistribution[df, df], Z 
\[Distributed] NormalDistribution[0, 1]}]

Out[1]= 0


Darren Glosemeyer
Wolfram Research


  • Prev by Date: Solve never calls Equal?
  • Next by Date: Re: How to write a "proper" math document
  • Previous by thread: Expectation function
  • Next by thread: Compile and Total