How to use the MULTINOMIAL function
What is the MULTINOMIAL function?
The MULTINOMIAL function calculates the ratio of the factorial of a sum of values to the product of factorials.
Table of Contents
1. Introduction
What is the sum of values?
Summarize is when you add numbers using addition and the result is the sum or total.
For example, lets use the numbers 2, 3 and 4.
2 + 3 + 4 = 9
The sum is 9.
What is the factorial of a sum of values?
The factorial of a number n is the product of all positive integers less than or equal to n, and is represented by n!
The factorial of a number n is defined as:
n! = n * (n-1) * (n-2) * ... * 3 * 2 * 1
In other words, the factorial of a number n is the product of all positive integers less than or equal to n.
Some examples:
1! = 1
2! = 2 * 1 = 2
3! = 3 * 2 * 1 = 6
4! = 4 * 3 * 2 * 1 = 24
5! = 5 * 4 * 3 * 2 * 1 = 120
0! = 1
The factorial function grows very quickly as n increases. Factorials are useful in combinatorics for counting permutations and combinations.
Using the example that returned the sum of 9, the factorial becomes 9!
9*8*7*6*5*4*3*2*1 = 362880
What is the product of values?
Multiplication is one of the basic arithmetic operations, along with addition, subtraction, and division. Multiplication involves taking two numbers, called factors or terms, and combining them to get a product.
It is denoted by the multiplication symbol * or x. For example: 5 * 3 = 15
What is the factorial of a product of values?
The factorial of a product is equal to the product of the individual factorials.
For example:
(2*3*4)! = 2! * 3! * 4! = 2 * 6 * 24= 288
What is the ratio of the factorial of a sum of values to the product of factorials?
multinomial coefficient = (a1 + a2 + ... + an)! / (a1! a2! ... an!)
Proceeding with the values above 2,3, and 4 we get
362880 / 288 equals 1260.
What is the ratio?
A ratio shows the relative size of two or more values. It is one number divided by another. A ratio compares two quantities using division.
Ratios can be written as fractions, with the numerator and denominator representing the values being compared. Use / in an Excel formula to perform a division and create a ratio.
What functions use the factorial in Excel?
Function | Description |
---|---|
MULTINOMIAL(n1, n2, ...) | Returns the ratio of the factorial of a sum of values to the product of factorials. |
FACT(number) | Returns the factorial of the provided number. |
FACTDOUBLE(number) | Returns the double factorial of the provided number. |
2. Syntax
MULTINOMIAL(number1, [number2], ...)
number1 | Required. The number for which you want to calculate the multinomial. |
[number2] | Optional. Up to 254 additional numbers. |
3. Example 1
Cells B3:D3 contains the following numbers 2, 3, and 4. The function in cell F3 calculates the multinomial to 1260.
Formula in cell D3:
Lets calculate the multinomial and verify the value in cell F3. The math formula is:
The text representation of the math formula is: multinomial coefficient = (a1 + a2 + ... + an)! / (a1! a2! ... an!)
=(2+3+4)! / (2!*3!*4!)
=9!/4*3*2*3*2*2
=362880/288
=1260
1260 matches the calculated value in cell F3.
The following Excel formula calculates the same thing as the MULTINOMIAL function:
The second group of values are 2, 4, and 5 in cell range B4:D4.
Formula in cell D4:
The calculated value is 6930, lets calculate this value manually.
=(2+4+5)!/(2!*4!*5!)
=11!/2*4*3*2*5*4*3*2
=39916800/5760
=6930
This value matches the calculated value in cell D4.
The third group of values are 2, 5, and 7 in cell range B5:D5.
Formula in cell D4:
The calculated value is 72072, lets calculate this value manually.
=(2+5+7)!/(2!*5!*7!)
=14!/2*5*4*3*2*7*6*5*4*3*2
=87178291200/1209600
=72072
This value matches the calculated value in cell D5.
4. Example 2
In a team of 10 people, in how many ways can you choose 3 people to be in the first group [A], 2 people to in the second group [B], and the remaining 5 people to be in the third group [C]?
The arguments are:
- Cell B3 - 3
- Cell C3 - 2
- Cell D3 - 5
Formula in cell F3:
The formula returns 2520 which represents the number of ways you can choose 3 people to be in the first group, 2 people in the second group, and 5 people in the third group.
Lets calculate this manually. multinomial coefficient = (a1 + a2 + ... + an)! / (a1! a2! ... an!)
=(3+2+5)!/(3!*2!*5!)
=3628800/1440
=2520
This value matches the value in cell F3.
5. Example 3
In how many ways can you arrange the letters in the word "ANTARCTICA"?
The count for each letter is: A = 3, N = 1, T = 2, R = 1, I = 1, C = 2
The arguments are populated in the following cells:
- Cell B3 - 3
- Cell C3 - 1
- Cell D3 - 2
- Cell B4 - 1
- Cell C4 - 1
- Cell D4 - 2
Formula in cell F3:
The formula returns 151200 which represents the number of ways you can arrange the letters in the word "ANTARCTICA".
Lets calculate this manually. multinomial coefficient = (a1 + a2 + ... + an)! / (a1! a2! ... an!)
=(3+1+2+1+1+2)!/(3!*2!*2!)
=3628800/24
=151200
This value matches the value in cell F3.
6. Example 4
A machine produces 20% defective items. What is the probability of getting exactly 3 defective items out of 10 items?
The arguments are populated in the following cells:
- Cell B3 - 3
- Cell C3 - 7
Formula in cell F3:
The formula returns 0.201326592 (20.1%) which represents the probability of getting exactly 3 defective items out of 10 items based on an 20% defective output.
Lets calculate this manually. multinomial coefficient = (a1 + a2 + ... + an)! / (a1! a2! ... an!)
=(3+7)!/(3!*7!)
=3628800/30240
=120
=120*0.2^3*0.8^7
=120*0.008*0.2097152
=0.201326592
This value matches the value in cell F3.
7. Example 5
In a lottery where you pick 6 numbers from 1 to 49, how many possible combinations are there?
The arguments are populated in the following cells:
- Cell B3 : 6
- Cell C3 : 49 - 6 = 43
Formula in cell F3:
The formula returns 13,983,816 which represents the number of possible combinations if you pick 6 numbers from 49 numbers (1 to 49).
Lets calculate this manually. multinomial coefficient = (a1 + a2 + ... + an)! / (a1! a2! ... an!)
=(6+43)!/(6!*43!)
=49!/(6!*43!)
=13,983,816
This value matches the value in cell F3.
8. The function not working
MULTINOMIAL returns
- #VALUE! error if the argument is non-numeric. Cell B3 contains "A" which is a non-numerical value. The MULTINOMIAL function in cell F3 returns #VALUE! error.
- #NUM! error if the argument is less than 0 (zero). Cell B4 contains -2 which is a number smaller than 0 (zero). The MULTINOMIAL function in cell F4 returns #NUM! error.
8.1 Troubleshooting the error value
When you encounter an error value in a cell a warning symbol appears, displayed in the image above. Press with mouse on it to see a pop-up menu that lets you get more information about the error.
- The first line describes the error if you press with left mouse button on it.
- The second line opens a pane that explains the error in greater detail.
- The third line takes you to the "Evaluate Formula" tool, a dialog box appears allowing you to examine the formula in greater detail.
- This line lets you ignore the error value meaning the warning icon disappears, however, the error is still in the cell.
- The fifth line lets you edit the formula in the Formula bar.
- The sixth line opens the Excel settings so you can adjust the Error Checking Options.
Here are a few of the most common Excel errors you may encounter.
#NULL error - This error occurs most often if you by mistake use a space character in a formula where it shouldn't be. Excel interprets a space character as an intersection operator. If the ranges don't intersect an #NULL error is returned. The #NULL! error occurs when a formula attempts to calculate the intersection of two ranges that do not actually intersect. This can happen when the wrong range operator is used in the formula, or when the intersection operator (represented by a space character) is used between two ranges that do not overlap. To fix this error double check that the ranges referenced in the formula that use the intersection operator actually have cells in common.
#SPILL error - The #SPILL! error occurs only in version Excel 365 and is caused by a dynamic array being to large, meaning there are cells below and/or to the right that are not empty. This prevents the dynamic array formula expanding into new empty cells.
#DIV/0 error - This error happens if you try to divide a number by 0 (zero) or a value that equates to zero which is not possible mathematically.
#VALUE error - The #VALUE error occurs when a formula has a value that is of the wrong data type. Such as text where a number is expected or when dates are evaluated as text.
#REF error - The #REF error happens when a cell reference is invalid. This can happen if a cell is deleted that is referenced by a formula.
#NAME error - The #NAME error happens if you misspelled a function or a named range.
#NUM error - The #NUM error shows up when you try to use invalid numeric values in formulas, like square root of a negative number.
#N/A error - The #N/A error happens when a value is not available for a formula or found in a given cell range, for example in the VLOOKUP or MATCH functions.
#GETTING_DATA error - The #GETTING_DATA error shows while external sources are loading, this can indicate a delay in fetching the data or that the external source is unavailable right now.
8.2 The formula returns an unexpected value
To understand why a formula returns an unexpected value we need to examine the calculations steps in detail. Luckily, Excel has a tool that Here is how to troubleshoot a formula:
- Select the cell containing the formula you want to examine in detail.
- Go to tab “Formulas” on the ribbon.
- Press with left mouse button on "Evaluate Formula" button. A dialog box appears.
The formula appears in a white field inside the dialog box. Underlined expressions are calculations being processed in the next step. The italicized expression is the most recent result. The buttons at the bottom of the dialog box allows you to evaluate the formula in smaller calculations which you control. - Press with left mouse button on the "Evaluate" button located at the bottom of the dialog box to process the underlined expression.
- Repeat pressing the "Evaluate" button until you have seen all calculations step by step. This allows you to examine the formula in greater detail and hopefully find the culprit.
- Press "Close" button to dismiss the dialog box.
There is also another way to debug formulas using the function key F9. F9 is especially useful if you have a hunch that a specific part of the formula is the issue, this makes it faster than the "Evaluate Formula" tool since you don't need to go through all calculations to find the issue..
- Enter Edit mode: Double-press with left mouse button on the cell or press F2 to enter Edit mode for the formula.
- Select part of the formula: Highlight the specific part of the formula you want to evaluate. You can select and evaluate any part of the formula that could work as a standalone formula.
- Press F9: This will calculate and display the result of just that selected portion.
- Evaluate step-by-step: You can select and evaluate different parts of the formula to see intermediate results.
- Check for errors: This allows you to pinpoint which part of a complex formula may be causing an error.
The image above shows cell reference B3:D3 converted to hard-coded value using the F9 key. The hard-coded value is a large number and the MULTINOMIAL function expects a number and not a text string. We have found what is wrong with the formula using the F9 key.
Tips!
- View actual values: Selecting a cell reference and pressing F9 will show the actual values in those cells.
- Exit safely: Press Esc to exit Edit mode without changing the formula. Don't press Enter, as that would replace the formula part with the calculated value.
- Full recalculation: Pressing F9 outside of Edit mode will recalculate all formulas in the workbook.
Remember to be careful not to accidentally overwrite parts of your formula when using F9. Always exit with Esc rather than Enter to preserve the original formula. However, if you make a mistake overwriting the formula it is not the end of the world. You can “undo” the action by pressing keyboard shortcut keys CTRL + z or pressing the “Undo” button
Other errors
Floating-point arithmetic may give inaccurate results in Excel - Article
Floating-point errors are usually very small, often beyond the 15th decimal place, and in most cases don't affect calculations significantly.
Functions in 'Math and trigonometry' category
The MULTINOMIAL function function is one of 62 functions in the 'Math and trigonometry' category.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form