 	         	STATSPACK V1.1
		        --------------

		Statistical Software for the HP 48GX
                      graphics calculator

                       by Stuart Sidders

                     Watford Maths Centre


                         
Contents:

1.0	Introduction
2.0	System Requirements
3.0	Disclaimer	
4.0	Registration
5.0	Installation
6.0	Library Menu
7.0	General Functions and Features
8.0	Program Details
8.01    STATSPACK: Binomial probability function
8.02		   Menu Keys
8.03		   Graphical Display
8.10    STATSPACK: Poisson probability distribution
8.11		   Menu Keys
8.12		   Graphical Display
8.20    STATSPACK: Normal probability distribution
8.21		   Menu Keys
8.22		   PICT menu key
8.30    STATSPACK: Percentage points on the Normal distribution
8.31		   Menu Keys
9.0	About
10.0	Uninstall
11.0	Acknowledgments
12.0	World Wide Web (WWW)
	











1.0	Introduction
--------------------

STATSPACK is a suite of programs that have been written to cover a variety of common statistical functions.
The latest version contains the following functions:
 
    1) The Binomial probability distribution
    2) The Poisson probability distribution
    3) The Normal probability distribution
    4) Percentage points for the standardised Normal distribution


The program that is presented here is a demo of the current version of STATSPACK.

As a teacher of mathematics and statistics, I wrote the program primarily for my students. It has been tried and tested over many months and is written for the HP 48GX calculator.

Various symbols are used in the documentation but cannot be reproduced exactly as seen on the calculator due to the limitations of this text editor.

	Symbol 		Meaning

	u		mean  (mu)
	o^2		variance  (sigma squared)
	

There is a facility on the HP48GX to calculate Normal probabilities but I have often found this cumbersome to use and so I developed the Normal distribution program to enhance this existing command.


2.0	System Requirements
---------------------------

Calculator: HP 48GX 
Minimum Free Memory 60K ( Demo )
		    58K ( Registered version )         


3.0	Disclaimer
------------------
Although every effort has been made to eliminate errors in the software, I take no responsibility for any loss of memory or damage these programs cause to your calculator.

I would advise that a calculator is fully backed up before loading this library.



4.0	Registration
--------------------

This demo module is presented as SHAREWARE. To obtain the full version please register for the program in one of the following ways.
		The cost of which is $25(US)

	1) On Compuserve - GO SWREG and look for reg id #13682
	2) or you can obtain a copy from
			
                      	Stuart Sidders
			Watford Maths Centre
			40 Rickmansworth Road,
			Watford,
			Hertfordshire,
			WD1 7HT
			ENGLAND. 

	  Please make cheques payable to WATFORD MATHS CENTRE
          Cost 20 to cover disk, postage and packing.


Any person registering for the program will be entitled to full support.



5.0	Installation
--------------------

The program comes in the form of a library.
     To install the library to port 0: ( similar for port 1 )
        1) Remove demo version with :0:1026 PURGE if in port 0
           or :1:1026 PURGE if in port 1
           ( See uninstall for details )
        2) Dowload the library to the HP 
        3) Recall the library to the stack
        4) 0 STO if storing in port 0 or 1 STO if in port 1
        5) Execute OFF-ON keys or ON-C
        6) (Optional) Delete the variable created by the download procedure
           from its directory.

    

6.0	Library Menu
--------------------

STATSPACK is accessed via the STPK menu key in the library.
The menu will then change to display the four available programs.
	
	BINO	Binomial probability distribution

	POISS	Poisson probability distribution
	
	NORM	Normal distribution

	z	Percentage points for the Normal distribution	
	

7.0   General functions and features
------------------------------------

The following functions apply to all program modules

 *  Movement between fields:
       Use the cursor arrow keys to move between fields or the ENTER key.

 *  Use the ENTER function key to submit a value to a field

 *  Algebraic entry is available

 *  Any value can be edited using the EDIT function key

 *  Radians or degree modes are available




8.0 Program details
-------------------


8.01	STATSPACK:  Binomial Probability Distribution

Menu Key: BINO


This module evaluates probabilities for any random variable X which
follows a binomial model.

The notation used is X~B(n,p) where n is the number of trials and p
the probability of success.

The program allows calculation of P(X=a), P(X<a), P(a<X<b) etc

A menu key APRX is available to automatically approximate the distribution to the Poisson or Normal distributions depending on the size of the parameters if required. Use of this key can speed up calculations at the expense of accuracy. Answers are generally correct to about 3 decimal places.
When the APRX menu key is selected, the approximations are made if the conditions below are met.

 * The Poisson approximation is automatically used when n>50 and p<0.1
 * The Normal approximation is automatically used when np<5 and n(1-p)<5

Notification of an approximation will be made by a message appearing in the top right of the display.

           * N APRX   Normal approximation being used
           * P APRX   Poisson approximation being used


