XL4: Histogram and FREQUENCY Results Different for Same Data

Last reviewed: February 2, 1998
Article ID: Q105429
The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0 and 4.0a
  • Microsoft Excel for the Macintosh, version 4.0

SYMPTOMS

The Histogram tool in the Analysis ToolPak add-in macro and the FREQUENCY() function in Microsoft Excel 4.0 return different values for the same data set.

STATUS

This is a known problem in Microsoft Excel 4.0. The problem was corrected in Microsoft Excel 5.0 for Windows and Microsoft Excel 5.0 for the Macintosh.

MORE INFORMATION

The FREQUENCY() function returns one element more than the number of intervals listed in the bins_array argument while the Histogram tool returns the same number of elements as the number of intervals in the bins_array argument.

The FREQUENCY() function counts all values below the first bin value and all values above the last bin value. The Histogram tool does not count any values lower than the first bin value, but it does count all values above the highest bin value. The HISTOGRAM() macro function is the macro equivalent of the Histogram tool and will return the same information as the Histogram tool.

Example

Given the following data in Input Range (A1:A11)

    A1:  1
    A2:  2
    A3:  5
    A4:  8
    A5: 11
    A6: 12
    A7: 19
    A8: 21
    A9: 32
   A10: 45
   A11: 48

and the following Bin Values (B1:B4)

   B1: 10
   B2: 20
   B3: 30
   B4: 40

the result of the FREQUENCY() formula, =FREQUENCY(A1:A10,B1:B4), is 4,3,1,1,2. The result of the Histogram tool is 3,1,1,2.

Note that the FREQUENCY() function returns five values while the Histogram tool returns four values. The difference in results occurs because the FREQUENCY() function counts the values 1, 2, 5, and 8 for the first value that is returned, while the Histogram tool does not count the numbers BELOW the first bin value, but does count the numbers ABOVE the largest bin value.


Additional query words: 4.00 4.00a XL4 cumulative distribution
Version : WINDOWS:4.0,4.0a; MACINTOSH:4.0
Platform : MACINTOSH WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.