*79*

**FrequenciesÂ **tell us how often different values occur in a dataset.

We can easily calculate frequencies in Google Sheets by using theÂ **FREQUENCY()** function, which has the following syntax:

**FREQUENCY(data, classes)**

where:

**data:**Array containing data values**classes:Â**Array containing a set of classes

The following examples show how to calculate frequencies and relative frequencies in Google Sheets.

**Calculating Frequencies in Google Sheets**

Suppose we have the following dataset with 15 values in Google Sheets:

To calculate the frequency of each individual value (e.g. count how many 12â€™s occur, how many 13â€™s occur, etc.) we need to first define the classes in column B. We can easily do this by typing the following formula in cell B2:

=SORT(UNIQUE(A2:A16))

This produces the following results:

Next, we can type the following formula into cell C2:

=FREQUENCY(A2:A16, B2:B7)

This produces the following results:

The way to interpret this output is as follows:

- The valueÂ
**12**occurs in the original dataset**2Â**times. - The valueÂ
**13**occurs in the original dataset**3****Â**times. - The valueÂ
**14**Â occurs in the original dataset**2Â**times. - The valueÂ
**15**occurs in the original dataset**4**times. - The valueÂ
**16**occurs in the original dataset**1**time. - The valueÂ
**17**Â occurs in the original dataset**3**times.

**Calculating Relative Frequencies in Google Sheets**

Once we have calculated the frequencies of each individual data value, we can then calculate the relative frequencies of each value by typing the following formula into cell D2:

=C2/COUNT($A$2:$A$16)

This formula calculates the relative frequency of the valueÂ **12Â **in the original dataset:

Once weâ€™ve calculated this relative frequency, we can hover the mouse over the bottom right corner of cell D2 until a small **+Â **appears. Double click theÂ **+Â **to copy the formula down to the remaining cells:

The way to interpret this output is as follows:

- The valueÂ
**12**accounts forÂ**0.133Â**(or 13.3%) of all values in the dataset. - The valueÂ
**13**accounts forÂ**0.200**(or 20.0%) of all values in the dataset.

And so on.

Youâ€™ll notice that the sum of all of the relative frequencies is equal toÂ **1** (or 100%).

**Visualizing Relative Frequencies in Google Sheets**

Lastly, we can visualize the relative frequencies by creating a histogram.

First, highlight the array of relative frequencies:

Next, click theÂ **InsertÂ **tab along the top ribbon, then clickÂ **Chart**. Google Sheets will automatically produce the following histogram of relative frequencies:

We can easily add x-axis labels by clicking the **X-axisÂ **input button within theÂ **Chart EditorÂ **and specifying cellsÂ **B2:B7Â **as the labels. This produces the following results:

This simple chart helps us quickly understand how often each individual value occurs in the original dataset.