Statistical Analysis of the Number of Donors a Beggar Needs Before He (or She) can go home By Shalosh B. Ekhad In a certain country there are only, 2, types of coins, of denominations, 1, 2 A person passing a beggar throws A coin of, 1, cents , with probability, p A coin of, 2, cents , with probability, 1 - p Each person's donation is independent of the others. The beggar decides to go home as soon as the amount in his hat exceeds n cen\ ts. Let X(n) be the random variable "Number of donors until he goes home". Since the expected size of a single donation is 2 - p n The expectation of X(n) is roughly, ----- 2 - p More precisely, up to exponentially small error, the Expectation of X(n) is -1 + p n - --------- - ------ 2 -2 + p (-2 + p) and in Maple notation it is -(-1+p)/(-2+p)^2-1/(-2+p)*n The variance of X(n), up to exponentially small error is 2 (-1 + p) (p + p - 1) p (-1 + p) n --------------------- + ------------ 4 3 (-2 + p) (-2 + p) and in Maple notation it is (-1+p)*(p^2+p-1)/(-2+p)^4+p*(-1+p)/(-2+p)^3*n The , 3, -th moment about the mean of of X(n), up to exponentially small error is 2 2 2 p (-1 + p) (p + 7 p - 7) p (-1 + p) (p + 2 p - 2) n - -------------------------- - --------------------------- 6 5 (-2 + p) (-2 + p) and in Maple notation it is -p^2*(-1+p)*(p^2+7*p-7)/(-2+p)^6-p*(-1+p)*(p^2+2*p-2)/(-2+p)^5*n The limit of the scaled , 3, -th moment as n goes to infinity is 0 The , 4, -th moment about the mean of of X(n), up to exponentially small error is 6 5 4 3 2 (-1 + p) (p + 26 p + 12 p - 75 p + 35 p + 3 p - 1) ------------------------------------------------------- 8 (-2 + p) 4 3 2 2 2 2 p (-1 + p) (p + 16 p - 6 p - 20 p + 10) n 3 p (-1 + p) n + -------------------------------------------- + ----------------- 7 6 (-2 + p) (-2 + p) and in Maple notation it is (-1+p)*(p^6+26*p^5+12*p^4-75*p^3+35*p^2+3*p-1)/(-2+p)^8+p*(-1+p)*(p^4+16*p^3-6* p^2-20*p+10)/(-2+p)^7*n+3*p^2*(-1+p)^2/(-2+p)^6*n^2 The limit of the scaled , 4, -th moment as n goes to infinity is 3 The , 5, -th moment about the mean of of X(n), up to exponentially small error is 2 6 5 4 3 2 p (-1 + p) (p + 69 p + 307 p - 558 p - 206 p + 582 p - 194) - ----------------------------------------------------------------- 10 (-2 + p) 6 5 4 3 2 p (-1 + p) (p + 50 p + 122 p - 316 p + 88 p + 84 p - 28) n - --------------------------------------------------------------- 9 (-2 + p) 2 2 2 2 10 p (p + 2 p - 2) (-1 + p) n - --------------------------------- 8 (-2 + p) and in Maple notation it is -p^2*(-1+p)*(p^6+69*p^5+307*p^4-558*p^3-206*p^2+582*p-194)/(-2+p)^10-p*(-1+p)*( p^6+50*p^5+122*p^4-316*p^3+88*p^2+84*p-28)/(-2+p)^9*n-10*p^2*(p^2+2*p-2)*(-1+p) ^2/(-2+p)^8*n^2 The limit of the scaled , 5, -th moment as n goes to infinity is 0 The , 6, -th moment about the mean of of X(n), up to exponentially small error is 10 9 8 7 6 5 4 (-1 + p) (p + 160 p + 1995 p + 40 p - 9920 p + 9151 p + 1495 p 3 2 / 12 - 3890 p + 965 p + 5 p - 1) / (-2 + p) + p (-1 + p) / 8 7 6 5 4 3 2 (p + 124 p + 1127 p - 978 p - 3230 p + 4208 p - 978 p - 364 p + 91) 2 4 3 2 2 2 / 11 5 p (5 p + 47 p - 18 p - 58 p + 29) (-1 + p) n n / (-2 + p) + ---------------------------------------------------- / 10 (-2 + p) 3 3 3 15 p (-1 + p) n + ------------------ 9 (-2 + p) and in Maple notation it is (-1+p)*(p^10+160*p^9+1995*p^8+40*p^7-9920*p^6+9151*p^5+1495*p^4-3890*p^3+965*p^ 2+5*p-1)/(-2+p)^12+p*(-1+p)*(p^8+124*p^7+1127*p^6-978*p^5-3230*p^4+4208*p^3-978 *p^2-364*p+91)/(-2+p)^11*n+5*p^2*(5*p^4+47*p^3-18*p^2-58*p+29)*(-1+p)^2/(-2+p)^ 10*n^2+15*p^3*(-1+p)^3/(-2+p)^9*n^3 The limit of the scaled , 6, -th moment as n goes to infinity is 15 The , 7, -th moment about the mean of of X(n), up to exponentially small error is 2 10 9 8 7 6 5 - p (-1 + p) (p + 347 p + 9252 p + 28473 p - 88225 p - 32862 p 4 3 2 / 14 + 199058 p - 131946 p - 3621 p + 24405 p - 4881) / (-2 + p) - p / 10 9 8 7 6 5 (-1 + p) (p + 278 p + 5981 p + 10276 p - 49830 p + 19480 p 4 3 2 / 13 2 + 49614 p - 46472 p + 9593 p + 1350 p - 270) n / (-2 + p) - 7 p / 6 5 4 3 2 2 2 / (8 p + 195 p + 336 p - 938 p + 159 p + 372 p - 124) (-1 + p) n / / 3 2 3 3 12 105 p (p + 2 p - 2) (-1 + p) n (-2 + p) - ---------------------------------- 11 (-2 + p) and in Maple notation it is -p^2*(-1+p)*(p^10+347*p^9+9252*p^8+28473*p^7-88225*p^6-32862*p^5+199058*p^4-\ 131946*p^3-3621*p^2+24405*p-4881)/(-2+p)^14-p*(-1+p)*(p^10+278*p^9+5981*p^8+ 10276*p^7-49830*p^6+19480*p^5+49614*p^4-46472*p^3+9593*p^2+1350*p-270)/(-2+p)^ 13*n-7*p^2*(8*p^6+195*p^5+336*p^4-938*p^3+159*p^2+372*p-124)*(-1+p)^2/(-2+p)^12 *n^2-105*p^3*(p^2+2*p-2)*(-1+p)^3/(-2+p)^11*n^3 The limit of the scaled , 7, -th moment as n goes to infinity is 0 The , 8, -th moment about the mean of of X(n), up to exponentially small error is 14 13 12 11 10 9 (-1 + p) (p + 726 p + 36478 p + 294544 p - 193534 p - 1954804 p 8 7 6 5 4 3 + 2698108 p + 777177 p - 3185829 p + 1725841 p - 76667 p - 146437 p 2 / 16 12 11 + 24391 p + 7 p - 1) / (-2 + p) + p (-1 + p) (p + 592 p / 10 9 8 7 6 5 + 25296 p + 155040 p - 245242 p - 682504 p + 1418312 p - 458992 p 4 3 2 / 15 2 - 581582 p + 455200 p - 82020 p - 4920 p + 820) n / (-2 + p) + 7 p / 8 7 6 5 4 3 2 (17 p + 862 p + 5158 p - 5148 p - 13954 p + 17868 p - 2680 p 2 2 / 14 - 2808 p + 702) (-1 + p) n / (-2 + p) / 3 4 3 2 3 3 70 p (7 p + 52 p - 18 p - 68 p + 34) (-1 + p) n + ----------------------------------------------------- 13 (-2 + p) 4 4 4 105 p (-1 + p) n + ------------------- 12 (-2 + p) and in Maple notation it is (-1+p)*(p^14+726*p^13+36478*p^12+294544*p^11-193534*p^10-1954804*p^9+2698108*p^ 8+777177*p^7-3185829*p^6+1725841*p^5-76667*p^4-146437*p^3+24391*p^2+7*p-1)/(-2+ p)^16+p*(-1+p)*(p^12+592*p^11+25296*p^10+155040*p^9-245242*p^8-682504*p^7+ 1418312*p^6-458992*p^5-581582*p^4+455200*p^3-82020*p^2-4920*p+820)/(-2+p)^15*n+ 7*p^2*(17*p^8+862*p^7+5158*p^6-5148*p^5-13954*p^4+17868*p^3-2680*p^2-2808*p+702 )*(-1+p)^2/(-2+p)^14*n^2+70*p^3*(7*p^4+52*p^3-18*p^2-68*p+34)*(-1+p)^3/(-2+p)^ 13*n^3+105*p^4*(-1+p)^4/(-2+p)^12*n^4 The limit of the scaled , 8, -th moment as n goes to infinity is 105 The , 9, -th moment about the mean of of X(n), up to exponentially small error is 2 14 13 12 11 10 - p (-1 + p) (p + 1489 p + 131049 p + 2068808 p + 4165028 p 9 8 7 6 5 - 22726998 p - 3973382 p + 74893240 p - 70970914 p - 9301782 p 4 3 2 / + 44248302 p - 20899060 p + 1631812 p + 854476 p - 122068) / / 18 14 13 12 11 (-2 + p) - p (-1 + p) (p + 1226 p + 94708 p + 1244692 p 10 9 8 7 6 + 1153220 p - 12331100 p + 7332936 p + 22586712 p - 32374266 p 5 4 3 2 + 10124596 p + 5633756 p - 4132760 p + 651544 p + 17192 p - 2456) n / 17 2 10 9 8 7 6 / (-2 + p) - 6 p (41 p + 3859 p + 50810 p + 54530 p - 343815 p / 5 4 3 2 2 + 123544 p + 372752 p - 328280 p + 48920 p + 22100 p - 4420) (-1 + p) 2 / 16 3 n / (-2 + p) - 14 p / 6 5 4 3 2 3 (137 p + 2370 p + 3414 p - 9932 p + 876 p + 4908 p - 1636) (-1 + p) 4 2 4 4 3 / 15 1260 p (p + 2 p - 2) (-1 + p) n n / (-2 + p) - ----------------------------------- / 14 (-2 + p) and in Maple notation it is -p^2*(-1+p)*(p^14+1489*p^13+131049*p^12+2068808*p^11+4165028*p^10-22726998*p^9-\ 3973382*p^8+74893240*p^7-70970914*p^6-9301782*p^5+44248302*p^4-20899060*p^3+ 1631812*p^2+854476*p-122068)/(-2+p)^18-p*(-1+p)*(p^14+1226*p^13+94708*p^12+ 1244692*p^11+1153220*p^10-12331100*p^9+7332936*p^8+22586712*p^7-32374266*p^6+ 10124596*p^5+5633756*p^4-4132760*p^3+651544*p^2+17192*p-2456)/(-2+p)^17*n-6*p^2 *(41*p^10+3859*p^9+50810*p^8+54530*p^7-343815*p^6+123544*p^5+372752*p^4-328280* p^3+48920*p^2+22100*p-4420)*(-1+p)^2/(-2+p)^16*n^2-14*p^3*(137*p^6+2370*p^5+ 3414*p^4-9932*p^3+876*p^2+4908*p-1636)*(-1+p)^3/(-2+p)^15*n^3-1260*p^4*(p^2+2*p -2)*(-1+p)^4/(-2+p)^14*n^4 The limit of the scaled , 9, -th moment as n goes to infinity is 0 The , 10, -th moment about the mean of of X(n), up to exponentially small error is 18 17 16 15 14 (-1 + p) (p + 3020 p + 444309 p + 12089164 p + 68998705 p 13 12 11 10 - 109146918 p - 556876768 p + 1104142352 p + 326133297 p 9 8 7 6 5 - 2190394659 p + 1681631189 p + 5260380 p - 554642384 p + 238494466 p 4 3 2 / 20 - 21863766 p - 4882708 p + 610313 p + 9 p - 1) / (-2 + p) + p / 16 15 14 13 12 (-1 + p) (p + 2500 p + 329541 p + 7819610 p + 33832835 p 11 10 9 8 - 90691020 p - 190647062 p + 591280612 p - 236947263 p 7 6 5 4 3 - 542665856 p + 637138114 p - 194939196 p - 45143872 p + 35624288 p 2 / 19 2 12 - 4941564 p - 59048 p + 7381) n / (-2 + p) + 3 p (167 p / 11 10 9 8 7 + 27255 p + 662498 p + 2812416 p - 5412055 p - 11310992 p 6 5 4 3 2 + 24652914 p - 6083840 p - 12919912 p + 9116210 p - 1312204 p 2 2 / 18 3 8 7 - 278748 p + 46458) (-1 + p) n / (-2 + p) + 105 p (65 p + 2152 p / 6 5 4 3 2 + 10142 p - 10796 p - 27172 p + 33736 p - 2332 p - 7640 p + 1910) 3 3 / 17 (-1 + p) n / (-2 + p) / 4 4 3 2 4 4 4725 p (2 p + 13 p - 4 p - 18 p + 9) (-1 + p) n + ----------------------------------------------------- 16 (-2 + p) 5 5 5 945 p (-1 + p) n + ------------------- 15 (-2 + p) and in Maple notation it is (-1+p)*(p^18+3020*p^17+444309*p^16+12089164*p^15+68998705*p^14-109146918*p^13-\ 556876768*p^12+1104142352*p^11+326133297*p^10-2190394659*p^9+1681631189*p^8+ 5260380*p^7-554642384*p^6+238494466*p^5-21863766*p^4-4882708*p^3+610313*p^2+9*p -1)/(-2+p)^20+p*(-1+p)*(p^16+2500*p^15+329541*p^14+7819610*p^13+33832835*p^12-\ 90691020*p^11-190647062*p^10+591280612*p^9-236947263*p^8-542665856*p^7+ 637138114*p^6-194939196*p^5-45143872*p^4+35624288*p^3-4941564*p^2-59048*p+7381) /(-2+p)^19*n+3*p^2*(167*p^12+27255*p^11+662498*p^10+2812416*p^9-5412055*p^8-\ 11310992*p^7+24652914*p^6-6083840*p^5-12919912*p^4+9116210*p^3-1312204*p^2-\ 278748*p+46458)*(-1+p)^2/(-2+p)^18*n^2+105*p^3*(65*p^8+2152*p^7+10142*p^6-10796 *p^5-27172*p^4+33736*p^3-2332*p^2-7640*p+1910)*(-1+p)^3/(-2+p)^17*n^3+4725*p^4* (2*p^4+13*p^3-4*p^2-18*p+9)*(-1+p)^4/(-2+p)^16*n^4+945*p^5*(-1+p)^5/(-2+p)^15*n ^5 The limit of the scaled , 10, -th moment as n goes to infinity is 945 ----------------------- This ends this article that took, 0.284, seconds to produce.