Statistics: Spreadsheets: the frequency() function

The tutor shares a nice function that seems to work the same in Excel or LibreOffice Calc.

The frequency() function tells, from an array of values and another of categories, the frequency in each category. A potential use is to make a histogram.

Example: Organize the following values into categories:

49,55,81,63,99,48,77,37,86,93,88,97,73,78,65,67,71,60,90,55

Solution:

  1. Enter the values into a range: let’s imagine you use b1:b20
  2. Decide the categories you want. In this case, six might make sense: 0-49, 50-59, 60-69, 70-79, 80-89, 90-100
  3. To the frequency() function, a category is an upper limit. Your category array, perhaps entered in range c1:c6, could be as follows:

    49 59 69 79 89 >90

  4. With the values entered in b1:b20, and the categories entered in c1:c6, you might select the range e1:e6.
  5. Type =frequency(b1:b20,c1:c6) but don’t press Enter!
  6. frequency() is an array function; you must press Ctrl+Shift+Enter.
  7. Hopefully you receive, in e1:e6, the array 3 2 4 4 3 4

Btw: In LibreOffice Calc, the frequency() function is under ARRAY functions. In Excel, it’s a Statistical function (under More Functions).

HTH:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply