Excel Statistical Functions

leonuk10

New Member
Joined
Sep 13, 2010
Messages
12
Hi all,

The answer I know is 312 x 311 x 310 x 309 x 308 = 2,862,766,146,240 = 2.86277E+12. The arguments are 312 and 5.

Using the notation myfunction(x,y) the result is (x)*(x-1)*(x-2)*(x-3)*(x-4)*..etc...*(x-(y+1))

Another example, myfunction(17,10) = 70572902400 (17x16x15x14x13x12x11x10x9x8).

What is myfunction? I'm looking for a excel formula I could use within a spreadsheet without the use of VBA.. I know I could write a solution using VB and creating my own formula, BUT is there already a built in function in Excel I could use, for speed?

My maths/stats knowledge is somewhat limited but I know it might have something to do with the factorial function =FACT(X)/(FACT(Y-X) or using the BINOMDIST somehow? Or is there another more suitable function?

The FACT(X) etc would work but usually I'd be using this using very large numbers so will often result in an overflow error!

Help!! Thanks in advance.
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
It would be

=FACT(A1)/FACT(A1-B1)

... but for the fact that you can only compute factorials up to 170. So, instead,

=PRODUCT(A1 - (ROW(INDIRECT("1:" & B1))-1))

... confirmed with Ctrl+Shift+Enter
 
Upvote 0
It would be

=FACT(A1)/FACT(A1-B1)

... but for the fact that you can only compute factorials up to 170. So, instead,

=PRODUCT(A1 - (ROW(INDIRECT("1:" & B1))-1))

... confirmed with Ctrl+Shift+Enter

Fantastic! Yes, I managed to get myself to =FACT(A1)/FACT(A1-B1) but, as mentioned, would not work for very large numbers. I do like the formula you used though, didn't occur to me to use array functions - it's not something I use often or familiar with. Quite scared in fact to use ctrl+shift+enter!

Many thanks for that, big help. Also encouraged me to learn more about array formulas as this is a weakness of mine!! Very interesting.;)
 
Upvote 0
You're welcome, glad it worked for you.
 
Upvote 0
Long shot, but don't ask you'll never learn...

What is the BINOMDIST function? I guess it stands for binomial distribution and is within this field of mathematics... but thats as far as my knowledge goes.

Think this is more of a maths question than an excel question though!
 
Upvote 0
On the original question - myfunction is actually just PERMUT - eg PERMUT(17,10) = 70572902400

(You are calculating permutations - the number of ways you can select 10 things from a pool of 17 where order matters).
 
Upvote 0
The binomial distribution is about things like flipping coins where the probability of success is independent for each trial.

So if you wanted the probability of exactly 1 head if you flipped a coin 3 times, you would use

BINOMDIST(1,3,0.5,FALSE) = 0.375
(There are 2x2x2=8 possible outcomes of three coin flips, 3 of them give exactly 1 head, so the probability is 3/8 = 0.375)
 
Upvote 0
myfunction is actually just PERMUT - eg PERMUT(17,10) = 70572902400
Argh; missed that. Nice recognition.
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,905
Members
449,478
Latest member
Davenil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top