E-Code

Sample size for a margin of error — a TI-84 Plus CE program

By E-Code · updated

SAMPSIZE is a TI-BASIC program for the TI-84 Plus CE. How many observations you need for a chosen confidence level and margin of error: estimating one mean (known sigma), one proportion (p-hat or the safe .5), or the difference of two means (per group), rounded up.

What it asks for and what it shows

It asks for 3 values at its prompts, after you pick option 1 from its menu. In the example below it shows Z*, N EXACT, NEED N.

Example run

One of its oracle test cases: “mean: sigma 15, within 3 at 95%”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Menuoption 1
Input 10.95
Input 215
Input 33
The screen shows
Z*=1.959963985
N EXACT=96.03647052
NEED N=97

How it's checked

5 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 24 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE statistics programs · All TI-84 Plus CE programs