home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / math / ksprob21.zip / KSDOCS.EXE / KSPDAT.DOC < prev    next >
Text File  |  1992-12-21  |  31KB  |  616 lines

  1.  
  2.  
  3.                                  kspdat 2.10
  4.  
  5.  
  6.                                Joseph C. Hudson
  7.                                 4903 Algonquin
  8.                               Clarkston, MI 48348
  9.  
  10.         Introduction
  11.  
  12.         kspdat is a contraction of ks probability data.
  13.  
  14.         Introductory prob and stat textbooks usually have a few tables
  15.         for common distributions and a few pictures of probability and
  16.         density functions. Occasionally, cdfs and oc curves may be seen.
  17.         kspdat is a first attempt at allowing prob and stat instructors
  18.         to use the tables and pictures they want to use, rather than
  19.         being restricted to those that the author chose.
  20.  
  21.         kspdat does not produce pictures, or directly usable tables, for
  22.         that matter. It does produce tables of pdfs (density or
  23.         distribution functions), cdfs, hazard functions, reliability
  24.         (survival) functions and inverse cdfs. The output can be edited
  25.         into replacements for book's tables (like when you want to pass
  26.         out tables for testing purposes without violating someone's
  27.         copyright), alternate forms for these tables, additional tables,
  28.         or, most important for me, output can be fed into a graphing
  29.         program to produce pictures.
  30.  
  31.         I do not offer a warranty or guarantee of any kind for this
  32.         program. I've tried hard to make the output correct, but using
  33.         it with new data sets and different machines may reveal errors
  34.         I'm not aware of. Follow the advice of Gerard E. Dallal
  35.         (Statistical Microcomputing - Like It Is, American Statistician,
  36.         V42 N3 Aug 1988): assume that this program does everything wrong
  37.         until you put it through its paces with difficult input and
  38.         conclude otherwise. Above all, enjoy. If you care to send me a
  39.         brief report about what you like and don't like about this
  40.         program, it would be very much appreciated.
  41.  
  42.         kspdat is copyright (C) 1990-93 Joseph C. Hudson 4903 Algonquin
  43.         Clarkston MI 48348. All rights are reserved.
  44.  
  45.  
  46.         kspdat                                                  page 2
  47.  
  48.  
  49.         examples of use
  50.  
  51.         let's start with a couple of quick examples to illustrate what
  52.         kspdat does. Start kspdat. You see the main menu:
  53.  
  54.         ┌──────────────────────────────────────────────────────────────┐
  55.         │ kspdat 2.10                                                  │
  56.         │                                                              │
  57.         │ exit     help   save spec  get spec   view data   view dfile │
  58.         │ compute  dir    save data  view file  view names  view cfile │
  59.         │ view graph                                                   │
  60.         │                                                              │
  61.         │ cols to graph:                                               │
  62.         │ data file:                                                   │
  63.         │ indep var:                                                   │
  64.         │                                                              │
  65.         │                                                              │
  66.         │                                                              │
  67.         │                                                              │
  68.         │                                                              │
  69.         │                                                              │
  70.         │                                                              │
  71.         └──────────────────────────────────────────────────────────────┘
  72.  
  73.  
  74.         the cursor will be on "help". If you hit return, you will be able
  75.         to page through a series of help screens. Don't bother to right
  76.         now. Instead, use the down arrow to move to the "data file:"
  77.         prompt. The help box at the bottom of the screen will ask you to
  78.         enter the name of a file to use for output. Do it. For this
  79.         exercise, use bintable, prefaced by the drive/subdirectory you
  80.         want the output to go to.
  81.  
  82.         If you hit return or the down arrow after entering the name, the
  83.         cursor will be at the <indep var:> prompt. If not, use the arrow
  84.         keys to move the cursor there. type in  x 0(1)10
  85.  
  86.         Hit return or down arrow when done. the cursor will go to the
  87.         blank area below and prompt you with "c2:". type in  bi 10 .2 cdf
  88.  
  89.         Hit return or down arrow when done. you will get a "c3:" prompt.
  90.         Hold the alt key down and type the letter C. The bi 10 2 cdf
  91.         should have been copied from the line above. arrow over to the 2
  92.         and change it to a 4, so that the line reads  bi 10 .4 cdf
  93.  
  94.         Repeat twice, to get  c4: bi 10 .6 cdf  and   c5: bi 10 .8 cdf.
  95.         after you get the last line, hold the alt key down and type the
  96.         letter Q (I'll refer to this simply as alt-Q or alt-whatever from
  97.         now on). The program should put you at the "compute" prompt.
  98.         Hit return. After the computer is done working, you will be at
  99.         "view data". Hit return. You will see the data that was just
  100.         generated. There will be some strange names heading each column.
  101.  
  102.  
  103.         kspdat                                                  page 3
  104.  
  105.  
  106.         Hit Esc to get back to the main menu, go left and down with the
  107.         arrow keys to the "save data" prompt and hit return. A new menu
  108.         will appear:
  109.  
  110.         ┌──────────────────────────────────────────────────────────────┐
  111.         │ kspdat save data           2/26/90   20:06    390K free mem  │
  112.         │                                                              │
  113.         │ missing values: mvcode          number of tables: one        │
  114.         │                                                              │
  115.         │ col  column    number of blank  number of spaces for digits  │
  116.         │ no.   name     leading  spaces    before d.p.  after d.p.    │
  117.         │ 1    x0(1)10         0                0            0         │
  118.         │ 2    bic10.2         0                0            0         │
  119.         │ 3    bic10.4         0                0            0         │
  120.         │ 4    bic10.6         0                0            0         │
  121.         │ 5    bic10.8         0                0            0         │
  122.         │                                                              │
  123.         │                                                              │
  124.         │                                                              │
  125.         │                                                              │
  126.         └──────────────────────────────────────────────────────────────┘
  127.  
  128.         Leave the missing values and number of tables as they are, (hit
  129.         return to get past them) and change the zeros to these values:
  130.  
  131.         │ 1    x0(1)10         2                2            0         │
  132.         │ 2    bic10.2         2                1            4         │
  133.         │ 3    bic10.4         2                1            4         │
  134.         │ 4    bic10.6         2                1            4         │
  135.         │ 5    bic10.8         2                1            4         │
  136.  
  137.         Hit alt-Q when done, and then return. After a bit, you'll be
  138.         back at the main menu at "view dfile". hit return, and you will
  139.         see the fruits of your labor:
  140.  
  141.            0  0.1074  0.0060  0.0001  0.0000
  142.            1  0.3758  0.0464  0.0017  0.0000
  143.            2  0.6778  0.1673  0.0123  0.0001
  144.            3  0.8791  0.3823  0.0548  0.0009
  145.            4  0.9672  0.6331  0.1662  0.0064
  146.            5  0.9936  0.8338  0.3669  0.0328
  147.            6  0.9991  0.9452  0.6177  0.1209
  148.            7  0.9999  0.9877  0.8327  0.3222
  149.            8  1.0000  0.9983  0.9536  0.6242
  150.            9  1.0000  0.9999  0.9940  0.8926
  151.           10  1.0000  1.0000  1.0000  1.0000
  152.  
  153.         the first column of output are the x values from 0 to 10, the
  154.         second column contains binomial cdf values for p = .2,  and the
  155.         remaining columns binomial cdf values for p = .4, .6 and .8. Take
  156.         this into a text editor, add headers and you have a (small)
  157.         binomial table.
  158.  
  159.         kspdat                                                  page 4
  160.  
  161.  
  162.         Exit kspdat by going to "exit" in the menu and typing X.
  163.  
  164.  
  165.         The usual t, F and chi-square tables of upper tail areas can be
  166.         constructed by specifying df as the independent variable. Let's
  167.         run through the making of a small t table.
  168.  
  169.         Start kspdat and arrow down to the "indep var:" prompt. Type in
  170.  
  171.         df 1(4)5(5)30(10)40(20)120
  172.  
  173.         hit return or the down arrow when done and you will be at the
  174.         "c1:" prompt. Type in
  175.  
  176.         st .01 x
  177.  
  178.         Hit return or down arrow and you will go to the next line and
  179.         get the "c2:" prompt. Type alt-C to copy the line above, then
  180.         right arrow over to the 1 and change it to a 5, to get
  181.  
  182.         st .05 x
  183.  
  184.         Hit return or down arrow. at the "c3:" prompt, do your thing
  185.         again to get
  186.  
  187.         st .10 x
  188.  
  189.         Now hit alt-Q to get to the "compute" prompt and hit return.
  190.         When computations are complete, you will be at "view data".
  191.         Hit return and you should see
  192.  
  193.                          1         2         3         4
  194.                       df1(4)5(5 stx.01    stx.05    stx.10
  195.  
  196.                1       1.0000   31.8205    6.3138    3.0777
  197.                2       5.0000    3.3649    2.0150    1.4759
  198.                3      10.0000    2.7638    1.8125    1.3722
  199.                4      15.0000    2.6025    1.7531    1.3406
  200.                5      20.0000    2.5280    1.7247    1.3253
  201.                6      25.0000    2.4851    1.7081    1.3163
  202.                7      30.0000    2.4573    1.6973    1.3104
  203.                8      40.0000    2.4233    1.6839    1.3031
  204.                9      60.0000    2.3901    1.6706    1.2958
  205.                10     80.0000    2.3739    1.6641    1.2922
  206.                11     100.0000   2.3642    1.6602    1.2901
  207.                12     120.0000   2.3578    1.6577    1.2886
  208.  
  209.  
  210.         kspdat                                                  page 5
  211.  
  212.  
  213.         Hit Esc to get back to the menu. Arrow down to the "data
  214.         file:" prompt and enter a path and file name (with no
  215.         extension). Then arrow up and across to "save data". Hit return,
  216.         then hit return twice to begin editing the numbers of spaces.
  217.         Enter 1   3   0 in the first row and 2   3   3 in rows 2 - 4,
  218.         then hit alt-Q and return. You have created an ascii file,
  219.         probably with a .d01 extension, with the following contents:
  220.  
  221.                        1   31.821    6.314    3.078
  222.                        5    3.365    2.015    1.476
  223.                       10    2.764    1.812    1.372
  224.                       15    2.602    1.753    1.341
  225.                       20    2.528    1.725    1.325
  226.                       25    2.485    1.708    1.316
  227.                       30    2.457    1.697    1.310
  228.                       40    2.423    1.684    1.303
  229.                       60    2.390    1.671    1.296
  230.                       80    2.374    1.664    1.292
  231.                      100    2.364    1.660    1.290
  232.                      120    2.358    1.658    1.289
  233.  
  234.         Add column headings, maybe a little picture on top like
  235.         most books have; voilà, a t table. You can even make
  236.         the picture with the help of kspdat (and your favorite
  237.         graphing program and your favorite graphics editor and
  238.         your favorite graphics incorporating word processor).
  239.  
  240.         degrees of freedom (df) can be specified as the independent
  241.         variable only with dependent variables that are x values from
  242.         the chi-square, F, Student's t distributions and their noncentral
  243.         versions. In specifying the dependent variable, substitute the
  244.         right tail area for df in the ch, nx st and nt specifications,
  245.         and for df2 in the fd and nf specs. For the F and noncentral F,
  246.         the ind var df is used as the denominator degrees of freedom.
  247.         df1 must still be specified. In all cases, x must be specified
  248.         as what to compute.
  249.  
  250.         examples with dep var specification df 1(1)30
  251.  
  252.         this spec:    computes a column of 30 values with
  253.         ch .05 x      5%   right tail % pts for the chi-square dist
  254.         ch .95 x      5%   left  tail % pts for the chi-square dist
  255.         nx .95 8.5 x  5%   left  tail % pts for the noncentral chi-
  256.                                  square dist with noncentrality 8.5.
  257.         st .01 x      1%   right tail % pts for the Student`s t dist
  258.         fd 5 .025 x   2.5% right tail % pts for F with 5 numerator df
  259.  
  260.  
  261.         kspdat                                                  page 6
  262.  
  263.  
  264.         My main motivation in writing kspdat was to produce data sets
  265.         for graphing. Try this exercise to see how to do this:
  266.  
  267.         Start kspdat again and use bino as the name of the output file.
  268.         Enter  x -0.5(.1)16.5  as the independent variable. In c2, put
  269.         bi 16 .5 bar  and in c3 put  no 8 2 pdf.  Go to "compute" and
  270.         then "save data". In save data, make sure the number of tables
  271.         is "many". (hit the T key when you're at the <number of tables:>
  272.         prompt if necessary) Make the menu look like this:
  273.  
  274.         ┌──────────────────────────────────────────────────────────────┐
  275.         │ kspdat save data           2/26/90   22:33    387K free mem  │
  276.         │                                                              │
  277.         │ missing values: mvcode          number of tables: many       │
  278.         │                                                              │
  279.         │ col  column    number of blank  number of spaces for digits  │
  280.         │ no.   name     leading  spaces    before d.p.  after d.p.    │
  281.         │ 1    x-0.5(.1)       2                2            2         │
  282.         │ 2    bib16.5         2                1            6         │
  283.         │ 3    nop82           2                1            6         │
  284.         │                                                              │
  285.  
  286.         Save the data and exit the program. you should have 4 new files:
  287.         bino.d01, bino.c01, bino.d02 and bino.c02. The ".d" files are
  288.         data files and the ".c" files are codebook files. The codebook
  289.         files are used by ksstat for missing value info, column names and
  290.         so on. For humans, they are a record of what's in the data
  291.         files. Look at bino.d01. It has all x values that are n + .5,
  292.         where n is an integer, repeated three times, with three different
  293.         values in the second column. These values are there to allow a
  294.         graphing program that can graph a data set to trace out a
  295.         histogram of the binomial pdf with n = 16 and p = .5. We really
  296.         don't need the .1 step size for this, but we do for the second
  297.         data set, bino.d02. This contains values of the normal (Gaussian)
  298.         pdf with µ = 8 and σ = 2, the same mean and standard deviation as
  299.         the binomial distribution in bino.d01. Graphing both of these
  300.         data sets together will show a normal curve superimposed on top
  301.         of the binomial histogram.
  302.  
  303.         I can't supply a graphing program to do the graphing, but can
  304.         recommend gnuplot. An early version of gnuplot produced the
  305.         graphs in the files bino.com and bino.prn. All of these files are
  306.         in the self extracting archive kspdbn.exe. To see the image on
  307.         screen, run bino.com. use the command  copy bino.prn prn /b  to
  308.  
  309.  
  310.         kspdat                                                  page 7
  311.  
  312.  
  313.         print the image on an Epson compatible printer. Bino.com was pro-
  314.         duced using a program called grabber. With grabber produced
  315.         screen images captured as .com files, the directory utility
  316.         dirmagic can be used to make simple but effective (and cheap)
  317.         slide shows.
  318.  
  319.         There is one additional file in kspdbn.exe, bino.spc. This is a
  320.         kspdat specification file created with the "save spec" option in
  321.         the main menu. It has all of the stuff that I typed into kspdat
  322.         to create the .c## and .d## files.
  323.  
  324.         The "get spec" menu option reads .spc files. Once a .spc file is
  325.         read in, you can edit it and produce new output without retyping
  326.         all the information.
  327.  
  328.         running kspdat
  329.  
  330.         In running kspdat, you have some purpose in mind: a picture you
  331.         want to draw or a table you want to write. To accomplish your
  332.         task, you will have to
  333.  
  334.              1. give a name for the data file(s).
  335.  
  336.              2. describe the independent variable. In a table, the
  337.                 independent variable is what goes in the first column.
  338.                 In a graph, it is what is graphed on the horizontal (x)
  339.                 axis.
  340.  
  341.              3. describe the dependent variable(s). These are what go in
  342.                 all other columns of a table or are graphed on the
  343.                 vertical (y) axis of a graph. You may want more than one
  344.                 of these for either tables or graphs.
  345.  
  346.              4. compute the values of the dependent and independent
  347.                 variables.
  348.  
  349.              5. save the computed data to disk file(s) for further
  350.                 processing with either a text editor or graphics program.
  351.  
  352.              6. optionally, save the specifications used to generate your
  353.                 disk files so that you can later recall them for reuse
  354.                 without retyping. Since some specifications can be
  355.                 lengthy, this can save time.
  356.  
  357.              7. exit the program.
  358.  
  359.         The next section describes the menu selections used to achieve
  360.         these steps.
  361.  
  362.  
  363.         kspdat                                                  page 8
  364.  
  365.  
  366.         the kspdat main menu
  367.  
  368.         The main menu consists of 17 choices or places to enter data.
  369.         There is a help window at the bottom of the screen that shows
  370.         brief help for each menu selection. The arrow keys will move you
  371.         through the selections, with one exception. In the dependent
  372.         variable selection area at the bottom of the menu, use alt-Q to
  373.         leave this area. The menu choices are:
  374.  
  375.            exit       press x to leave the program. If there is unsaved
  376.                       data, you will be given a chance to rescind your
  377.                       choice.
  378.  
  379.            help       pressing the enter key will bring up a series of
  380.                       help screens. Esc brings you back to the main menu.
  381.  
  382.            save spec  after you have entered all the information
  383.                       necessary to produce your output, including the
  384.                       formatting information entered in the save data
  385.                       menu selection, you can save all of the things you
  386.                       typed in in a .spc file. Hit enter to begin. You
  387.                       will be asked for a file name to use. The .spc
  388.                       extension is automatically used, so you need not
  389.                       type this in.
  390.  
  391.            get spec   retreives information saved previously in a .spc
  392.                       file. You will be asked for a file name. As with
  393.                       save spec, the .spc extension is forced.
  394.  
  395.            view data  after using compute, there is data in memory.
  396.                       Hitting enter on this selection allows you to see
  397.                       that data. Column names will appear at the top.
  398.                       These are constructed from the information used to
  399.                       generate the data and are not pretty, but they
  400.                       serve as a rough reminder of what is in the column.
  401.                       Don't worry about the format here. You can specify
  402.                       that when saving the data to disk. The word missing
  403.                       will appear in place of any values not computed.
  404.  
  405.            view names lets you see the names of the columns of data
  406.                       currently in memory.
  407.  
  408.            compute    this is what gets the work done. after you have
  409.                       specified dependent and independent variable
  410.                       information, come here to actually compute the
  411.                       data.
  412.  
  413.            dir        shows a disk directory.
  414.  
  415.  
  416.         kspdat                                                  page 9
  417.  
  418.  
  419.            save data  this lets you create your output file or files. The
  420.                       kspdat save data menu will appear. There are two
  421.                       choices to be made at the top of the menu. When you
  422.                       enter the menu, the cursor will be at the "missing
  423.                       values:" prompt, with "mvcode" showing. mvcode
  424.                       stands for missing value code. If there are any
  425.                       values that are missing in your data, kspdat will
  426.                       output either a missing value code or a blank.
  427.                       Blanks are appropriate when tables are the final
  428.                       product, missing value codes when the data will be
  429.                       read by another program. Missing value codes are
  430.                       numbers that do not otherwise appear in the column
  431.                       with the missing value. They are chosen by the
  432.                       program and reported, along with column names, in
  433.                       a codebook file that is written along with the data
  434.                       file. You specified a data file name in the main
  435.                       menu. This name is used, with extension .dnn for
  436.                       data files and .cnn for codebook files. The nn are
  437.                       digits chosen to avoid conflict with other file
  438.                       names. A data file and its corresponding codebook
  439.                       file always have the same name and same digits.
  440.                       The second menu selection is "number of tables:".
  441.                       The choices are one and many. With many, there is
  442.                       one table produced for each dependent variable.
  443.                       Each table is written to a separate disk file. Each
  444.                       file contains two columns, the independent variable
  445.                       in the first column and a dependent variable in the
  446.                       second column. This multiple file arrangement is
  447.                       necessary for some plotting programs. Many must be
  448.                       chosen if you have any "bar" indep varsand more
  449.                       than one independent variable. With "one", bar and
  450.                       pdf produce the same output with more than one ind-
  451.                       ependent variable. With only one ind var, the many
  452.                       or one choice is irrelevant.
  453.  
  454.                       The third area of the save data menu allows you to
  455.                       specify the format of the output. For each column
  456.                       of output, specify three things: the number of
  457.                       leading blank spaces, the number of digits to allow
  458.                       for before thew decimal point and the number of
  459.                       digits to print after the decimal point. If the
  460.                       number of digits after is 0, the decimal point is
  461.                       not printed. After entering this information, type
  462.                       alt-Q. You will be given the choice of saving the
  463.                       data, going back to edit the information entered or
  464.                       aborting.
  465.  
  466.            view file  choosing this entry will let you see any disk file.
  467.                       You will be asked for the file name.
  468.  
  469.  
  470.         kspdat                                                  page 10
  471.  
  472.  
  473.            view dfile lets you see the last data file created. When
  474.                       multiple files are written, this is the one with
  475.                       the largest number in the extension, corresponding
  476.                       to the last dependent variable column. You can see
  477.                       other data files with the view file selection.
  478.  
  479.            view cfile lets you see the last codebook file created. Same
  480.                       comments as view dfile.
  481.  
  482.            view graph lets you see rough graphs of one or more dependent
  483.                       variable columns against the independent variable.
  484.                       This is meant only to give you a rough idea of what
  485.                       the data looks like.
  486.  
  487.            cols to graph: lets you specify which columns to view.
  488.  
  489.            data file: this is where you give the name to be used for the
  490.                       data and codebook files. No extension is necessary.
  491.                       If you give one, it will be discarded.
  492.  
  493.            indep var: here, you specify the independent variable, the
  494.                       contents of the first column of the table. enter
  495.                       either x, cdf or df followed by a  range of values
  496.                       specified in from(step)to format or in min, max,
  497.                       number of steps format. Don't mix the two formats.
  498.                       e.g.
  499.  
  500.                       x 1(1)10      start at 1 and go to 10 in steps of 1
  501.  
  502.                       x 1,10,9      start at 1 and go to 10 in 9 steps
  503.  
  504.                       cdf  0(0.1).5(.05)1  start at 0 and go to .5 in
  505.                                            steps of .1 then to 1 in steps
  506.                                            of .05
  507.  
  508.                       cdf 0,.5,5,.5,1,10   start at 0 and go to .5 in
  509.                                            5 steps then from .5 to 1 in
  510.                                            10 steps.
  511.                       cdf 0,.5,5,.55,1,9   does the same thing
  512.  
  513.  
  514.                       df 1(1)30(10)120     both of these generate
  515.                       df 1,30,29,40,120,8  1 2 .. 30 40 50 .. 120
  516.  
  517.                       personally, I much prefer the () notation,
  518.                       hardly ever use the other.
  519.  
  520.  
  521.  
  522.         kspdat                                                  page 11
  523.  
  524.  
  525.            dep var    when you hit return or the down arrow from the
  526.                       <indep var:> prompt, you will be in the go to the
  527.                       blank area below and be prompted with c2:. At this
  528.                       point, enter
  529.                          1. a two letter code for the distribution
  530.                          2. values of the parameters
  531.                          3. bar, pdf, cdf, rel, haz or x
  532.  
  533.                       The sixth help screen summarizes the choices:
  534.                       enter <dist> <params> <bar,pdf,cdf,haz,rel or x>
  535.                       use two letter code for dist, values of params
  536.                       in order listed
  537.                                                 F          fd df1 df2
  538.                       binomial       bi n p     noncen F   nf df1 df2 nc
  539.                       disc uniform   du min max gamma      ga Θ a
  540.                       disc Weibull   dw p ß     inv Gausn  ig µ lambda
  541.                       hypergeometric hy N n k   Laplace    la a b
  542.                       neg binomial   nb p n     lognormal  ln µ σ
  543.                       Poisson        po µ       logistic   lo µ σ
  544.                       beta           be a b     normal     no µ σ
  545.                       Cauchy         ca a b     observed   ob fname col#
  546.                       chi-square     ch df      Pareto     pa b
  547.                       noncen chi-sq  nx df nc   Rayleigh   ra b
  548.                       cont uniform   cu min max Students t st df
  549.                       extr value lg  el a b     noncen t   nt df nc
  550.                       extr value sm  es a b     triangular tr a b
  551.                       exponential    ex µ       Weibull    we Θ ß δ
  552.  
  553.                       Descriptions of the distributions and their
  554.                       parameters can be found in ks.doc.
  555.  
  556.                       The solidus can be used to enter fractions, e.g.
  557.                       you can use 1/3 (1.0 / 3, 1/3.0, etc) instead of
  558.                       .33333333333333333. Mixed numbers cannot be used.
  559.                       That is, 4 1/3 is taken as two separate numbers,
  560.                       not as 13/3.
  561.  
  562.                       If the independent variable is x, the dependent
  563.                       variables can be any combination of
  564.                       pdf, bar, cdf or rel from discrete distributions or
  565.                       pdf, cdf, haz or rel from continuous distributions.
  566.  
  567.                       If the independent variable is cdf, the dependent
  568.                       variables can be x from any distribution or
  569.                       observed data.
  570.                       If you compute pdf values from a discrete
  571.                       distribution, you can compute either the actual pdf
  572.                       or bars. With bars, x is rounded to the nearest
  573.                       integer and the pdf is computed for that integer.
  574.                       This is useful for graphing.
  575.  
  576.  
  577.  
  578.         kspdat                                                  page 12
  579.  
  580.  
  581.                      Examples:
  582.  
  583.                       bi 10 .4 bar   binomial n = 10 p = .4 bar format
  584.  
  585.                       bi 10 .4 pdf   binomial n = 10 p = .4 pdf format
  586.  
  587.                       no  0  1 cdf   normal (Gaussian) µ = 0  σ = 1  cdf
  588.  
  589.                       ga  2 .5  x    gamma a = 2  Θ = .5 inverse cdf
  590.  
  591.                       ob c:df.dat 3  observed data in file df.dat, col 3
  592.  
  593.  
  594.                       Use <enter>, the up arrow or the down arrow to
  595.                       complete the current entry. The cursor will go to
  596.                       the next available field, scrolling if necessary.
  597.                       Use alt-Q to end data entry. During data entry, you
  598.                       can use the the up and down arrow keys to move to a
  599.                       previously entered field to edit it.
  600.  
  601.                       The information you type is checked for form and
  602.                       number of parameters, but parameter values are not
  603.                       checked for correctness. Misspecified parameters
  604.                       will lead to either missing or garbage output. For
  605.                       example, giving 10.5 for the binomial n will be
  606.                       accepted but will truncated to 10.
  607.  
  608.         Most computed values are good to 12+ significant digits. A few
  609.         algorithms used, for the normal cdf and inv, t inv, chi sq inv, f
  610.         inv, gamma cdf and inv, and beta cdf and inv, require that the
  611.         number of significant digits in the returned value be specified
  612.         beforehand. For most cases, the number specified is 10. This is a
  613.         compromise between computation speed and accuracy.
  614.  
  615.         For refrences, see ks.doc.
  616.