Difference between revisions of "Median Command"
From GeoGebra Manual
(wrong separator: 4,5 -> 4.5) |
|||
Line 5: | Line 5: | ||
:{{example|1=<div> | :{{example|1=<div> | ||
:* <code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2'' and | :* <code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2'' and | ||
− | :* <code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields ''4 | + | :* <code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields ''4.5''</div>}} |
{{note| 1=<div>If the length of the given list is even, the arithmetic mean of the two center elements is returned.</div>}} | {{note| 1=<div>If the length of the given list is even, the arithmetic mean of the two center elements is returned.</div>}} | ||
==CAS Syntax== | ==CAS Syntax== | ||
Line 12: | Line 12: | ||
:{{example|1=<div> | :{{example|1=<div> | ||
:* <code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2'' and | :* <code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2'' and | ||
− | :* <code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields ''4 | + | :* <code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields ''4.5''</div>}} |
{{note| 1=<div>If the length of the given list is even, the arithmetic mean of the two center elements is returned.</div>}} | {{note| 1=<div>If the length of the given list is even, the arithmetic mean of the two center elements is returned.</div>}} | ||
Revision as of 12:44, 8 October 2012
- Median[ <List of Numbers> ]
- Determines the median of the list elements.
- Example:
Median[{1, 2, 3}]
yields 2 andMedian[{1, 1, 8, 8}]
yields 4.5
Note:
If the length of the given list is even, the arithmetic mean of the two center elements is returned.
CAS Syntax
- Median[ <List of Numbers> ]
- Determines the median of the list elements.
- Example:
Median[{1, 2, 3}]
yields 2 andMedian[{1, 1, 8, 8}]
yields 4.5
Note:
If the length of the given list is even, the arithmetic mean of the two center elements is returned.
Following text is about a feature that is supported only in GeoGebra 4.2.
|