Saturday, July 5, 2025

HP 21S and TI-84 Plus CE: Normal Distributions and Hypothesis Tests

HP 21S and TI-84 Plus CE: Normal Distributions and Hypothesis Tests


Let’s compare how calculations involving the normal distribution are done between a classic calculator and a current one. The classic calculator is the rare HP 21S calculator from 1988 and the current calculator is the TI-84 Plus CE.


In 2017 (how time flies!) I wrote a review for the HP 21S (along with it’s cousin HP 20S):

https://edspi31415.blogspot.com/2017/04/retro-review-hewlett-packard-hp-20s-and.html.


Normal Distribution Calculations


z = z-score, point; p = probability, area


Assumptions: The mean is assumed to be 0 while the standard deviation is 1. (μ = 0, σ = 1).


Lower Tail (-∞, z)



HP 21S

TI-84 Plus CE*

Example

Given z, find p

Keystrokes:

1 [ - ] z [ ←| ] (Q(z)) [ = ]

normalcdf(-1E99, z)

Input: z = 0.77
Result:
p ≈ 0.7794

Given p, find z

Keystrokes:

[ ( ] 1 [ - ] p [ ) ] [ |→ ] (zp)

invNorm(p)

Input: p = 0.77
Result:
z ≈ 0.7388


* also includes TI-83 Plus, TI-84 Plus, TI-83 Premium (Python), TI-82 Advanced, and I do believe it is the same syntax for TI-89/Nspire family


Upper Tail (z, +∞)


HP 21S

TI-84 Plus CE*

Example

Given z, find p

Keystrokes:

z [ ←| ] (Q(z))

normalcdf(z, 1E99)

Input: z = 0.49
Result:

p ≈ 0.3121

Given p, find z

Keystrokes:

p [ |→ ] (zp)

InvNorm(1 - p)

Input: p = 0.49
Result:

z ≈ 0.0251


Two Tail (-z, z)


HP 21S**

TI-84 Plus CE*

Example

Given z, find p

Keystrokes:

z [ STO ] [ 0 ] [ +/- ]

[ ←| ] (Q(z)) [ - ]
[ RCL ] 0 [ ←| ] (Q(z)) [ = ]

normalcdf(-z, z)

Input: z = 1
Result:

p ≈ 0.6827

Given p, find z

Keystrokes:

p [ ÷ ] 2 [ = ] [ STO ] 0
Lower Limit:

[ ( ] 0.5 [ - ] [ RCL ] 0 [ ) ] [ |→ ] (zp)
Upper Limit:

[ ( ] 0.5 [ + ] [ RCL ] 0 [ ) ] [ |→ ] (zp)

InvNorm(p, 0, 1, CENTER)

Input: p = 0.25
Result:

Upper: z ≈ 0.3186

Lower: z ≈ -0.3186


** HP 21S: A memory register is needed for this particular algorithm. I use register 0 for this example.



Sample Test of the Mean: Is the Proposed Mean the True Mean? (μ0 = μ)


Perform a significant test of whether a proposed mean (μ0) is the true mean (μ) given data from a sample:


x-bar: arithmetic mean of a sample

σ: population deviation of the sample

n: sample size


In this test, the null or default hypothesis is μ =μ0, while the alternate hypothesis is μ ≠ μ0.


Your confidence level and critical level, α, are complimentary. For example, if you want a 95% confidence level, your critical level, or α, is: α = 1 – 0.95 = 0.05 (5%). This is a two-tail test.


HP 21S

TI-84 Plus CE

[ ←| ] [ ← ] (LOAD) (A) (1-Stat)
n [ XEQ ] D

μ [ R/S ]

σ [ R/S ]



Test Method # 1:

α [ ÷ ] 2 [ = ] [ |→ ] (zp) (= critical value)

μ0 [ XEQ ] B (= test value)


Null: μ0 = x-bar, Alternative: μ0 ≠ x-bar

If test value < critical value, do not reject null hypothesis

If test value > critical value, reject null hypothesis and accept the alternate hypothesis


Test Method # 2:

μ0 [ XEQ ] B [ ←| ] [ 1 ] (Q(z)) (= p)


Null: μ0 = x-bar, Alternative: μ0 ≠ x-bar

If p > α / 2, do not reject null hypothesis

If p < α / 2, reject null hypothesis and accept the alternate hypothesis


Note:

