# Need help evaluating this sum for expected-value prob. calc.

#### DesignEx

##### New member
This sum is for an 'Expected Value' probability calculation...

I tried writing a C++ program to help evaluate it, but because the factorials & exponents get so large the standard libraries cannot handle it nor any calculator I have. So I was hoping to get some advice on here. What would you recommend doing in order to solve this problem?

(I am in the process of getting MATLAB, never used it, and if there is no simpler solution I was planning on learning to use it to perhaps help solve it.)

Thanks.

#### galactus

##### Super Moderator
Staff member
Re: Need help evaluating this sum

I ran this through Maple and it gave me the answer, albeit huge. It has 1814 digits. $$\displaystyle 3.77\times{10^{1817}}$$

#### DesignEx

##### New member
Re: Need help evaluating this sum

Thanks, I believe there were one too many (1/365) terms on each sum, I ended up breaking it into bite-size chunks that a compiler could deal with and got a result. Thanks a lot though for letting me know the original obviously had a problem.

#### daon

##### Senior Member
Heres a way I use to calculate some counting problems:

$$\displaystyle Ln(\frac{n!}{k!}) = \sum _{i=k+1}^nLn(i)$$

Then apply e to both sides. It may not always be useable though, but it can help.