I'm using an old TI-85 calculator that I've had since high school. I couldn't find a way
to get it to calculate median and quartiles, so I wrote a program to do it.
I've tested it and it seems to work right, but I'd recommend that anybody using it be sure to test it first, if
only to make sure it's typed in right.



[xStat] -- defined in STAT or LIST editor

qL -- temporarily stores sorted list

q5s -- five-number summary

qsize -- length of qL

qql -- current quartile locator


After running the program, if you need to see the result again, just type q5s
on a line by itself and hit enter. It'll store the values until you change
it, delete it, or run the program again.
The program doesn't take yStat into account, so it doesn't work with
frequency tables. It also doesn't draw boxplots. It takes a single list of
numbers (in xStat) and returns {min, Q1, median, Q3, max}.


'/=' refers to the not-equal symbol (2nd TEST MORE F1)

'==' refers to the is-equal symbol (2nd TEST F1)

'->' refers to the STO> symbol



"Program to"

"calculate 5-pt"

"Summary for Stats"


"You must have "

"entered your stat"

"values in xStat"

"prior to running"

"this program."


5 -> dimL q5s

sortA xStat -> qL

min(qL) -> q5s(1)

max(qL) -> q5s(5)

dimL qL -> qsize

qsize / 2 -> qql

If fPart qql /= 0

(qL(iPart qql) + qL(iPart qql + 1)) / 2 -> q5s(3)

If fPart qql == 0

qL(qql) -> q5s(3)

.25 * qsize -> qql

If fPart qql /= 0

qL( iPart qql + 1 ) -> q5s(2)

If fPart qql = 0

(qL(qql) + qL(qql + 1)) / 2 -> q5s(2)

.75 * qsize -> qql

If fPart qql /= 0

qL( iPart qql + 1 ) -> q5s(4)

If fPart qql = 0

(qL(qql) + qL(qql + 1)) / 2 -> q5s(4)

Disp q5s

"free up RAM"

1 -> dimL qL


End of Code-----------------------

--Raymond Taylor