LBL D: store summary statistics for the test of one sample mean or probability. For this test, the standard error that is shown will not be used.


LBL B: calculate the z-score:

z = (x-bar – μ0) / (σ / √n)

[ stat ], TESTS, 1: Z-Test…

Inpt: Stats
(Input shown as Inpt)

μ0: enter μ0

σ: enter σ

x-bar: enter x-bar

n: enter n

Select μ ≠ μ0 (alternate hypothesis)

Select Calculate


Test Method # 1:

critical value: normalcdf(α/2, 1E99)

test value: [ vars ], 5: Statistics…, TEST, 2: z


Null: μ0 = μ, Alternative: μ0 ≠ μ

If test value < critical value, do not reject null hypothesis

If test value > critical value, reject null hypothesis and accept the alternate hypothesis


Test Method # 2:


Compare p to α


Null: μ0 = x-bar, Alternative: μ0 ≠ x-bar

If p > α, do not reject null hypothesis

If p < α, reject null hypothesis and accept the alternate hypothesis


One line command:

Z-Test(μ0, σ, x-bar, n, alt)

alt: -1 for μ0 < μ, 0 for μ0 ≠ μ, 1 for μ0 > μ


Example:

n = 515, μ = 7.65, σ = 3.56

α = 5% = 0.05, μ0 = 7.7, α / 2 = 0.025

[ ←| ] [ ← ] (LOAD) (A)
515 [ XEQ ] D

7.65 [ R/S ]

3.56 [ R/S ]


0.05 [ ÷ ] 2 [ = ] [ |→ ] (zp)

(critical value = 1.9600)

7.7 [ XEQ ] B

(z ≈ -0.3187 < 1.9600)


7.7 [ XEQ ] B [ ←| ] [ 1 ] (Q(z))

(p ≈ 0.6250 > 0.025)


Do not reject null hypothesis

Example:

n = 515, μ = 7.65, σ = 3.56

α = 5% = 0.05, μ0 = 7.7


[ stat ], TESTS, 1: Z-Test…

Inpt: Stats

μ0: 7.7

σ: 3.56

x-bar: 7.65

n: 515

Select μ ≠ μ0

Select Calculate


Results:

μ≠7.7

z=-0.3187304977

p=0.7499310153

x-bar=7.65

n=515



p ≈ 0.7499 > 0.05

z ≈ -0.3187 < 1.9600


Do not reject null hypothesis


This is one of several z-tests that can be performed.


Confidence Interval


Determine a confidence level of where the true mean is located given data from a sample:


x-bar: arithmetic mean of a sample

σ: population deviation of the sample

n: sample size


Confidence Mean:

x-bar ± (z * σ) / √n


z: absolute value of the z-score where the two tail probability equals c.

Using TI-84 Plus CE commands: invNorm(c, 0, 1, CENTER)


HP 21S

TI-84 Plus CE

[ ←| ] [ ← ] (LOAD) (A)
n [ XEQ ] D

μ [ R/S ]

σ [ R/S ]


Confidential Interval:

[ ( ] 1 [ - ] c [ ) ] [ ÷ ] 2 [ = ]

[ |→ ] [ 1 ] (zp)

[ XEQ ] C

→ precision [ R/S ]

→ lower limit [ R/S ]

→ upper limit


Note:

LBL C: Confidence interval

precision = (z * σ) / √n

lower limit = x-bar – precision

upper limit = x-bar + precision

[ stat ], TESTS, 7: Zinterval…


Inpt: Stats (Input is shown as Inpt)

σ: enter σ

x-bar: enter x-bar

n: enter n

C-Level: enter confidence level as a decimal

Calculate


One line command:

ZInterval σ, x-bar, n, c

n = 389, μ = 88.84, σ = 10.25

c = 90% = 0.9

[ ←| ] [ ← ] (LOAD) (A)
389 [ XEQ ] D

88.84 [ R/S ]

10.25 [ R/S ]

[ ( ] 1 [ - ] 0.9 [ ) ] [ ÷ ] 2 [ = ]

[ |→ ] [ 1 ] (zp)

[ XEQ ] C

→ 0.8548 [ R/S ]

→ 87.9852 [ R/S ]

→ 89.6948

n = 389, μ = 88.84, σ = 10.25

c = 90% = 0.9

Inpt: Stats

σ: 10.25

x-bar: 88.84

n: 389

C-Level: 0.9


