Difference between revisions of "Median Command"
From GeoGebra Manual
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact ) |
|||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.2}}</noinclude> | <noinclude>{{Manual Page|version=4.2}}</noinclude> | ||
{{command|cas=true|statistics}} | {{command|cas=true|statistics}} | ||
− | ;Median[ <List of | + | |
+ | ;Median[ <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[ <List of Numbers>, <List of Frequencies> ]:Calculates the weighted median of the list elements. | ;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''.</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, 6}]</nowiki></code> yields ''3''.</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> ] | ||
Line 15: | Line 22: | ||
:*<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 the [[Numeric Tool|numeric value]] [[File:Tool Numeric.gif]] ''4.5'' or its [[Evaluate Tool|evaluation]] [[File:Tool Evaluate.gif]] $\frac{9}{2}$</div>}} | :*<code><nowiki>Median[{1, 1, 8, 8}]</nowiki></code> yields the [[Numeric Tool|numeric value]] [[File:Tool Numeric.gif]] ''4.5'' or its [[Evaluate Tool|evaluation]] [[File:Tool Evaluate.gif]] $\frac{9}{2}$</div>}} | ||
+ | |||
;Median[ <List of Numbers>, <List of Frequencies> ]:Calculates the weighted median of the list elements. | ;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}, {4, 1, 4, 9}]</nowiki></code> yields ''3.5''.</div>}} | :{{example|1=<div><code><nowiki>Median[{1, 2, 3, 4}, {4, 1, 4, 9}]</nowiki></code> yields ''3.5''.</div>}} | ||
− | + | ||
+ | {{Note|1=If the length of the given list is even, the arithmetic mean of the two center elements is returned.}} | ||
:<br>See also [[Mean Command|Mean]] command. | :<br>See also [[Mean Command|Mean]] command. |
Revision as of 06:50, 9 July 2013
- 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.
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 the numeric value 4.5 or its evaluation $\frac{9}{2}$
- Median[ <List of Numbers>, <List of Frequencies> ]
- Calculates the weighted median of the list elements.
- Example:
Median[{1, 2, 3, 4}, {4, 1, 4, 9}]
yields 3.5.
Note: If the length of the given list is even, the arithmetic mean of the two center elements is returned.
See also Mean command.