Showing posts with label distribution. Show all posts
Showing posts with label distribution. Show all posts

Saturday, February 18, 2023

Numworks Software Version 20 Now Available

 Numworks Software Version 20 Now Available 


Click here for details:

https://www.numworks.com/calculator/update/version-20/


Highlights:

*  Separate Finance and Distribution Applications

*  Pressing the divide key [ ÷ ] prior to number entry cycles between:  Ans divided by denominator, fraction, mixed fraction.  

*  Pressing the Home Key then the 0 key gets the shortcut to Settings

*  The new Elements app is available.  We can display each element by its family, s/p/d/f blocks, type of metals, molar mass, electronegativity, melting temperature, boiling temperature, and atomic radius.  Each attribute is shown separately.

* When a value is highlighted in any app, except in Python, pressing [ shift ] (sto→) will give you a prompt to store the amount in a variable.  As a reminder, variables can have more than one character.

*  In the Grapher app, points of interest (zeroes/roots, minima, maxima, points of inflection, etc.) will have black dots.

*  Also in the Grapher app, the ability to find integrals is added to the toolbox.

*  Inverse trig functions are now labeled as arcsin, arccos, and arctan.  

*  Degree and degree minute second templates are loaded from the Toolbox > Units and constants > Length and angle > Angle submenu.

* Additional information is added to angle, trigonometric, and vector calculations.  

* We can add and subtract percents directly.   


There seems to not be additions to the Python programming module (yet).


To update:  just sign in to your Numworks account.  Then connect your calculator, select Update under the Calculator and follow the prompts.  Easy as that!


Thank you, Numworks! 


Eddie



Saturday, December 3, 2022

HP 15C and TI-84 Plus CE: Weibull Distribution Parameter Calculation

HP 15C and TI-84 Plus CE:  Weibull Distribution Parameter Calculation



Introduction


The Weibull probability density distribution function is:


f(x) = (b / Θ) * (x / Θ)^(b-1) * exp(-(x / Θ)^b)


with the lower tail cumulative distribution of (-∞ to x):


Area = 1 - exp(-(x / Θ)^b)


The area function tells us what is the probability a device lasts no more than x time units.  


Area = 1 - Survival


The survival function is the probability a device lasts more than x time units.


Survival = exp(-(x / Θ)^b)


Generally, the higher Θ is, the flatter the Weibull Distribution curve.  


In today's blog, we are estimating the parameters b and Θ given the number of data points, N, and data points (time periods to failure) x_i.   For the HP 15C program, which is modeled after the HP 55 program (see source below).   



The Process


Each x_i is sorted in ascending order.  Then transform the following data:


x' = ln x


α = (K - 0.3) ÷ (N + 0.4),  K = 1, 2, 3, ... , N


y' = ln( ln( 1 ÷ (1 - α)))


Enter each point (x', y'), and perform a linear regression analysis.


Then:  


b = slope


Θ = e^-(intercept ÷ slope)


 


HP 15C Program:  Weibull Distribution - Parameter Determination


Line #;  Key;  Code


001;  LBL A; 42, 21, 11

002;  1;  1

003;  STO 0;  44, 0

004;  CLΣ;  43, 32

005;  R/S;  31

006;  STO 1;  44, 1

007;  LBL 9;  42, 21, 9

008;  R/S;   31

009;  LN;  43, 12

010;  RCL 0;  45, 0

011;  . ;  48

012;  3 ;  3

013;  - ;  30

014; RCL 1;  45, 1

015; .  ;  48

016; 4 ;  4

017; +  ; 40

018; ÷ ; 10

019; 1 ;  1

020;  STO+ 0;  44, 40, 0

021;  x<>y  ; 34

022;  - ; 30

023;  1/x ;  15

024;  LN ; 43, 12

025;  LN ; 43, 12

026;  x<>y ; 34

027;  Σ+ ; 49

028;  GTO 9; 22, 9

029;  LBL B; 42, 21, 12

