# Calculate the total product of all combinations given a variable n and r?

• Jan 28th 2009, 09:29 AM
RhysGM
Calculate the total product of all combinations given a variable n and r?
To calculate the number of combinations by hand without using the formula;

n!
--------
r! (n-r)!

you can use this method below where n is the number of rows and r is the number of columns;

1 2 3 4 5 6

1
2 1
3 3 1
4 6 4 1
5 10 10 5 1
6 15 20 15 6 1

We'll call the rows or n selections and the columns or r folds. Lets also imagine these selections are football games. And that associated with each selection are odds of a particular team winning. We going to assume the odds are all the same, we're picking the favourties and these are 1/3. We also need a stake of 50 pence which is per combination so for 4 selections and 3 folds thats £2 and for 6 selections and 3 folds thats £10.

Using the method above how do I work out my returns for each selection and fold? Doing it this way should also reveal what the return would be if 5 out of 6 win or 4 out of the 6 win. I know it is possible to work it out this way but I can't figure out how.

The only way I know how to do it is to write out each combination and work out the return for each individual bet. This becomes a problem when you're dealing with 10 plus selections. 15 selections on 10 folds equal 3003 combinations.

I eventually want to put this into excel to build a Betting Calculator.

Any ideas?
Rhys