Difference between revisions of "Median Command"

From GeoGebra Manual
Jump to: navigation, search
Line 3: Line 3:
 
;Median[ <List of Numbers> ]
 
;Median[ <List of Numbers> ]
 
:Determines the median of the list elements.
 
:Determines the median of the list elements.
:{{example|1=<div>
+
:{{examples|1=<div>
:* <code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2'' and
+
:* <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> ]
 +
:{{example|1=<div><code><nowiki>Median[{1, 2, 3}, {4, 1, 3}]</nowiki></code> yields ''1.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==
 
;Median[ <List of Numbers> ]
 
;Median[ <List of Numbers> ]
 
:Determines the median of the list elements.
 
:Determines the median of the list elements.
:{{example|1=<div>
+
:{{examples|1=<div>
:* <code><nowiki>Median[{1, 2, 3}]</nowiki></code> yields ''2'' and
+
:* <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>}}
 
{{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>}}
 
{{betamanual|version=4.2|
 
1=; Median[ <List of Numbers>, <List of Frequencies> ]
 
}}
 

Revision as of 10:18, 21 December 2012


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> ]
Example:
Median[{1, 2, 3}, {4, 1, 3}] yields 1.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.
Examples:
  • Median[{1, 2, 3}] yields 2.
  • Median[{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.
© 2024 International GeoGebra Institute