TFQA Logo

Tools for Quantitative Archaeology
   Email:
             Kintigh email

TFQA Home
TFQA Documentation
TFQA Orders
Kintigh's ASU Home


SAMPMEAN: Learning About Sampling


      This simple program is included as a useful tool for teaching about sampling. An ASCII file with a list of numbers separated by blanks, commas, or carriage returns is read (or one can answer CON to the

request for the file name and type any number of numbers from the keyboard (including carraige returns) followed by a <Ctrl>Z). Either the file or the keyboard-entered list constitutes the (finite) population of values under consideration.


      The program computes a population mean and asks for a sample size and a number of TRIALS. It then

picks a random sample (with replacement) from the population. It displays on a histogram the location of the population mean with >> and with a bar for the location of the sample mean. Each time "P" is pressed, another sample is selected and its sample mean value is included in the histogram. If, at any time, "F" is pressed, the remainder of the sample are selected, one by one, and you can see the sample means added to the

histogram until it includes the TRIALS sample means. If instead of pressing "P", one presses "S" the distribution of sample values in a single sample (rather than the distribution of sample means) is shown. Throughout the program execution, runnings statistics of the samples are listed.


SEQUENCE OF PROGRAM PROMPTS


Name of File with Population Distribution {.DAT} ?


      File with list of values. Alternately, enter “CON” and type in any number of values followed by <Ctrl>Z.

Sample Size


      Size of the sample drawn with replacement from the population.


Number of Trials ?


      Number of different random samples to be selected.


Pause Between Samples {Y} ?


      Yes allows you to see each sample selected with its sample mean.


Histogram Lower Limit {xxx.xx} ?

Histogram Upper Limit {xxx.xx} ?

Histogram Interval {xxx.xx} ?


      This gives the user some control over the histogram of sample values selected and the histogram of the sample means. Generally, pick a number for the interval width at least as large as the default value to keep the histogram fitting on the screen.


[P]opulation or [S]ample Histogram or [F]ast


      Hitting P shows the location of the sample mean with respect to the population mean. Hitting S shows the selected sample with its sample mean. Hitting F runs through the rest of the samples creating a histogram of the sample means. In the histograms the population mean is shown by a >>, the sample mean by a +, and the grand mean of the sample means as a >.


Home Top Overview Ordering Documentation

Page Last Updated - 21-Jul-2007