Difference between revisions of "Documentation/How Tos/Calc: FREQUENCY function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE:FREQUENCY function}}
|bookid=1234'''
+
{{Documentation/CalcFunc ArraysTOC
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
+
|ShowPrevNext=block
|ShowParttitle=block
+
|parttitle=[[Documentation/How_Tos/Calc:_Array_functions|<div  style="font-size: 140%;">Arrays Functions]]
+
|ShowNextPage=block
+
|NextPage=Documentation/How_Tos/Calc:_GROWTH_function
+
 
|ShowPrevPage=block
 
|ShowPrevPage=block
 
|PrevPage= Documentation/How_Tos/Calc:_Array_functions
 
|PrevPage= Documentation/How_Tos/Calc:_Array_functions
|ShowPrevPart=block
+
|ShowNextPage=block
|PrevPart= Documentation/Reference/Calc_functions
+
|NextPage= Documentation/How_Tos/Calc:_GROWTH_function
|ShowNextPart=block
+
}}__NOTOC__
|NextPart= Documentation/How_Tos/Calc:_Complex_Number_functions
+
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
+
  
* [[Documentation/How_Tos/Calc:_FREQUENCY_function|<div style="font-size: 120%;
 
border-style: double; border-color:#778899;">Frequency</div>]]
 
* [[Documentation/How_Tos/Calc:_GROWTH_function|<div  style="font-size: 120%;">Growth]]
 
* [[Documentation/How_Tos/Calc:_LINEST_function|<div style="font-size: 120%;">Linest]]
 
* [[Documentation/How_Tos/Calc:_LOGEST_function|<div style="font-size: 120%;">Longest]]
 
* [[Documentation/How_Tos/Calc:_MDETERM_function|<div style="font-size: 120%;">Mdeterm]]
 
* [[Documentation/How_Tos/Calc:_MINVERSE_function|<div style="font-size: 120%;">Minverse]]
 
* [[Documentation/How_Tos/Calc:_MMULT_function|<div style="font-size: 120%;">Mmult]]
 
* [[Documentation/How_Tos/Calc:_MUNIT_function|<div style="font-size: 120%;">Munit]]
 
* [[Documentation/How_Tos/Calc:_SUMPRODUCT_function|<div style="font-size: 120%;">Sumproduct]]
 
* [[Documentation/How_Tos/Calc:_SUMX2MY2_function|<div style="font-size: 120%;">vSumx2my2]]
 
* [[Documentation/How_Tos/Calc:_SUMX2PY2_function|<div style="font-size: 120%;">Sumx2py2]]
 
* [[Documentation/How_Tos/Calc:_SUMXMY2_function|<div style="font-size: 120%;">Sumxmy2]]
 
* [[Documentation/How_Tos/Calc:_TRANSPOSE_function|<div style="font-size: 120%;">Transpose]]
 
* [[Documentation/How_Tos/Calc:_TREND_function|<div style="font-size: 120%;">Trend]]
 
}}
 
__TOC__
 
 
== FREQUENCY ==
 
== FREQUENCY ==
Returns an array, categorising values of a data set into given intervals.
+
Returns an array, categorizing values of a data set into given intervals.
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 42: Line 19:
 
: <tt>'''FREQUENCY'''</tt> returns a single column array, where the first element is the count of values in <tt>'''data'''</tt> that are less than or equal to the first value in <tt>'''bins'''</tt>, the second value is the count of values in <tt>'''data'''</tt> that are greater than the first value but less than or equal to the second value in <tt>'''bins'''</tt>, and so on. The array returned is one element longer than <tt>'''bins'''</tt>; the last element contains the count of values in <tt>'''data'''</tt> that are greater than the last value in <tt>'''bins'''</tt>.
 
: <tt>'''FREQUENCY'''</tt> returns a single column array, where the first element is the count of values in <tt>'''data'''</tt> that are less than or equal to the first value in <tt>'''bins'''</tt>, the second value is the count of values in <tt>'''data'''</tt> that are greater than the first value but less than or equal to the second value in <tt>'''bins'''</tt>, and so on. The array returned is one element longer than <tt>'''bins'''</tt>; the last element contains the count of values in <tt>'''data'''</tt> that are greater than the last value in <tt>'''bins'''</tt>.
  
: To return an array, <tt>'''FREQUENCY'''</tt> must be entered as an [[Documentation/How_Tos/Using_Arrays|array formula]] by pressing '''Cntrl-Shift-Enter''' instead of the '''Enter''' button (or by ticking the ''Array'' checkbox if you are using the Formula Wizard).
+
: To return an array, <tt>'''FREQUENCY'''</tt> must be entered as an [[Documentation/How_Tos/Using_Arrays|array formula]] by pressing {{key|Cntrl|Shift|Enter}} instead of the {{key|Enter}} button (or by ticking the ''Array'' checkbox if you are using the Formula Wizard).
  
 
=== Example: ===
 
=== Example: ===
[[Image:Calc_frequency_example.png|right]]
+
[[Image:Calc_frequency_example.png|center]]  
<tt>'''=FREQUENCY(A1:A11; B1:B5)'''</tt>
+
 
 +
: <tt>'''=FREQUENCY(A1:A11; B1:B5)'''</tt>
 
: when entered as an array formula, where the data values in A1:A11 are 12,8,24,11,5,20,16,9,7,16,33 and the values in B1:B5 are 5,10,15,20,25 returns {1|3|2|3|1|1}. The first value is the count of data values less than or equal to <tt>'''5'''</tt>, and the last value is the count of data values greater than <tt>'''25'''</tt>.
 
: when entered as an array formula, where the data values in A1:A11 are 12,8,24,11,5,20,16,9,7,16,33 and the values in B1:B5 are 5,10,15,20,25 returns {1|3|2|3|1|1}. The first value is the count of data values less than or equal to <tt>'''5'''</tt>, and the last value is the count of data values greater than <tt>'''25'''</tt>.
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
 +
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: GESTEP function|GESTEP]]
 
* [[Documentation/How_Tos/Calc: GESTEP function|GESTEP]]
 
* [[Documentation/How_Tos/Using Arrays|How To Use Arrays in Calc]]
 
* [[Documentation/How_Tos/Using Arrays|How To Use Arrays in Calc]]

Latest revision as of 12:27, 27 February 2024

FREQUENCY

Returns an array, categorizing values of a data set into given intervals.

Syntax:

FREQUENCY(data; bins)

data is a range or array containing numerical data.
bins is a single column range or array containing numbers in ascending order which are the upper limit of each category.
FREQUENCY returns a single column array, where the first element is the count of values in data that are less than or equal to the first value in bins, the second value is the count of values in data that are greater than the first value but less than or equal to the second value in bins, and so on. The array returned is one element longer than bins; the last element contains the count of values in data that are greater than the last value in bins.
To return an array, FREQUENCY must be entered as an array formula by pressing  Cntrl  +  ⇧ Shift  +  ↵ Enter  instead of the  ↵ Enter  button (or by ticking the Array checkbox if you are using the Formula Wizard).

Example:

Calc frequency example.png
=FREQUENCY(A1:A11; B1:B5)
when entered as an array formula, where the data values in A1:A11 are 12,8,24,11,5,20,16,9,7,16,33 and the values in B1:B5 are 5,10,15,20,25 returns {1|3|2|3|1|1}. The first value is the count of data values less than or equal to 5, and the last value is the count of data values greater than 25.




See Also
Views
Personal tools
Navigation
Tools