A facility is given to compare the actual probability to that of the Normal or Poisson approximations via the NORM or POISS menu keys.

Any distribution can be graphically displayed and probabilities traced.
Axes are set automatically.        



Limitation: Maximum of 2000 trials


The demo version has restrictions placed on the range of trials n that
are available.

          These are  n<=5,  50<=n<=60 and n>=200.

The registered version allows all values of n in the range 1-2000.



8.02	Menu Keys

The menu keys are dynamic, i.e. will appear when circumstances allow.

 The following keys allow calculation of various probabilities

  Menu Key     Row	Function 

   X= 		1 	Calculates P(X=a)	
   X<		1	Calculates P(X<a)
   X>		1	Calculates P(X>a)
   X<=		1	Calculates P(X<=a)
   X>=		1	Calculates P(X>=a)
   <X<		2	Calculates P(a<X<b)
   <=X<=    	2	Calculates P(a<=X<=b)



  HOLD         1/2	This key toggles the calculation of any probability 			on/off
         		( Useful when changing several fields )

  NORM	 	2	Normal approximation to the underlying Binomial 			distribution. This function is dynamic and only 			appears when a probability has been calculated.
 
  POISS	 	2	Poisson approximation to the underlying Binomial 			distribution. This function is dynamic and only 			appears when a probability has been calculated. 
                  	   
  STK^ 		2	Dumps the Distribution and the current probability to 			the stack. This function is dynamic and only appears 			when a probability has been calculated.
                	
  PLOT		3	Displays graphically the distribution. This function 			is dynamic and only appears when n and p are given.
	          
                  
  APRX		3	Sets the approximation mode on. Approximates 				probabilities automatically to the Poisson or Normal 			distributions. ( See notes in 7.1 )



8.03	Graphical Display: PLOT menu functions

When any graph is displayed via the PLOT menu key, the menu will change and the user is presented with the following.

  Menu Key     Row	Function 

   P() 		1 	This function will trace across the graph displaying
              		probabilities. A small tick mark moves under the x 			axis to highlight the current probability in the 			distribution.

   Exit		1	Exit to main program


The cancel key can be hit at any time to terminate a lengthy plot. The trace feature will still work, despite the incomplete graph. Useful if you want to trace a graph only and do not wish to view the distribution.

Axes are automatically set to cover a suitable domain.




8.10	STATSPACK:  Poisson Probability Distribution

Menu Key: POISS


This program evaluates probabilities for any random variable X which
follows a Poisson model.


The notation used is X~P(u) where u is the mean.

The program allows calculation of P(X=a), P(X<a), P(a<X<b) etc

A menu key APRX is available to automatically approximate the distribution to the Normal distribution depending on the size of the parameters, if required. Use of this key can speed up calculations at the expense of accuracy. Answers are generally correct to about 3 decimal places.
When the APRX menu key is selected, the approximations are made if the conditions below are met.

 * The Normal approximation is automatically used when the mean >20

Notification of an approximation will be made by a message appearing in the top right of the display.

           * N APRX   Normal approximation being used

A facility is given to compare the actual probability to that of the Normal  approximation via the NORM menu key.

Any distribution can be graphically displayed and probabilities traced.
Axes are set automatically.        


The demo version has restrictions placed on the mean, u.
          These are  u<=5,  20<=u<=30 and u>=100.

The registered version allows the mean to be any value >0.  


8.11	Menu Keys

The menu keys are dynamic, i.e. will appear when circumstances allow.

 The following keys allow calculation of various probabilities

  Menu Key     Row	Function 

   X= 		1 	Calculates P(X=a)	
   X<		1	Calculates P(X<a)
   X>		1	Calculates P(X>a)
   X<=		1	Calculates P(X<=a)
   X>=		1	Calculates P(X>=a)
   <X<		2	Calculates P(a<X<b)
   <=X<=    	2	Calculates P(a<=X<=b)



  HOLD         1/2	This key toggles the calculation of any probability 			on/off
         		( Useful when changing several fields )

  NORM	 	2	Normal approximation to the underlying Binomial 			distribution. This function is dynamic and only 			appears when a probability has been calculated.
               	   
  STK^ 		2	Dumps the Distribution and the current probability to 			the stack. This function is dynamic and only appears 			when a probability has been calculated.
                	
  PLOT		3	Displays graphically the distribution. This function 			is dynamic and only appears when the mean is given.
	                            
  APRX		3	Sets the approximation mode on. Approximates 				probabilities automatically to the Normal 				distribution. ( See notes in 7.11 )



8.12 Graphical Display: PLOT menu functions

When any graph is displayed via the PLOT menu key, the menu will change and the user is presented with the following.

  Menu Key     Row	Function 

   P() 		1 	This function will trace across the graph displaying
              		probabilities. A small tick mark moves under the x 			axis to highlight the current probability in the 			distribution.

   Exit		1	Exit to main program