030;  L.R.;  42, 49

031;  x<>y ; 34

032;  R/S ; 31

033;  ÷ ; 10

034;  CHS;  16

035;  e^x;  12

036;  RTN;  43, 32


1.  Execute label A.   

2.  Enter N, the number of data points, then press the R/S key.

3.  Enter each x_i in ascending order, press R/S key in between each keys.  

4.  Execute label B.   The b parameter is displayed.  

5.  Press R/S.  The Θ parameter is displayed.



TI-84 Plus CE Program: WBFIT  


Weibull Distribution - Parameter Determination


"EWS 2022-10-09"

ClrHome

Disp "WEIBULL DIST.","FIT CALCULATION"

Input "DATA LIST: ",L1

SortA(L1)

dim(L1)→N

ln(L1)→L1

N→dim(L2)

For(K,1,N)

(K-0.3)/(N+0.4)→A

ln(ln(1/(1-A)))→L2(K)

End

LinReg(a+bx) L1,L2

b→B

e^(­(a/b))→θ

ClrHome

Disp "1-e^(­(X/B)^θ)"

Disp "B:",B,"θ:",θ


The x_i data are sorted in the WBIT program.  



Examples


Example 1:

Hours to failure:

{ 11000, 11056, 11379, 11821, 11956, 12403, 12526, 13000, 13380, 13663 }

N = 10


b ≈ 14.01123

Θ ≈ 12649.59071


Example 2:

Days to failure:

{ 1760, 1799, 1882, 1931, 1996, 2004, 2150 }

N = 7


b ≈ 15.22473

Θ ≈ 1993.22461


Sources:


HP55 Statistics Programs  Hewlett Packard Company.  Cupertino, CA.  1975


Ma, Dan.  "The Weibull distribution"  Topics in Actuarial Modeling.  September 28, 2016.   https://actuarialmodelingtopics.wordpress.com/2016/09/28/the-weibull-distribution/  Last Retrieved September 20, 2022.  



Eddie


All original content copyright, © 2011-2022.  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. 


Sunday, November 13, 2022

HP 15C: Weibull Distribution Calculations

HP 15C:  Weibull Distribution Calculations


Introduction


The Weibull probability density distribution function is:


f(x) = (b / Θ) * (x / Θ)^(b-1) * exp(-(x / Θ)^b)


with the lower tail cumulative distribution of (-∞ to x):


Area = 1 - exp(-(x / Θ)^b)


The area function tells us what is the probability a device lasts no more than x time units.  


Area = 1 - Survival


The survival function is the probability a device lasts more than x time units.


Survival = exp(-(x / Θ)^b)


Generally, the higher Θ is, the flatter the Weibull Distribution curve.  


What follows are four calculations regarding the Weibull Distribution.  In the following programs, store the following values first prior to running the programs:


R0 = x

R1 = b

R2 = Θ


Use whatever labels you like.  


HP 15C Program:  Lower Tail Probability - Weibull Distribution


CDF = 1 - exp(-(x/Θ)^b)


Keys:


LBL B

1

RCL 0

RCL÷ 2

RCL 1

y^x

CHS

e^x

-

RTN


Key Codes:


42, 21,12

1

45, 0

45, 10, 2

45, 1

14

16

12

30

43, 32


Example:  

b = 1.96, Θ = 420

x = 300, result:  0.4038

x = 400, result:  0.5970

x = 500, result:  0.7552


HP 15C Program:  Failure Rate - Weibull Distribution


FR = b/Θ * (x/Θ)^(b-1) 


Keys:


LBL C

RCL 1

RCL÷ 2

RCL 0

RCL÷ 2

RCL 1

1

-

y^x

*

RTN


Key Codes:


42, 21, 13

45, 0

45, 10, 2

45, 0

45, 10, 2

45, 1

1

30

14

20

43, 32


Example:  

b = 1.96, Θ = 420

x = 300, result:  0.0034

