Difference between revisions of "Documentation/How Tos/Calc: MODE function"
From Apache OpenOffice Wiki
< Documentation | How Tos
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
m |
||
(9 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
− | __NOTOC__ | + | {{DISPLAYTITLE:MODE function}} |
+ | {{Documentation/CalcFunc StatisticalTOC | ||
+ | |ShowPrevNext=block | ||
+ | |PrevPage=Documentation/How_Tos/Calc:_MEDIAN_function | ||
+ | |NextPage=Documentation/How_Tos/Calc:_TRIMMEAN_function | ||
+ | }}__NOTOC__] | ||
== MODE == | == MODE == | ||
Line 12: | Line 17: | ||
− | : <i>Advanced topic:</i> <tt>'''MODE'''</tt> evaluates its parameters as | + | : <i>Advanced topic:</i> <tt>'''MODE'''</tt> evaluates its parameters as [[Documentation/How_Tos/Using_Arrays|array formulas]] - see the examples. |
+ | |||
=== Example: === | === Example: === | ||
Line 21: | Line 27: | ||
: returns <tt>'''3'''</tt>. The number <tt>'''9'''</tt> occurs the same number of times, but <tt>'''3'''</tt> is smaller. | : returns <tt>'''3'''</tt>. The number <tt>'''9'''</tt> occurs the same number of times, but <tt>'''3'''</tt> is smaller. | ||
+ | <tt>'''( -MODE(-A1:A10)=MODE(A1:A10) )'''</tt> | ||
+ | : returns <tt>'''TRUE'''</tt> if there is just one mode for the data in A1:A10, and <tt>'''FALSE'''</tt> otherwise. Notice the two minus signs. | ||
− | <i>Advanced topic:</i> Evaluation as an | + | |
+ | <i>Advanced topic:</i> Evaluation as an [[Documentation/How_Tos/Using_Arrays|array formula]]: | ||
<tt>'''MODE(ABS({1; 1; 1; 2; 2; -2; -2}))'''</tt> | <tt>'''MODE(ABS({1; 1; 1; 2; 2; -2; -2}))'''</tt> | ||
: returns <tt>'''2'''</tt>. The <tt>'''ABS'''</tt> function normally takes a single number, but here it is given an array. <tt>'''MODE'''</tt> forces the formula to be an array formula, so that the absolute value of each number in the array is found, and given to <tt>'''MODE'''</tt> as the array {1; 1; 1; 2; 2; 2; 2}. The most common value is now <tt>'''2'''</tt>. | : returns <tt>'''2'''</tt>. The <tt>'''ABS'''</tt> function normally takes a single number, but here it is given an array. <tt>'''MODE'''</tt> forces the formula to be an array formula, so that the absolute value of each number in the array is found, and given to <tt>'''MODE'''</tt> as the array {1; 1; 1; 2; 2; 2; 2}. The most common value is now <tt>'''2'''</tt>. | ||
− | {{ | + | |
− | * [[Documentation/How_Tos/Calc: AVERAGE function|AVERAGE]] | + | {{SeeAlso|EN| |
− | * [[Documentation/How_Tos/Calc: AVERAGEA function|AVERAGEA]] | + | * [[Documentation/How_Tos/Calc: AVERAGE function|AVERAGE]] |
+ | * [[Documentation/How_Tos/Calc: AVERAGEA function|AVERAGEA]] | ||
* [[Documentation/How_Tos/Calc: MEDIAN function|MEDIAN]] | * [[Documentation/How_Tos/Calc: MEDIAN function|MEDIAN]] | ||
Line 40: | Line 50: | ||
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
− | + | [[Category: Documentation/Reference/Calc/Statistical functions]] | |
− | + | ||
− | + |