The usage and examples of the frequency function of excel

Table of contents

1. Grammar and usage

(1) Syntax: frequency(data_array, bins_array)

(2) Usage: It is used to count the frequency of the specified grouping interval, and returns the frequency distribution of a set of data in a split vertical array.

2. Examples

(1) Count the number of people in each language grade segment by group.

(2) Count the number of women in each language achievement segment by group.

3. The difference with the countif function


1. Grammar and usage

(1) Syntax: frequency(data_array, bins_array)

Parameter Description:

data_array: An array or set of arrays of statistical data sources.

bins_array: An array of bins that group the data source. It is necessary to segment points, such as [60,80] that is 60,80 nodes.

(2) Usage: It is used to count the frequency of the specified grouping interval, and returns the frequency distribution of a set of data in a split vertical array.


2. Examples

(1) Count the number of people in each language grade segment by group.

 Enter "=FREQUENCY($F$2:$F$7,B11:B13)", and must press shift+ctrl+enter to pull down the formula. Because the grouping statistics of the frequency function does not include small, but includes large, for example, to obtain [90,100], the segment point needs to be less than 90, and if the segment points are 90 and 100, the value range is (90,100].

(2) Count the number of women in each language achievement segment by group.

Enter "=FREQUENCY(IF($C$2:$C$7="Female",$F$2:$F$7,""),B10:B13)" and must press shift+ctrl+enter to pull down the formula.

Note : ① The area needs a demarcation point, and each node includes the big and does not include the small.

②You cannot manually enter "{}", otherwise the text will be displayed directly as shown in the figure below.


3. The difference with the countif function

①The frequency function can directly use a formula to pull down to sum the number of groups.

②countif must write its own formula for each group.

The formula for the number of [90,100] is: "=COUNTIF(F2:F7,">=90")", as shown in the figure below.

 The formula for the number of [80,90) is: "=COUNTIF(F2:F7,"<90")-COUNTIF(F2:F7,"<80")", as shown in the figure below.

 The formula for the number of [60,80) is "=COUNTIF(F1:F7,"<80")-COUNTIF(F1:F7,"<60")", as shown in the figure below.

The formula for the number below 60 is "=COUNTIF(F1:F7,"<60")", as shown in the figure below.


reference article

 The specific function of the countif function can refer to: https://so.csdn.net/so/search?q=countif&t=blog&u=weixin_50853979

Guess you like

Origin blog.csdn.net/weixin_50853979/article/details/127721234