Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to derive MGF of a uniform distribution?

78 views
Skip to first unread message

Zootal

unread,
Nov 4, 2008, 4:00:35 PM11/4/08
to
I understand that the MGF (moment generating function) for a uniform
distribution is:

e^(tb) - e^(ta) / t(b-a)

I also understand that m(t) = e^(ty). How do you actually derive the
mgf? Is it:

(summation from -infinity to infinity) e^(ty) (1/(b-a))? where 0 <= a
<=b?

Ray Vickson

unread,
Nov 4, 2008, 4:25:21 PM11/4/08
to

Well, depending on what you mean by summation (i.e., what you are
summing over) the result looks like it will be infinite---hardly what
you want. Anyway, why would you think that your summation formula is
the mgf? What is the DEFINITION of the mgf? If you apply that
definition to the distribution that is uniform on (a,b), what do you
get?

R.G. Vickson

Zootal

unread,
Nov 4, 2008, 5:28:32 PM11/4/08
to

My bad - it should be integration, not summation, I don't know where
that came from :-).

mgf -> m(t) = E( e^(ty) ) = (integration from -infinity to infinity)
e^(ty) f(y) dy. In the case of a uniform distribution, shouldn't this
be:

(integration from -infinity to infinity) e^(ty) (1/(b-a) dy ?

Ray Vickson

unread,
Nov 4, 2008, 6:58:42 PM11/4/08
to
On Nov 4, 2:28 pm, Zootal <zoo...@gmail.com> wrote:
> On Nov 4, 1:25 pm, Ray Vickson <RGVick...@shaw.ca> wrote:
>
>
>
> > On Nov 4, 1:00 pm, Zootal <zoo...@gmail.com> wrote:
>
> > > I understand that the MGF (moment generating function) for a uniform
> > > distribution is:
>
> > > e^(tb) - e^(ta) / t(b-a)
>
> > > I also understand that m(t) = e^(ty). How do you actually derive the
> > > mgf? Is it:
>
> > > (summation from -infinity to infinity) e^(ty) (1/(b-a))? where 0 <= a
> > > <=b?
>
> > Well, depending on what you mean by summation (i.e., what you are
> > summing over) the result looks like it will be infinite---hardly what
> > you want. Anyway, why would you think that your summation formula is
> > the mgf? What is the DEFINITION of the mgf? If you apply that
> > definition to the distribution that is uniform on (a,b), what do you
> > get?
>
> > R.G. Vickson
>
> My bad - it should be integration, not summation, I don't know where
> that came from :-).
>
> mgf -> m(t) = E( e^(ty) ) = (integration from -infinity to infinity)
> e^(ty) f(y) dy.

For any given density function f(y), what do you get when t = 0? In
other words, what is mgf(0)?

> In the case of a uniform distribution, shouldn't this
> be:
>
> (integration from -infinity to infinity) e^(ty) (1/(b-a) dy ?

*Evaluate* this integral (say, for t = 0) and see what you get. Is it
what you want? Think of a specific example, say with a = 0 and b = 1.
Plot f(y). Look at the picture. Now *think*: the answer is staring you
in the face and you will kick yourself for not seeing it before.

R.G. Vickson

Zootal

unread,
Nov 4, 2008, 7:38:40 PM11/4/08
to
On Nov 4, 3:58 pm, Ray Vickson <RGVick...@shaw.ca> wrote:
> On Nov 4, 2:28 pm, Zootal <zoo...@gmail.com> wrote:
>
>
>
> > On Nov 4, 1:25 pm, Ray Vickson <RGVick...@shaw.ca> wrote:
>
> > > On Nov 4, 1:00 pm, Zootal <zoo...@gmail.com> wrote:
>
> > > > I understand that the MGF (moment generating function) for a uniform
> > > > distribution is:
>
> > > > e^(tb) - e^(ta) / t(b-a)
>
> > > > I also understand that m(t) = e^(ty). How do you actually derive the
> > > > mgf? Is it:
>
> > > > (summation from -infinity to infinity) e^(ty) (1/(b-a))? where 0 <= a
> > > > <=b?
>
> > > Well, depending on what you mean by summation (i.e., what you are
> > > summing over) the result looks like it will be infinite---hardly what
> > > you want. Anyway, why would you think that your summation formula is
> > > the mgf? What is the DEFINITION of the mgf? If you apply that
> > > definition to the distribution that is uniform on (a,b), what do you
> > > get?
>
> > > R.G. Vickson
>
> > My bad - it should be integration, not summation, I don't know where
> > that came from :-).
>
> > mgf -> m(t) = E( e^(ty) ) = (integration from -infinity to infinity)
> > e^(ty) f(y) dy.
>
> For any given density function f(y), what do you get when t = 0? In
> other words, what is mgf(0)?

e^(ty) would be e^0, or simply one. So wouldn't mgf(0) be the expected
value of f(y)? In the case of a uniform distribution, that would be
simply (a+b)/2.


>
> > In the case of a uniform distribution, shouldn't this
> > be:
>
> > (integration from -infinity to infinity) e^(ty) (1/(b-a) dy ?
>
> *Evaluate* this integral (say, for t = 0) and see what you get. Is it
> what you want? Think of a specific example, say with a = 0 and b = 1.
> Plot f(y). Look at the picture. Now *think*: the answer is staring you
> in the face and you will kick yourself for not seeing it before.
>
> R.G. Vickson

So... (integrate) e^(ty) (1/(b-a) dy = 1/(b-a) y e^(ty). Evaluate from
0 to 1 gives us e^(ty). I'm missing something....

Ray Vickson

unread,
Nov 5, 2008, 12:01:49 AM11/5/08
to

No. f(y) does not have an expected value (in any reasonable sense).
f(y) is the thing you use to compute expected values of other things.
In the case of t = 0, you just need to compute the expected value of
the number "1". What do you think that expected value should be?

> In the case of a uniform distribution, that would be
> simply (a+b)/2.

No. That is the expected value of y --- not what was asked for.

>
>
>
> > > In the case of a uniform distribution, shouldn't this
> > > be:
>
> > > (integration from -infinity to infinity) e^(ty) (1/(b-a) dy ?
>
> > *Evaluate* this integral (say, for t = 0) and see what you get. Is it
> > what you want? Think of a specific example, say with a = 0 and b = 1.
> > Plot f(y). Look at the picture. Now *think*: the answer is staring you
> > in the face and you will kick yourself for not seeing it before.
>
> > R.G. Vickson
>
> So... (integrate) e^(ty) (1/(b-a) dy = 1/(b-a) y e^(ty).

? Are you just writing the very first thing that comes into your head?
Are you thinking and computing at all? If you were, you would never
have written what you just wrote.

Evaluate from
> 0 to 1 gives us e^(ty). I'm missing something....

Well, yes, you are missing the fact that you are taking a = 0 and b =
1 in one part of the formula but not in the other parts. You need to
fix this up. Also, you are missing the limits of integration in your
original formula, then you do the integral incorrectly and do not even
bother looking at the limits. I give up.

R.G. Vickson

0 new messages