Stat48 ver 2.1 for HP48/49 by Scott Guth, sguth@mtsac.edu.  
Web Page: www.mtsac.edu/~sguth

Stat48 ver 2.1 is copyright August 28 1999, by Scott Guth

To run:
Download the file Stat48 to your HP48G(X) using BINARY mode.
Go into the STAT48 directory and execute the program 'Menu.'

Sorry, but this program doesn't run on the S(X) calculators
because the program uses the INFORM and CHOOSE commands, which
aren't available for the S(X) series.

Enhancements for version 2.1 include:
* Source code modified slightly for HP49 compatibility.

Enhancements for version 2.0 include:
* Confidence intervals for 2 population means, independent samples.
* Allow user to specify "pooled", "unpooled", or "f-test decides"
  for hypothesis tests & confidence intervals on 2 means from 
  independent small samples.
* Allow user to specify when variance(s) are known for tests or 
  conf. int's on means to force a z test even when sample sizes are
  small.
* Allow user to specify how large a large sample is (usually n>30
  is large, but this can be changed by the user).
* Allow the user to specify round-off for final results.
* Confidence Interval for 2 sample proportions.

Enhancements for version 1.3 included:

* More Standardized Notation
* 2 sample proportion test.
* 2 way ANOVA -- one observation per cell.
* 2 way ANOVA -- more than one observation per cell (equal number of
  observations per cell).
* Goodness of Fit.
* Means test and confidence interval for 2 dependent samples.
* t test for linear correlation.

Additional Features

* single population mean test
* single population proportion test
* single population standard deviation test
* two population means test
* two population variances test
* Analysis of Variance - Single Factor
* Contingency Tables test
* Critical Values for the Z, t, Chi^2, and F distributions, given degrees
  of freedom and area of upper tail.

* Version 1.3 allows the user to decide on the degrees of freedom
  for the two sample t-test for means with unequal variances.  Pre-
  viously, min(n1-1, n2-1) was used for degrees of freedom, but now 
  the user may choose between this, the more correct 

  df=(A+B)^2/(A^2/(n1-1)+B^2/(n2-1)) where A=s1^2/n1 and B=s2^2/n2

  or the latter rounded to the nearest integer.

I have attempted to use more useful notation in the program,
since many people have written me asking what the abbreviations 
mean.  Feel free to make suggestions if you have any ideas!

*********************************************************************

Introduction

STAT48 is a directory for the HP48 which does most hypothesis tests &
confidence intervals which are commonly performed in an 
Elementary Statistics Course.  The program is written in User RPL, but
since most of the work is done by the ROOT function in HP48 ROM, speed is
not really a problem.

I have taught statistics at the college level for nearly nine years.  I 
wrote this package to help me grade tests -- never did I realize how
popular it would become.  I have been motivated to make the package 
more useful for others beside myself only because of the many nice 
letters people have written to me in regard to stat48.

In the STAT48 directory you will find the command MENU.  Start this 
program to perform most hypothesis tests and confidence intervals.  
Just follow the help at the bottom of each input form, and eventually you'll 
get the test statistic and critical value(s) for your hypothesis test, or 
confidence interval, as requested by you.  

Included are Hypothesis Tests and Confidence Intervals for:

* single population mean (small or large sample size).
* single population proportion
* single population standard deviation
* two population means (independent or dependent)
* two population variances (F-test)
* two population proportions
* Analysis of Variance -- 1 factor 
* Analysis of Variance -- 2 factor, 1 or more than 1 observation per cell.
* Contingency Tables
* Goodness of Fit
* Test for Linear Correlation
* Critical Values for the Z, t, Chi^2, and F distributions, given degrees
  of freedom and area of upper tail.

Hypothesis tests are all performed by computing test statistics,
critical values and p-values.  The test statistics are abbreviated T.S.,
and they are computed from the sample data supplied.  

Most of the tests are self explanatory, if you use the built-in menu system.
Go into the STAT48 directory and execute 'Menu' to begin.

