# Median

### From ObjectVision

(Difference between revisions)

Line 5: | Line 5: | ||

== '''syntax''' == | == '''syntax''' == | ||

- | * use the [[rth_element]] function with r = 0.5 to get the median of a set of [[attribute]] values | + | * use the [[rth_element]] function with r = 0.5 to get the median of a set of [[attribute]] values. '''Note: there is no function called median in GeoDMS.''' |

* Median(''a'', ''b'', ''c)'' is rewritten such that the middle value of ''a'', ''b'', and ''c'' is derived for each element. This can be used to bind a to a given range of allowed values. | * Median(''a'', ''b'', ''c)'' is rewritten such that the middle value of ''a'', ''b'', and ''c'' is derived for each element. This can be used to bind a to a given range of allowed values. | ||

## Current revision as of 09:31, 24 June 2020

*Aggregation functions median*

## **definition**

The median of a set of numeric values is the value **separating the higher half of an attribute from the lower half.**

## **syntax**

- use the rth_element function with r = 0.5 to get the median of a set of attribute values.
**Note: there is no function called median in GeoDMS.** - Median(
*a*,*b*,*c)*is rewritten such that the middle value of*a*,*b*, and*c*is derived for each element. This can be used to bind a to a given range of allowed values.

## **conditions median(a, b, c)**

- the domain of arguments
*a*,*b*, and*c*must match or be void. - the values unit of arguments
*a*,*b*, and*c*must match. -
*b*is known to be not larger than*c*.