median | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Returns the median (middle number) of a list of numbers. | ||||||
Introduced | 1.1 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Control Structure: function Glossary: return, value, math operation Function: average, standardDeviation, value | ||||||
Description | Use the median function to find the value that best represents a group of values. If the number of items in the numbersList is odd, the median function returns the middle value of the list when it is sorted in numeric order. If the number of items is even, the median function takes the two middle values and averages them to produce the median. If the list consists of fewer than three numbers, or if the numbers are evenly distributed, the median is equal to the average. If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information. | ||||||
Tags | math |