It is necessary for the user to understand basic object types on the HP48
and how to enter them in a command line.  Several applications use matrices,
several use lists, and one (2 Factor Analysis of Variance, more than 1
observation per cell) uses a list of matrices.

The only test which should require explanation is the 2 Factor ANOVA test with
multiple observations per cell.  Since such matrices are not valid HP48
objects, I chose to use a list of matrices as the solution.  The first matrix
in the list would contain the first observation for each cell.  The second
matrix contains the second observation for each cell, and so on.  

For example, the table

		Col.1	Col.2	Col.3
	Row.1	5,7,3	4,2,8	5,6,1
	Row.2	4,6,1	7,4,3	7,5,0
	Row.3	1,3,1	5,2,3	9,8,7

Would be entered as
{ [[5 4 5][4 7 7][1 5 9]], [[7 2 6][6 4 5][3 2 8]], [[3 8 1][1 3 0][1 3 7]] }.

The notations for 2-factor-ANOVA are rather complicated, but I tried to make them
as understandable as possible.  For example, row or column factors are referred 
to as row or column respectively.  SSrow, SScol, SST, SSE, SSrc are sums of squares 
for row, column, total, error, and interaction (SSrc = SS row & column).  
MSrow, MScol, MST, MSE, MSrc are means of squares for row, column, total, error, 
and interaction (MSrc = MS row & column).  For hypothesis tests, F test statistics 
for row, col, rc (rc=interaction) are F T.S. row, F T.S. col, F T.S. rc, F critical
values are Frow(alpha,DFnum,DFden), Fcol(alpha,DFnum,DFden), and 
Frc(alpha,DFnum,DFden).  P-values are given for each test statistic as well.

If you have questions or suggestions about notation or functionality, please 
email me at sguth@mtsac.edu.

P-values are also supplied for each hypothesis test.  It is important to
note that currently STAT48 computes p-values for one-tail tests under the
assumption that the the test statistic is on the same side as the 
appropriate tail (stat48 only asks for the number of tails -- it does not 
ask on one tail tests if the tail is right or left tailed).  In rare 
occasions, this is not the case, so it is up to the user to compute 

               1 - given_p_value 

to compute the correct p-value.

Please note that critical values are computed (for the F, Chi-square, and 
Student's t distributions) with EXACTLY the correct degrees of freedom
in the problem, while most tables require you to round the deg. of freedom or
compute critical values via linear interpolation.  For this reason, 
the critical value returned may be slightly different from what you 
looked up in a table -- it is actually more precise.

Since the computation of critical values (with inverse probability
distribution functions) is not a process which is native to the 48GX,
they take a several seconds to compute.  The HP48 function ROOT is used
to compute these.

Store the number of places for rounding in the variable 'PLACES' in
the STAT48 directory.  'PLACES' defaults to 4.

Store the largest sample size that you consider "small" in the 
variable 'SMALL', also in the STAT48 directory.  'SMALL' defaults
to 30.

Additionally, in the STAT48 directory, you'll find two important
sub-directories:  FREQ and BINO.

FREQ contains tools for computing mean & standard deviation for data
accompanied by frequencies (a feature missing in the HP48).
Enter the 1st pair as a vector

[x_value, frequency]

then press SADD (the S in the name of the command is really a Sigma
on the menu!).  The rest of the pairs don't need to be entered as a vector.
They may be entered as

x_value frequency

with a space in-between, and then press SADD.

When done, press the button XBARmuSsigma  (the mu and sigma are greek 
letters on the menu), and you get the mean, sample and population 
standard deviation.

BINO contains two programs for computing binomial probabilities.  
These may not be as useful to you so feel free to purge this 
directory if you don't need it.  To use it, store values in X, 
N, and P (if you don't know what these are, check a statistics text, 
press BINO to compute the binomial probability exactly, and press 
APPX to use the normal distribution as an approximation.

I have tested these programs carefully, but if you find any errors,
please let me know, so that I can fix them!  As always, I will not
be held responsible for errors that this program may generate, so
use at your own risk.  Everything is written in User RPL, so the
programs are quite safe.

If this is useful to you, please send me a note at sguth@mtsac.edu.
Thanks, and enjoy.
