Sample size for a margin of error — a TI-84 Plus CE program
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.
| Step | Value |
|---|---|
| You enter | |
| Menu | option 1 |
| Input 1 | 0.95 |
| Input 2 | 15 |
| Input 3 | 3 |
| 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
- Open the library in the TI-84 Plus CE calculator and pick “Sample size for a margin of error” (SAMPSIZE).
- Put it on your own calculator with a computer and a USB cable, or type it in by hand.
Related programs
- Confidence intervals: z, t, proportion, two-sample
- Regression: linear, quadratic, exponential with r²
- Hypothesis tests: z, t, two-sample t, chi-square
- Binomial, Poisson and normal probabilities
- One-way ANOVA
All TI-84 Plus CE statistics programs · All TI-84 Plus CE programs