




                           CHAPTER 13

                      STATISTICAL POTPOURRI




                    THE ON-SCREEN CALCULATOR

  The  SPPC  System  provides  a  complete  on-screen  scientific
calculator.  It is designed as a "Reverse Polish Notation" or RPN 
calculator which is very easy to use.  The main  thing  you  must
remember  is  that all numeric values must be entered by pressing
<cr> and results are obtained by entering an operator.

  Examples: 

    To solve y = 2 * 3, enter the following keystrokes:
      2 <cr> 3 <cr> *

    To solve y = (2 + 3) * (4 - 5), enter:
      2 <cr> 3 <cr> + 4 <cr> 5 <cr> - *

    To solve y = sqrt(16.38 * 0.55) / .05, enter:
      16.38 <cr> 0.55 <cr> * fs .05 <cr> /

    To solve y =  14.8  *  cos(45),  enter:
      14.8 <cr> 45 <cr> r tc * 


TRIGONOMETRIC  FUNCTIONS

  The  calculator provides the basic trigonometric functions with 
the tap of a key.  However, you should carefully  note  that  all
trig  functions require radians.  This is managed quite easily by 
the fact that any number can be converted  to  radians  with  the
press  of a single key.  And, when the final result is presented, 
in radians, it can be converted to degrees  with  another  single
keystroke.


STATISTICAL FUNCTIONS

  The  RPNC  provides some very convenient statistical functions. 
When you wish to use the statistical functions, you should  clear
them by pressing the letters 'cs' for "Clear Statistics".  If you
do  not  do  that,  new  data  entries  will  be  added  to those
previously entered.  Thus, you may enter part of your data, carry 
out other operations, and then  return  to  data  entry  for  the
statistical functions. 

  To enter data for the statistical functions,  enter  Y  <cr>  X
<cr> s (for "Summate").  Repeat those steps for each pair of Y an
X values.

  To remove data from your statistical calculations, enter Y <cr>
X <cr> n (for "Negate") and the values of Y and X will be removed
from all statistical calculations.

  For single valued statistical functions you may enter X <cr> s.
