Skip to content

Home / Statistical Tools / Analysis Tools / Scatterplot / Examples / GroupBy

GroupBy

Use GroupBy to create separate scatter plots for each group in your data, making it easy to compare relationships across shifts, departments, or locations.

Goal

Compare the temperature-yield relationship between Day and Night shifts to see whether the relationship differs by shift.

Sample Data

Download ScatterPlot_GroupBy.xlsx

Excel Protected View

When you open downloaded files, Excel displays a Protected View warning. You must click Enable Editing before you can use Quantum XL with the file.

Excel Protected View warning

Alternatively, you can copy the sample data from the table below and paste it directly into a new Excel workbook.

Temperature Yield Shift
150 77.2 Day
170 81.3 Day
190 85.7 Day
210 90.2 Day
230 94.8 Day
160 75.1 Night
180 80.4 Night
200 84.6 Night
220 89.3 Night
240 93.0 Night

Each row represents one observation with Temperature (X), Yield (Y), and the Shift when it was recorded. Day shift has 5 observations and Night shift has 5 observations.

Steps

  1. Launch the analysis

    From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Scatter Plot.

  2. Select your data

    Select cells A1:C11 (the header row plus all 10 data rows).

  3. Configure the analysis

    In the Scatter Plot dialog:

    • Select the GroupBy radio button (instead of Excel)
    • X Columns: "Temperature" should be checked
    • Y Columns: "Yield" should be checked
    • GroupBy: Move "Shift" to the GroupBy Order list

    Click Finish to generate the charts.

How GroupBy Works

When you add a GroupBy column, Quantum XL creates a separate scatter plot for every unique value in that column. In this example, the "Shift" column has two unique values — "Day" and "Night" — so we get two charts, each with its own regression line and statistics.

Result

Quantum XL creates two scatter plots, one for each shift:

Day Shift — Five observations showing the temperature-yield relationship for day operations. The regression line and R² indicate how well temperature predicts yield during the day.

Night Shift — Five observations showing the same relationship for night operations. Comparing R² values and regression slopes between shifts reveals whether the temperature-yield relationship differs by shift.