Learn
Mode in R
Introduction

In this lesson, you will learn how to find the mode of a dataset. Each of the next three exercises will cover the following:

• Manually finding the mode of a dataset
• Using R’s functions to find the mode
• Comparing mode to mean and median values

In the lesson, we will use a dataset of the 100 greatest novels, determined by a French literary magazine, Le Monde. From the dataset, you will use the mode to answer the question:

What is the most common age for a great author to publish their best work?

If you are not familiar with mean, also known as average, or median, we recommend that you learn about it in our lessons on average and median.

Instructions

The histogram to the right displays the age of authors, at publication, for the top 100 novels from Le Monde’s survey. The red line is the mean age, and the blue line is the median age.

Use the definition of mode below and the histogram to the right to guess where the mode falls. You will calculate the correct answer in the last exercise.

The mode is the most common observation in a dataset.

You will not be able to find the exact mode, because the histogram displays bins with a range of values. However, you can guess a range of values where you are most likely to see the mode.