6.10.7 Q-Q Plot


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

The Q-Q plot is a graphic method that tests whether or not a dataset follows a given distribution. The Q-Q plot has independent values on the X axis, and dependent values on the Y axis. If all the plotted points are close to the reference line, then we conclude that the dataset follows the given distribution.

Q-Q Plot 07.png

Minimum Origin Version Required: Origin 2016 SR0

What You Will Learn

  • How to create a Q-Q plot
  • How to mask a suspected outlier in the source data and recalculate the Q-Q plot

Create a Q-Q Plot

You can refer to this graph in Learning Center. (Select Help: Learning Center menu or press F11 key , and then open Graph Sample: Statistical Graphs)

  1. Click the Button Import Single ASCII.png button to import the Q-Q plot.dat file under <Origin EXE folder>\Samples\Graphing\ path.
  2. In the QQplot workbook, activate the Q-Q plot worksheet, highlight column B, right click, and from the context menu, select Plot > Statistical: Q-Q Plot.... In the Plotting:plot_prob dialog, make sure that the Score Method drop-down is set to Benard. Click OK.
    Q-Q Plot 01.png
  3. Double-click on the Lower Percentiles line to open the Plot Details dialog. Go to the Line tab, set Color to Red, Transparency to 80%, then check Fill Area Under Curve check box and select Fill to next data plot - One Color in the below drop-down list.
    Q-Q Plot 03.png

  4. Go to Pattern tab, set Fill Color to Red. And make sure the Follow line transparency is checked.
    Q-Q Plot 04.png

  5. Go to the Line tab of Upper Percentiles line set Color to Red, Transparency to 80%. Click OK to apply the setting and close the dialog.
    Q-Q Plot 05.png

    Your graph should look as shown below.

    Q-Q Plot 02.png

Mask a Suspected Outlier

  1. Click on the green lock icon to make sure the Recalculate Mode is Auto.
    Q-Q Plot 08.png
  2. Click on the Data Reader tool and click to select the suspected data point in the Q-Q Plot.
    Q-Q Plot 09.png

    Q-Q Plot 10.png

    The Data Info window shows the value of the outlier point.
  3. Activate the Q-Q plot worksheet and highlight column B.

    Q-Q Plot 06.png
  4. From the Menu Bar, click on Window:Command Window and at the prompt, enter the script shown below.
    colmask cond:=eq val:=x;

    The outlier point will be shown in red in the Q-Q plot worksheet, and it will not be included in the graph.
    Q-Q Plot 11.png

    Q-Q Plot 07.png