Result:

(87.985, 89.695)

x-bar = 88.84

n = 389



Sources


CalcBlog “Hypothesis Testing using Z-Test on the TI-83 Plus, TI-84 Plus, TI-89, and Voyage 200” February 6, 2011. https://www.calcblog.com/hypothesis-testing-z-test-on-ti84-ti89-graphing-calculator/ Accessed January 30, 2025.


Hewlett Packard HP-21 Stat/Math Calculator: Owner’s Manual Edition 3. June 1990.


TI-Basic Developer “The Z-Test( Command” http://tibasicdev.wikidot.com/z-test Accessed January 30, 2025.

Enjoy! Until next time,


Eddie


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

Spotlight: Casio fx-570SP X II Iberia

Spotlight: Casio fx-570SP X II Iberia


Quick Facts



Model: fx-570SP X II Iberia

Company: Casio

Timeline: about 2014 – 2022, predecessor to the fx-570SP CW

Type: Scientific

Power: 1 AAA battery

Memory Registers: 9 (A, B, C, D, E, F, x, y, M).

Language: Castellano, Català, Euskara, Portugués

Number of Functions: 576 (see source)



This calculator is designed for Spain and Portugal market. I recently was able to obtain one from an auction site.












Introduction



Iberia is in reference to the Iberian Peninsula, which contains Spain and Continental Portugal. The fx-570SP X II Iberia is a calculator with all the keys, menus, functions, and prompts in Spanish.



Examples:

The trigonometric functions sin and sin ⁻¹ are labeled sen and Arcsen, respectively.

MCM is Minimo Comune Multiplo, also known as Least Common Multiple (LCM) in a lot of the world.

Likewise, MCD is Maximo Comune Divisor, also known as Greatest Common Divisor (GCD).



The calculator uses a decimal point as a separator between a number’s integer and fractional part.

The fx-570SP X II Iberia is based off the fx-570EX and the solar counterpart, the very popular fx-991EX Classwiz.



My review of the fx-991EX Classwiz from 2015: https://edspi31415.blogspot.com/2015/11/casio-fx-991ex-classwiz-review.html



There are several functions that are present of the fx-570SP X II Iberia that are not present in the fx-991EX Classwiz:



|_ ([ALPHA] [fraction bar template]): Euclidean Division. Returns the quotient, labeled C, and remainder, labeled R, from dividing two integers.

Example:

148 |_ 15 returns C=9, R=13



Π ([ALPHA] [ x ]): Product of a function f(x). In E Mat (Math IO), the product function is shown in a template form.

Example:

1^2/2 * 2^2/2 * 3^2/2 * 4^2/2 = Π(x^2/2, 1, 4) returns 36





MCM ([ALPHA] [ ÷ ]): Least Common Multiple

Example:

LCM(14, 21) → MCM(14, 21) returns 42



MCD ([ALPHA] [ × ]): Greatest Common Divisor

Example:

GCD(14, 21) → MCD(14, 21) returns 7



Simp ([ALPHA] [ ( ]): Manual simplification of fractions (when Simplificar - Manual is selected).



Repeating Bar ([ALPHA] [ √ ]): Allows to easily type repeating decimal patters.

Example:

1/3 can be written as 0.3 with a bar over the 3 (0.3333333333…).



Menu (Menú)



The modes of the available in the fx-570SP X II are same of the fx-991 EX Classwiz:



1: Calcular (Calculate)

2: Complejos (Complex Numbers)

3: Base-N (Base Conversions and Boolean Objects)

4: Matriz (Matrices)

5: Vector (Vector)

6: Estadística (Statistics)

7: Distribución (Distribution)

8: Hoja de cálculo (Spreadsheet – 1,700 byte capacity, 45 rows, 5 columns (A-E))

9: Tabla (Table – up two function f(x), g(x), can be graphed using a QR code)

A: Ecuación/Func (Equation Solver: Linear Systems and Polynomials)

B: Inecuación (Inequalities)

C: Verificar (Verify)



The fx-570SP X II can solve up to 4 x 4 linear systems and 4-degree polynomials.



Regressions included are:

y = a + b x

y = a + b x + c x²

y = a + b ln x

y = a e^(b x)

y = a b^x

y = a x^b

y = a + b/x



The fx-570SP X II is succeed by the fx-570SP CW (https://www.calculados.com/calculadoras/fx-570-sp-cw/#1683017979230-21cc574f-5c0e).



Final Thoughts



I am fluent in English (my first language) and speak some Spanish, so the fx-570SP X II is going to help practice mathematical terms in Spanish. I look forward to using this calculator.



Calculated Industries has a Spanish version of the Construction Master 5 named the Construction Master 5 En Espanol (https://www.calculated.com/prd201/Construction-Master-5-In-Spanish.html), I may want this for my collection.



Source


Casio. “Classwiz fx-570SP X II Iberia” 2024. https://www.edu-casio.es/portfolio-item/fx-570spx-iberia-ii-classwiz/ Retrieved June 3, 2025.



Eddie


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

fx-991 CW: Finding the Eigenvalues of a 2 x 2 Matrix

fx-991 CW: Finding the Eigenvalues of a 2 x 2 Matrix



Finding the Eigenvalues of a 2 x 2 Matrix


To find the eigenvalues of a matrix M, the characteristic polynomial must be solved in terms of λ:


det( M – λ * I) = 0


where:

M = a square matrix of dimension n x n

I = an identity matrix of size n x n.


The identity matrix is a square matrix in which all elements have a value 0 except the diagonal elements, which have the value 1.


A 2 x 2 identity matrix: [ [ 1, 0 ] [ 0, 1 ] ]

A 3 x 3 identity matrix: [ [ 1, 0, 0 ] [ 0, 1, 0 ] [ 0, 0, 1 ] ]


For a 2 x 2 matrix:


M = [ [ a, b ] [ c , d ] ]


The characteristic polynomial used to find the eigenvalues are:


det( M – λ * I) = 0

det( [ [ a, b ] [ c , d ] ] - λ * [ [ 1, 0 ] [ 0, 1 ] ] ) = 0

det( [ [ a, b ] [ c , d ] ] - [ [ λ, 0 ] [ 0, λ ] ] ) = 0

det( [ [ a - λ, b ] [ c , d - λ ] ] ) = 0

(a – λ) * (d – λ) – b * c = 0

λ^2 – (a + d) * λ + (a * d – b * c) = 0


Note:

trace(M) = a + d

det(M) = a * d – b * c


The characteristic equation to be solved is:


λ^2 – (a + d) * λ + (a * d – b * c) = 0

λ^2 – trace(M) * λ + det(M) = 0



Casio fx-991CW Algorithm


The algorithm will involve two apps: Matrix and Equation. Here is a way of finding the eigenvalues of a 2 x 2 matrices using only the fx-991 CW calculator without the need for writing anything down.


Note: The variables I use in the procedure is just for illustrative purposes. You can use any variables you want to designate the corner elements, the trace, and the determinant. The point is to be organized.


Variables used in this procedure:

A = upper-left element

B = lower-right element

C = trace = A + B

D = determinant


Settings: It is assumed that the MathI/MathO Input/Output mode and a+bi is selected for Complex result.


The screen shots are generated using the ClassPad Math (classpad.net) emulator for the fx-991CW and illustrates finding the eigenvalues of the matrix:


MatA = [ [ 4, 2 ] [ 5, 4 ] ]


Matrix App


Step 1: Press the [ HOME ] key, select the Matrix app.


Step 2: Use the TOOLS key to define a Matrix of dimension 2 x 2.


Step 3: Enter the matrix’s elements. Register each element is registered by using [ OK ] or [ EXE ]. Be careful not to press [ EXE ] or [ OK ] without entering a value first, as we need to keep the matrix editing screen up.


Step 4: Go to element (1,1) (upper-left hand corner), press the [ VARIABLE] key, go to variable A, press [ OK ], and select Store. Then go to element (2,2) (lower-right hand corner), press the [ VARIABLE] key, go to variable B, press [ OK ], and select Store.**


Step 5: Without entering or editing an element, press either [ EXE ] or [ OK ] to leave the matrix editor. When the message “Press [TOOLS] to define Matrix.” appears, we are in the calculation mode of the Matrix app.


Note: If you leave the matrix edit mode before storing the corner elements, you can go back into matrix edit mode by pressing [ TOOLS ], selecting your matrix, and then selecting Edit. You can check to see if corner values are stored by pressing [ VARIABLE ].





Step 6: Press [ SHIFT ] [ 4 ] (A) + [ SHIFT ] [ 7 ] ( B ) [ EXE ]. This calculates the matrix’s trace. Then press [ VARIABLE ], choose C, press [ OK ], choose Store.


Step 7: Press [ CATALOG ], select the Matrix sub-menu, then the Matrix Calc sub-menu, and select Determinant. Then use the catalog to grab the matrix and press [ EXE ] to calculate the matrix. Use the variable list to store the value in D (similar procedure in Step 6).





When transferring between apps, the values stored in the memory registers A-F, x, y, and z are retained, even when the fx-991CW is turned off.


Equations App


Step 8: Press [ HOME ] and select the Equation app and press [ OK ]. Select Polynomial, ax²+bx+c (2nd order polynomial, quadratic equation).


Step 9: Enter the following coefficients: 1 x² – C x + D (note the minus sign on C).


Step 10: Press [ OK ]. The first eigenvalue is displayed. Press the down arrow ([↓]) to get the other eigenvalue. 

 An optional step is to use the [ VARIABLE ] key to store the results (like in E or F, for example). 

 Another optional step is to press [ FORMAT ], select Decimal to see the decimal approximation.





The results are:


C = trace = 8

D = determinant = 6

Eigenvalues:

λ1 = 4 + √10

λ2 = 4 - √10



Other Examples



Find the eigenvalues of Mat B = [ [ -8, 1 ] [ 16, 7 ] ]


Results:

C = trace = -1

D = determinant = -72

Eigenvalues:

λ1 = 8

λ2 = -9





Find the eigenvalues of Mat C = [ [ -5, -7 ] [ 3, - 2] ]


Results:

C = trace = -7

D = determinant = 31

Eigenvalues:

λ1 = (-7 + 5 * √3 * i) / 2

λ2 = (-7 - 5 * √3 * i) / 2




I hope you find this useful and beneficial. Until next time,


Eddie


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

Numworks vs TI-83 Premium/TI-84 Plus CE Python: Drawing and Equals Sign Using Turtle

Numworks vs TI-83 Premium/TI-84 Plus CE Python: Drawing and Equals Sign Using Turtle


Even though many graphing calculators now have Python, and many of them have the same-named modules, the modules and commands can differ between calculators. It is very important to consult the calculator’s manual and the calculator’s help facilities to see what the particular calculator can and can not do.


The goal of halfequ.py is to draw an equals sign using the Turtle module.




Numworks: halfequ.py


from math import *
from turtle import *

# drawing equals sign
# Numworks

def hequ():
  for i in range(10):
    setheading(0)
    forward(120)
    right(90)
    forward(1)
    right(90)
    forward(120)
    left(90)
    forward(1)

# draw equals sign

speed(7)
penup()
goto(-60,-20)
pendown()
hequ()

penup()
goto(-60,40)
pendown()
hequ()

penup()
goto(0,0)
setheading(0)


TI-84 Plus CE Python/TI-83 Premium Python Edition: HALFEQU.py


from turtle import *
t=Turtle()

def hequ():
  for i in range(10):
    t.setheading(0)
    t.forward(120)
    t.right(90)
    t.forward(1)
    t.right(90)
    t.forward(120)
    t.left(90)
    t.forward(1)

t.speed(7)
t.penup()
t.goto(-60,-20)
t.pendown()
hequ()

t.penup()
t.goto(-60,40)
t.pendown()
hequ()

t.penup()
t.home()
t.done()


Notes


* The turtle module is an add-on module for the TI-84 Plus CE/TI-83 Premium Python Edition, which requires a separate download.

* The Numworks turtle does not require named object of turtle like TI does. The TI requiring a “named” turtle may open the possibility of having more than one turtle.

* The TI’s command, t.home(), puts the turtle at point (0,0) with an orientation of 0°.

* In TI’s turtle, t.done() must be at the end of the code in order for the drawing to commence.

* In Numworks, the turtle is represented as a turtle, while the TI’s turtle is represented as an arrow.

* In Numworks, the turtle can be displayed or hidden by the showturtle() or hideturtle() command, respectively.

* Numworks’ drawing range: x = [-160, 160], y = [-111, 111].

* TI’s turtle drawing range: x = [-160, 160], y = [-120, 120].


Eddie


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


HP 21S and TI-84 Plus CE: Normal Distributions and Hypothesis Tests

HP 21S and TI-84 Plus CE: Normal Distributions and Hypothesis Tests Let’s compare how calculations involving the normal distribution ar...