Difference between revisions of "Median Command"
From GeoGebra Manual
(→CAS Syntax: remove 9/2 (Giac always gives 4.5)) |
m |
||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|statistics}} |
− | {{command|cas=true|statistics}} | ||
;Median[ <List of Raw Data> ] | ;Median[ <List of Raw Data> ] | ||
:Determines the median of the list elements. | :Determines the median of the list elements. | ||
Line 16: | Line 15: | ||
:*<code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2''. | :*<code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2''. | ||
:*<code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields 4.5 </div>}} | :*<code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields 4.5 </div>}} | ||
+ | ;Median[ <List of Numbers>, <List of Frequencies> ]:Calculates the weighted median of the list elements. | ||
+ | :{{example|1=<div> | ||
+ | :*<code><nowiki>Median[{1, 2, 3}, {4, 1, 3}]</nowiki></code> yields ''1.5''. | ||
+ | :*<code><nowiki>Median[{1, 2, 3}, {4, 1, 6}]</nowiki></code> yields ''3''.</div>}} | ||
{{Note|1=<div> | {{Note|1=<div> | ||
*If the length of the given list is even, the arithmetic mean of the two center elements is returned. | *If the length of the given list is even, the arithmetic mean of the two center elements is returned. | ||
*See also [[Mean Command|Mean]] command.</div>}} | *See also [[Mean Command|Mean]] command.</div>}} |
Revision as of 11:55, 6 August 2015
- Median[ <List of Raw Data> ]
- Determines the median of the list elements.
- Examples:
Median[{1, 2, 3}]
yields 2.Median[{1, 1, 8, 8}]
yields 4.5.
- Median[ <List of Numbers>, <List of Frequencies> ]
- Calculates the weighted median of the list elements.
- Example:
Median[{1, 2, 3}, {4, 1, 3}]
yields 1.5.Median[{1, 2, 3}, {4, 1, 6}]
yields 3.
CAS Syntax
- Median[ <List of Numbers> ]
- Determines the median of the list elements.
- Examples:
Median[{1, 2, 3}]
yields 2.Median[{1, 1, 8, 8}]
yields 4.5
- Median[ <List of Numbers>, <List of Frequencies> ]
- Calculates the weighted median of the list elements.
- Example:
Median[{1, 2, 3}, {4, 1, 3}]
yields 1.5.Median[{1, 2, 3}, {4, 1, 6}]
yields 3.
Note:
- If the length of the given list is even, the arithmetic mean of the two center elements is returned.
- See also Mean command.