Minitab Cookbook
上QQ阅读APP看书,第一时间看更新

Calculator – basic functions

The e-calculator tool is analogous to formulas in Excel. In Minitab, we will run calculations on the columns one at a time. Using the weather data from the Oxford station, we will create a new column for the hours of sunlight in a month divided bythe amount of rainfall (in millimeters) for that month.

Calculator – basic functions

Getting ready

We will be using data from Oxford weather station; it can be obtained from http://www.metoffice.gov.uk/climate/uk/stationdata/. Select Oxford weather station data and copy the data into Minitab. Only copy the data and not the column headers. Then, rename the columns as Year, Month, T Max, T Min, Airfrost(days), Rain(mm), and Sun(Hrs).

Note

Inspect the data that we copy to ensure that the columns have the right data type. The column header C1-T will indicate text, C1-D will indicate data, and C1 without the hyphen is a numeric column.

Also, note that a few of the values in the data will be recorded as missing; this is where text values are supplied next to the number. A cleaned worksheet is provided in the Oxford weather (cleaned).mtw file.

How to do it…

The following instructions will create a new column for the hours of sunlight to amount of rainfall in a month ratio:

  1. Go to the Calc menu and click on Calculator.
  2. In the dialog box, enter a name for the new column into the Store result in Variable section. We will name it as 'Sun(Hrs)/Rain(mm)'.
  3. Select the section labeled Expression, and then double-click on Sun (Hours) to move it across, enter /, and then move the Rain(mm) column over.
  4. Tick the box labeled Assign as formula and click on OK.
    How to do it…

How it works…

The results of this function are generated in the selected column. The checkbox Assign as a formula will create a formula in the worksheet that will keep updating it. By default, this is not selected to avoid problems with circular or self-referencing formulas. When a formula is stored in a column, a green cross is placed at the top of the column to indicate the presence of a formula. The green cross indicates that this is up-to-date, while a red cross would indicate a problem in updating the formula.

How it works…

There's more…

The calculator in Minitab has a plethora of functions available. We can choose from the function list on the right in the calculator screen. These include several statistical, mathematical, and text functions. They can be filtered with the drop-down list at the top. The help function for the calculator includes a list of functions and how to use them.

See also

  • The Calculator – using an if statement recipe
  • The Cleaning up a text column with the calculator recipe