Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Suppose that the Random X ~ N(u*t,sigma^2*t). How do you use Mathematica to generate moment-generating e^X ?

Hence, mean is u*t and variance is sigma^2*t.

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    Unhappily, it is very difficult to paste Mathematica code here on Yahoo! Answers.

    Well, on Mathematica 7, you will need to use the definition of moment-generating function and be aware that Mathematica has an entity for each of several useful statistical distributions. The Normal Distribution is represented by NormalDistribution[mean,standard deviation]. There is also a method to obtain the probability distribution function (PDF). I have put it all together with some reasonable assumptions.

    I will suggest you to try this (it is also on http://www.pastey.net/134871 where you can download it or even copy and paste it into Mathematica - but before copying you should toggle the line numbers off):

    (* Mathematica code starts here *)

    M[z_] =

    Assuming[u\[Element]Reals

    &&

    t>0

    &&

    \[Sigma]>0 ,

    \!\(

    \*SubsuperscriptBox[\(\[Integral]\),

    \(-\[Infinity]\),

    \(\[Infinity]\)]

    \(Exp[z\ x]

    PDF[NormalDistribution[

    u\ t,

    \[Sigma]\

    \*SqrtBox[\(t\)]], x]

    \[DifferentialD]x\)\) ]

    R[z_] := Log[M[z]]

    R'[0]

    R''[0]

    (* Mathematica code ends here *)

Still have questions? Get your answers by asking now.