Winsorized mean and variance

This macro calculates the Winsorized mean and variance. Subcommands let you specify the amount of Winsorizing (by default c = 0.2) and to store the results.

Download the Macro

Be sure that Minitab knows where to find your downloaded macro. Choose File > Options > General. Under Macro location browse to the location where you save macro files.

Important

If you use an older web browser, when you click the Download button, the file may open in Quicktime, which shares the .mac file extension with Minitab macros. To save the macro, right-click the Download button and choose Save target as.

Required Inputs

  • A column of numeric data

Optional Inputs

STORE C C
Use two specify two storage columns for the results.
C K
Use to specify an amount of Winsorizing (K) other than the default of 0.2.

Running the Macro

Suppose your data are in C1 and you would like to remove and replace the upper and lower 10% of the data and store the mean in C2 and the variance in C3.To run the macro, choose View > Command Line/History and type:

%WINSOR C1;
C 0.1;
STORE C2 C3.

Click Run.