home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / educ / pstat1.zip / SIMCORR.DOC < prev   
Text File  |  1986-12-17  |  5KB  |  103 lines

  1.  
  2.                                      SIMCORR
  3.  
  4.                                  Joseph C. Hudson
  5.                          4198 Warbler Dr. Flint, MI 48504
  6.  
  7.  
  8.              Simcorr produces pseudo-ramdom samples from a bivariate
  9.         normal population. The main use of this program is to illustrate
  10.         the meaning of the correlation coefficient. Simcorr can help
  11.         develop a feeling for the variability in the relationship
  12.         between the population and sample correlation coefficients. The
  13.         amount of variability might suprize some.
  14.              Simcorr was written using the Turbo Graphics Toolbox to
  15.         generate graphs of the simulated samples. Two files from this
  16.         toolbox must be present when Simcorr is run. These are the error
  17.         message and 4x6 font files. To keep things together, these files
  18.         have been renamed SIMCORR.MSG and SIMCORR.FON. They must be
  19.         on the default drive when SIMCORR is run. When you type SIMCORR
  20.         with these two files and SIMCORR.COM on the default drive, the
  21.         following screen begins to develop:
  22.  
  23.         ________________________________________________________________
  24.  
  25.                 Sampling from a Bivariate Normal Population
  26.  
  27.              Mean of X:     0.00           Stan Dev of X:     1.00
  28.              Mean of Y:   100.00           Stan Dev of Y:    10.00
  29.              Correlation:   0.20           Sample Size:       45
  30.  
  31.              Observed   XBar:   0.2431     Obs S. D. of  X:   0.8376
  32.              Observed   YBar: 101.6787     Obs S. D. of  Y:   9.1961
  33.              Obs Correlation:   0.1646     Output  Files:     c:simco
  34.              Z statistic:       0.2376     Prob of larger |Z|: 0.8122
  35.  
  36.         You may now type
  37.           G to see graph,
  38.           N to give a name for output files
  39.           S to save random data to disk
  40.           Q to quit
  41.  
  42.         When the graph is on screen, you may type:
  43.           N to give a name for output files
  44.           S to save graph to disk
  45.           P to redo with new parameters
  46.           D to redo with same parameters, new rndm data, see this screen
  47.           G to redo with same parameters, new rndm data, see graph only
  48.           Q to quit
  49.         ________________________________________________________________
  50.  
  51.  
  52.         Simcorr                                                   Page 2
  53.  
  54.             The user enters the first 6 numbers shown.generates the
  55.         rest of the screen. The standard deviations must be positive,
  56.         and the correlation must be between -1 and 1. Sample size must
  57.         be at least 4 and at most 110. If you want to save either the
  58.         simulated data or a graph to disk, you must use "N" to
  59.         give a name for the output files. A name of 5 characters or
  60.         less must be specified. You can specify a dirve designator if
  61.         you wish. The program will add the characters SDA to data file
  62.         names and GRF to graph files. File extensions begin with .001
  63.         and progress upward with succeeding saves. If you change names,
  64.         the numbered extensions begin over at .001.
  65.              The second block of numbers are computed by the program
  66.         from the random sample. The last row of this block shows the Z
  67.         statistic and the prob value for an approximate hypothesis test
  68.         that the sample comes from a population with the correlation
  69.         that you specified against the alternate hypothesis that the
  70.         correlation is some other value. Snedecor and Cochran [1, p186]
  71.         discuss this test.
  72.              The graph shows the scatter plot of the random sample and
  73.         the population regression line. The center of the graph is the
  74.         center of the population, (MuX, MuY). The graph shows 4 standard
  75.         deviations on either side of each mean. Note that this is the
  76.         population regression line, not the sample regression line. If
  77.         both population standard deviations are 1, the slope of the
  78.         line is the correlation you specified, not the computed
  79.         correlation from the sample. If the prob value is low, you
  80.         should notice a marked difference between the line drawn and
  81.         the sample regression line, which you can imagine drawn through
  82.         the center of the scatter of points with slope the sample
  83.         correlation.
  84.              The menu does not appear when the graph is on screen, so
  85.         you have to remember the commands. The important ones are P, D,
  86.         and G. Using P starts everything over again. D generates new
  87.         data and lets you see the summary statistics. G generates new
  88.         data and skips the summary screen, going directly to the graph
  89.         after the data is generated.
  90.              The source code is included on the disk. Many references
  91.         are made to Turbo Graphics Toolbox routines, so the source will
  92.         not be too useful without this. SIMCORR.PAS is placed in the
  93.         public domain with no promises of accuracy or appropriateness
  94.         for any purpose. If you use the code in your application, I
  95.         would appreciate attribution.
  96.  
  97.  
  98.         Reference
  99.  
  100.         1. Snedecor, G.W. and W.C. Cochran, Statistical Methods, Sixth
  101.         Edition, Iowa State University Press, Ames, Iowa, 1976.
  102.  
  103. nedecor, G.W