x = 400, result:  0.0045

x = 500, result:  0.0055


HP 15C Program:  Mean of a Weibull Distribution


µ = (1/b)! * Θ


Keys:


LBL D

RCL 1

1/x

x!

RCL× 2

RTN


Key Codes:


42, 21, 14

45, 1

15

42, 0

45, 20, 2

43, 32


Example:  

b = 1.96, Θ = 420

Result:  373.3720


HP 15C Program:  Standard Deviation of a Weibull Distribution


σ = Θ * √((2/b)! - (1/b)!^2)


Keys:


LBL E

2

RCL 1

÷

x!

RCL 1

1/x

x!

x^2

-

RCL× 2

RTN


Key Codes:


42, 21, 15

2

45, 1

10

42, 0

45, 1

15

42, 0

43, 11

30

11

45, 20, 2

43, 32


Example:

b = 1.96, Θ = 420

Result:  198.2208


Sources:


HP55 Statistics Programs  Hewlett Packard Company.  Cupertino, CA.  1975


Ma, Dan.  "The Weibull distribution"  Topics in Actuarial Modeling.  September 28, 2016.   https://actuarialmodelingtopics.wordpress.com/2016/09/28/the-weibull-distribution/  Last Retrieved September 20, 2022.  



Eddie


All original content copyright, © 2011-2022.  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. 


Saturday, October 1, 2022

Casio fx-CG 50: Random Walk Histogram

Casio fx-CG 50:  Random Walk Histogram


Mosquitos an Inspiration, What? 


Inspiration:  

Ellenberg, Jordan.   Shape:  The Hidden Geometry of Information, Biology, Strategy, Democracy, and Everything Else  Penguin Books:  New York, NY. 2021


The beginning of Chapter 4, Sir Ronald Ross proposes the problem:  In a simple case, a mosquito can only travel in one of two directions, which is northeast or southwest.   The goal was to find the average distance a mosquito is from its home after a given life span.


The program TWALK would address a similar problem.  


N = number of trials


S = number of steps the mosquito (or whatever you want to imagine) walks in a single direction


Each trial calculates the final position.  The program draws a histogram of all the trails.   


TWALK gives two choices:


(-1, 1):  Each turn, the mosquito must move forward 1 step or backward 1 step


(-1, 0, 1):  Each turn, the mosquito must either move forward 1 step, move backward 1 step, or stay still for one turn. 



Drawing an Histogram Program in Casio Programming


Syntax:


S-Grph#  DrawOn, Hist, List x, 1, [ColorLinkOff], [Color] ColorLighter


# = Graph 1, 2, 3

List x = List 1 to List 26

Color Commands:  ColorLinkOff, 

Colors: One of 8 eight colors

ColorLighter: the fill of the color is lighter than the bar


The color commands are optional.  If you are using a Casio fx-9750GIII, leave of the color commands.



Casio fx-CG50 Program TWALK


Text:

'ProgramMode:RUN

"EWS 2022-08-04"

"RANDOM WALK 2.0"

"NO. TRIALS"?->N

N->Dim List 26

"NO. STEPS"?->S

Menu "STEPS","_(-)_1,1",2,"-1,0,1",3

Lbl 2:2->F:Goto 1

Lbl 3:3->F:Goto 1

Lbl 1

For 1->I To N

