My Math Forum  

Go Back   My Math Forum > College Math Forum > Advanced Statistics

Advanced Statistics Advanced Probability and Statistics Math Forum


Reply
 
LinkBack Thread Tools Display Modes
February 12th, 2012, 05:38 PM   #1
Member
 
Joined: Apr 2011

Posts: 31
Thanks: 0

Error with Moment Generating Functions

Just a warning, I may use improper terms here. If you think I'm explaining something wrong, it's quite possible that I am. Just let me know.
I'm trying to calculate the second moment for a binomial distribution. E(y^2), where Y ~ Binom.
I have two different methods, both of which I believe should work, but I'm getting different results. Could someone help me find which one I've done incorrectly?

V(Y) = E(y^2) - E(y)^2
==> npq = E(y^2) - (np)^2
==> E(y^2) = np(q + np)

The second method I'm using is with the second moment of the moment generating function.
My thinking is that if I take the MGF for the binomial distribution, take its derivative, and set t = 0, I should get E(y^2)

mgf = (p*e^t + q)^n
mgf(first derivative) = n*p*e^t*(p*e^t + q)^(n-1)
mgf(first derivative, t = 0) = n*p*(p + q)^(n-1)
mgf(first derivative, t = 0) = n*p

Obviously these both can't be right. I'm thinking the first one is correct, but where did I mess up?
Relmiw is offline  
 
February 13th, 2012, 03:18 PM   #2
Global Moderator
 
Joined: May 2007

Posts: 6,256
Thanks: 508

Re: Error with Moment Generating Functions

Quote:
Originally Posted by Relmiw
Just a warning, I may use improper terms here. If you think I'm explaining something wrong, it's quite possible that I am. Just let me know.
I'm trying to calculate the second moment for a binomial distribution. E(y^2), where Y ~ Binom.
I have two different methods, both of which I believe should work, but I'm getting different results. Could someone help me find which one I've done incorrectly?

V(Y) = E(y^2) - E(y)^2
==> npq = E(y^2) - (np)^2
==> E(y^2) = np(q + np)

The second method I'm using is with the second moment of the moment generating function.
My thinking is that if I take the MGF for the binomial distribution, take its derivative, and set t = 0, I should get E(y^2)

mgf = (p*e^t + q)^n
mgf(first derivative) = n*p*e^t*(p*e^t + q)^(n-1)
mgf(first derivative, t = 0) = n*p*(p + q)^(n-1)
mgf(first derivative, t = 0) = n*p

Obviously these both can't be right. I'm thinking the first one is correct, but where did I mess up?
The first method is the correct result.

Your second method (moment generator) is correct. However what you got is the first moment (mean), not the second moment. You need to use the second derivative to get the second moment.
mathman is offline  
February 13th, 2012, 03:57 PM   #3
Member
 
Joined: Apr 2011

Posts: 31
Thanks: 0

Re: Error with Moment Generating Functions

Ohhh, my goodness. Of course. Thank you
Relmiw is offline  
Reply

  My Math Forum > College Math Forum > Advanced Statistics

Tags
error, functions, generating, moment



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moment generating function to PMF FreaKariDunk Algebra 3 October 19th, 2012 07:01 AM
Derive the moment-generating function of Y bar 450081592 Advanced Statistics 1 November 26th, 2011 02:04 PM
approaching moment generating function standard normal fc_groningen Advanced Statistics 0 March 7th, 2011 08:02 AM
Generating functions - (1-x-x^2-x^3-x^4-x^5-x^6)^-1 KristopherWindsor Advanced Statistics 4 May 3rd, 2010 08:47 AM
Generating functions - (1-x-x^2-x^3-x^4-x^5-x^6)^-1 KristopherWindsor Number Theory 0 January 1st, 1970 12:00 AM





Copyright © 2017 My Math Forum. All rights reserved.