The FREQUENCY function in Excel plays a crucial role in statistical analysis by summarizing data into a frequency distribution. It enables users to categorize a range of values and count how many fall within specified bins, making it an essential tool for data analysis and visualization.
Syntax
FREQUENCY(data_array, bins_array)
- data_array: This is the range of numbers for which you want to count the frequencies.
- bins_array: This specifies the intervals (or bins) into which the data will be grouped.
Example #1
=FREQUENCY(A2:A10, B2:B5)
In this case, the function will count how many values in the range A2:A10 fall within each interval defined in B2:B5. For instance, if A2:A10 contains scores ranging from 50 to 95, and B2:B5 defines bins like 60, 70, 80, and 90, the output would be an array indicating how many scores fall below 60, between 60 and 70, and so on.
Example #2
=FREQUENCY({10,20,30,30,40}, {15,25,35})
Here, the frequencies of the dataset {10,20,30,30,40} are evaluated against the bins {15,25,35}. The output would indicate that there is 1 number below 15, 2 numbers between 15 and 25, and 2 between 25 and 35, resulting in the array {1, 2, 2}.
Example #3
=FREQUENCY(D2:D15, E2:E5)
This function analyzes the range D2:D15, which could represent ages of individuals, against the predefined age bins in E2:E5. If the bins are 18, 30, 45, and 60, the output will show the number of individuals within each age range, helping to visualize demographic distributions.
Error handling
- NUM! – This error occurs if the size of the bins_array is greater than the data_array. Ensure that the bin range is appropriate for the data you are analyzing.
- VALUE! – This error indicates that either the data_array or bins_array contains non-numeric values. Verify that both arrays consist of numeric data.
- N/A – This may happen if the bins_array doesn’t contain any numbers that match the entries in the data_array. Adjust your bins accordingly.