1.10 Statistics


Origin provides many tools for statistical analysis. Advanced statistical tools are available in OriginPro. In this lesson, we will work with tools available in standard Origin.

Descriptive Statistics

  1. Start with the project saved from the previous lesson, create a new folder in Project Explorer and rename it as Statistics. Open the empty folder.
  2. Create a new workbook and import the file <Origin EXE Path>\Samples\Statistics\body.dat.
  3. Drag and select the first 5 rows of column D(Height). Basic statistics (average, sum, count) for your selected data will be displayed in the status bar at the bottom right side of the interface.

    You can right-click on the statistics listed in the status bar to customize what quantities to display there.

    GST Statistics 01.png

  4. From the menu, select Statistics: Descriptive Statistics: Statistics on Columns. In the dialog, select the Input tab, then expand Range 1. Click on the interactive button Button Select Data Interactive.png to the right of Data Range. Return to the worksheet, then drag and select columns D and E. Click the interactive button again to restore the dialog.
  5. In the Group control, click the triangle button Context menu button.jpg and select B(Y): age. Click the button again and select C(Y): gender. In the list, select ..."gender" in the Group box, then use the Move Up button Move up button.png to move it to the top.
  6. Click OK to generate the report.
    GST Statistics 02.png
  7. Click the downward-pointing triangle buttonDownward triangle button.png on the right of the Descriptive Statistics node in the report sheet and select Digits... from the context menu.
  8. In the opened dialog, change Digits to Set Decimal Places= and set Decimal Number as 1. Click OK to update the display format in all tables of the report.
  9. The numeric display in all report sheets can be globally set using the Digits in Report control on the Numeric Format tab of the Options dialog accessible from the Preference: Options main menu.

Normality Test

  1. Create a new workbook by clicking the New Workbook button Button New Workbook.png.
  2. Double-click in the F(x) label row of column A. This will put you into edit mode for that cell. Type the formula:
    nint(100+20*normal(100))
    The column will be filled with random integer numbers centered around 100.
  3. Highlight column A and click Statistics: Descriptive Statistics: Normality Test to open the dialog. The selected column is set as Input Data automatically. Accept default settings and click OK. This will generate the report sheet for Normality Test. The footnote under the Shapiro-Wilk table indicates that this data is normally distributed, as expected.
    GST Statistics 03.png

Frequency Counts

  1. Activate Sheet1 of the workbook from the previous section. Keep column A highlighted, then click Statistics: Descriptive Statistics: Frequency Counts.
  2. Accept all default settings in the dialog and press OK.
  3. In the result sheet, highlight the column C(Y) . On the 2D Graphs toolbar, click the triangle button next to the Column button Button Column.png, then choose Column + Label Button Column Label.png to create a column graph with labels. This will create a histogram plot with counts as labels.
    GST Statistics 04.png
  4. The Plot: Statistics menu provides multiple histogram plot options when a worksheet is active. This Frequency Counts tool provides an alternate way to first perform counting, and then plot a histogram from the results. This allows for more flexibility and customization such as adding labels to the columns.

One Way ANOVA

  1. Create a new workbook and then click on the Import Single ASCII button Button Import Single ASCII.png. Browse to <Origin EXE Path>\Samples\Statistics folder. Change the drop-down list next to the File Name to Text File (*.txt).
    GST Statistics 05.png
  2. Select the file nitrogen.txt
  3. Select the menu Statistics: ANOVA: One Way ANOVA to open the One Way ANOVA dialog. In the Input tab, set Input Data to Indexed. Press the triangle button to the right of Factor and select A(X): plant. Press the triangle button to the right of Data and select B(Y): nitrogen.
  4. The ANOVA dialog box provides two options for input mode: Indexed or Raw. You can refer to the FAQ-333: What is indexed versus raw data and how to I transform from one to another? to learn more about how data can be arranged for either mode.

  5. In the Means Comparison tab of the dialog, select the Tukey check box. Then switch to the Plots tab and select Means Comparison Plot. Click OK to close the dialog and generate the report.
  6. Go to the report sheet ANOVA1Way1. From the result, we can draw following conclusions:
    • The ANOVA table (Overall ANOVA) reports a p-value that is smaller than 0.05, hence at least two of the four groups have significantly different means.
      GST Statistics 06.png
    • Double-click on the Means Comparison Plot to open it. The red plots indicate significantly different mean values. PLANT4 has the smallest mean and is significantly different from the other three groups.
      GST Statistics 07.png
    • Save your project file.