Difference between revisions of "Median Command"

From GeoGebra Manual
Jump to: navigation, search
(removed extra CAS syntax)
m (Text replace - ";(.*)\[(.*)\]" to ";$1($2)")
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|statistics}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|statistics}}
;Median[ &lt;List of Raw Data> ]
+
;Median( &lt;List of Raw Data> )
 
:Determines the median of the list elements.
 
:Determines the median of the list elements.
 
:{{examples|1=<div>
 
:{{examples|1=<div>
 
:*<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[ &lt;List of Numbers>, &lt;List of Frequencies> ]:Calculates the weighted median of the list elements.  
+
;Median( &lt;List of Numbers>, &lt;List of Frequencies> ):Calculates the weighted median of the list elements.  
 
:{{example|1=<div>
 
:{{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, 3}]</nowiki></code> yields ''1.5''.

Revision as of 17:15, 7 October 2017


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}, {6, 1, 3, 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.
© 2024 International GeoGebra Institute