The algebraic equation satisfied by the Probability Generating Function of L\ ife in a Casion where the stakes given by the Probability distribution, [[2, 1/10], [1, 1/10], [0, 1/10], [-1, 1/5], [-2, 1/2]] By Shalosh B. Ekhad Theorem: Let a(n) be probability that you exit after EXACTLY n rounds in a \ casino where in each turn The probability that you win, 2, dollars is, 1/10 The probability that you win, 1, dollars is, 1/10 The probability that you neither win nor lose is, 1/10 The probability that you lose, 1, dollars is, 1/5 The probability that you lose, 2, dollars is, 1/2 Let X(t) be the ordinary generating function of that sequence, in other word\ s infinity ----- \ n X(t) = ) a(n) t / ----- n = 0 X(t) satisifies the algebraic equation 3 6 3 2 5 3 2 4 1/1000 t X(t) + (1/250 t - 1/100 t ) X(t) + (1/100 t - 1/25 t ) X(t) / 71 3 2 \ 3 /61 3 23 2 \ 2 + |---- t - 3/100 t + 1/5 t| X(t) + |--- t - -- t + 3/10 t| X(t) \1000 / \500 25 / 3 2 / 477 3 43 2 \ 63 t 57 t 7 t + |-1 + ---- t - -- t + 9/5 t| X(t) + ----- - ----- + --- = 0 \ 1000 50 / 200 50 10 and in Maple notation 1/1000*t^3*X(t)^6+(1/250*t^3-1/100*t^2)*X(t)^5+(1/100*t^3-1/25*t^2)*X(t)^4+(71/ 1000*t^3-3/100*t^2+1/5*t)*X(t)^3+(61/500*t^3-23/25*t^2+3/10*t)*X(t)^2+(-1+477/ 1000*t^3-43/50*t^2+9/5*t)*X(t)+63/200*t^3-57/50*t^2+7/10*t = 0 Or more usefully (for computing many terms) 3 6 3 2 5 X(t) = 1/1000 t X(t) + (1/250 t - 1/100 t ) X(t) 3 2 4 / 71 3 2 \ 3 + (1/100 t - 1/25 t ) X(t) + |---- t - 3/100 t + 1/5 t| X(t) \1000 / 3 /61 3 23 2 \ 2 /477 3 43 2 \ 63 t + |--- t - -- t + 3/10 t| X(t) + |---- t - -- t + 9/5 t| X(t) + ----- \500 25 / \1000 50 / 200 2 57 t 7 t - ----- + --- 50 10 and in Maple notation X(t) = 1/1000*t^3*X(t)^6+(1/250*t^3-1/100*t^2)*X(t)^5+(1/100*t^3-1/25*t^2)*X(t) ^4+(71/1000*t^3-3/100*t^2+1/5*t)*X(t)^3+(61/500*t^3-23/25*t^2+3/10*t)*X(t)^2+( 477/1000*t^3-43/50*t^2+9/5*t)*X(t)+63/200*t^3-57/50*t^2+7/10*t The probability that you got broke before, 1000, rounds is, 1.000000000 assuming that this is the case The Conditional expected number of rounds in the casino, until being in th\ e red is, 1.817279933 The Conditonal standard-deviation of life in the casino is, 1.901530941 The condintioanl scaled, 3, moment is, 4.443585189 The condintioanl scaled, 4, moment is, 34.67914368 This took, 49.010, seconds.