Programming the TI85 to calculate normal probabilities.

J. Turner (jct@nadn.navy.mil) 27 March 1996


Go to USNA homepage.

Go to SM230 home page.

Go to SM230 syllabus.


.Document Outline


Introduction

The TI85 has the capacity to store variables and programs. Variables as you would expect are single letters that store a value. A program can display a value, and it can also store values in variables. Programs can have descriptive names.

Warning: If you use a variable name inside a program, then the old value of that variable will be lost.

The program described here will be called ZCDF. It computes the cumulative normal distribution function. Using this program will eliminate the need for tables of normal probabilities when taking tests and working homework problems.

Programming

A listing of the program is presented first. It is followed by directions for typing the program. If you are familiar with programming a TI85, then you may type the program without reference to the directions.

You may store this program in any program location. When you press the PRGM button and select EDIT you will be asked for a name. Type ZCDF.

PROGRAM: ZCDF
:Prompt M
:Prompt S
:Prompt X
:fnInt(e^(-T^2/2)/sqrt(2*pi),T,0,(X-M)/S)+.5 STO A
:Disp A

Step by step directions:

Read all these instructions before you begin!

  1. Press PRGM and select EDIT. Choose one of the program labels.
  2. Type the name ZCDF. Press ENTER.
  3. Select I/O, and Promp then type "M"
  4. Repeat step 3 for S and X.
  5. Type the next line as it appears, but do not type STO, rather press the STO button; the screen will display an arrow. (See below for more hints.)
  6. Use the (-) before T^2. Press Calc, and then F5 to get fnInt. Use the appropriate calculator button for square root (sqrt), as well as for pi.
  7. QUIT exits the program editor.

Return to beginning of document.

Examples and Use

Use:

To use this program select it from the PRGM NAMES menu and press ENTER. The program will prompt the user for M, the mean and S, the standard deviation, the standard deviation, and X. The displayed result is the probability that a normal random variable with parameters M and S is less than or equal to X. This displayed value is stored in A, overwriting anything that you have stored in A. If you have anything you want stored in A, it should be saved elsewhere before ZCDF is executed. Also X, M, and S are used by this procedure and are changed by it.

Example 1:

PRGM NAMES then select the program
M=? 0
S=? 1
X=? 1.96
.975002104852

Example 2:

Heights of sailors has a normal distribution with mean 68" and standard deviation 4".
If I make a door opening 75" high, how many sailors can fit through?
M=68
S=4
X=75
.959940843136

Example 3:

In the above example, how high can I make the door opening if I only need to accomodate 80% of sailors?
M=68
S=4
X=70
.691462461274
So try a little higher.
M=68
S=4
X=71.5
.809213047147
So about 71.5" is sufficient.

Return to beginning of document.