The Statistic template appears in the template list when a numeric field of type float32, float64, int8, int16, int32, int64, uint8, uint16, uint32, or uint6 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.
Statistic |
Select by comparing the source field value using the given Condition to other values in the table.
Condition options:
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 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 single Integers field of type int32. 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 Integers 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.
Records with an Integers field value of 10, the maximum value that occurs in that field in the table, are selected. In this table, there are three records that have the maximum value.
|
Statistic : minimum |
Select records with the minimum value in the table.
We start with a table with a single Integers field of type int32. 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 Integers 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.
Records with an Integers field value of 1, the minimum value that occurs in that field in the table, are selected. In this table, there is only one record that has the minimum value.
|
Statistic : median |
Select records with the median value in the table.
We start with a table with a single Integers field of type int32. 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 Integers 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.
Records with an Integers field value of 6, the median value that occurs in that field in the table, are selected.
We can see these values are indeed the median by Ctrl-clicking the column head for the Integers field to sort the table by that field.
The two median values do, indeed, fall in the middle of the table. In this table, there are two records that have the median value. Note that in tables with even numbers of records there might be some indeterminacy of what "median" means, for example, if in the above table the upper value of 6 was instead 5. What would be the "median" in that case? Manifold will pick the second record for a "median" of 6.
|
Statistic : top |
Select the specified number of records with the largest values.
We start with a table with a single Integers field of type int32. 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 Integers 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 5. For the Action, we use the default replace selection option.
Press Select.
The 5 records with the highest values in the table in their Integers fields are selected. Three of those records have the same value, 10, and two of those records have the same value, 8, with 10 and 8 being the highest values in the table. If five records had the highest value 10, those five would have been selected.
|
Statistic : bottom |
Select the specified number of records with the smallest values.
We start with a table with a single Integers field of type int32. 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 Integers 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.
The 5 records with the lowest values in the table in their Integers fields are selected. Three of those records have the same value, 1, and the other two of those records have unique values, 1, and 3. If five records had the lowest value 1, those five would have been selected.
|
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 single Integers field of type int32. 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 Integers 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 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. Three of the records are all the same value, 10, the maximum value in the table.
In the illustration above, we have twice Ctrl-clicked the column header for the Integers field, to sort the field from highest value to lowest value. That helps make clearer the distribution of values in the 14 records in the table.
With the Include bound box unchecked, the template selects the 3 records with top values, which in this case are all records with the maximum value of 10. Records with the value of 10 are in percentiles lower than the 25th percentile. Records with a value of 8 are not selected, because to get those we have to include the 25th percentile.
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, the records containing the 8 values are also selected. Five records are selected because the values in records are not evenly distributed in the 14 record population of the table.
If one of the two records that have a value of 8 instead had a value of 9, then when the Include bound box was checked a percent of 25 would select only four records, the three records with a value of 10 plus the one record with a value of 9. That is because 10 and 9 fall within the 25th percentile of the distribution of values in the table, but 8 does not if the table includes a value of 9.
|
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 single Integers field of type int32. 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 Integers 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 Integers field, to sort the field from highest value to lowest value. That helps make clearer the distribution of values in the 14 records in the table.
Only the record with a value of 1 in the Integers field is selected. That is because the only group of records that fall into less than the 25th percentile of least values is that single record. If the three records with a value of 2 were included, those would fall into the 25th percentile, for which we would have to check the Include bound box.
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, the three records containing the 2 values are also selected. Four records are selected because the values in records are not evenly distributed in the 14 record population of the table.
If the record that has a value of 3 instead also had a value of 2, then when the Include bound box was checked a percent of 25 would select five records, the record with a value of 1 as well as the four records with a value of 2.
If the record with a value of 4 instead had a value of 2, for a total of five records with a value of 2, then all five of those records would be selected in addition to the record with a value of 1. That is because records with a value of either 1 or 2 fall within the 25th percentile of records in the table, given the total number of records in the table and the other values in the table.
|