HP Forums
(48G) Statistics: Mid-range & Estimator of Standard Deviation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (48G) Statistics: Mid-range & Estimator of Standard Deviation (/thread-8431.html)



(48G) Statistics: Mid-range & Estimator of Standard Deviation - Gerald H - 05-31-2017 09:35 AM

A lazy way to find the average of a set of data is to take half of the sum of max & min values, which is in fact the correct method to find the middle of the range of values.

The programme below finds the mid-range value, MR, for a list of values.

An easy way to quickly calculate a reasonable approximation to the standard deviation of the values is to divide MR by 4.

Code:

« 1. * SORT OBJ
DUP 1. ==
  IF
  THEN DROP
  ELSE SWAP OVER 1.
+ ROLLD 2. - DROPN
+ 2. /
  END
»