obtaining expected value for moment generating function
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This is the given cumulative distribution function:
$F(x) = begincases
0 & x<0\
0.5x & 0â¤x<1 \
0.25(x-1) + 0.5 & 1â¤x<3\
1 & yâÂÂ¥3
endcases$
We are asked to determine E($X$), E($X^2$), Var($X$), the mgf of X, and also use the mgf to verify the values of E($X$) and E($X^2$).
I got the following density function from the cdf:
F(x) = begincases
0 & x<0\
0.5 & 0â¤x<1 \
0.25 & 1â¤x<3\
0 & yâÂÂ¥3
endcases
My working was:
E($X$)= $int_0^10.5x;dx$ + $int_1^30.25x;dx$ = $1.25$
E($X^2$)= $int_0^10.5x^2;dx$ + $int_1^30.25x^2;dx$ = $frac56$
Mgf = $int_0^10.5e^tx;dx$ + $int_1^30.25e^tx;dx$
= $frace^t4t+frace^3t4t-frac12t$
This seemed a valid cdf, and if so, my questions are:
(i) I get a negative value for the variance, so I am not sure if I am calculating E($X$) and E($X^2$) correctly;
(ii) the mgf does not seem correct (is it possible to have 't' in the denominator, for example the first derivative of $frac12t$ would be -$frac12t^2$ which would be undefined when we substitute 0 for t).
probability-distributions
add a comment |Â
up vote
0
down vote
favorite
This is the given cumulative distribution function:
$F(x) = begincases
0 & x<0\
0.5x & 0â¤x<1 \
0.25(x-1) + 0.5 & 1â¤x<3\
1 & yâÂÂ¥3
endcases$
We are asked to determine E($X$), E($X^2$), Var($X$), the mgf of X, and also use the mgf to verify the values of E($X$) and E($X^2$).
I got the following density function from the cdf:
F(x) = begincases
0 & x<0\
0.5 & 0â¤x<1 \
0.25 & 1â¤x<3\
0 & yâÂÂ¥3
endcases
My working was:
E($X$)= $int_0^10.5x;dx$ + $int_1^30.25x;dx$ = $1.25$
E($X^2$)= $int_0^10.5x^2;dx$ + $int_1^30.25x^2;dx$ = $frac56$
Mgf = $int_0^10.5e^tx;dx$ + $int_1^30.25e^tx;dx$
= $frace^t4t+frace^3t4t-frac12t$
This seemed a valid cdf, and if so, my questions are:
(i) I get a negative value for the variance, so I am not sure if I am calculating E($X$) and E($X^2$) correctly;
(ii) the mgf does not seem correct (is it possible to have 't' in the denominator, for example the first derivative of $frac12t$ would be -$frac12t^2$ which would be undefined when we substitute 0 for t).
probability-distributions
For your first question, $E(X^2) = frac73$. The method is correct, just the results are different. It's possible to have $t$ in denominator, but I didn't check your second result
â Rumpelstiltskin
Jul 28 at 11:03
Hi Adam, just realized that I had a basic mistake with the $E(X^2)$ - thanks for pointing it out. But am still stuck with the mgf, would appreciate any thoughts on that. (I have seen examples with t in the denominator but it is always of the form such that the denominator does not equal 0 when 0 is substituted (eg (2-t))
â Denson
Jul 28 at 11:24
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is the given cumulative distribution function:
$F(x) = begincases
0 & x<0\
0.5x & 0â¤x<1 \
0.25(x-1) + 0.5 & 1â¤x<3\
1 & yâÂÂ¥3
endcases$
We are asked to determine E($X$), E($X^2$), Var($X$), the mgf of X, and also use the mgf to verify the values of E($X$) and E($X^2$).
I got the following density function from the cdf:
F(x) = begincases
0 & x<0\
0.5 & 0â¤x<1 \
0.25 & 1â¤x<3\
0 & yâÂÂ¥3
endcases
My working was:
E($X$)= $int_0^10.5x;dx$ + $int_1^30.25x;dx$ = $1.25$
E($X^2$)= $int_0^10.5x^2;dx$ + $int_1^30.25x^2;dx$ = $frac56$
Mgf = $int_0^10.5e^tx;dx$ + $int_1^30.25e^tx;dx$
= $frace^t4t+frace^3t4t-frac12t$
This seemed a valid cdf, and if so, my questions are:
(i) I get a negative value for the variance, so I am not sure if I am calculating E($X$) and E($X^2$) correctly;
(ii) the mgf does not seem correct (is it possible to have 't' in the denominator, for example the first derivative of $frac12t$ would be -$frac12t^2$ which would be undefined when we substitute 0 for t).
probability-distributions
This is the given cumulative distribution function:
$F(x) = begincases
0 & x<0\
0.5x & 0â¤x<1 \
0.25(x-1) + 0.5 & 1â¤x<3\
1 & yâÂÂ¥3
endcases$
We are asked to determine E($X$), E($X^2$), Var($X$), the mgf of X, and also use the mgf to verify the values of E($X$) and E($X^2$).
I got the following density function from the cdf:
F(x) = begincases
0 & x<0\
0.5 & 0â¤x<1 \
0.25 & 1â¤x<3\
0 & yâÂÂ¥3
endcases
My working was:
E($X$)= $int_0^10.5x;dx$ + $int_1^30.25x;dx$ = $1.25$
E($X^2$)= $int_0^10.5x^2;dx$ + $int_1^30.25x^2;dx$ = $frac56$
Mgf = $int_0^10.5e^tx;dx$ + $int_1^30.25e^tx;dx$
= $frace^t4t+frace^3t4t-frac12t$
This seemed a valid cdf, and if so, my questions are:
(i) I get a negative value for the variance, so I am not sure if I am calculating E($X$) and E($X^2$) correctly;
(ii) the mgf does not seem correct (is it possible to have 't' in the denominator, for example the first derivative of $frac12t$ would be -$frac12t^2$ which would be undefined when we substitute 0 for t).
probability-distributions
edited Jul 28 at 13:16
Did
242k23208441
242k23208441
asked Jul 28 at 10:57
Denson
367
367
For your first question, $E(X^2) = frac73$. The method is correct, just the results are different. It's possible to have $t$ in denominator, but I didn't check your second result
â Rumpelstiltskin
Jul 28 at 11:03
Hi Adam, just realized that I had a basic mistake with the $E(X^2)$ - thanks for pointing it out. But am still stuck with the mgf, would appreciate any thoughts on that. (I have seen examples with t in the denominator but it is always of the form such that the denominator does not equal 0 when 0 is substituted (eg (2-t))
â Denson
Jul 28 at 11:24
add a comment |Â
For your first question, $E(X^2) = frac73$. The method is correct, just the results are different. It's possible to have $t$ in denominator, but I didn't check your second result
â Rumpelstiltskin
Jul 28 at 11:03
Hi Adam, just realized that I had a basic mistake with the $E(X^2)$ - thanks for pointing it out. But am still stuck with the mgf, would appreciate any thoughts on that. (I have seen examples with t in the denominator but it is always of the form such that the denominator does not equal 0 when 0 is substituted (eg (2-t))
â Denson
Jul 28 at 11:24
For your first question, $E(X^2) = frac73$. The method is correct, just the results are different. It's possible to have $t$ in denominator, but I didn't check your second result
â Rumpelstiltskin
Jul 28 at 11:03
For your first question, $E(X^2) = frac73$. The method is correct, just the results are different. It's possible to have $t$ in denominator, but I didn't check your second result
â Rumpelstiltskin
Jul 28 at 11:03
Hi Adam, just realized that I had a basic mistake with the $E(X^2)$ - thanks for pointing it out. But am still stuck with the mgf, would appreciate any thoughts on that. (I have seen examples with t in the denominator but it is always of the form such that the denominator does not equal 0 when 0 is substituted (eg (2-t))
â Denson
Jul 28 at 11:24
Hi Adam, just realized that I had a basic mistake with the $E(X^2)$ - thanks for pointing it out. But am still stuck with the mgf, would appreciate any thoughts on that. (I have seen examples with t in the denominator but it is always of the form such that the denominator does not equal 0 when 0 is substituted (eg (2-t))
â Denson
Jul 28 at 11:24
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
For the first question, see my comment.
For your second question, mgf is correct, notice that your calculation only works for $tneq 0$, for $t=0$ we have $E(e^tX) = E(1) = 1$. This will always be the case, mgf equals to $1$ for $t=0$. You can also see this by taking limit as $tto 0$ from your function.
$$lim_tto 0 (frace^t-12t+frace^t(e^2t-1)4t) = 1/2+1/2 = 1 $$
$$lim_tto 0 fracE(e^tX)-E(e^0)t = lim_tto 0 (E(e^tX))' = lim_tto 0 (frace^t4t-frace^t4t^2+frac3e^3t4t-frace^3t4t^2+frac12t^2) = 1.25$$
Direct calculations aren't very efficient, but you can do it like this.
$$frace^t-12t+frace^t(e^2t-1)4t = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty fract^nn! sum_n=0^infty frac(2t)^n(n+1)!) = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty t^n sum_k=0^n frac2^k(n-k)!(k+1)!) $$
$$sum_k=0^nfrac2^k(n-k)!(k+1)! = frac1(n+1)!sum_k=0^nbinomn+1k+12^k = frac12(n+1)!(3^n+1-1) $$
So the series becomes
$$sum_n=0^infty t^nfrac14(n+1)!(3^n+1+1)$$
$$E(X^n) = frac14(n+1)(3^n+1+1) $$
$$ E(X)=frac18(3^2+1) = 1.25,,E(X^2) = frac112(3^3+1) = frac73 $$
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
For the first question, see my comment.
For your second question, mgf is correct, notice that your calculation only works for $tneq 0$, for $t=0$ we have $E(e^tX) = E(1) = 1$. This will always be the case, mgf equals to $1$ for $t=0$. You can also see this by taking limit as $tto 0$ from your function.
$$lim_tto 0 (frace^t-12t+frace^t(e^2t-1)4t) = 1/2+1/2 = 1 $$
$$lim_tto 0 fracE(e^tX)-E(e^0)t = lim_tto 0 (E(e^tX))' = lim_tto 0 (frace^t4t-frace^t4t^2+frac3e^3t4t-frace^3t4t^2+frac12t^2) = 1.25$$
Direct calculations aren't very efficient, but you can do it like this.
$$frace^t-12t+frace^t(e^2t-1)4t = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty fract^nn! sum_n=0^infty frac(2t)^n(n+1)!) = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty t^n sum_k=0^n frac2^k(n-k)!(k+1)!) $$
$$sum_k=0^nfrac2^k(n-k)!(k+1)! = frac1(n+1)!sum_k=0^nbinomn+1k+12^k = frac12(n+1)!(3^n+1-1) $$
So the series becomes
$$sum_n=0^infty t^nfrac14(n+1)!(3^n+1+1)$$
$$E(X^n) = frac14(n+1)(3^n+1+1) $$
$$ E(X)=frac18(3^2+1) = 1.25,,E(X^2) = frac112(3^3+1) = frac73 $$
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
add a comment |Â
up vote
1
down vote
accepted
For the first question, see my comment.
For your second question, mgf is correct, notice that your calculation only works for $tneq 0$, for $t=0$ we have $E(e^tX) = E(1) = 1$. This will always be the case, mgf equals to $1$ for $t=0$. You can also see this by taking limit as $tto 0$ from your function.
$$lim_tto 0 (frace^t-12t+frace^t(e^2t-1)4t) = 1/2+1/2 = 1 $$
$$lim_tto 0 fracE(e^tX)-E(e^0)t = lim_tto 0 (E(e^tX))' = lim_tto 0 (frace^t4t-frace^t4t^2+frac3e^3t4t-frace^3t4t^2+frac12t^2) = 1.25$$
Direct calculations aren't very efficient, but you can do it like this.
$$frace^t-12t+frace^t(e^2t-1)4t = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty fract^nn! sum_n=0^infty frac(2t)^n(n+1)!) = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty t^n sum_k=0^n frac2^k(n-k)!(k+1)!) $$
$$sum_k=0^nfrac2^k(n-k)!(k+1)! = frac1(n+1)!sum_k=0^nbinomn+1k+12^k = frac12(n+1)!(3^n+1-1) $$
So the series becomes
$$sum_n=0^infty t^nfrac14(n+1)!(3^n+1+1)$$
$$E(X^n) = frac14(n+1)(3^n+1+1) $$
$$ E(X)=frac18(3^2+1) = 1.25,,E(X^2) = frac112(3^3+1) = frac73 $$
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
For the first question, see my comment.
For your second question, mgf is correct, notice that your calculation only works for $tneq 0$, for $t=0$ we have $E(e^tX) = E(1) = 1$. This will always be the case, mgf equals to $1$ for $t=0$. You can also see this by taking limit as $tto 0$ from your function.
$$lim_tto 0 (frace^t-12t+frace^t(e^2t-1)4t) = 1/2+1/2 = 1 $$
$$lim_tto 0 fracE(e^tX)-E(e^0)t = lim_tto 0 (E(e^tX))' = lim_tto 0 (frace^t4t-frace^t4t^2+frac3e^3t4t-frace^3t4t^2+frac12t^2) = 1.25$$
Direct calculations aren't very efficient, but you can do it like this.
$$frace^t-12t+frace^t(e^2t-1)4t = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty fract^nn! sum_n=0^infty frac(2t)^n(n+1)!) = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty t^n sum_k=0^n frac2^k(n-k)!(k+1)!) $$
$$sum_k=0^nfrac2^k(n-k)!(k+1)! = frac1(n+1)!sum_k=0^nbinomn+1k+12^k = frac12(n+1)!(3^n+1-1) $$
So the series becomes
$$sum_n=0^infty t^nfrac14(n+1)!(3^n+1+1)$$
$$E(X^n) = frac14(n+1)(3^n+1+1) $$
$$ E(X)=frac18(3^2+1) = 1.25,,E(X^2) = frac112(3^3+1) = frac73 $$
For the first question, see my comment.
For your second question, mgf is correct, notice that your calculation only works for $tneq 0$, for $t=0$ we have $E(e^tX) = E(1) = 1$. This will always be the case, mgf equals to $1$ for $t=0$. You can also see this by taking limit as $tto 0$ from your function.
$$lim_tto 0 (frace^t-12t+frace^t(e^2t-1)4t) = 1/2+1/2 = 1 $$
$$lim_tto 0 fracE(e^tX)-E(e^0)t = lim_tto 0 (E(e^tX))' = lim_tto 0 (frace^t4t-frace^t4t^2+frac3e^3t4t-frace^3t4t^2+frac12t^2) = 1.25$$
Direct calculations aren't very efficient, but you can do it like this.
$$frace^t-12t+frace^t(e^2t-1)4t = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty fract^nn! sum_n=0^infty frac(2t)^n(n+1)!) = frac12(sum_n=0^infty fract^n(n+1)! +sum_n=0^infty t^n sum_k=0^n frac2^k(n-k)!(k+1)!) $$
$$sum_k=0^nfrac2^k(n-k)!(k+1)! = frac1(n+1)!sum_k=0^nbinomn+1k+12^k = frac12(n+1)!(3^n+1-1) $$
So the series becomes
$$sum_n=0^infty t^nfrac14(n+1)!(3^n+1+1)$$
$$E(X^n) = frac14(n+1)(3^n+1+1) $$
$$ E(X)=frac18(3^2+1) = 1.25,,E(X^2) = frac112(3^3+1) = frac73 $$
edited Jul 28 at 13:14
answered Jul 28 at 11:34
Rumpelstiltskin
1,378315
1,378315
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
add a comment |Â
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
I see, but I was referring to obtaining $E(X)$ and $E(X^2)$from the mgf. If I take the first derivative of the mgf, I get terms with t alone in the denominator (eg frace^t4t and frac12t^2), which would not be defined on substituting t=0.
â Denson
Jul 28 at 12:08
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
@Denson function is defined even for $t=0$, you just never calculated the derivative at $0$.
â Rumpelstiltskin
Jul 28 at 13:07
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
Adam I was not familiar with this. Thanks very much
â Denson
Jul 28 at 14:41
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
could I just clarify the first derivative above- using L'Hopital's rule for the first four terms, we get 1/4 - 1/8 +9/4 - 9/8 = 1.25. But I wasn't clear about the last term ($1/2t^2$)- does this term tend to infinity as t approaches zero?
â Denson
Jul 28 at 15:28
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
@Denson yes, $1/(2t^2)$ approaches infinity as $tto 0$
â Rumpelstiltskin
Jul 28 at 18:16
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865165%2fobtaining-expected-value-for-moment-generating-function%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
For your first question, $E(X^2) = frac73$. The method is correct, just the results are different. It's possible to have $t$ in denominator, but I didn't check your second result
â Rumpelstiltskin
Jul 28 at 11:03
Hi Adam, just realized that I had a basic mistake with the $E(X^2)$ - thanks for pointing it out. But am still stuck with the mgf, would appreciate any thoughts on that. (I have seen examples with t in the denominator but it is always of the form such that the denominator does not equal 0 when 0 is substituted (eg (2-t))
â Denson
Jul 28 at 11:24