Select - Numeric Vectors: Statistic

The Statistic template appears in the template list when a numeric vector field, that is a field with an ordered set of multiple numbers, of x2 (two numbers), x3 (three numbers), or x4 (four numbers), numeric vector type has been picked in the Select pane.    The template selects records based on how large or small their values are relative to other values in the table.

 

Numeric vector order is computed based on the first component being the most significant, followed by the second component in the event of a tie in the first component, followed by the third component, and so on.

 

Statistic

Select by comparing the source field value using the given Condition to other values in the table.

 

Condition options:

 

  • maximum - selects records with the maximum value,
  • minimum - selects records with the minimum value,
  • median - selects records with the median value,
  • top - selects the specified number of records with the largest values,
  • bottom - selects the specified number of records with the smallest values,
  • top percent - selects records with values larger than the specified percentile, with an option to include or exclude the bounding percentage.
  • bottom percent - selects records with  values smaller than the specified percentile, with an option to include or exclude the bounding percentage.

 

If we would like to select records that are logical NOT variations of the above, for example not maximum, select on the basis of one of the above and press Ctrl-I or Edit - Select Inverse to invert the selection.   Selecting using maximum and then pressing Ctrl-I is the equivalent of "not maximum".

 

Launch the template by choosing a numeric vector field in the Select pane and then double-clicking the Statistic template.  When the template launches we can specify options.

 

 

Statistic : maximum

Select records with the maximum value in the table.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose maximum as the Condition option.   For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.   Note how the first component is most significant for sort order, followed by the second component, and then the third.

 

The records with a value of [ 118, 5, 95 ] is selected as the maximum over the record with a value of [ 118, 5, 17 ], because although the first two components are the same in both records, the value of 95 in the third component is greater than the value of 17.

 

Statistic : minimum

Select records with the minimum value in the table.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose minimum as the Condition option.   For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.   Note how the first component is most significant for sort order, followed by the second component, and then the third.

 

The records with a value of [ -111, -55, 49 ] is selected as the minimum over the record with a value of [ -111, 44, 99 ], because although the first components are the same in both records, the value of -55 in the second component is lower than the value of 44.

 

Statistic : median

Select records with the median value in the table.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose median as the Condition option.   For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.   Note how the first component is most significant for sort order, followed by the second component, and then the third.

 

The records with a value of [ 18, -62, -15 ] is selected as the median because it falls in the middle of the distribution of records in the table, the distribution being determined on the basis of the first component, since there are no ties for the first or second components for values near the center of the distribution of values.  

 

Statistic : top

Select the specified number of records with the largest values.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.  

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose top as the Condition option.   For the Records number, we enter 3.  For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.   Note how the first component is most significant for sort order, followed by the second component, and then the third.

 

The 3 records with the highest values in the table in their x3 int8 vector fields are selected, using as sort order the first component as most significant, then the second component, and so on.  

 

Statistic : bottom

Select the specified number of records with the smallest values.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.  

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose bottom as the Condition option.   For the Records number, we enter 5.  For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.   Note how the first component is most significant for sort order, followed by the second component, and then the third.

 

The 5 records with the lowest values in the table in their x3 int8 vector fields are selected, using as sort order the first component as most significant, then the second component, and so on.  

 

Statistic : top percent

Select records with values larger than the specified percentile, with an option to include or exclude the bounding percentage.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose top percent as the Condition option.   For the Percent number, we enter 25.  

 

We uncheck the Include bound box.

 

For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.

 

In this table, there are 14 records, so 25 percent of those records would be 3.5 records if the values within the records were evenly distributed.   However, the values are not evenly distributed.   

 

With the Include bound box unchecked, the template selects the 3 records with top values

 

We can see how the selection would be different with the Include bound box checked.

 

 

We check the Include bound box.   Press Select.

 

 

This time, an additional record is selected, since it falls within the 25th percentile that is the bound.

 

See additional discussion and examples for Statistic: top percent and Statistic: bottom percent in the Select - Numbers: Statistic topic.

 

 

Statistic : bottom percent

Select records with  values smaller than the specified percentile, with an option to include or exclude the bounding percentage.

 

We start with a table with a field called x3 int8 vector of type int8x3.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Select pane we choose the x3 int8 vector field and then we double-click the Statistic template to launch it.

 

 

In the Statistic template we choose bottom percent as the Condition option.   For the Percent number, we enter 25.  

 

We uncheck the Include bound box.

 

For the Action, we use the default replace selection option.

 

Press Select.  

 

 

In the illustration above we have twice Ctrl-clicked the column header for the x3 int8 vector field to sort that field with larger records above.

 

With the Include bound box unchecked, the template selects the three records with the least values

 

We can see how the selection would be different with the Include bound box checked.

 

 

We check the Include bound box.   Press Select.

 

 

This time, an additional record is selected, since it falls within the 25th percentile that is the bound.

 

See additional discussion and examples for Statistic: top percent and Statistic: bottom percent in the Select - Numbers: Statistic topic.

 

 

Notes

Numeric vector types - Numeric vectors are fields that have ordered sets of multiple numbers, of x2 type float32x2, float64x2, int8x2, int16x2, int32x2, int64x2uint8x2, uint16x2, uint32x2, uint6x2, of x3 type float32x3, float64x3, int8x3, int16x3, int32x3, int64x3uint8x3, uint16x3, uint32x3, uint6x3, or of x4 type float32x4, float64x4, int8x4, int16x4, int32x4, int64x4uint8x4, uint16x4, uint32x4, uint6x4.

 

See Also

Select - Numeric Vectors

 

Select - Numeric Vectors: Expression

 

Select - Numeric Vectors: Null

 

Select - Numeric Vectors: Search

 

Select - Numeric Vectors: Unique

 

Select Reference

 

Select - Expression