Find the moment generating function and characteristic function of a geometric random variable X with parameter p. A geometric random variable with parameter p has probability mass function
IP(X=k) = (1 - p)k-1p, k = 1, 2, . . .
Use the moment generating function or characteristic function to calculate the mean, variance, and third moment of a geometric distribution.