Skip to content

HOW TO MAKE A BOXPLOT IN EXCEL, R-STUDIO, MINITAB, AND SPSS?

    Since we have already studied Grouped Data, we can construct one of the most commonly used graphs in descriptive statistics, the Box and Whisker Plot.

    What is a Box and Whisker Plot?

    The box and whisker plot is a graphical representation of a set of grouped data in a frequency table, consisting of a body, which is the box, and extensions called whiskers. It can only be applied to data of quantitative variables. For its construction, the box and whisker plot uses position measures such as the first quartile (Q1), the second quartile (Q2) (which is equal to the median), the third quartile (Q3), and also the extreme values of the data set.

    Is this a Box and Whisker Plot?
    ¿Is this a Box and Whisker Plot?

    Why is a Box and Whisker Plot important?

    Grafica-de-caja-y-bigote-en-Minitab

    A Box and Whisker Plot allows us to compare a variable across different data sets. This enables us to distinguish and infer details about their dispersion, position, and symmetry.

    Another aspect, no less important, is that it serves as a complement to the analysis of a Frequency Histogram and allows us to analyze the outliers of the data.

    Problem 1: How to Make a Box and Whisker Plot in Excel?

    For this example of a Box and Whisker Plot in Excel, we will use the following data. It represents the cost of consultations at Clinic A in one day for 43 patients.


    Clinic A: $240 $240 $240 $240 $240 $240 $240 $240 $255 $255 $265 $265 $280 $280 $290 $300 $305 $325 $310 $320 $330 $350 $350 $350 $360 $370 $390 $400 $450 $340 $330 $200 $200 $210 $245 $250 $280 $285 $290 $300

    For creating the Box and Whisker Plot, we use Microsoft 365 Excel.

    1. The first thing we need to do is copy the data into a new Excel spreadsheet.
    2. Then, we select the data and click on “Insert” and choose “Box and Whisker” chart.
    3. Next, we format the lines dividing the diagram and their labels.
    4. Finally, we include the axis names and the title of the Box and Whisker Plot.
    5. Combine, choose the layout, and the color you prefer.

    This would be the result of the Box and Whisker Plot with the data of consultation costs at Clinic A, as an example.

    Box and Whisker Plot

    As we can see, the average cost of the consultation is $293, which does not coincide with the median or the 50% of the data, which is $280, causing asymmetry in the distribution of costs. 75% of the consultation costs are equal to or less than $330.

    We recommend the following video, where you can find more information about the Box and Whisker Plot in Excel.

    Problem 2: Example of How to Make a Box and Whisker Plot in RStudio

    In this example, we will use RStudio to create a Box and Whisker Plot. We will present a video that shows step-by-step the complete construction of the Box and Whisker Plot.

    We use the functions plot() and boxplot() to create the Box and Whisker Plot, giving x as the argument, a factor vector, and y as the argument, a numeric vector, to create the statistical analysis graph. To download the program, we provide the link from the official RStudio website.

    Problem 3: Making a Box and Whisker Plot in Minitab

    We will use the data of consultation costs at Clinic A.


    Clinic A: $240 $240 $240 $240 $240 $240 $240 $240 $255 $255 $265 $265 $280 $280 $290 $300 $305 $325 $310 $320 $330 $350 $350 $350 $360 $370 $390 $400 $450 $340 $330 $200 $200 $210 $245 $250 $280 $285 $290 $300

    For the development of this problem, we will use Minitab 18 to create the Box and Whisker Plot.

    • The first thing we need to do is enter the data into a new Minitab worksheet.
    Datos en Minitab para el Diagrama de Caja y Bigotes
    • Then, we go to the top of Minitab in the Graphs tab.
    • Select Boxplots.
    • Then, we choose the Simple option.
    • Select the column of the Data, in our case Clinic A.
    • Finally, click on OK.
    • Combine, choose the layout, and the color you prefer.

    This would be the result of our Box and Whisker Plot in Minitab:

    Box and Whisker Plot in Minitab

    As we can see, the median or the 50% of the data is $280, causing asymmetry in the distribution of costs.

    For greater clarity on how to create a Box and Whisker Plot in Minitab, we recommend the following tutorial.

    Problem 4: How to Make a Boxplot in SPSS?

    For the development of this problem, we will use SPSS 24 to create the Frequency Histogram.

    • The first thing we need to do is transfer the data we had in the previous example in Minitab to an SPSS spreadsheet. We define the variables as numeric, so we set the type to Scale.
    Data in SPSS for the Box and Whisker Plot
    • We click on the Graphs tab and select Legacy Dialogs.
    • Select Boxplots and then Simple.
    • Next, we select the Variable we are going to use, in our case, the Cost of consultations at Clinic A.
    • Click OK.
    • Combine, choose the layout, and the color you prefer.

    This would be the result of our Box and Whisker Plot in SPSS:

    Box and Whisker Plot in SPSS

    For a more in-depth study on how to create a Box and Whisker Plot step by step in SPSS, we recommend the following tutorial.

    Referencias

    • Mario F. Triola., 2013. Statistics. 11th Edition. Pearson Education. Mexico.
    • For further illustration, visit “R for Beginners: Boxplot.
    Share this Page on: