How many ways can (0,1,-1) sum to numbers (15 through to 30)

53 Views Asked by At

I am currently trying to solve a statistics problem involving random guessing in multiple choice tests and the probability of passing said test. In order to work out the probability of passing i need to calculate the number of ways that the numbers -1, 0 and 1 can sum together, only 30 times, and equal the numbers 15 through to 30.

I was wondering if anyone knew of any formulas or programs that could give me the result of this problem.

1

There are 1 best solutions below

0
On BEST ANSWER

For example, to score $15$ you can have $15 \ 1$'s and the rest $0$'s, $16\ 1$'s, $13\ 0$'s and one $-1$, or ... $22\ 1$'s, one $0$, and $7\ -1$'s. You are looking for the multinomial coefficient. To take the case of $19\ 1$'s, $7\ 0$'s and $4\ -1$'s there are ${30 \choose 19}{11 \choose 4}={30 \choose 19,7,4}=\frac {30!}{19!7!4!}=18027009000$ possibilities because you can first choose the $19$ questions to get $1$ out of the $30$, then choose $4$ of the remaining $11$ to be $-1$. Now you need to sum over the numbers of $1$ and $0$ answers. If we let $i$ be the number of $1$ answers and $j$ be the number of $-1$ answers we need $30 \ge i \ge 15, 30-i \ge j, i-15 \ge j$ and the result is $$\sum_{1=15}^{30}\sum_{j=0}^{\min(30-i,i-15)}{30 \choose i,j,30-i-j}=\sum_{1=15}^{30}\sum_{j=0}^{\min(30-i,i-15)}\frac{30!}{i!j!(30-i-j)!}$$ You can automate this in a spreadsheet using fixed and relative addressing, then copy right and down.