--- title: "Adding descriptive statistics and error bars" slug: "adding-visuals-for-descriptive-statistics" tags: ["bar graph", "mean", "box and whiskers", "median", "boxplot"] updated: 2026-11-10T17:32:26Z published: 2026-11-10T17:32:26Z canonical: "userguide.dataclassroom.com/adding-visuals-for-descriptive-statistics" --- > ## Documentation Index > Fetch the complete documentation index at: https://userguide.dataclassroom.com/llms.txt > Use this file to discover all available pages before exploring further. # Adding descriptive statistics and error bars Once you have created a dot plot or a histogram, it is a simple task to add visuals to show descriptive statistics like **mean** and **median**, with or without **error bars.** In any dataset that has a **numeric Y axis** and a **categorical X axis**, the 'Descriptive stats' option will appear in the box to the right of your graph. Begin your selection by checking that box. ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/mean%2001.jpg) Grouping by a numeric X variableIf your X variable is numeric, but the values **fall into groups or categories**, you will also be offered the option to add the descriptive stats. See [Grouping by a numeric X variable](/v1/docs/adding-visuals-for-descriptive-statistics#grouping-by-a-numeric-x-variable) below for more detail. ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/mean1.png) Once you have checked the box, several options will appear. You will have the choice of showing mean, median or both. For **M****edian-based** statistics you will see a drop down menu for **box and whiskers** (aka **boxplot**) or the median line. For **M****ean-based** statistics you will see a drop down menu for the measure of uncertainty to display: **standard deviation**, standard error of the mean (**SEM**), SEM x 2, or the **95% confidence interval** (CI95). Also offered are Half Range (aka Semi Range) and Mean Deviation error bars. You may also choose to show both **Mean & Median** on your graph. You will have access to all choices for both categories Once you select your choices, you will see the visuals appear on your graph. ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/mean8.png) You also have the option to show the values on your graph or in the window just by checking the **Values** box. This will show a table of the numerical values for mean, median, 95% confidence interval, and so on. Highlighting outliers can also be done: in this case, the descriptive stats annotation is shown (boxplot or mean/error bars) and just the data points that a calculated to be outliers. See [the outliers article](/v1/docs/showing-outliers) for more detail. ## Mean as bar and other options There are other options for showing the mean. When the Y axis includes zero, a **bar with error bars / whiskers** is also an option: ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1792577427092.png) This is how you make a "bar graph of the mean" in DataClassroom. You can turn off the **Show dots** option with **Hide dots** if you want to. Look to the right of the graph to do that. Note, you can not make a mean bar graph ("bar graph of the mean") in DataClassroom without error bars! It is generally considered bad practice to represent means or medians without some representation of variance. To alter the type of mean representation (bar, line, or dot), this is set on the same screen, as the dropdown next to "Show Mean dot as..." ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/mean3.png) Under the **Appearance** menu, there are several other settings to tell your data story most effectively. Have a play! ## Grouping by a numeric X variable You can display descriptive statistics for groups of points when your **X variable is numeric**, as long as the values **fall into groups** rather like those of a categorical variable. This lets your graph have a proper numeric X axis. Sometimes these kinds of error bars are called **per datum error bars**. Note that the descriptive stats will in this case always be above the numeric location on the X axis (overlaid on the dots) so it can often be the case that you might want to use the "Hide dots" option, or reduce them in size. ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1709205014605.png) You can play with this [example dataset here](https://dataclassroom.com/en/dataseteditor/6172514d-b78e-472f-90a7-b02536a5220e). Usually if your data is suitable for grouping in this way the option will just appear, so you don't have to think too carefully about exactly when your data will be considered "grouped". **However, you'll need to have data which has:** - At least two different values, with at least two points with each - Few X values that are "loners" i.e. no others with same value ## Video tutorial Watch the tutorial below for more assistance adding descriptive statistics to your graphs. [Embedded content](https://www.youtube.com/embed/v7eOz9W51WE?&wmode=opaque&rel=0)