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.

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...