Repeat  those  steps  for  each value of X.  You may then get the 
mean and standard deviation of X by pressing gmx (for  "Get  Mean
of X") and gsx (for "Get Standard deviation of X").  


MEMORY ARITHMETIC

  You may also conduct memory arithmetic using the calculator,
and the rules for doing that are very simple.  They are as
follows: 

  msi = "Memory Store i"; store in memory i.
  mri = "Memory Recall i"; recall from memory i.
  m+i = "Memory Add i"; add to contents of memory i.
  m-i = "Memory Subtract i"; subtract from contents of memory i.
  mxi = "Memory Multiply i"; multiply contents of memory i.
  m/i = "Memory Divide i"; divided contents of memory i.

  To clear all 21 memory registers, press cm (for "Clear
     Memories").

  To store 15.67 in M9, press                          
     15.67 <cr> ms9 <cr>

  To recall the contents of M14, press                 
     mr14 <cr>

  To sum 15.67 into M14, press                         
     15.67 <cr> m+14 <cr>

  To multiply the contents of M8 by 7.8, press
     7.8 <cr> mx8 <cr>

  To divide the contents of M8 by 7.8, press
     7.8 <cr> m/8 <cr>

  To recall M4, sum it with M19 and add the result into M17,
     press mr4 <cr> mr19 <cr> + m+17 <cr>



                         DATA ENCRYPTION

  This procedure enables you to encrypt sensitive data or text
messages provided the data or messages consist of strict ASCII
characters over the range from 32 to 126.


ENCRYPTING A FILE   

  In order to ENCRYPT a data file or  message,  choose  option  B
from  the  main  menu of the program.  Then enter the name of the
file that you wish to ENCRYPT.  Then enter the name of the output 
file where you want the encrypted data  file  or  message  to  be
stored.

  When  you  have  provided  the input and output file names, you 
must provide a 'code key'.  You may use any code  key  up  to  15
characters  in length.  You must record or remember this code key
else you cannot later decode your data file or message. 

  The program will then ENCRYPT and store your data or message on
the  output file that you indicated.  You may send a copy of your 
encrypted file to anyone who also has this program and  the  code
key that you used.


DECODING MESSAGES 

  In  order to DECODE a datafile or message, choose option C from 
the main menu of the program.  You will then be  asked  to  enter
the  name  of the file that you wish to decode.  You will then be 
asked to enter the name of the output file  where  you  want  the
DECODED message to be stored. 

  Once  you  have  provided  the input and output file names, you 
will be asked to provide the 'code key' which  will  be  used  to
decode  the  input file.  If you do not know the proper code key, 
you will obtain unintelligible results.  If you enter the  proper
code  key, the decoded data file or message will be stored in the
output file that you indicated.


VIEW AN ENCRYPTED FILE 

  Option D of the menu allows you to view and encrypted  file  on
screen without storing the decrypted version on an external file.
When  you  choose this option you will be asked to enter the name 
of the file that you wish to view.  You will  then  be  asked  to
provide  the  'code  key'  which will be used to decode the input 
file.  If you do not know the proper code key,  you  will  obtain
unintelligible  results.   If  you enter the proper code key, the
decoded message will be displayed on screen. 

  You may exit instantly by pressing the * key beside  the  shift
key on the right side of your keyboard.  This will help to insure
privacy  while you are viewing confidential data or messages.  If 
someone approaches who should not see the file, just press the  *
key and you will return immediately to the main menu.



                         RANDOM INTEGERS

  This program enables you to draw a random  sample  of  integers
from  a  range  of values which you specify.  In order to use the
program you must first decide whether you wish to employ sampling
with replacement or sampling without replacement.  That choice is
made by selecting the approriate option from the main menu of the
program.   

  Once you have chosen the sampling procedure you  wish  to  use,
you must then enter a positive integer of your choice in order to
initialize or 'seed' the random number generator.  

 After  you have seeded the random number generator you must then 
indicate the range of values (from 'Start' to 'End')  from  which
you   wish   to   select   N  integer  values.   There  are  some
restrictions.


PARAMETER RESTRICTIONS

  The value of 'Start' cannot be less than 1.

  The value of 'End' cannot be greater than 99999.

  The value of N must be less than (End - Start + 1).

  N must be less than 5000.


PARAMETER CHECKING

  The  above  restrictions are checked by the program so you need
not worry about messing up.  The program won't let you.  However, 
you should be aware that the program could run for quite  a  long
time if you choose sampling without replacement and your value of
N  represents a really large proportion of the specified range of
values. 

  That's about it.  We hope the program is  useful  to  you.   It
saves all the trouble of working with random number tables!



                      RANDOM NORMAL SAMPLES

  This program enables you to generate any reasonable number  (up
to  30,000)  of  normally  distributed  random  variables for any 
reasonable number of cases  (no  limit)  that  have  a  specified
population  mean and standard deviation.  Each variable will have
the same population mean and standard deviation. 

  If you wish to create a new sample, choose Option  B  from  the
main  menu.  If you wish to add cases to an existing file, choose
Option C from the main menu.  

  The  speed with which the program generates your sample data is
dependent on the number of variables and the number of cases that 
you specify.  For example, if you request the  production  of  10
variables  for  100  cases,  the  program  will require about one 
minute on an XT when writing to a floppy diskette  and  about  55
seconds  when  writing  to your hard disk -- if you have the high 
speed  math  co-processor!   If  you  do  not   have   the   math
co-processor the program will be very slow.

  Thus,  if  you are generating a truly large sample with lots of 
variables, you might want to use Option C.  That is,  create  the
first  part  of your data using Option B.  You can then add cases
to your file during other computer sessions by using Option C.

  The output file will contain the following information:

  1. A header line of your choosing.

  2. A line specifying the number of cases, variables, and the
     letter R (for raw data).

  3. Variable names which range from VAR0 to VARk where k is one
     less than the number of variables you requested.

  4. The data values generated by the program.


                        BASE CONVERSIONS

  This  module  enables  you  to convert numbers from one base to 
another up to base 32.  If you have base 10 values which must  be
converted  to  hexidecimal  values  for example, you can make the
conversions with enormous simplicity.  Merely enter the base from
which you wish to convert, the base to which you wish to convert, 
and then the numeric values to be converted.  Outputs  from  this
module are not saved for later printing.


                           ASCII TABLE

  This module does nothing but display the ASCII characters along
with their decimal, octal and hexidecimal equivalents.  The ASCII
Table is presented on screen only.  It is not saved for printing.
