Sunday, March 26, 2023

HP 32S II Statistical Formulas

HP 32S II Statistical Formulas



Statistics Formulas


The 32S II can store formulas for evaluations, including formulas involving stat variables.  


Covariance:

C = r × sx × sy


Root Mean Square Based on X Variable Statistics:

R = SQRT( Σx^2 ÷ n )


Z-Score Based on X Variable Statistics:  

Z = (X - x-bar) ÷ sx


Accessing Stat variables:


r:  [ right shift ]  [ LN ] (L.R.) [ y^x ] (r)

sx:  [ right shift ] [ 1/x ] (s, σ), [ √x ] (sx)

sy:  [ right shift ] [ 1/x ] (s, σ), [ LN ] (sy)

Σx^2:  [ right shift ] [ Σ+ ] (SUMS) [ e^x ] (x)

n:  [ right shift ] [ Σ+ ] (SUMS) [ √x ] (n)

x-bar:  [ right shift ] [ y^x ] (x-bar,y-bar) [ √x ] (x-bar)


Example


Data:  (x, y)

(10.4, 20)

(13.5, 18)

(16.8, 15)

(19.1, 13.9)


Enter statistical data:  y [ENTER] x [ Σ+ ]


Some stats:

x-bar = 14.95

y-bar = 16.725

r = -9.9503133E-1


Covariance:  Solve for C

C = -10.555

Result is stored in C


Root Mean Square:  Solve for R

R = 15.3089842903

Result is stored in R


Z-Score Based on X Variable Statistics:   Solve for Z

X?  15,  Z = 1.31382E-2

X?  17,  Z = 5.38666E-1

Result is stored in Z



Formulas vs. Programs


If we are going to evaluate formulas (that is, solve for the variable left of the equals sign), we could also enter and use programs.   The programs for the above three formulas:


Covariance:

C01  LBL C

C02  r

C03  sx

C04  ×

C05  sy

C06  ×

C07  RTN


Root Mean Square:

R01  LBL R

R02  Σx^2

R03  n

R04  ÷

R05  SQRT

R06  RTN


Z Score:  (x is in the X stack)

Z01  LBL Z

Z02  x-bar

Z03  -

Z04  sx

Z05  ÷

Z06  RTN


Byte Consumption Comparison


Covariance

Formula:  12 bytes

Program:  10.5 bytes


Root Mean Square

Formula:  12 bytes

Program:  9 bytes


Z Score

Formula: 15 bytes

Program:  9 bytes


From sample set, programs are shorter than formulas.  Is this true in general?


Eddie



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Fun with the HP 30b

Fun with the HP 30 b Introduction The following programs are for the HP 30b Business Professional. Did you know that the 30b...