F=2=>Sum (2*RanInt#(0,1,S)-1)->List 26[I]

F=3=>Sum (RanInt#((-)1,1,S))->List 26[I]

Next

"POSITIONS LIST:"Disps

List 26Disps

(-)S->H Start

1->H pitch

S-Gph1 DrawOn,Hist,List 26,1,ColorLinkOff,Blue ColorLighter 

DrawStat



On the Screen:

"EWS 2022-08-04"

"RANDOM WALK 2.0"

"NO. TRIALS"?→N

N→Dim List 26

"NO. STEPS"?→S

Menu "STEPS","-1,1",2,"-1,0,1",3

Lbl 2:2→F:Goto 1

Lbl 3:3→F:Goto 1

Lbl 1

For 1->I To N

F=2⇒Sum (2×RanInt#(0,1,S)-1)→List 26[I]

F=3⇒Sum (RanInt#(-1,1,S))→List 26[I]

Next

"POSITIONS LIST:"◢

List 26◢

-S->H Start

1->H pitch

S-Gph1 DrawOn,Hist,List 26,1,ColorLinkOff,Blue ColorLighter 

DrawStat


Examples


N = 50, S = 5


(-1, 1):  Mosquito cannot rest





(-1, 0, 1): Mosquito can rest






Wishing you an excellent day,


Eddie 


All original content copyright, © 2011-2022.  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. 


Thursday, September 8, 2022

Casio fx-991EX Classwiz Tips: Normal Distribution

Casio fx-991EX Classwiz Tips:  Normal Distribution


This week I am going to show some things that can be done with the Casio fx-991EX Classwiz.  


The Normal Distribution 


The Classwiz's Distribution mode has calculations for the following probability distributions:


1.  Normal, f(x) = exp(-1/2 * ((x - μ) / σ)^2 ) / (σ * √(2 * π))

2.  Binomial

3.  Poisson


This is Mode 7.


Normal CD - Finding the Area


[ MENU ], 7: Distribution, 2: Normal CD


The CDF function calculates the area (probability) between two limits.   The lower and upper tail areas require the limits to be -∞ and +∞, respectively.  However, the Classwiz does not provide values for -∞ and +∞.  For the best estimate, I suggest using -7 and 7 are the limits.  The calculator calculates the probability from -7 to 7 to be 1.


Example:

(For all the examples, the standard values μ = 0, σ = 1)


Lower tail area to x = 3:  lower limit = -7, upper limit = 3; area:  0.9986501019


Lower limit = -2, upper limit = 2; area:  0.954499736


Upper tail from x = -1:  lower limit = 1, upper limit = 7; area:  0.1586552539


Inverse CD


[ MENU ], 7: Distribution, 3: Inverse Normal


This calculation gets the point value for a lower tail distribution (-∞ to x).


Example:

(For all the examples, the standard values μ = 0, σ = 1)


Area = 0.5; xInv:  0


Area = 0.6; xInv: 0.2533470931


Area = 0.7; xInv: 0.5244004382


Eddie


All original content copyright, © 2011-2022.  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. 


Thursday, August 15, 2019

TI Nspire CX II: Distributing Money Among Friends

TI Nspire CX II:  Distributing Money Among Friends

The Problem

This post is inspired from a Instagram post by @gercekboss at www.eylemmath.weebly.com.  The problem states that:

$100 is to be distributed among 100 friends:
1% is given to the 1st friend
2% is given to the 2nd friend
3% is given to the 3rd friend
and so on.

I have a TI Nspire CX II Document that covers this problem, which can be downloaded here:  https://drive.google.com/file/d/1aewZ-8wU2JjZxgGyBpNHivEYLU5QAt31/view?usp=sharing

Name of the document:  distribute percent.tns 

Using the TI Nspire CX II to set up two sequences to model this problem as two sequences:

Balance Sequence (Problem 1.3, plot is in green)

u1(n) = u1(n-1) - u1(n-1) * n%
Intial Terms: 100
0 ≤ n ≤ 99 step 1

Amount Sequence (Problem Page 1.7, plot is in red)

u2(n) = u1(n-1) *n%
Initial Terms: 0
0 ≤ n ≤ 99 step 1

By analysis, the 10th friend will get the biggest distribution under this plan, $6.28.  By the time we get to the 38th friends, the distribution becomes meaningless because the calculated amount will be less than one penny.



Regression Analysis

I performed curve fitting analysis for the balance and amount distributed on problems page 1.5 and 1.9, respectively.

Balance can be estimated by the logistic equation:

balance(n) ≈ 112.84/(1 + 0.1*e^(0.23n)) - 0.54  for 1 ≤ n ≤ 40

The maximum absolute error is 0.67. 

Amount can be estimated by the quartic polynomial:

amount(n) ≈ -4.01E-5*n^4 + 4.31E-3 * n^3 - 0.15 * n^2 + 1.89 * n - 1.26
for 1 ≤ n ≤ 40

I did slightly better, the maximum absolute error is 0.52.



Generalizing the Problem

Now, let's take any money of money and any amount of friends for whom to distribute that money.  The rate can increase per friend by at different rates:

a*n% + b%

If you want 2%, 4%, 6%, etc, let a = 2, b = 0



If you want each friend to get 1/2% more than the last, let a = 1/2, b = 0.

If you want the first friend to get 2%, second to get 3%, etc, let a = 1, b =  1.

The sequences are set up as:

Balance Sequence

u1(n) = u1(n-1) - u1(n-1) * (a*n% + b%)
Intial Terms: c
0 ≤ n ≤ l step 1

Amount Sequence

u2(n) = u1(n-1) *(a*n% + b%)
Initial Terms: 0
0 ≤ n ≤ l step 1

Variables:
a = rate parameter
b = rate parameter
c = initial amount of money
l = number of friends

You can customize the problem in Problem 2 of the document.  Change the variables on Problem Page 2.2 and see the results on Problem Pages 2.3 and 2.4. 

Source:

Question 251. eleymmath.    https://eylemmath.weebly.com/algebra/100-question  Retrieved July 21, 2019. 

Eddie

All original content copyright, © 2011-2019.  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.

Saturday, July 27, 2019

HP Prime and TI-84 Plus CE: Maximum Probability - Incomplete Gamma Law

HP Prime and TI-84 Plus CE:  Maximum Probability - Incomplete Gamma Law

Introduction

The program IGLMAX calculates four calculation points of the Incomplete Gamma Law:

Three parameters of A, γ, and β of the IGL (Incomplete Gamma Law):

g(x) = 1 / (β^γ * gamma(γ)) * x^(γ - 1) * e^(x/β)

where:

X = list of data points, where x_i ≥ 0
s = number of data points
r = number of points where x_i = 0 (zero points)

A = ln(mean(X)) - (Σ ln(X_i))/(s - r)
γ = 1/(4*A) * (1 + √(1 + 4*A/3))
β = mean(X)/γ

And

p = probability that x is not exceeded
p = r/s + (1 - r/s) * (1 - uigf(γ, x)/gamma(γ))

Gamma Function:
gamma(γ) = ∫( t^(γ - 1) * e^(-t) dt, 0, ∞ )

Upper Incomplete Gamma Function:
uigf(γ, x) = ∫( t^(γ - 1) * e^(-t) dt, x/β, ∞ )

One particular application is determining the maximum limit that rainfall exceeds x (inches or mm).  The book "Pocket Computers in Agrometeorology" introduces this concept and provides a program for the classic TI-59 (see source below). 

HP Prime Program IGLMAX

EXPORT IGLMAX(L1,X)
BEGIN
// list of data ≥0, X
// 2019-06-16 EWS
LOCAL S,R,M,L,I;
LOCAL A,Y,B,N,G,P;
// set up
S:=SIZE(L1);
R:=0; // count zeros
M:=0; // ΣX
L:=0; // Σ(LN(X))
// counting loop
FOR I FROM 1 TO S DO
IF L1(I)==0 THEN
R:=R+1;
ELSE
M:=M+L1(I);
L:=L+LN(L1(I));
END;
END;
// parameters
A:=LN(M/(S-R))-L/(S-R);
Y:=(4*A)^(−1)*(1+√(1+4*A/3));
B:=M/(S-R)*1/Y;
// gamma
G:=CAS.Gamma(Y);
// upper incomplete gamma
N:=∫(T^(Y-1)*e^(−T),T,X/B,∞);
// maximum probability
P:=R/S+(1-R/S)*(1-N/G);
// results
RETURN {"A=",A,"γ=",Y,
"β=",B,"Max Prob=",P};
END;


TI-84 Plus Program IGLMAX
(Text to enter)

Note: probability is rounded to six decimal places

"EWS 2019-06-16"
Input "DATA (X≥0):",L1
Input "X:",X
"INITIALIZE"
dim(L1)→S
0→R
0→M
0→L
"COUNTING LOOP"
For(I,1,S)
If L1(I)=0
Then
R+1→R
Else
M+L1(I)→M
L+ln(L1(I))→L
End
End
"PARAMETERS"
ln(M/(S-R))-L/(S-R)→A
(4*A)^(­1)*(1+√(1+4*A/3))→Y
M/(S-R)*1/Y→B
"GAMMA"
fnInt(T^(Y-1)*e^(­T),T,0,500)→G
"INCOMPLETE GAMMA"
fnInt(T^(Y-1)*e^(­T),T,X/B,500)→N
"PROB"
R/S+(1-R/S)*(1-N/G)→P
round(P,6)→P
ClrHome
Disp "A=",A,"GAMMA=",Y,"BETA=",B
Pause 
Disp "MAX PROB (FIX 6)=",P

Example

Data from a city of the rainfall in 2017 and 2018 (in inches):

2017
January: 3.90
February: 2.84
March: 2.31
April: 0.98
May: 0.64
June: 0.05
July:  0.00
August: 0.01
September: 0.00
October: 0.33
November: 0.72
December: 1.08

2018
January: 2.49
February: 2.66
March:  3.06
April: 2.94
May: 2.33
June: 0.81
July: 0.05
August: 0.00
September: 0.00
October: 0.14
November: 0.50
December: 2.24

Parameters:
A:  0.7237035089
γ (Gamma): 0.8296776362
β (Beta): 1.812752248

Probability that X inches of rainfall will not exceed:
X = 1 in:  0.593857
X = 2 in:  0.781173
X = 3 in: 0.879613

Source:

R.A. Gommes  Pocket Computers In Agrometeorology  Food and Agriculture Organization of the United Nations.  FAO PLANT PRODUCTION AND PROTECTION PAPER.  Rome, 1983.  ISBN 92-5-101336-5

Eddie

All original content copyright, © 2011-2019.  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.

Friday, April 7, 2017

Retro Review: Hewlett Packard HP 20S and 21S


Retro Review:  Hewlett Packard HP 20S and 21S



Company:  Hewlett Packard
Type:  Scientific Programming
Memory:  9 Registers, 99 Programing Steps, 6 Pre-loaded programs
Years:  1988? – 1993? (21S); 1988 – 2002(?) (20S), original price was around $50
Operating System:  Algebraic
Batteries:  3 x LR44

HP 21S:  The Rarer Cousin of the HP 20S

The HP 21S is an algebraic, keystroke programming calculator.  I paid $35, which is not bad considering the keyboard and the display are in supreme quality, the keys are a pleasure to touch, and the learning curve is easy to operate the calculator.   

The HP 21S was originally released by Hewlett Packard along with the more familiar cousin the HP 20S.   Both had a great dark brown keyboard with white font for primary labels, orange and blue for shift key fonts (my favorite!).  This design has been used several Hewlett Packard calculators from the late 1980s/early 1990s, including the HP 32SII and the HP 48 SX.  Sometime during the 1990s, the HP 20S garnered a purple/green shift font scheme, to match the HP 48 G series. 


What the 20S and 21S Have in Common

Both are algebraic programming calculators.  Each calculator has 10 memory registers (R0 through R9) with storage arithmetic available (STO+, STO-, STO*, and STO÷).  Both models have the standard array of scientific functions including trigonometric, logarithmic, exponential, combination, permutation, integer and fraction parts, and decimal/hours-minutes-seconds conversions.  However, there is no fraction mode and all numbers are real numbers. 

One thing is to consider is that the factorial function (n!) only accepts positive integers. 

 

The INPUT Key

 It does take a little getting used to working the [INPUT] key, especially for those who work with HP calculators, since we’re used to RPN.  The INPUT key stores the number in a temporary “x” slot.  The INPUT key places a role in several functions:
 
Rectangular to Polar Conversion:  x, [INPUT], y, [left shift], [STO] (>P) 
(θ is displayed, r is stored)
 
Polar to Rectangular Conversion:  r, [INPUT], θ, [right shift], [STO] (>R) 
(y is displayed, x is stored)
 
Combinations/Permutations:  n, [INPUT], r, [right shift], [ 0 ] (combination) or [ . ] (permutation)
 
Percent Change: 
HP 20S:  old, [INPUT], new, [left shift], [ 1/x ] (%CHG)
HP 21S:  old, [INPUT], new, [right shift], [ 5 ] (%CHG)

 

Statistics

 
Both the HP 20S and HP 21S have one variable, one weighted variable, two variable statistics, and linear regression.  There is no separate mode to be entered, just enter data with the [ Σ+ ] and go.  Upon entering and clearing data though, the following registers become holders of statistical sums:


R4 = n

R5 = Σx

R6 = Σy

R7 = Σx^2

R8 = Σy^2

R9 = Σxy

 
What is really nice is that both models have the sums indicated in gray at the bottom right hand corner of the keys as reminders.

Programming
 
Both the HP 20S and the HP 21S are keystroke programmable.  Both allow for labels A – F, 0 – 9.  In addition there are two tests:  x=0? and x≤y?.

The x≤y? Test:  x, [INPUT]*, y, [right shift], [ 7 ] (x≤y?).   A way to remember this command is:  hidden value ≤ displayed valued?

 
* According to the manuals, any other arithmetic/pending operation can be used such as [ + ] and [ ÷ ] are also allowed.
 

Each digit takes a step.  For example, 250 takes three steps, one for the 2, the 5, and the 0.

 
Differences between the HP 20S and HP 21S
 

Scientific Operations

 
HP 20S
HP 21S
Hyperbolic functions, base conversions (binary, octal, hexadecimal, binary), metric/US conversions (kg/lb, °C/°F, cm/in, l/gal)
Upper tail areas and inverse (z, t, F, Chi-squared), random numbers, seeding

 
Preloaded Programs

 

The HP 20S and HP 21S have six-preloaded programs.  The can be loaded by the key sequence [left shift], [ ← ] (LOAD).  While the HP 21S programs can be loaded at any time, the HP 20S must be in programming mode to load programs.

 

Unfortunately, user-created programs cannot be stored into permanent memory which would have been nice.

 

Preloaded Programs HP 20S

 

A
Root Finder
62 steps
B
Numerical Integration
58 steps
C
Complex Arithmetic
75 steps
D
3 x 3 Matrices
98 steps
E
Quadratic Equation
65 steps
F
Curve Fitting (logarithmic, exponential, power)
77 steps

 

Preloaded Programs HP 21S

 

A
One Sample Stat Tests
82 steps
B
Two Sample Stat Tests
82 steps
C
Linear Regression Stat Tests (used with One Sample Tests)
86 steps
D
Chi Square Tests
53 steps
E
Binomial Distribution
39 steps
F
Time Value of Money Solver (Finance)
99 steps

 

Final Verdict
 

Do I recommend buying the HP 21S and/or the HP 20S?  Assuming the price is reasonable, Yes, Yes, and Yes!  It is shame that the HP 20S and HP 21S are no longer produced because these are nice calculators.


The original price was around $45 - $55.    
 

Let’s get to the features.  I think it would be appropriate comparing the features of both the HP 21S and HP 20S at the same time. 
 

Eddie
 

This blog is property of Edward Shore, 2017

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations Some Background and Periodic Reduction Formulas ...