# Error with numerical summation - how to specify "n choose r"?

I'm trying to do the following sum:

NSum[((50000 - x) choose x)*(1/3^15)^x*((3^15 - x)/3^15)^(50000 - x), {x, 1, 4}]


But I keep getting an error saying:

"Summand (or its derivative) ((50000-x)\ choose\ x)\ (1/3^15)^x\ \((3^15-x)/3^15)^(50000-x) is not numerical at point x = 1."


Does anyone know what might be wrong?

Thanks

• what's choose? Dec 7, 2014 at 7:10
• @Verbeia Isn't n choose r C(n, r)?
– Kar
Dec 7, 2014 at 7:13
• Not in Mathematica syntax, it isn't. I think you need Binomial. Dec 7, 2014 at 7:14

You are most likely hitting this problem because choose is not defined to be a numerical quantity. NSum requires a summation where each part evaluates to something numerical, not algebraic. Deleting the choose gives a result:

In:= NSum[((50000 - x)  x)*(1/3^15)^
x*((3^15 - x)/3^15)^(50000 - x), {x, 1, 4}]

Out= 0.0034724


EDIT

Based on the additional information you have provided, you might be looking for Binomial.

NSum[Binomial[(50000 - x) , x]*(1/3^15)^x*((3^15 - x)/3^15)^(50000 - x), {x, 1, 4}]

(* 0.00347843 *)