home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / finance / cj100.zip / CATJACK.DOC < prev    next >
Text File  |  1989-05-22  |  22KB  |  541 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                 C a t J A C K
  8.  
  9.                Statistical Calculator
  10.  
  11.                                       by
  12.  
  13.                                Brad Strausbaugh
  14.                            350 E. Del Mar Blvd #125
  15.                              Pasadena, Ca  91101
  16.  
  17.  
  18. CatJACK is an  easy-to-use  interactive  tool  for  fast  quantitative
  19. analysis  of small data sets.  The statistics available include single
  20. and praired  distribution,  ANOVA,  correlation  and  regression,  and
  21. crosstab analysis.  No knowledge of programming is required.  You will
  22. need only a basic understanding of elementry statistics.
  23.  
  24.  
  25. The Shareware Concept
  26.  
  27. CatJACK is widely available  to  the  public  on  electronic  bulletin
  28. boards and shareware distributors around the country.  You are invited
  29. to share CatJACK with colleagues and/or your local bulletin board.  To
  30. keep  all  the  files  together, please share only the self-extracting
  31. CJ100.EXE.  If you find  CatJACK  useful  in  meeting  you  needs  for
  32. quantitative analysis, please send $20 to the author.
  33.  
  34.       Brad Strausbaugh
  35.       350 E. Del Mar Blvd #125
  36.       Pasadena, Ca  91101
  37.  
  38. Your support of the  shareware  concept  helps  insure  the  continued
  39. availability of quality software on a test-drive-first basis.
  40.  
  41. Shareware distributors are encouraged to copy and  distribute  CatJACK
  42. for  the  few dollars per diskett typical in the shareware marketplace
  43. today.  Charging the author's fee mentioned above is prohibited and in
  44. violation of the copyright.
  45.  
  46.  
  47. Getting Started
  48.  
  49. After extracting CJ100.EXE you will find the following files.
  50.  
  51.       CATJACK.DOC       This documentation file
  52.       CATJACK.EXE       The CatJACK program
  53.       BRUN30.EXE        The run-time module
  54.       T.TBL             The probablity tables
  55.       F1.TBL
  56.       F5.TBL
  57.       CHISQ.TBL
  58.       STUDENTS          A data file for demonstration purposes
  59.                                                                 Page 2
  60.  
  61.  
  62. You can invoke CatJACK by setting your default device and subdirectory
  63. to  where  you  are  keeping  these  files, and entering the following
  64. command at a DOS prompt.
  65.  
  66.       C> CATJACK
  67.  
  68. After taking a few seconds to load  the  probability  tables,  CatJACK
  69. will  display  the login banner.  Just press any key and you are ready
  70. to start.
  71.  
  72.  
  73. The 30 Minute Tour
  74.  
  75. This document uses the rather un-original example of a junior  college
  76. psychology  class's  data to illustrate CatJACK's operation.  Although
  77. this data has already been created, you will be asked in the next  few
  78. paragraphs  to define and create a portion of it yourself.  Doing this
  79. you will learn to make the best use of CatJACK.
  80.  
  81.  
  82. Controlling the CatJACK Environment
  83.  
  84. Here are a few basic conventions used throughout the CatJACK system.
  85.  
  86.      1.  The main menu is always present at the  top  of  the  screen.
  87.          The currently active option is highlighted in reverse video.
  88.  
  89.      2.  You can change the current menu  option  with  the  left  and
  90.          right  arrow  keys  on  the  numeric keypad (be sure the "Num
  91.          Lock" key is off), or by entering the  first  letter  of  the
  92.          option  you  want.   When  the  menu  option  you  want is is
  93.          highlighted, press the Return key to select it.
  94.  
  95.      3.  The Return key always advances you forward to  the  the  next
  96.          step  while  the  Escape  key allows you to "stepback" to the
  97.          previous step.
  98.  
  99.      4.  The bottom line of the screen will always  display  pertinent
  100.          help information.
  101.  
  102.  
  103.  
  104. Defining an Array
  105.  
  106. By way of illustration, let us define an array containing  information
  107. on  our  students  in the junior college psychology class.  We want to
  108. determine (1) if the  distribution  of  our  students'  mid-term  exam
  109. scores,  and  (2)  whether  or  not  there is a significant difference
  110. between the scores of male and  female  students.   I  have  kept  the
  111. sample size small to minimize data entry time.
  112.  
  113. We begin by selecting the "Define" option from the main menu.  We will
  114. define  a  data  array  with  two variables, Grade and Sex, for our 15
  115. students.  Just think of the array as a  two-dimensional  table  where
  116. each  horizontal  row  represents  a  student and each vertical column
  117.                                                                 Page 3
  118.  
  119.  
  120. represents a variable.
  121.  
  122. After selecting "Define", a prompt will appear on line  2  asking  for
  123. the  width  of  the first variable.  Keep the following points in mind
  124. when you select a width.
  125.  
  126.      1.  Variables can be from 1 to  10  characters  wide  (8  is  the
  127.          default).   This  includes decimal points and signs.  Be sure
  128.          you choose a width that  will  hold  the  maximum  value  you
  129.          expect in your data.
  130.  
  131.      2.  The width you select to accomodate the variable's  data  will
  132.          also be the maximum width allowed for the variable's name.
  133.  
  134. Lets make the first variable, Grades, 8 characters wide.  Since  8  is
  135. the default we can just press the Return key at the width prompt.
  136.  
  137. Next, CatJACK asks for the name we want to give this variable.  Notice
  138. the  space  available  to enter the variable name is only 8 characters
  139. wide, the same as  our  width  selection.   Enter  the  variable  name
  140. "Grade" (without the quotes).
  141.  
  142. Finally CatJACK asks whether Grade is  a  text  or  numeric  variable.
  143. Data  for  numeric variables is right justified and available for math
  144. operations, while data for text variables is left justified and cannot
  145. be summed, or averaged, etc.  Since we want to perform calculations on
  146. Grade, enter "N" for numeric.
  147.  
  148. Now our first variable has been defined and its name  appears  in  the
  149. upper left corner of the array editor.  CatJACK now asks if we want to
  150. define another variable.  We  still  have  to  define  a  variable  to
  151. identify each student's sex, so enter "Y" for Yes.
  152.  
  153. We want the width for this variable to be 3 characters wide, the  name
  154. to  be  "Sex"  and  the data type to be Text.  Go ahead and define the
  155. variable Sex.  Remember, the helpline is always present at the  bottom
  156. of the screen if you get stuck.
  157.  
  158. This time when CatJACK asks if you want to  define  another  variable,
  159. enter "N" for No.  CatJACK will return you to the main menu.
  160.  
  161.  
  162. Entering Data
  163.  
  164. With an array defined, we are now ready to enter our  students'  data.
  165. Select the "Edit" option from the main menu.
  166.  
  167. CatJACK  prompts  for  the  grade  of  the  first  student.   It  also
  168. highlights  the  corresponding  cell  on  the  spreadsheet.  The first
  169. student's mid-term exam grade was 96%, so enter "96"  at  the  prompt,
  170. then  press  Return  (Never  enter the percent sign, and never enter a
  171. dollar sign or a pound sign.  The only valid characters for a  numeric
  172. variable are the digits 0 to 9, a decimal point, and sign if needed).
  173.  
  174. CatJACK then prompts for the same student's Sex.  Enter "M" for  Male,
  175.                                                                 Page 4
  176.  
  177.  
  178. then press Return.
  179.  
  180. CatJACK is now awaiting data for the second  student.   Go  ahead  and
  181. enter  data  for the remaining students as shown below.  If you make a
  182. mistake and need to change the data in a certain cell, use  the  arrow
  183. keys to move to that cell, then enter the correct data.  If you get in
  184. trouble, remember the help line at the bottom of the screen.
  185.  
  186.    Define Edit Save Load Sort Analyze Print Quit
  187.  
  188.  
  189.      +- Grade   -Sex--------
  190.      1        96 M
  191.      2        80 F
  192.      3        84 F
  193.      4        90 M
  194.      5        88 F
  195.      6        78 M
  196.      7        86 M
  197.      8        88 F
  198.      9        92 M
  199.     10        90 F
  200.     11        84 F
  201.     12        88 F
  202.     13        68 M
  203.     14        74 F
  204.     15       100 M
  205.     16
  206.     17
  207.      +-------------------
  208.  
  209. When you are finished press the Escape key to  stepback  to  the  main
  210. menu.
  211.  
  212. We have kept the number of students in our example down to 15 just  to
  213. minimize  data  entry time.  Your actual data will probably exceed the
  214. 17 lines showing in the first spreadsheet window.  CatJACK  allows  up
  215. to  200  lines of data.  The edit window scrolls as needed to show the
  216. current cell.
  217.  
  218.  
  219. Single Distribution Analysis
  220.  
  221. Now we can examine  the  students'  Grade  distribution.   Select  the
  222. "Analyze"  Main  menu  option.   CatJACK  will  ask  whether  we  want
  223. Distribution, ANOVA,  Correlation/Regression,  or  Crosstab  analysis.
  224. Select "Distribution".
  225.  
  226. CatJACK then asks whether we want a "Single" or "Paired"  distribution
  227. analysis,  Lets  select  "Single" first to see the distribution of the
  228. whole class.
  229.  
  230. CatJACK prompts for which variable to analyze.  Enter "Grade".  If you
  231. enter  a  variable  that  does not exist, an error message will appear
  232. asking you to reenter the correct variable name.
  233.                                                                 Page 5
  234.  
  235.  
  236. After a few seconds  CatJACK  will  display  the  Single  Distribution
  237. Analysis  of  the  variable  Grade, This screen shows, the sample size
  238. (n), mean, median, mode, standard deviation (StdDev),  standard  error
  239. of  the  mean  (StdErr), highest, lowest, range, variance and sum.  It
  240. also shows a grouped frequency histogram with mid-point raw score  and
  241. mid-point z score.
  242.  
  243. Notice the histogram is made up of asterisks (*), one for  each  case.
  244. We  should mention here that if the mode of a distribution exceeds 15,
  245. each asterisk will represent more than one case.  Just how many  cases
  246. each  asterisk represents depends on how many multiples of 15 the mode
  247. exceeds.  In such  cases  the  histogram  may  show  a  group  with  a
  248. frequency  greater  than  1 but no asterisks.  The histogram should be
  249. used only to get a general picture of the distribution curve.
  250.  
  251. If you want to send this display to your printer  select  the  "Print"
  252. option  from the line-2 menu.  The "Print" option is available for all
  253. analysis screens.  When you are finished select the "Menu" option,  or
  254. just press the Escape key to stepback to the distribution menu.
  255.  
  256.  
  257. Paired Distribution Analysis
  258.  
  259. We can compare the  mid-term  grades  of  male  and  female  students.
  260. Stepback  to  the  Distribution  menu  with  the Escape key and select
  261. "Paired".
  262.  
  263. At the appropriate prompts select "Sex" as the  independent  variable,
  264. and  "Grade"  as  the dependent variable.  For the independent group x
  265. enter "F" (Female), and the independent group y enter "M" (Male).
  266.  
  267. After a few seconds  CatJACK  will  display  the  Paired  Distribution
  268. Analysis of Grade by Sex.
  269.  
  270. In addition to the  statistics  we  saw  in  the  Single  Distribution
  271. Analysis,  we also see the t-ratio, degree of freedom (d.f.) and p for
  272. both the one and two tailed probability distributions.  The  histogram
  273. shows  occurrences  of  the x variables as "x", the y variable as "y",
  274. and were both occur, "#",
  275.  
  276.  
  277.  
  278. Adding New Variables To The Current Data Array
  279.  
  280. Suppose that instead of comparing the mid-term exam grades by Sex,  we
  281. want  to  compare  them, by the students' high schools.  To do this we
  282. will add a new variable to the array.  We will name it "HS"  for  High
  283. School.
  284.  
  285. Stepback to the main menu with the Escape  key  and  select  "Define".
  286. Since  CatJACK now has our current array in memory, it asks whether we
  287. want to "Create" a new array or "Modify" the current one.  We want  to
  288. add  a variable to the current array so select "Modify".  Then CatJACK
  289. asks if we want to "Add" a new variable or "Delete" an  existing  one.
  290. Select "Add".
  291.                                                                 Page 6
  292.  
  293.  
  294. Subsequent prompts should look familiar.  They are  the  Width,  Name,
  295. and  Text/Numeric  prompts  we've  seen  before.   Define the new high
  296. school variable as Width:  2, Name:  HS, and data type T (text).
  297.  
  298. Now stepback to the main menu and select the "Edit" option.  Using the
  299. arrow  keys  to  position  the  active  cell  on  line  1 under the HS
  300. variable, enter the data into the new variable as shown below.
  301.  
  302. Terminate each entry with the Down Arrow key instead of the Return key
  303. to stay in the HS column.
  304.  
  305. By the way, "WY" is for West York, "EY" is for East York, and  "C"  is
  306. for Central.
  307.  
  308.    Define Edit Save Load Sort Analyze Print Quit
  309.  
  310.  
  311.      +- Grade   -Sex-HS-------
  312.      1        96 M   WY
  313.      2        80 F   C
  314.      3        84 F   C
  315.      4        90 M   WY
  316.      5        88 F   EY
  317.      6        78 M   C
  318.      7        86 M   C
  319.      8        88 F   WY
  320.      9        92 M   WY
  321.     10        90 F   EY
  322.     11        84 F   WY
  323.     12        88 F   EY
  324.     13        68 M   EY
  325.     14        74 F   C
  326.     15       100 M   WY
  327.     16
  328.     17
  329.      +-----------------------
  330.  
  331. When you have entered the high schools, stepback to the main menu with
  332. the Escape key.
  333.  
  334.  
  335. Analysis of Variance
  336.  
  337. Now we can compare grades across high schools.  Since there  are  more
  338. than  two  high schools reprsented in this junior college class we use
  339. "ANOVA".
  340.  
  341. Select "Analyze" from the main menu, then  "ANOVA"  from  the  analyze
  342. menu.   Enter  "HS"  as  the  independent  variable and "Grade" as the
  343. dependent.
  344.  
  345. After computing for a few seconds CatJACK  displays  the  Analysis  of
  346. Variance Summary Table which includes the within an between groups sum
  347. of squared deviations from the mean (SS), degree  of  freedom  (d.f.),
  348. mean square (MS), F-ratio, and p.
  349.                                                                 Page 7
  350.  
  351.  
  352. If you want to see statistics for  each  group  of  students  by  high
  353. school,  select "GroupDetail" from the ANOVA menu.  This display shows
  354. each group's n, mean, standard deviation, and standard  error  of  the
  355. mean.
  356.  
  357. When you are using ANOVA on your own  data,  keep  in  mind  that  the
  358. maximum number of independent groups allowed is ten.
  359.  
  360.  
  361. Saving and Loading Arrays from Disk
  362.  
  363. We still haven't seen correlation and crosstab analyses.  To  do  that
  364. we  will  need  some  new variables.  Since you now know how to define
  365. arrays and enter data, this would be a good time to look at Saving the
  366. array  you've  just entered to disk and Loading an array I've prepared
  367. for you that contains the new variables.
  368.  
  369. It is a good habit to save new data  to  disk  immediately  after  you
  370. leave the Edit mode.  In the event of a system failure you can recover
  371. simply by reloading the array from disk.  And if you  are  entering  a
  372. particularly large array you may want to save the array after entering
  373. every twenty lines or so.
  374.  
  375. First Save your current array to disk.  Use the Escape key to stepback
  376. to  the  main  menu,  then select the Save option.  CatJACK asks for a
  377. name to identify the array when it's on disk.  Enter  the  array  name
  378. "CLASS".  CatJACK will then save your array to disk.
  379.  
  380. Now you can load the new larger array.  Select the  Load  option  from
  381. the  main  menu.  When CatJACK asks for the name of the array to load,
  382. enter "STUDENTS".  CatJACK will take a few seconds to load  the  array
  383. before it displays it on the spreadsheet.
  384.  
  385. In addition to the variables you are  familiar  with,  our  new  array
  386. contains  each  student's  GPA and SAT scores.  Notice, also, that the
  387. variable name for HS has been changed to "HighSchool" and its data  is
  388. now spelled out.
  389.  
  390.  
  391. Correlation Analysis
  392.  
  393. Suppose we want to know the extent to which we can predict a student's
  394. mid-term exam grade from his or her GPA.
  395.  
  396. Select the main menu option "Analyze", then select  the  analyze  menu
  397. option  "Correlation/Regression".   CatJACK  then  prompts  for  which
  398. correlation coefficient to use, Pearson or Spearman.  Since Grades and
  399. GPA  are  interval  data  we  select  "Pearson".   Using  Spearman for
  400. anything other than ranked data will yield erroneous results.
  401.  
  402. CatJACK then asks for which display you want.  Select "Detail"  (We'll
  403. look  at  the  others  in  a  moment).  Then CatJACK prompts for which
  404. variables to use.  Enter "GPA as the Independent (predictor) variable,
  405. and "Grade" as the dependent variable.
  406.                                                                 Page 8
  407.  
  408.  
  409. After a few seconds CatJACK displays the Pearson Correlation Analysis.
  410. This  display  includes  the  Pearson  Correlation  coefficient (r), r
  411. Square, standard error of  prediction  (StdErr),  degree  of  freedom,
  412. t-ratio, regression line slope and Y intersect.  It also shows a brief
  413. scatterplot where points are represented as  ".",  ":",  "+",  or  "#"
  414. depending on their frequencies.
  415.  
  416. Now we can predict a student's likely mid-term exam score from his  or
  417. her  GPA.  Select the line-2 menu option "Predict", then enter the GPA
  418. of a student whose Grade you want to  predict,  say,  "3.2".   CatJACK
  419. will  display the predicted Grade (Y Prime) along with the Grade high,
  420. low, and range for the 99%, 95%, 90%, and 80% confidence levels.
  421.  
  422. You can compare one numeric variable with all others.   Lets  stepback
  423. to  the  Correlation  menu  using the Escape key, select the "Pearson"
  424. coefficient again, and now select  the  "OneToAll"  display.   At  the
  425. independent  variable  prompt,  enter  "Grade".   CatJACK now displays
  426. statistics  showing  how  Grade  correlates  to  all   other   numeric
  427. variables.
  428.  
  429. And finally we can see how all  numeric  variables  correlate  to  all
  430. others.  Proceed to the display prompt as before, and this time select
  431. "AllToAll".  CatJACK will display the correlation coefficient  of  all
  432. numeric variables to all others.
  433.  
  434.  
  435. Crosstab Analysis
  436.  
  437. We can examine the contingency of two variables.  Suppose we  want  to
  438. compare  the  frequency  of  male  vs  female  students from each high
  439. school.  Use the Escape key to  stepback  to  the  analysis  menu  and
  440. select  "Crosstab".  Enter "HighSchool" as the X variable and "Sex" as
  441. the Y variable.  After computing  for  a  few  seconds,  CatJACK  will
  442. display  the  Crosstab  Analysis screen, with each cell containing the
  443. observed (O) and theoretical (T) frequencies; and  it  will  show  the
  444. degree of freedom, chi-square, and p.
  445.  
  446. When you use Crosstab analysis on your data keep  in  mind  that  each
  447. variable can have no more than ten groups.
  448.  
  449.  
  450. Sorting
  451.  
  452. We can sort the data array by any number of variables.   For  example,
  453. suppose  we  want  to sort our students by HighSchool, and within each
  454. HighSchool we want to sort by Grade.
  455.  
  456. To do this, stepback to the main menu and select  the  "Sort"  option.
  457. CatJACK  will  prompt  for  the variables or "keys" to sort by.  Enter
  458. "HighSchool" and "Grade for keys 1 and 2 respectively.   When  CatJACK
  459. prompts for key 3, just press Return.
  460.  
  461. After a few seconds CatJACK will display the array in the  sort  order
  462. requested.
  463.                                                                 Page 9
  464.  
  465.  
  466. Printing the Data Array
  467.  
  468. To list the entire data array on your printer just select the  "Print"
  469. main  menu  option.  The array will be printed out in the current sort
  470. order with the variables names  appearing  across  the  top  and  line
  471. numbers down the left side.
  472.  
  473.  
  474. To Quit from CatJACK
  475.  
  476. You can terminate your CatJACK interactive session and return  to  DOS
  477. by  selecting  the "Quit" main menu option.  If the current data array
  478. has been changed but not saved to disk, a warning will appear,  asking
  479. if you want to save it before quitting.
  480.  
  481.  
  482. Analyzing Data Output by Other Programs
  483.  
  484. You can use CatJACK to analyze data you  already  have  on  disk  from
  485. other  programs.   This  data  must  have the characteristics outlined
  486. here.  See the example of our STUDENTS file below.
  487.  
  488.      1.  Variables cannot be more than 10 characters wide.
  489.  
  490.      2.  Variables must be separated by one space.
  491.  
  492.      3.  On the first line, an "N" for numeric or "T"  for  text  must
  493.          appear, left justified, over each variable.
  494.  
  495.      4.  On the second line,  the  variable  name  must  appear,  left
  496.          justified, over each variable.
  497.  
  498.      5.  On the third line, hyphens must appear across  the  width  of
  499.          each  variable.  This tells CatJACK each variable's start and
  500.          end position.
  501.  
  502.      6.  From the forth line on the data should appear.  Numeric  data
  503.          must  be  right justified within each variable, and text data
  504.          must be left justified.
  505.  
  506.      7.  CatJACK allows a maximum of 200 lines of data.
  507.  
  508. Any  deviation  from  these  characteristics  can  have  unpredictable
  509. results.   You can use your favorite text editor to make the necessary
  510. modifications to your file.  If you are using  a  word  processor,  be
  511. sure it is set to non-document mode.
  512.                                                                Page 10
  513.  
  514.  
  515.  
  516. N        T   T          N        N
  517. Grade    Sex HighSchool GPA      SAT
  518. -------- --- ---------- -------- --------
  519.       96 M   WESTYORK        3.6     1300
  520.       80 F   CENTRAL         3.3     1166
  521.       84 F   CENTRAL         3.4     1210
  522.       90 M   WESTYORK        3.4     1280
  523.       88 F   EASTYORK        3.5     1277
  524.       78 M   CENTRAL         2.7     1120
  525.       86 M   CENTRAL         3.5     1260
  526.       88 F   WESTYORK        3.4     1256
  527.       92 M   WESTYORK        3.6     1380
  528.       90 F   EASTYORK        2.8     1390
  529.       84 F   WESTYORK        3.0     1250
  530.       88 F   EASTYORK        3.1     1310
  531.       68 M   EASTYORK        2.3      824
  532.       74 F   CENTRAL         2.4     1022
  533.      100 M   WESTYORK        3.8     1498
  534.  
  535.  
  536.  
  537. CatJACK
  538.  
  539. Jack is a brown long-haired Persian cat who kept  me  company  through
  540. the long hours of developing this program.
  541.