The cancel key can be hit at any time to terminate a lengthy plot. The trace feature will still work, despite the incomplete graph. Useful if you want to trace a graph only and do not wish to view the distribution.

Axes are automatically set to cover a suitable domain.


 

8.20	STATSPACK:  Normal Probability Distribution

Menu Key: NORM


This module evaluates probabilities for any random variable X which
follows a Normal (Gaussian) distribution.

The notation used is X~N(u,o^2) where u is the mean and o^2 the variance.

The program allows calculation of P(X<a), P(X>a) and P(a<X<b)

8.21	Menu Keys

  Menu Key     Row	Function 

   X<		1	Calculates P(X<a)
   X>		1	Calculates P(X>a)
   <X<		1	Calculates P(a<X<b)


  HOLD          1	This key toggles the calculation of any probability 			on/off
         		( Useful when changing several fields )
   
  PICT		1	Displays standardised z values corresponding to the 			observed values in a graphical way. ( see 				section 7.23 below for more details ). This menu key 			is dynamic and will be displayed when a probability 			has been calculated.

  STK^ 		1	Dumps the Distribution and the current probability to 			the stack. This menu key is dynamic and will be 			displayed when a probability has been calculated.



8.22	PICT menu key

This key provides the user with a graphical display of a Normal curve and the standardised curve. The curves are not drawn to scale but do provide a visual display of the mapping between an observed value and its equivalent z value.
When this screen is displayed a new menu will appear.
	
  Menu Key     Row	Function	

    VALUE	1	Displays the value of any highlighted field
    STK^	1	Dumps the highlighted field to the stack
    EXIT	1	Returns to main program

When the VALUE key is selected the current menu will disappear and the full value of the highlighted field will be shown. The user can navigate all fields by using the cursor arrow keys. To return the menu, just hit any menu key. 
 

The demo version has restrictions placed on the mean, u.
The allowed range is:-

            u<=5, u>=100.

The registered version has no restrictions placed on the mean.


8.30	STATSPACK:  Percentage Points on the Normal Distribution

Menu Key: z

This program will evaluate the percentage points for a standardised Normal distribution. The user is shown a standardised Normal distribution graph
   ie Z~N(0,1)

Probabilities can be entered either as a percentage or as a value from 0-1.
Percentages are the default method of entry.
These values can be either the upper or lower tails.

As soon as the upper or lower tail value is entered, the corresponding z value will be evaluated and displayed. The displayed graph will then be shaded to reflect the selected percentage probability.

Values can be dumped to the stack.

The demo version has restrictions placed on the upper or lower tails p and q respectively.

The allowed range is:-

            p<=10% (lower tail) and  q<=10% (upper tail)

Any value in the range 0-100% or 0-1 is allowed in the registered version.


8.31	Menu Keys

  Menu Key     Row	Function 

   %		1	Toggles percentage mode ON/OFF


  STK^ 		1	Dumps the calculated z value to the stack. This menu 			key is dynamic and will be displayed when a z value 			has been calculated.


 



9.0	ABOUT:  Information pages

   Several pages providing information about STATSPACK

   MENUKEYS: 

       	ABOUT 			Title page - version 

       	WWW 			General information

       	REG 	Demo only	Details on how to register for the full 				version of STATSPACK

	BINO	Demo only	Restrictions on binomial distribution demo

	POISS	Demo only	Restrictions on Poisson distribution demo

	NORM	Demo only	Restrictions on Normal distribution demo

	z	Demo only	Restrictions on z percentage points demo
	
 
   To exit from this menu display hit the cancel key.


10.0	Uninstall
-----------------
To remove this program from the library, do the following:

	1) Select the HOME directory
	2) Enter the library number 1026 on the stack
        3) Select 'left shift', 'library' 'DETAC' (this will detach the 	   library from the HOME directory)
	4) Enter the library identifier
	   :0:1026 if stored in port 0 or
	   :1:1026 if stored in port 1
	5) Now enter 'left shift', 'Purge'
           You should see :0:1026 PURGE or :1:1026 PURGE
	6) Press ENTER and the library should now be removed.
		


11.0	Acknowledgments
-----------------------

There were a number of occasions in the writing of this program that I ran into programming difficulties. Many thanks go to Lee Buck for the time he spent answering my queries.



12.0	World Wide Web (WWW)
----------------------------
 
For further details of STATSPACK and latest information on 		forthcoming modules, upgrades etc.

visit:

        http://ourworld.compuserve.com/homepages/WMC_CalcSoft
   
If you have any comments good or bad or any suggestions for future 	modules, please contact me at:-

     E-Mail: 101565,2240    (Compuserve)

     Internet: 101565.2240@compuserve.com

