HP F2226A - 48GII Graphic Calculator User Manual Page 575

Graphing calculator.

(n+1)/2. If you have an even number, n, of elements, the median is the
average of the elements located in positions n/2 and (n+1)/2. Although the
pre-programmed statistical features of the calculator do not include the
calculation of the median, it is very easily to write a program to calculate such
quantity by working with lists. For example, if you want to use the data in
ΣDAT to find the median, type the following program in RPN mode (see
Chapter 21 for more information on programming in User RPL language).:
«
nC « RCLΣ DUP SIZE 2 GET IF 1 > THEN nC COL− SWAP DROP
OBJ
1 +
ARRY END OBJ
IF 'n MOD 2 == 0' THEN DUP 'n/2' EVAL GET SWAP '(n+1)/2' EVAL GET +
2 / ELSE '(n+1)/2' EVAL GET END "Median"
Store this program under the name MED. An example of application of this
program is shown next.
Example 2 – To run the program, first you need to prepare your ΣDAT matrix.
Then, enter the number of the column in ΣDAT whose median you want to find,
and press @@MED@@.
For the data currently in ΣDAT (entered in an earlier
example), use program MED to show that
The mode of a sample is better determined from histograms, therefore, we
leave its definition for a later section.
The variance (Var) of the sample is defined as
The standard deviation (St Dev) of the sample is just the square root of the
variance, i.e., s
.
x
The range of the sample is the difference between the maximum and minimum
values of the sample.
statistical functions provides the maximum and minimum values of the sample,
you can easily calculate the range.
OBJ
DROP DROP DUP
TAG " " "
Median: 2.15
2
s
x
Since the calculator, through the pre-programmed
n «
LIST SORT
.
1
n
2
(
x
x
)
.
i
n
1
i
=
1
Page 18-4 48gii49g+

Comments to this Manuals

Symbols: 0 