if $X$ is a random variable with a geometric distribution how can I calculate $$ E(e^X) $$ I have no idea on how to do that.
-
1$\begingroup$ Have you tried applying a definition of expectation? It works nicely in this case. $\endgroup$– whuber ♦May 10, 2021 at 15:30
-
$\begingroup$ Is this a question from a course or textbook? If so, please add the self-study tag & read its wiki. $\endgroup$– Stephan KolassaMay 10, 2021 at 15:33
-
$\begingroup$ @StephanKolassa Yes I have to find that for a course I follow, I didnt know the self-study tag, thank you, I'll add it. $\endgroup$– JacK'o'LanternMay 10, 2021 at 15:36
-
1$\begingroup$ @whuber I have tried but I dont know how to deal with the exponential. I am stuck at $E[e^X]=\sum_i^n e^i P(X=i)$, I dont know how to continue. $\endgroup$– JacK'o'LanternMay 10, 2021 at 15:38
-
2$\begingroup$ @JacK'o'Lantern What is $P(X = i)$ for a given i, when you know $X$ follows a geometric distribution? After you get that, what do you know about geometric series that can help you simplify the sum? Moreover, you want to check the range of your summation, it should cover the support of a geometric random variable. $\endgroup$– B.LiuMay 10, 2021 at 15:44
2 Answers
Building on the answer by @Stephan and comment by user whuber. First, there is two versions of the geometric distribution; for now I use the one with support $0,1,2, \ldots$ which has moment generating function (mgf) given by $$ \DeclareMathOperator{\E}{\mathbb{E}} M_X(t)= \E e^{t X} =\frac{p}{1-(1-p)e^t} $$ which is valid for $ t < -\ln(1-p)$. That gives an expression for the expectation of $e^X$ by setting $t=1$: $$ \E e^X = M_X(1)=\frac{p}{1-(1-p)e^1} $$ but only for values of $p$ satisfying the restriction $1 < -\ln(1-p)$, that is $p > 1- e^{-1}$, when the probability is too small the waiting time for first success becomes to long and the expectation of its exponential becomes infinite. This is easy to see from calculating the expectation directly: $$ \E e^X =\sum_0^\infty e^k \cdot (1-p)^k p = p\sum_0^\infty [ e(1-p) ]^k $$ and when the bracketed expression becomes 1 or larger the sum is infinite.
The moment-generating function of any random variable $X$ is defined as
$$ M(t) := E(e^{tX}).$$
So you can simply take the MGF of whatever geometric distribution you are referring to from its Wikipedia page and evaluate it at $t=1$.
-
1$\begingroup$ Sort of: the problem is that for many geometric distributions, $M$ is not defined. It would be more useful to explain how to find $M$ and to show why it is not always defined, as well as to state what that implies for the answer to this question. $\endgroup$– whuber ♦May 10, 2021 at 15:31
-
1$\begingroup$ @whuber: you are, of course, right, and your approach is better, as almost always. To be honest, this does smell suspiciously like self-study... $\endgroup$ May 10, 2021 at 15:33
-
$\begingroup$ I didn't even know what a moment-generating function is, but I'll take a look, thank you! $\endgroup$ May 10, 2021 at 15:40