JAMES A. PETE Biostatistical Programs

in BASIC Language for

Time-Shared Computers:

Coordinated with the Book £

Quantitative /^oology"

SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY NUMBER 69
SERIAL PUBLICATIONS OF THE SMITHSONIAN INSTITUTIO N

The emphasis upon publications as a means of diffusing knowledge was expressed

by the first Secretary of the Smithsonian Institution. In his formal plan for the Institution, Joseph Henry articulated a program that included the following statement:

"It is proposed to publish a series of reports, giving an account of the new discoveries

in science, and of the changes made from year to year in all branches of knowledge

not strictly professional." This keynote of basic research has been adhered to over the

years in the issuance of thousands of titles in serial publications under the Smithsonian

imprint, commencing with Smithsonian Contributions to Knowledge in 1848 and continuing

with the following active series:

Smithsonian Annals of Flight

Smithsonian Contributions to Anthropology

Smithsonian Contributions to Astrophysics

Smithsonian Contributions to Botany

Smithsonian Contributions to the Earth Sciences

Smithsonian Contributions to Paleobiology

Smithsonian Contributions to Zoology

Smithsonian Studies in History and Technology

In these series, the Institution publishes original articles and monographs dealing

with the research and collections of its several museums and offices and of professional

colleagues at other institutions of learning. These papers report newly acquired facts,

synoptic interpretations of data, or original theory in specialized fields. Each publication is distributed by mailing lists to libraries, laboratories, institutes, and interested

specialists throughout the world. Individual copies may be obtained from the Smithsonian Institution Press as long as stocks are available.

S. DILLON RIPLEY

Secretary

Smithsonian Institution
SMITHSONIAN CONTRIBUTIONS TO

ZOOLOGY

NUMBER 69

Peters Biostatistical Programs

in BASIC Language for

Time-Shared Computers:

Coordinated with the Book

"Quantitative Zoology"

SMITHSONIAN INSTITUTION PRESS

CITY OF WASHINGTON

1971
ABSTRACT

Peters, James A. Biostatistical Programs in "BASIC" Language for Time-Shared

Computers: Coordinated with the Book "Quantitative Zoology." Smithsonian

Contributions to Zoology, 69: 1-00. 1971.—This series of computer programs,

written in the language BASIC, is designed to facilitate use of the time-shared

computer by individuals with little or no background in computers or programming. The programs are coordinated with the book "Quantitative Zoology," by

G. G. Simpson, A. Roe, and R. Lewontin, which permits the user of this publication to find the proper statistical procedures for his needs in that book and to

carry out the statistical procedure indicated. The programs are identified by using

the page numbers from Simpson et al.

Official publication date is handstamped in a limited number of initial copies and is recorded

in the Institution's annual report, Smithsonian Year.

UNITED STATES GOVERNMENT PRINTING OFFICE

WASHINGTON : 1971

For sale by the Superintendent of Documents, U.S. Government Printing Office

Washington, D.C. 20402 - Price 50 cents (paper cover)
TO ALL SCIENTISTS ASSOCIATED WITH THE

MUSEUM OF NATURAL HISTORY

You will find enclosed a copy of a recent publication in

the Smithsonian Contributions to Zoology entitled "Biostatistical

Programs in BASIC Language for Time-Shared Computers: Coordinated with the Book "Quantitative Zoology." We hope to

put a copy in the hands of every scientist in the Museum

of Natural History, whether he is an employee of the Smithsonian or not. If you know of anyone who did not receive it

please notify James A. Peters (ext. 6171) and one will

be sent.

A seminar designed to demonstrate forall interested

staff the techniques used to run any of the programs in

the enclosed paper will be offered early in September, 1971,

when the staff has re-assembled after the summer. A teletype

machine will be brought to the seminar room and the entire

sequence of steps required to run a program will be followed,

so that anyone attending the seminar should then be able

to take advantage of the time-shared computer to run his

personal data at any time he wishes.

For those already familiar with the teletype, a complete

set of tapes of the programs is available. In addition, the

Dialcom Company, which currently serves as our time-share

contractor, has asked permission to store the entire series

in their "library," which will make the programs available

to all users whether within the Smithsonian or not. When

this has been completed the use of the programs will be even

simpler than before. Anyone not familiar with the operation

of the time-shared computer who wishes to use it prior to the

seminar in September should contact J. A. Peters, as well.

When the seminar is scheduled, a series of additional

programs currently available for use by Smithsonian scientists

will also be demonstrated. These will include taxonomic

identifications from stored matrices, printing of taxonomic

diagnoses from the same matrices, automated loan records,

stored files and programs to manipulate synonymies and phylogenies, computerized mailing lists, mechanical plotting

of graphs, and perhaps an exhibit-oriented question answering

service, as well as anything new worked out during the summer.

An announcement of the time and place of the seminar

will be made late in the summer.
. Peters Biostatistical Programs

in BASIC Language for

Time-Shared Computers:

Coordinated with the Book

"Quantitative Zoology"

Introduction

This collection of computer programs is designed to

make computer use easy for the individual who has

no familiarity or knowledge of their internal workings and who does not particularly care to learn

about them. For the computer specialist or the biologist who has learned to do his own programming,

these programs are of no interest or value at all, and

he might even question the value of their existence.

But the absolute neophyte can, and I hope will, use

this publication as a painless, easy introduction to

the computer world. After he has used these programs for awhile, he will find it easy to progress a

little further.

The availability of time-shared computers, which

are contacted through a familiar typewriter keyboard, now makes most kinds of data manipulation

both instantaneous and painless. The investigator

who needs to do any kind of work with numbers does

himself a serious disservice if he fails to take advantage of computers. But the first hurdle continues to

be the highest because it involves the decision to

start, and the act of doing so. It involves getting rid

of the idea that computer use is complicated and that

one cannot do the entire job by himself. It involves

learning that the problem need not be large, difficult,

and composed of amounts of data that could not be

handled in any way other than by computer. Data for

James A. Peters, Department of Vertebrate Zoology, National

Museum of Natural History, Smithsonian Institution, Washington, D.C. 20560.

computer work can consist of only a few measurements or counts on a dozen specimens, with no more

answers wanted than an average, or range, and perhaps the standard deviation. And, finally, it involves

spending only fifteen minutes in learning how to use

the time-shared computer.

It is my contention that the average biologist does

not have to know any more about how to write a

program to use the computer than he needs to know

about internal gear mechanisms to run a microtome.

The set of programs presented here are designed to

facilitate such usage. If the reader has ever consulted

the book by G. G. Simpson, A. Roe, and R. Lewontin

entitled "Quantitative Zoology" (published in 1939,

revised in 1960), the use of these programs should be

simple. The code designation for the programs are

taken directly from the pagination of this book, so

that the program entitled "SIP74" will do all the calculations for which a formula is shown on Sl(mpson)

P(age) 74. If the user of this publication is not familiar with that particular book on biostatistics, he

still can use the index to find a program that will run

the type of computation he wishes to make. The basic

concept behind the use of this book as the locus for

organization is that the user will be able to follow

The use of the work "Quantitative Zoology," by G. G.

Simpson, A. Roe, and R. Lewontin (New York: 1960,

revised edition) as the basis for this series of programs,

and the reproduction of any material contained therein,

has been by permission of Harcourt, Brace and World,

Inc., New York.

1
SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

the same procedure as if he were going to calculate

with a pencil or with a desk calculator in deciding

what formula he wishes to calculate, after which he

can substitute the time-shared computer as the device

for doing the calculations. In every case the entire

program is printed here, including data from an

example in "Quantitative Zoology" and also including the result of a run by the computer using those

data, which can be directly compared with the book

to be sure the program has run correctly. This test

is followed by substitution of the user's data (always in line 900 and on), as directed by the program itself, and by a run on that data for his

answers.

I visualize these programs as being used in three

ways. The most effective way would be for the user to

store the entire series in the memory of the computer

("on disc") so that he could simply identify from the

book what statistical values he wanted to calculate

and then call for the program by using the page

number. The first few lines (the "REMS," or remarks) of each program are devoted to instructions

on its use, and the user may list these to see what

procedures he should follow. His data are then fed in

from a tape, and the program is run. If usage by a

group is fairly high this would be the best method to

use, but if usage is cyclic or erratic the second method

probably would be better.

The second way to use these programs would be to

have paper tapes of the entire series stored beside

the teletype. The user selects the program he needs

for the statistical values wanted, feeds it into the

computer, and uses it for as long as he has need for it,

after which it is removed from the disc storage until

the next use. This saves the costs of disc storage but

increases the amount of contact time.

The third way to use the programs is directly from

the listings presented here. I have tried to provide

enough information to permit use even if Simpson's

book were not available and the user had to put the

program in directly from this booklet. Care must be

taken in this case to copy exactly, because slight errors can result in great delays in trying to find them

or in totally erroneous answers. Such users should

always run the program on the data included here, to

see if it is running correctly.

Program lines 14 through 19 have been left vacant

throughout these programs so the user can put identification data in them. Anything inserted in these

lines with a "PRINT" statement will be put at the

head of a sheet of calculated results and will provide

a permanent record of the data source. As an example, one might type (on a single line) the following: 15 PRINT "FEMALE PAPILIO, MONTGOMERY COUNTY, WING LENGTH." Everything within the quotation marks would then be

printed out with the results.

No attempt is made here to teach the preliminary

steps for making contact with the time-shared computer. The techniques and commands change from

one contractor to the next, and they generally are

taught by the contractor at the beginning of service.

Any previous user of a system can show the beginner

how to make the first contact.

It will be noted that occasionally there are pages

(in Simpson et al.) on which formulae are printed

that do not appear here as a numbered program. This

is a consequence of the fact that it often is simpler

to program a series of operations or formulae as a

single unit. The following material is organized to

permit the user to find out from the centered headings (all of which refer to pages in Simpson et al.)

where material from any page not directly programmed can be found.

SIP1-SIP64

The information contained in these pages, while in many cases amenable to handling, organization, and printing by the computer, generally is such that it is not worth the time or the expense involved in computer use. The

techniques described here are used throughout the remainder of the text, and, where appropriate, programs using

them have been written. In such cases, the programs often can be used to perform the simple operations required

in this section, if the user wishes.

SIP65

The equation presented on this page is included in program SIP74.
NUMBER 69 g

SIP66-SIP67

Program SIP74 provides for grouped data as well as for individual values. It will call for an answer from the

user as to whether his data is grouped or not. If classes are used as in example 26 on page 67, the class midpoint

is to be used as the "X" value in SIP74.

SIP68-SIP73

Program SIP74 will calculate the mean of means, as discussed on these pages. Method 1 sums a series of means

and divides the sum by the number of means. If this method is desired, the values of the individual means are

entered in line 900, and the ungrouped data routine is chosen when the computer asks for a selection. Method 2

involves multiplying each mean by the size of its sample and then dividing the sum of those values by the sum

of the sample sizes. In this method, the user first enters the mean of a sample ("X" value), then the size of the

sample ("Y" value), and continue to the end of the samples. The grouped data routine is chosen when the

computer offers a selection. If needed by the user, the Median, page 70, can be found in SIP143. The Mode is

left for the individual user to tabulate since a computer program scarcely facilitates this operation.

SIP74

CGI hkfr SIP7 4 CALCULATES VARIOUS toEASORES OF CENTRAL TENDENCY. DATA

002 REK BEGINS IN LINE 900 - FOR INDIV1L0AL VALUES PUT IN ANY SEQUENCE*

0 0 3 REta FOR GROUPED DATA PUT IN FIRST VARIABLE FOLLOWED BY II S FREfcUEN<

0 0 4 REtt CY> ET C END DATA SERIES UTH THE VALUE S.0E25 . DATA IN

0 0 5 REM PROGRAM TAKEN FR01* P . 66 .

006 REM

060 LET B=0

070 LEI 0=0

080 LET D=0

100 LEI J=l

110 LET G=G

200 DIM X(500)

205 PRINT

210 PRINT "TYPE 2 FOR GROUPED DATA* TYPE 1 FOR UNGROUPED DATA"

215 INPUT G

217 IF G'=2 THEN 400

220 READ X

2^0 IF X=5.0E25 THEN 500

260 LET C=C+1

29G LET J=J*X

300 LET B=B+C1/X)

320 LET D=D+CX*X>

340 LET G=G+X

3 60 G0 T0 220

400 READ X*Y

410 IF X=5.0E2 5 ThEN 500

420 LET C=C+Y

430 LET G=G+CX*Y>

440 LET B=B+C1/X*Y>

450 LET J=J*CX*Y>

460 LET D=D+CX*X*Y>

470 Gfc T0 400

500 LET E=1/((1/C)*B)
SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

700 LET F=SQRCD/C)

760 LET H=<yC

770 LET T=JT(1/C)

775 PRINT

780 PRINT

790 PRINT " NUMBER="*C

795 PRINT "ARITHMETIC MEAN=tfJH

800 PRINT " HARMONIC MEAN="JE

810 PRINT " QUADRATIC MEAN=ffJF

830 PRINT " GEOMETRIC MEAN="iT

900 DATA 3.0* 2.8* 3-4* 3.2* 3«0*

901 DATA 2.9* 3»0*

903 DATA 5.0E25

999 DATA 5.0E25

1000 END

2.9* 2.7*

9*

9*

2.6.

3* 1.

3»3J

2*8J

2.9

3*1. 3 * 0

Sample Run of SIP74

TYPE 2 FOR GROUPED DATA, TYPE 1 FOK UNGROUPED DATA

NUMBER=

ARITHMETIC MEAN=

HARMONIC MEAN=

QUADRATIC MEAN=

GEOMETRIC MEAN=

2 1

2.97143

2.96

2.97721

2.96569

SIP78-SIP95

All of the material contained in Chapter 6 is incorporated in and calculated by SIP87, which also produces results

of the equations on pages 166—167 (the standard errors of the median, the first or third quartiles, the mean

deviation, the coefficient of variation, and the standard deviation). All of these are based on the same set of data.

The early formulae in this chapter are devoted to hand calculation of the equations, and scientists need not

spend the amount of time necessary for this when it is so simple today to run the data through a computer. No

program is provided for the data manipulation shown on page 95.

SIP87

001 REM SIP87 CALCULATES ThE fcEASUKES OF DISPERSION FOh A SERIES OF

002 RLM VALUES. DATA BEGIN IN LINE 900 . FOK INDIVIDUAL VALUES* PUT

003 HEM IN AS YOU HAVE THEh • FOR GROUPED DATA PUT IN THE F I hSl

004 REM VAklAbLE* THEN II S FREQUENCY* FOLLOWED BY SECOND VAhlAbLE*

005 KEfo ITS FREQUENCY* ETC. DATA STORED IN PROGRAM FROM P. 86 .

006 REM PhOthAM ML L ALSO GIVE STANDAhD EKKOKS OF THE VALUES* IF YGL

007 KEM ADD SIP166 10 II . DATA STRING IS TERMINATED UTh VALUE

008 REM 5.0E25 IF DATA IS UNGROUPED* SAME VALUE PLUS A ZERO IF

009 hEM DAT* IS GROUPED.

010 REM

050 LET A=0

060 LET C=0

070 LET D=0
NUMBER 69

080

085

086

08 7

090

1 GO

120

150

180

200

205

206

208

210

212

214

220

260

265

270

280

300

310

320

360

363

9 00

901

9 02

999

1000

GROUPED LATA TYPE. 2* FOR INDIVIDUAL VALUES TYPE 1"

THEN 205

220

220

DIM XC5OO)

PRINT "FOR

INPUT t»

IF Q=2

READ X

IF X=5»0E25 THEN

LET A=A+1

LET C=C+CX*X)

LET D=D+X

GfcJ Ttf 90

READ X*Y

IF X=5.CE25 THEN

LET A=A+Y

LET C=C+<CX*X)*Y)

LET D=D+CX*Y>

Gfc Tfe) 205

LET F=<C-((D*D)/A))/(A-l )

LET G=St)h(F)

LET V=<100*G)/(D/A)

PRINT

NUMBER OF VAR1ATES="iA

" ARITHMETIC MEAN=MiD/A

VARIANCEs";F

" STANDARD DEVIATION="iG

"COEFFICIENT OF VARIATION="i V

STANDARD ERROR OF MEAN=MJ G/SORCA)

52* 1* 54* 3* 56* 3* 57* 8* 58* 7* 59*

62* 6* 63* 14* 64* 6* 65* 3* 66* 1* 67J

5-0E25

5.0E25

PRINT

PRINT

PRINT

PRINT

PRINT

PRINT"

DATA

DATA

DATA

DATA

END

11

1

60*

68*

11.

1*

6 1 * 10

5.0E25

F O R

!2

Sample Run of SIP87

GROUPED DATA TYPE 2* FOR INDIVIDUAL VALUES TYPE 1

NUMBER OF VARIATES= 86

ARITHMETIC MEAN= 60.430 2

VARIANCE= 9.35368

STANDARD DEVIATION* 3.05838

COEFFICIENT OF VARIATION* 5.06101

STANDARD ERROR OF MEAN= .32 9 793

SIP90

The calculation of the coefficient of variation has been incorporated in SIP87, since it is based on the same set of

data and usually is desired at the same time as the other standard calculations.
6 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

SIP113

001 REM SIP11 3 CALCULATES ESTIMATED SIZE OF A POPULATION BASED ON

002 REM RECAPTURE OF PREVIOUSLY MARKED INDIVIDUALS. DATA I S IN -

003 REM SERTED I N LIN E 90 0 AS FOLLOWS: FIRST VALUE I S THE NUMBER OF

004 REM INDIVIDUALS FIRST MARKED <"N"> * SECOND VALUE I S THE TOTAL

005 REM NUMBER OF INDIVIDUALS I N RECAPTURE SAMPLE <"R"> * THIRD

006 REM I S NUMBER OF PREVIOUSLY MARKED INDIVIDUALS I N RECAPTURE

007 REM SAMPLE ("M") . DATA STRING I S ENDED WITH VALUE 5.0E25 . DATA

008 REM IN PROGRAM I S FROM EXAMPLE 39* P. 114 .

0 50 LET A*0

060 PRINT

070 PRINT

090 PRINT "SAMPLE"* "ESTIMATED POPULATION SIZE"

100 READ X* Z* Y

120 IF X=5.0E25 THEN 1000

140 LET A=A+1

160 LET B=CX*Z)/Y

170 PRINT

180 PRINT A* B

200 G0 T0 100

900 DATA 110* 271* 38* 40* 62* 6* 131* 80* 11* 300* 430* 10* 5-0E25

999«DATA 5.0E25* 5.0E25

1000 END

Sample Run of SIP113

SAMPLE ESTIMATED POPULATION SIZE

1 784.474

2 413*333

3 ^52.

4 12900

SIP129

001 REM SIP129 CALCULATES THE PROBABILITIES IN A POISSON DISTRIBUTION.

002 REM DATA IS ASSUMED T0 BE GROUPED* AND MUST BE SO TO RUN IN SIP129.

003 REM DATA GOES IN LINE 900* WITH VARIABLE FIRST* FOLLOWED BY ITS

004 REM FREQUENCY* THROUGH ENTIRE SERIES* AND ENDED WITH 5.0E25.

006 REM STORED DATA FROM EXAMPLE 45* P. 131.

007 REM

050 LL'I A=u
NUMBER 69

C60 LfcT b=0

C7G LET C=0

OfcG LET D=0

G9i: Lt'I E=0

100 LET F=0

110 LET G=0

120 LET H=l

130 LET 1=1

140 LET J=0

163 PRINT

180 DIM XC500)* YC500)

190 READ X, Y

220 IF X=5.0E25 THEN 303

240 LET B=B+CX*Y)

260 LET A=A+<CX*X)*Y)

280 LET C=C+Y

300 G0 T0 190

303 PRINT

315 PRINT

320 LET D=B/C

330 LET Q=-D

335 LET E=2.71828

340 LET E=EtQ

350 PRINT " MEAN="JD

355 PRINT "VARIANCE="J CA-<C*(D*D>))/<C-1

357 PRINT

360 REST0RE

365 PRINT "FOR AN"*" THE POISSON"

370 PRINT "X VALUE"*" PROBABILITY"

375 PRINT " OF:"*" IS:"

380 READ X* Y

390 IF X=5.0E25 THEN 1000

400 LET F=X

420 IF F=0 THEN 550

440 LET G=CF-1)

450 IF G=0 THEN 570

460 LET H=H*G

480 LET I=F*H

500 LET J=<E*CDtF))/I

515 PRINT

520 PRINT F*J

540 G0 T0 380

550 PRINT F*E

555 PRINT

560 G0 T0 380

570 PRINT F*D*E

580 G0 T0 380

900 DATA 0*16*1*9*2*3*3*1*4*1*5*0*5.0E25

999 DATA 5.0E25* 5.0E25

1000 END
SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

Sample Run of SIP129

MEAN =

VARIANCE^

FOR AN

X VALUE

OF:

0

1

2

3

4

5

.733334

1.02989

THE POISSON

PROBABILITY

IS:

.480306

.352224

.129149

•315697E-01

.5 78 778F- 02

•848874E-03

SIP143

001 REM SIP143 RUNS THE COEFFICIENT OF SKEWNESS. PUT GROUPED DATA

002 REM IN LINE 900, FIRST THE VARIABLE, SECOND THE FREQUENCY.

003 REM TERMINATE DATA WITH VALUE 5.0E25. DATA IN PROGRAM TAKEN

004 REM FROM EXAMPLE 43, P. 144.

005 REM

050 LET B=0

052 LET D=0

056 LET H=0

058 LET J=l

061 LET T=0

070 DIM XC500), YC500)

080 READ X, Y

090 IF X=5.0E25 THEN 130

105 LET D=D+Y

110 LET T=T+C<X*X)*Y>

120 LET E=E+CX*Y>

125 G0 T0 80

130 LET F=E/D

133 PRINT

135 PRINT

 MNUMBER=";D

140 PRINT " MEAN=";F

210 LET S=(T-CCE*E>/D))/(D-1)

220 LET U=SQR(S)

225 PRINT "STD.DEV.="*U

227 PRINT

230 LET I=D/2

235 REST0RE

237 READ XI, Yl, X2, Y2
NUMBER 69

238 LET B=X2-X1

250 REST0RE

260 READ X, Y

280 LET H=H+Y

290 IF H>=I THEN 350

300 G0 T0 260

350 PRINT "VALUE OF MEDIAN CLASS IS:"5X

370 LET H=H-Y

390 LET H=H+1

400 IF H>«I THEN 450

410 LET J=J+1

420 G0 T0 390

450 PRINT "SERIAL NUMBER OF MEDIAN VALUE IN ITS CLASS="JJ

460 LET L=X-(B/2>

480 LET L=L+((J-.5)*B)/Y

500 PRINT "PRECISE ESTIMATE OF MEDIAN="J L

520 LET N=(3*CF-L))/U

540 PRINT "COEFFICIENT OF SKEWNESS=";N

900 DATA 5.5* 3* 5.6* 12, 5.7, 43* 5.8* 80* 5»9* 131* 6.0* 236

901 DATA 6.1* 185* 6.2* 142* 6.3* 99* 6.4* 37* 6.5* 15* 6.6* 12

902 DATA 6.7* 3* 6.8* 2* 5-0E25

999 DATA 5.0E2 5

1000 END

Sample Run of SIP143

NUMBER^ 1000

MEAN= 6.06149

STD.DEV.= .201288

VALUE OF MEDIAN CLASS IS: 6

SERIAL NUMBER OF MEDIAN VuLUfc IN ITS CLASS: 231

PRECISE ESTIMATE OF MEDIAN: 6.04767

COEFFICIENT OF SKEWNESS= .206068

SIP146

001 REM SIP146 RUNS THE COEFFICIENT OF KURTOSIS. PUT GROUPED DATA

002 REM IN LINE 900* FIRST THE VARIABLE* AND SECOND THE FREQUENCY.

003 REM TERMINATE DATA WITH THE VALUE 5.0E25. DATA IN PROGRAM TAKEN

004 REM FROM EXAMPLE 51* P. 147.

005 REM

050 LET C=0

052 LET H=0

057 LET 1=0

058 LET L=0

100 READ X* Y

140 IF X=5.0E25 THEN 280

150 LET C=C+Y
10 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

160 LET I=I+CX*X*Y>

170 LET H=H+CX*Y)

260 G0 T0 100

280 LET D=H/C

300 LET E = <I-CCH*H)/O>/<C-1>

320 LET F=SQRCE>

400 RESTORE

420 READ X, Y

440 IF X=5.0E25 THEN 480

460 LET G=X-D

470 LET L=L+CG*4*Y)

475 G0 T0 420

480 LET M=CL/CFt4*C>>-3

540 PRINT

550 PRINT " NUMBER=";C

560 PRINT " ARITHMETIC MEAN=";D

565 PRINT " VARIANCE=";E

570 PRINT " STANDARD DEVIATION*"JF

580 PRINT "COEFFICIENT OF KURTOSIS=";M

900 DATA 52, 1> 54, 3 , 56* 3 , 57 , 8, 58 ,

901 DATA 62, 6 , 63 , 14, 64, 6, 65 , 3 , 66;

999 DATA 5.0E2 5

1000 END

7,

1

59,

67;

1 1 ,

1,

6 0 ,

68,

11

1,

6 1 , 10

5.0E25

Sample Run of SIP146

AhITHi>1ETIC

VARIAi\iCE =

DEVIATIONS

COEFFICIENT OF KUhTOSIS=

9.35368

3-05&3&

-.10629 6

020

021

022

023

024

025

382

384

386

388

389

390

392

395

40C

410

SIP161

REt\ SIF161 CALCULATES "ihE CONFIDENCE LIMITS OF THE VARIANCE.

YOU fcL'ST SUPPLY THE CHI SOUAhE VALUES FOR THE LIMITS YOU

WISH TO ESTABLISH. THIS FKCtRA^. I S WRITTEN TO EL ADDED TO

SIP87 , WHICh CALCULATES THE VARIANCE* IT CANNOT BE RUN

INDEPENDENTLY OF THAT PhOl-RAM NOR AT THE SAME TIME AS SIP163 .

IS CHI SGUARE OF LOWER CONFIDENCE LIMIT?"

IS CHI SQUARE OF UFPER CONFIDENCE LIMIT?"

REM

HEM

PRINT "WHAT

INPUT Rl

PRINT "WHAT

INPUT R2

PRINT

PRINT

PRINT

FhINT

FRINT"CONFIDENCE LIMITS FOR STANDARD DEVIATION ARE:"

PRINT SQhC(<A-l)*F)/R2> " TO" SGR<((A-1)*F)/Rl )

"CONFIDENCE LIMITS

<<A-1)*F)/R 2 " TO"

FOR VARIANCE AKE:"

<<A-1)*F
NUMBER 69 11

Sample Run of SIP161

r Oh GRGUPED DATA TYPE 2* r OK 1NDIVI DUAL VALUES TYPE 1

NUMBER OF VARIA1ES= 86

ARITHMETIC WEAN- 60.430 2

VARIANCE= 9.3536b

STANDARD DEVIATICN= 3.05838

COEFFICIENT OF VARIATION^ 5.06101

STANDARD ERRCR OF MEAN= .32979 3

WhAT IS Chi SQUARE OF LOWER CONFIDENCE LIMIT?

161.3 6

WHAT IS CHI SQUARE OF UPPER CONFIDENCE LIMIT?

!112.47 6

CONFIDENCE LIMITS FOR VARIANCE ARE:

7.06&73 TO 12.9573

CONFIDENCE LIMITS FOR STANDARD DEVIATION AHE:

2*65671 TO 3*59963

0 30

031

032

033

034

035

036

382

384

385

386

387

388

389

390

392

395

400

4 10

REM

REM

REM

REM

SIP163

SIP163 WILL CALCULATE ThE CHI SQUARE VALUES FOR THE CONFIDENCE

LIMITS YOU SET* AND ADD THEM TO THE RESULTS OF SIPS7. YOU

MUST INPUT ThE AMOUNT OF THE AREA OF THE NORMAL CURVE YOU

WISH TO INCLUDE. THIS PROGRAM CANNOT

OF SIP87* BUT MUST BE MERGED WITH IT.

THE SAME TIME AS SI PI 61-

BE RUN INDEPENDENTLY

IT CANNOT BE RUN AT

IS VALUE OF NORMAL VARIATE YOU HAVE SELECTED?"

REM

REM

PRINT "WHAT

INPUT N

PRINT "THE CHI SQUARE VALUES ARE:"

LET R1=C(-N+SGRC2*<A-1>>)*2)/2

LET R2 = ((N+SQR(2*(A-1) )) t£;)/2

PRINT Rl "AND" R2

PRINT

PRINT "CONFIDENCE LIMITS FOR VARIANCE ARE:"

PRINT <CA-n*F)/R2" TO" CCA-1>*F)/R1

PRINT

PRINV'CONFIDENCE LIMITS FOR STANDARD DEVIATION ARE:"

PRINT SGRC(CA-1)*F>/R2>" TO" SGRC(CA-1)*F>/Rl)

Sample Run of SIP163

FOR GROUPED DATA TYPE 2* FOR INDIVIDUAL VALUES TYPE 1

•2
12 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

NUMBER OF VARIATES= 8 6

ARITHMETIC MEAN = 60*430 2

VARIANCE= 9.35368

STANDARD DEVIATION= 3*05838

COEFFICIENT OF VARIATION= 5.06101

STANDARD ERROR OF ttEAN= .32979 3

V-HAT I S VALUE OF NORMAL VAR1A1E YOU HAVE SELECTED?

! 1.9 6

THE CHI SQUARE VALUES ARE:

61.365 5 AND 112.47 6

CONFIDENCE LIMITS FOR VARIANCE ARE:

7-0687 2 TO 12-9562

CONFIDENCE LIMITS FOR STANDARD DEVIATION ARE:

2-65871 TO 3-59947

SIP166

008 REM SIP166 WILL CALCULATE THE STANDARD ERRORS OF VARIOUS

009 REM MEASURES OF DISPERSAL PLUS THE VALUES OF ANY GIVEN CONFI010 REM DENCE LIMITS TO THOSE STANDARD ERRORS. THIS PROGRAM MUST BE

011 REM ADDED TO SIP87 TO RUN. IT CANNOT BE RUN INDEPENDENTLY.

012 REM IF YOU WANT CALCULATED CONFIDENCE LIMITS YOU WILL BE ASKED

013 REM TO SUPPLY EITHER THE »Tf VALUE OR THE AMOUNT OF THE NORMAL

020 REM CURVE WITHIN LIMITS YOU ESTABLISH, TO PERMIT CALCULATION

021 REM OF THE LIMITS.

500 PRINT

503 PRINT "STANDARD ERRORS:"

505 PRINT •• MEDIAN=";<1.2533*G>/SGR<A>

510 PRINT " FIRST 0R THIRD QUARTILE=";Cl.3636*G)/SQR(A)

520 PRINT " MEAN DEVIATIONS; ( .6028*G)/SQRCA>

540 PRINT " COEFFICIENT OF VARIATION^; V/Z

560 PRINT " STANDARD DEVIATION=";G/Z

565 PRINT "CONFIDENCE LIMITS WANTED? 2 FOR YES* 1 FOR NO."

570 INPUT K

575 IF K=l THEN 1000

580 PRINT "DEGREES OF FREEDOM ARE:";A-1

585 PRINT"WHAT IS T VALUE OR AMT OF NORMAL CURVE FOR CONF. LIMITS?"

590 INPUT T

600 PRINT

610 PRINT "CONFIDENCE LIMITS ARE:"

620 PRINT "MEAN: PLUS-MINUS"i <T*<G/SQRCA)))

640 PRINT "MEDIAN: PLUS-MINUS"; CT*1.2533*G)/SQR<A>

645 PRINT "QUARTILES: PLUS-MINUS"; <T*1.3636*G>/SQRCA>

650 PRINT "M. D.: PLUS-MINUS"; CT*.6023*G)/S0R (A)

660 PRINT "C.V.: PLUS-MINUS"; <T*CV/Z)>

700 G0 T0 1000
NUMBER 69 13

Sample Ron of SIP166

FOR GROUPED bA'iA iYPE 2* FOR INDIVIDUAL VHLUES TYPE 1

NUMBER OF VARIATES= 8 6

ARITHMETIC hLANs 60.4302

VARIANCE= 9.35368

STANDARD DEVIATIONS 3.05838

COEFFICIENT OF VARIATION 5.06101

STANDARD ERRORS:

MEDIAN= .4133 3

FIRST 0R THIRD' GUARTILE= .44970 6

MEAN DEVIATIONS .198799

COEFFICIENT OF VARIATION* -38589 8

STANDARD DEVIATIONS .233199

CONFIDENCE LIMITS WANTED? 2 FOR YES* 1 FOR NO.

! 2

DECREES 0F FREEDOM ARE: 65

V.HAT IS T VALUE OR AMT OF NORMAL CURVE FOR COtOh • LIMITS?

! L9 6

CONFIDENCE LIMITS ARE:

MEAN: PLUS-MINUS .64639 5

MEDIAN: PL US-MINUS .810127

QUARTILES: PLUS-MINUS .881425

M. D»: PLUS-MINUS .389647

CV. : PLUS-MINUS .756361

SIP176

001 REM SIP176 IS SET UP TO CALCULATE BOTH STUDENT'S

 f Tf AND

002 REM THE

 fF* VALUE FOR TWO SAMPLES TO BE COMPARED. IF YOU WANT

003 REM ONLY STUDENT'S 'TS TYPE THE FOLLOWING LINE OF INSTRUCTION!

004 REM 75 5 G0 T0 1000

005 REM IF YOU WANT ONLY THE VALUE OF 'FS TYPE THE FOLLOWING:

006 REM 600 G0 T0 760

007 REM DATA CAN BE GROUPED OR UNGROUPED. IT IS PUT IN LINE 900.

008 REM IF UNGROUPED PUT THOSE OF FIRST SAMPLE IN, TERMINATED WITH

009 REM VALUE 2.0E25* THEN SECOND SAMPLE* ENDING WITH 5.0E25.

010 REM IF GROUPED* DO SAME* BUT PUT VALUE FIRST FOLLOWED BY ITS

011 REM FREQUENCY* AND DOUBLE TERMINATION VALUES IN BOTH CASES.

050 LET AsO

051 LET C=0

052 LET D=0

053 LET J=0

054 LET H=0

055 LET L=0
14 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

060 PRINT

070 PRINT "TYPE 1 FOR UN GROUPED DATA; 2 FOR GROUPED DATA"

O&O INf-L'l K

090 IF K=2 THEN 160

100 READ T

110 IF T=2.0E25 THEN 220

130 LET A=A+1

140 LET D=D+T

150 LET C=C+CT*T>

1-55 G0 T0 100

160 READ X,Y

165 IF X=1.0E25 THEN 220

170 LET A=A+Y

180 LET D=D+CX*Y)

190 LET C=C+<X*X*Y>

200 G0 T0 160

220 LET F=CC-<(D*D)/A>)/(A-1)

260 LET G=SQRCF)

280 LET S1=D/A

285 PRINT

286 PRINT

290 PRINT " FIRST SAMPLE"

300 PRINT " MEAN="IS1

310 PRINT " VARIANCE="JF

320 PRINT " STANDARD DEVIATION:*"* G

330 PRINT "STANDARD ERROR OF MEAN="5G/SQRCA)

340 IF K=2 THEN 440

350 READ T

360 IF T=5.0E25 THEN 480

380 LET L=L+1

400 LET H=H+T

420 LET J=J+CT*T)

430 G0 T0 350

440 READ X,Y

450 IF X=5.0E25 THEN 480

460 LET L=L+Y

465 LET H=H+CX*Y)

470 LET J=J+(X*X*Y)

475 G0 T0 440

480 LET V=CJ-<<H*H)/L))/(L-1 )

520 LET M=SQRCV>

540 LET S2=H/L

545 LET W=F/V

550 PRINT

555 PRINT" SEC0ND SAMPLE"

560 PRINT " MEAN="*S2

570 PRINT " VARIANCE="SV

580 PRINT " STANDARD DEVIATION="JM

590 PRINT "STANDARD ERROR OF MEAN="lM/SQRCL)

640 LET N=<S1-S2)*SQRCCA*L)/<A+L))

660 LET 0=(CA-1)*F)+C(L-1)*V)

720 LET T=N/(SQR(0/(A+L-2)>)

730 PRINT
NUMBER 69 15

740 PRINT "STUDENTS T="JT

750 PRINT "DEGREES OF FREEDOM=";A+L-2

760 PRINT

770 PRINT "VALUE OF F RATIO FOR SAMPLES IS:";VJ

775 PRINT "DEGREES OF FREEDOM IN NUMERATOR*"JA-1

776 PRINT "DEGREES OF FREEDOM IN DENOMINATOR^'* L-l

900 DATA 50.5* 50.0, 50.1* 48.5, 49.5* 49.2* 49.7*

901 DATA 47.2* 48.0. 47.9*

902 DATA 48.8* 48.3* 47.6:

999 DATA 5.0E25

1000 END

48.5*

49.1*

47.4* 47.8*

50.2* 49.7*

2.0E25

50.0* 50.2* 47.4

5.0E25

Sample Run of SIP176

TYPE 1 hOk UNtRGUPED DATA* 2 b OK LhOLPED

! 1

FIRST SAhPLE

fiEAN= 49.6 428

VARIANCE* .434245

STANDARD DEVIATIONS .656973

STANDARD ERRGR OF fcn.AN» .249066

SAMPLE

WEAN= 48*54

VARIANCE^ 1.14118

STANDARD DEVIA1ICN= 1.06826

STANDARD ERRGR GF MEAN^ .275824

STUDENTS T= 2.49963

DECREES OF FREEDGIVJ= 20

VALUE CF F RATIO FOR SAMPLES IS:

DECREES GF FREEDOM IN NUMERATOR*

DECREES CF FREEDOM IN DEt\GiviIi\ATGh

3SG522

14

SIP181

001 REM SIP181 RUNS THE STUDENT'S

 f Tf TEST FOR PAIRED SAMPLES. THE

002 REM TWO VALUES IN EACH PAIR ARE ENTERED IN LINE 900* FOLLOWED

003 REM BY THE NEXT PAIR. SERIES IS ENDED WITH VALUE 5.0EP5 REPEATED

004 P.EM ONCE. DATA IN PROGRAM FROM EXAMPLE 58* P. 181.

GOb kEK

050 LET A=0

060 LET C=0

070 LET D=0

100 READ X, Y

120 IF X=5.0E25 THEN 240

140 LET A=A+1
16 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

160 LET B=X-Y

180 LET OC+B

200 LET D=D+(B*B>

220 G0 T0 100

240 LET Es<D-CCC*C)/A)>/<A-l)

260 LET T=<C/A)/SGRCE/A>

320 PRINT "VALUE OF STUDENTS T IS:"JT

330 PRINT "DEGREES OF FREEDOM="JA-1

900

901

902

903

904

906

DATA

DATA

DATA

DATA

DATA

DATA

9.8*

11.1*

11.4*

12.3*

12.7*

13.4*

10

1

1

1

1

1

• 2*

1.4*

2.6*

3.0*

3.5*

2.6*

10.5*

11.1*

11.9*

12.4*

12.8*

13.5*

10.7*

12.1*

12.3*

13.2*

13.3*

13.5*

10.5* 1

1 1.3*

12.2*

12.4*

13.0*

10.7 *

12.6*

12.4*

12.4*

12.7*

5.0E25

1

1

1

1

1

0.8*

1 .4*

2.2*

2.5*

3.1*

10.8*

12.8*

12.0*

13.8

13.1*

1 1.0*

1 1 .4*

12.3*

13.2*

1

1

1

1

1.0

0 . 8

3 . 7

3 . 6

999 DATA 5.0E25

1000 END

Sample Run of SIP181

VALUE OF STUDENTS T IS= -3.41602

DEGREES OF FREED0M= 2 5

SIP183

0G1 RLM SIP16 3 TESTS SINGLE. INDIVIDUALS WITH THE. KNOW

OGfc REM VALUES OF A PREVIOUS SAMPLE.. DATA GOES IN LINE 90 0 AND

003 REM SO ON* USINC THE FOLLOWING SEQUENCE OF KNOWN) VALUES:

0 0 4 REM FIRST NUMBER=MEAN OF KNOWN SAMPLE.

0 0 5 REM SECOND NUMBLR=STANDARD DEVIATION OF KNOWN SAMPLE

0 0 6 REM THIRD NUMBLR=VALUE FOR INDIVIDUAL SPECIMEN

0 0 7 KLM FOURTH NUMBER=NUMBE.R OF SPECIMENS IN KNOWN SAMPLE

OC& REM ThI S I S THEN FOLLOWED BY SAME SEQUENCE. FOR SECOND

0 0 9 RLM CHARACTERISTIC TO BE. TLSTE.D AGAINST KNOWN SAMPLE.

0 1 0 RE.M SEQUENCE IS ENDED WITH VALUE. 5.0E.25 . DATA STORED IN PROGRAM

0 1 1 RLM FROM EXAMPLE 59* P« 1&3.

0 1 2 RE.M

0 5 0 LET D=0

0 5 5 PRINT

06C PRINT "VARIATL"* "SAMPLE MEAN"*"SAMPLE S« L."* " STUDENTS T"

O&O DIM XC100) * YC10CO* i(100) * WC100)

100 READ X* Y* Z* W

120 IF X=5.0E25 THEN 1000

140 LET D=D+1

160 LET A=X-Z

180 LET B=SQR(W/(W+1))

220 LET T«<A*B>/Y

240 PRINT

250 PRINT D*X*Y*T

260 G0 T0 100
NUMBER 69

900 DATA 13.6* .7* 14.3* 15* 9.6* .5* 9.4* 16* 16.4* .8* 16.7

901 DATA 15* 11.9* .7* 10.9* 15* 5.0E25

999 DATA 5.0E25* 5.0E25* 5.0E25

1000 END

17

Sample Run of SIP183

VARIATE SAMPLE MEAN SAMPLE S. D. STUDENTS T

1 13.6 .7 -.968245

2 9.6 .5 .388058

3 16.4 .8 -.363091

4 11.9 .7 1.38321

SIP185

The calculation of the ratio between sample variances ("F") is included in SIP176, since it is based on the same

set of data. Instructions will be found in that program to permit calculation of both Student's t and "F," or

either one without the other, as the user wishes.

SIP187

SIP187 PERMITS CALCULATION OF CHI SQUARE AND GIVES YOU A

CHOICE OF INCLUDING YATEfS CORRECTION (P. 190) FOR ANY

NUMBER OF SAMPLES* ALL OF WHICH WILL BE PAIRED WITH ALL OTHERS.

DATA IS PUT IN LINE 900* WITH THE TWO VALUES FOR THE FIRST

LOCALITY ENTERED* THEN THE TWO FOR THE SECOND LOCALITY* AND

SO ON. SERIES IS TERMINATED WITH THE VALUE 5.0E25.

DATA IN PROGRAM FROM EXAMPLE ON P. 188.

001 REM

002 REM

003 REM

004 REM

005 REM

006 REM

007 REM

060 LET 0=1

070 LET F=l

090 PRINT

100 PRINT "WHAT IS NUMBER OF SAMPLES?"

110 INPUT A

120 PRINT"IF YATES CORRECTION IS WANTED* TYPE 2* IF NOT* TYPE 1"

130 INPUT B

135 PRINT

140 F0R K=l T0 CA+l)

150 READ XCK)* YCK)

160 IF XCK)=5.0E25 THEN 600

170 IF K<Q THEN 470

180 IF K>Q THEN 220

190 LET R=XCK)

200 LET S=Y(K)

205 LET F=Q
18

SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

210 G0 T0 470

220 LET F=F+1

240 LET N=S+R+XCK)+Y<K>

250 LET P=CR*YCK)>-CS*X<K>>

260 LET E=<P*P*N>/<CR+S)*<XCK>+Y<K))*(R+XCK))*CS+YCK>>>

300 PRINT'TOR SAMPLE";Qj-AND SAMPLE"JFJ" CHI SQUARE IS:"J E

380 IF P<0 THEN 480

400 LET M=P-CN/2)

410 LET J=CM*M*N)/C<R+S>*<X<K>+YCK>>*CR+XCK))*CS+YCK>>>

415 IF B=l THEN 470

420 PRINT" CHI SQUARE WITH YATES CONTINUITY CORRECTION IS:"J J

430 PRINT

470 NEXT K

480 LET M=P+<N/2)

500 G0 T0 410

600 IF Q=A THEN 1000

610 LET Q=Q+1

620 REST0RE

630 G0 T0 140

900 DATA 22* 24* 23* 33* 50* 15* 5.0E25

999 DATA 5.0E25* 5.0E25

1000 END

Sample Run of SIP187

UHAT IS NUMBER OF SAMPLES?

!3

IF YATES CORRECTION IS WANTED* TYPE 2* IF NOT* TYPE 1

! 2

FOR SAMPLE 1 AND SAMPLE 2 CHI SQUARE IS: .467375

CHI SQUARE WITH YATES CONTINUITY CORRECTION IS: .233549

FOR SAMPLE 1 AND SAMPLE 3 CHI SQUARE IS: 10.0068

CHI SQUARE WITH YATES CONTINUITY CORRECTION IS: 8.77075

FOR SAMPLE 2 AND SAMPLE 3 CHI SQUARE IS: 16.1563

CHI SQUARE WITH YATES CONTINUITY CORRECTION IS: 14.693

SIP189-SDP190

Yates's correction for continuity is included in SIP187. The user is asked if he wishes to make a correction because

of sample size during the run of that program; a "yes" answer will run Yates's correction on the data.

SIP191-SIP212

The material in these pages is covered for the most part by SIP176. Since the amount of data does not affect the

computer operation unless it is extremely large, the simpler formula for Student's t on SIP194 is not needed.
NUMBER 69 jg

SIP223

001 REM SIP223 RUNS A REGRESSION ON ANY PAIR OF VALUES FOR ANY NUMBER

002 REM OF INDIVIDUALS. DATA GOES IN LINE 900* FIRST X VALUE* THEN

003 REM Y* FOLLOWED BY NEXT X AND NEXT Y. FINISH SERIES V'lTH VALUE

004 REM 5.0E25 REPEATED ONCE. SIP223 ALSO PRINTS THE CORRELATION

005 REM COEFFICIENT CP. 238)* THE 'Z1 VALUE CP. 244)* AND THE Z

006 REM DIVIDED BY S SUB Z CP. 245). DATA IN PROGRAM FROM EXAMPLE

007 RFM 65* P. 222.

008 REM

050 LET E=0

060 LET C=0

070 LET G=0

080 LET 1=0

100 READ X*Y

120 IF X=5.0E25 THEN 300

140 LET A=A+1

180 LET C=C+X

220 LET E=E+Y

240 LET G=G+CX*Y)

250 LET I=I+CX*X)

260 LET L=L+CY*Y)

290 G0 T0 100

300 LET B=(G-(CC*E)/A))/(I-C(C*C)/A))

320 LET D=CG-CCC*E)/A))/CL-CCE*E)/A))

340 LET F=CE/A)-CB*CC/A))

360 LET H=(C/A)-(D*(E//\))

380 LET S1=CI-C(C*C)/A))/CA-1)

390 LET S2=CL-(CE*E)/A))/<A-1)

400 LET T=C(A-1)/CA-2))*<S2-<B*B*S1))

420 LET U=(CA-1)/(A-2))*CS1-CD*D*S2))

425 LET R=SQRCB*D)

430 PRINT

431 PRINT "NUMBER OF VARIATES="jA

434 PRINT " MEAN OF X="JC/A* " MEAN OF Y=";E/A

435 PRINT

 M VARIANCE OF X="JS1* " VARIANCE OF Y=";S2

436 PRINT

440 PRINT "VALUES FOR REGRESSION OF Y ON X ARE:"

441 PRINT

450 PRINT " Y-INTERCEPT="JF

460 PRINT " SLOPE=";B

470 PRINT " REGRESSION EQUATION IS: Y=";BJ" X +"5F

480 PRINT " VARIANCE OF ESTIMATE OF Y ON X="iT

481 PRINT

490 PRINT "VALUES FOR REGRESSION OF X ON Y ARE:"

500 PRINT

510 PRINT " X-INTERCEPT=";H

520 PRINT " SLOPE="*D

530 PRINT " REGRESSION EQUATION IS:X="iD; " Y + "iH

540 PRINT " VARIANCE OF ESTIMATE OF X ON Y=";U

545 PRINT
20 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

550 PRINT "THE CORRELATION COEFFICIENT^1 SR

555 LET Z=(L0GCl+R)-L0G(l-R))/2

560 PRINT "THE Z VALUE=";CL0GC1+R)-L0GC1 -R)>/2

570 PRINT "Z/S OF Z=";Z/Cl/SQRCA-3))

900 DATA 37, 284* 49, 375* 50, 353, 51, 366, 53, 418, 54, 408

901 DATA 68, 510, 86, 627, 93, 683, 106, 820, 130, 1056, 137, 986

902 DATA 142, 1086, 142, 1086, 146, 1078, 149, 1122, 155, 1254

903 DATA 156, 1202, 187, 1387, 5.0E25

999 DATA 5.0E25

1000 END

Sample Run of SIP223

iMlihfcEh OF VARIATES= 19

fcEAN OF X= 104.789 MEAN OF Y= 794.7 9

VARIANCE OF X = 2261.6 2 VARIANCE OF Y= .1344 0 IE 06

VALUES FOR REGRESSION OF Y OtM X ARE:

Y-INTERCEFT= -9*882 2

SLOPE= 7.6759 3

REGRESSION EQUATION IS : Y= 7*67893 X +

VARIANCE OF ESTIMATE OF Y ON X= 1103-39

VALUES FOR REGRESSION OF X ON Y ARE:

X-INTERCEPT- 2.08945

SLOPE= .12921 7

REGRESSION EQUATION IS:X= .12921 7 Y +

VARIANCE OF ESTIMATE OF X ON Y= 18*5677

-9.8822

2.08945

THE CORRELATION COEFFICIENTS

THE Z VALUE= 3-12099

21/S OF Z = 12.48 4

996116

SIP225

The variance of the estimate is included in SIP223, and it will be included in the output of any run of that

program (see above).

001

002

003

004

00b

006

007

REM

REM

REM

REM

REK

REM

REM

SIP226

SIP226 CALCULATES THE CONFIDENCE INTERVALS FOR THE INTERCEPT (ALPHA) AND THE SLOPE (BETA) IN A REGRESSION. THIS

PROGRAM MUST BE ADDED TO SIP223, AND CANNOT BE RUN INDEPENDENTLY, SINCE IT USES THE DATA AND RESULTS OF THAT

PROGRAM. YOU WILL BE ASKED TO SUPPLY THE »Tf VALUE FOR THE

CONFIDENCE LIMITS YOU SELECT. TEST RUN RESULTS SHOWN IN

fc*f*l»PLE 67, H.
NUMBER 69 21

600 PRINT "DEGREES OF FREEDOM ARE:"; A-2

610 PRINT

620 PRINT "WHAT IS T VALUE FOR CONFIDENCE LIMITS SELECTED?"

t30 INPUT Tl

633 LET El=Cl/A)+(CCC/A)t2)/(CA-l)*S1))

635 LET P1=SGRCE1)

640 PRINT "CONFIDENCE LIMITS ARE:"

650 PRINT " FOR Y ON X:"

660 PRINT " ",B" PLUS-MINUS" CT1*SGR<T>)/CSQR<SI>*SQR<A-1))

670 PRINT " "iF" PLUS-MINUS" T1*SGR(T)*P1

680 PRINT " FOR X ON Y:"

690 PRINT " ",D " PLUS-MINUS" CT1*SQRCU))/<SQRCS2>*SQRCA-1))

700 PRINT " ",H " PLUS-MINUS" CT1*SGR<U>)/Pl

Sample Run of SIP226

NUMBER OF VARIATESs 19

MEAN OF X= 104.789 MEAN OF Y= 794.79

VARIANCE OF X= 2261.62 VARIANCE OF Y= .134401E 06

VALUES FOR REGRESSION OF Y ON X ARE:

Y-INTERCEPT* -9.8822

SLOPE= 7.67893

REGRESSION EQUATION IS: Y= 7.67893 X + -9.8822

VARIANCE OF ESTIMATE OF Y ON X= 1103.39

VALUES FOR REGRESSION OF X ON Y ARE:

X-INTERCEPTS 2.08945

SLOPE= .129217

REGRESSION EQUATION IS:X= .129217 Y + 2.08945

VARIANCE OF ESTIMATE OF X ON Y= 18.5677

THE CORRELATION COEFFICIENT* .996116

THE Z VALUE= 3.12099

Z/S OF Z= 12.484

DEGREES OF FREEDOM ARE: 17

WHAT IS T VALUE FOR CONFIDENCE LIMITS SELECTED?

! 2.11

CONFIDENCE LIMITS ARE:

FOR Y ON X:

7.67893 PLUS-MINUS .347378

-9.8822 PLUS-MINUS 39.7947

FOR X ON Y:

.129217 PLUS-MINUS .584553E-02

2.08945 PLUS-MINUS 16.0134
22 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

SIP229

001 REM SIP229 USES DATA TAKEN FROM TWO REGRESSIONS RUN IN SIH223.

002 REM DATA GOES IN LINE 900* AS FOLLOWS:

003 REM FIRST—NUMBER OF VARIATES

004 REM SECOND--VARIANCE OF X (OR OF Y>

005 REM THIRD--SLOPE

006 REM FOURTH —VARIANCE OF ESTIMATE

007 REM THIS IS THEN FOLLOWED BY SAME VALUES FOR SECOND REGRESSION.

008 REM DATA STORED IN THIS PROGRAM IS TAKEN FROM EXAMPLE 68* P. 230.

009 REM

020 PRINT

100 READ Nl* SI* Bl* Tl* N2* S2* B2* T2

120 LET A=((N1-1>*S1)+CCN2-l)*S2)

140 LET D=CN1-1>*CN2-1>*S2*S1

160 LET C=CCCN1-2>*T1> + C<N2-2>*T2>>/<Nl+N2-4)

180 LET T=(CB1-B2)*SQRCD/A))/SQR(C)

260 PRINT "STUDENTS T="*T

270 PRINT

280 PRINT "DEGREES OF FREEDOM=";N1+N2-4

900 DATA 24* 98917* .153* 79.45* 19* 134401* .129* 32.36

1000 END

Sample Run of SIP229

STUDENTS T= 3.38546

DEGREES OF FREEDOM= 39

SIP232

001 REM SIP232 PERMITS CALCULATIONS OF PREDICTED VALUES FOR THE

002 REM DEPENDENT VARIABLE FROM THE REGRESSION EQUATION. IT IS

003 REM ASSUMED THE NECESSARY REGRESSION HAS BEEN CALCULATED* AND

004 REM THE VALUES NEEDED ARE KNOWN. PUT THE VALUE OF THE INTER005 REM CEPT CA-SUB-Y) AND OF THE SLOPE (B-SUB-Y) OF Y ON X IN THE

006 REM DATA LINE 900* FOLLOWED BY ANY VALUES OF X FOR WHICH A

007 REM PREDICTED VALUE OF Y IS DESIRED. PROCEDURE SHOULD BE

008 REM REVERSED FOR PREDICTION OF X VALUES FROM KNOWN Y VALUES.

009 REM END DATA STRING WITH VALUE 5.0E25. DATA FROM EXAMPLE 65*

010 REM P. 222.

011 PRINT

050 PRINT "FOR THE KNOWN"* " PREDICTED"

051 PRINT " VALUE*"* " VALUE IS;"

100 READ A* B

150 LET C=(-A/B)+(l/B)

200 READ Y

225 IF Y=5.0E25 THEN 1000

250 LET D=C*Y
NUMBER 69 23

300 PRINT

320 PRINT Y*""*D

400 G0 T0 200

900 DATA -11.4* 7.68* 2* 3* 4* 5.0E25

999 DATA 5.0E25

1000 END

Sample Run of SIP232

FOis THE KNOWN PREDICTED

VALUE* VALUE IS :

2 3-22917

3 4.84375

4 6-4bS33

SIP233

001 HEM SIP233 HUNS BARTLFTT'S BEST FIT LINE* AND THE CONFIDENCE

002 HEM LIMITS OF THE SLOPE CBETA) AND THE INTERCEPT CALPHA* P.

003 REM 236). IT ALSO CALCULATES THE VARIANCES AS SHOWN ON P.

004 REM 236* BUT DOES NOT PRINT THEM. DATA GOES IN LINE 900* AS IN

005 REM EXAMPLE 69* P. 234. TERMINATE FIRST GROUP OF DATA WITH THE

006 REM REPEATED VALUE 2.0E25* SECOND WITH REPEATED 3.0E25* THIRD

007 REM WITH 5.0E25. VALL'F. OF STUDENT'S 'T1 IS LOOKED UP IN TABLE ON

008 REM P. 422* USING DEGREES OF FREEDOM GIVEN BY PROGRAM AND CONFI009 REM DENCE LIMITS YOU SELECT.

050 LET A=0

055 LET B=0

060 LET C=0

062 LET D=0

064 LET E=0

066 LET F=0

068 LET G=0

070 LET H=0

072 LET 1=0

100 READ X*Y

110 IF X=2.0E25 THEN 220

140 LET L=L+1

160 LET M = M+X

180 LET C=C+Y

200 GO T0 100

220 LET J=N/L

240 LET K=C/L

300 READ X*Y

310 IF X=3.0F.25 THEN 420

340 LET D=D+1
24 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

360 LET E*E+X

380 LET F=F+Y

400 G0 T0 300

420 LET U=E/D

440 LET Q=F/D

500 HEAD X,Y

520 IF X=5.OE25 THEN 620

540 LET G=G+1

560 LET H=H+X

580 LET I=I+Y

600 G0 T0 500

620 LET N=H/G

640 LET 0=I/G

720 LET P=L+G+D

760 LET B=<0-K>/<N-J>

780 LET A=C<C+F+I)/P>-((M+E+H)/P*B>

790 PRINT

800 PRINT "THE EQUATION OF BARTLETTS BEST FIT LINE IS:"

810 PRINT " Y="*Aj" +"iB;ft X"

813 PRINT

815 PRINT "DEGREES OF FREEDOM =";P-3

817 PRINT

820 PRINT "IF YOU WANT CONFIDENCE INTERVALS* TYPE 2, IF NOT TYPE 1"

825 INPUT Z

830 IF Z=l THEN 1000

835 PRINT "GIVE VALUE OF STUDENTS T FOR LIMITS YOU WISH"

840 INPUT E

841 REST0RE

843 PRINT

845 READ X,Y

850 IF X=2.0E25 THEN 860

855 LET S1=S1+C<X-J)*CX-J>>

856 LET S2=S2+CCX-J)*<Y-K>>

857 LET S3=S3+<CY-K>*(Y-K>>

859 G0 T0 845

860 READ X,Y

861 IF X=3.0E25 THEN 870

862 LET S1=S1+C<X-U)*(X-U>>

863 LET S2=S2+CCX-U)*CY-Q>>

864 LET S3=S3+<CY-Q>*CY-Q>>

865 G0 T0 860

870 READ X,Y

871 IF X=5.0E25 THEN 880

872 LET S1=SH-<CX-N)*CX-N>>

873 LET S2=S2+C<X-N)*CY-0>>

874 LET S3=S3+CCY-0)*(Y-0>)

875 G0 T0 870

876 PRINT

880 LET V=l/CP-3)

881 LET S1=S1*V

882 LET S2=S2*V

883 LET S3=S3*V

885 LET Y=CE*E*S1)-(C(N-J)t2)*(G/2))
NUMBER 69

887 LET R=C-2*E*E*S2)+(2*<<N-J)T2>*B*(G/2> >

889 LET C=CCN-J)T2*CG/2)*8*B>-CE*E*S3 >

890 PRINT "SMALL A="; Y/Y

891 PRINT "SMALL B=";R/Y

892 PRINT "SMALL C="5-C/Y

893 PRINT

895 LET T=SQRC((R/Y)T2)-(4*C-C/Y)))/ 2

896 PRINT "CONFIDENCE LIMITS OF SLOPE:";Bs"

897 LET V: = <E/SQRCP)>*SQRCCS3-<2*B*S2) + CB*B*S1 )))

898 PRINT "CONFIDENCE LIMITS OF INTERCEPT:"*Aj" PLUS-MINUS"; W

900 DATA 37* 284* 49* 375* 50* 353* 51* 366* 53* 418* 54* 408

901 DATA 2.0E25* 2.0E25* 68* 510* 86* 627* 93* 683* 106* 820

902 DATA 130* 1056* 137* 986* 142* 1086* 3.0E25* 3.0E25* 142* 1086

903 DATA 146* 1078* 149* 1122* 155* 1254* 156* 1202* 187* 1387

904 DATA 5.0E25* 5.0E25

999 DATA 5.0E25* 5.0E25

1000 END

25

PLUS-MINUS";T

Sample Run of SIP233

THL fc.GUAIION OF bARTLEITS BEST f IT LINE IS:

Y= -10.3402 + 7.6833 X

DEGREES OF FREEDOM = 16

IF YOU WAivT CONFIDENCE INTERVALS* TYPE 2* IF NOT TYPE 1

12

LIVE VALUE OF STUDENTS T FOR LIf.ITS YOU 1.1 i>H

12.12

A= 1

SMALL b= -15.368 1

SttALL C= 58.882 7

CONFIDENCE LIMITS OF SLOPE: 7.6833 PLUS-MINUS .40228 7

CONFIDENCE LIMITS OF INTERCEPT: -10.340 2 PLUS-iMNUS l£.63i:2

SIP234-SIP237

Most of the material in these pages is calculated in SIP233, although not all of it is printed out. If the user wishes,

a series of "PRINT" statements following his final data line will give the following values from the program:

X2 = U

X3 = N

X =(M+E+H)/P

x, = S2

B=B Y = (C+F+I)/P
26 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

A "PRINT" statement for any one of these would look like this:

925 PRINT "X BAR SUB 1 (MEAN OF FIRST GROUP) =", J

The Student's t called for in this section (and in SIP233) must always be looked up in the table on page 422,

using the known degrees of freedom (printed out by SIP233) and the confidence limits the user wishes to establish.

This value cannot be calculated by the program; it must be typed as input by the user when it is called for by

program (see above).

SIP238

SIP238 GIVES CONFIDENCE LIMITS FOR THE MEAN VALUE OF ANY

PREDICTED Y FOR ANY GIVEN VALUE OF X, AND ALSO THE LIMITS

FOR ACTUAL VALUE OF Y FOR SANE VALUE OF X, IN A REGRESSION.

DATA FOR THIS PROGRAM COMES FROM THE PRINTOUT OF SIP223,

WHICH INCLUDES ALL NECESSARY INFORMATION. THE STUDENT'S

•T' CALLED FOR IS LOOKED UP IN THE TABLE ON P. 422, USING

KNOWN DEGREES OF FREEDOM AND DESIRED CONFIDENCE LIMITS. THE

DATA TO TEST THIS PROGRAM SHOULD BE INSERTED FROM EXAMPLE

72* P. 239.

001 REM

002 REM

003 REM

004 REM

005 REM

006 REM

007 REM

008 REM

009 REM

010 REM

090 PRINT

100 PRINT "ENTER THE FOLLOWING VALUES IN THIS SEQUENCE:"

101 PRINT "NUMBER, MEAN, VARIANCE, SLOPE, Y-INTERCEPT, VARIANCE"

102 PRINT "OF ESTIMATE, AND T VALUE"

110 INPUT A, B, C, G, H, D, E

115 PRINT

120 PRINT "ENTER VALUE OF X CIF AT END OF X VALUES, TYPE 5.0E25V

12 5 INPUT X

126 IF X=5.0E25 THEN 1000

130 LET F=C1/A) + C((X-B)*(X-B)))/(CA-1 )*C)

140 LET N=E*D*CSGR(1+F)>

150 LET F=E*D*CSQRCF>>

180 LET M=H+(G*X)

199 PRINT

200 PRINT "FOR GIVEN X, Y=";M

201 PRINT

210 PRINT "CONFIDENCE LIMITS FOR MEAN Y="*M-FJ" —"JM+F

211 PRINT

220 PRINT "CONFIDENCE LIMITS FOR INDIVIDUAL PREDICTED"

240 PRINT "VALUE 0F Y="5M-N;" —"*M+N

250 G0 T0 115

1000 END

Sample Run of SIP238

ENTER THE b CLLCUNC VALUES IN 1HIS SEQUENCE:

ftUKELR* t-'EAiNi, VARIANCE, SLOPE, Y-INTERCEPT, VARIANCE

OF ESTIMATE, AND T VALLE

! 19, 1C4-7E, 22:61.61* 7.66, -11.4, 32.72, 2.11
NUMBER 69 27

ENTER VALUE OF X (I F A 7 LNb CF X VALUES* TYPE S.0E25 )

! 150

FOR GIVEN X* Y= 1140. 6

CONFIDENCE LIMITS FOh MEAN Y= 1118-4 6 — 1162.7 4

CONFIDENCE LIMITS FOR INDIVIDUAL PREDICTED

VALUE fc>F Y= 1068. 1 - - 1213- 1

ENTER VALUE CF X (I F AT END OF X VALUES* TYPE 5-0E25 )

5 5.OE2 5

SIP239-SIP245

The calculation of the correlation coefficient ("r") is included in program SIP223, which utilizes the same set

of data needed for the calculation of this value. It will be printed out along with the other results when that program is run. The transformation of "r" into Fisher's "z" value also is included in SIP223, as is the test of the

significance of z, as shown in Example 74, page 245.

SIP246

001 RF.M SIP246 CALCULATES THE SIGNIFICANCE OF THE DIFFERENCE BETWEEN

002 REM TWO CORRELATION COEFFICIENTS USING THE TRANSFORMED CORRF.L003 REM ATION COEFFICIENT CZ 1 ) . DATA FOR THIS PROGRAM IS DERIVED

004 REM FROM TV.'O SEPARATE REGRESSION'S RUN IN SIP223- PUT DATA IN

005 REM LINE 900: FIRST* NUMBER OF VARIATES IN FIRST GROUP* ITS

006 REM CORRELATION COEFFICIENT (fR

f>* AND ITS TRANSFORMED CORREL007 REM ATION COEFFICIENT C'Z»>* THEN THE SAME THREE VALUES FOR

008 REM THE SECOND REGRESSION. DATA IN PROGRAM TAKEN FROM EXAMPLE

009 REM 75* P. 246.

010 RF.M

100 READ Nl* Rl* Zl* N2* R2* Z2

120 LET A=(l/(Nl-3))+(l/CN2-3))

140 LET A=CZ1-Z2)/SQRCA>

170 PRINT

180 PRINT

200 PRINT "THE APPROXIMATE STANDARDIZED NORMAL DEVIATE=";A

91 DATA 24* .974* 2.16* 19* .988* 2.56

1000 END

Sample Run of SIP246

1 P ; f. i PFvOXIiVAlE STANDARDIZED NORMAL DEVIATE= -1-20539

SIP248

001 REM SIP248 GIVES PARTIAL CORRELATION FOR AN; iMUNBEF OF VARIATES.

002 REM WHEN INPUT IS CALLED FOR* GIVE THE CORREL/••; '^ COFi-F iCI ENT

003 REM <R> FOR THE VARIATES FOR WHICH PARTIAL CORRELATION IS TO BE

004 REM TESTED* FOLLOWED BY C0RR. COEFF. OF EACH OF THESE VARIABLES
28 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

005 REM VITH THE VARIABLE WHOSE EFFECT IS TO BE ELIMINATED (AS

006 REM DISCUSSED ON P. 248). REPEAT EACH TIME INPUT IS CALLED

007 REM FOR* CHANGING THE SEQUENCE UNTIL ALL PARTIAL CORRELATIONS

008 REM HAVE BEEN DETERMINED. DATA T0 TEST PROGRAM SHOULD BE TAKEN

009 REM FROM EXAMPLE ON P. 250.

010 REM

080 PRINT

085 PRINT

090 PRINT "IDENTIFICATION NUMBER OF TEST C5.0E25 IF AT END OF TESTS)"

091 INPUT D

092 IF D=5.0E25 THEN 1000

095 PRINT

100 PRINT"ENTER R VALUE FOR COMBINATION OF VARIABLES TO BE TESTED FOR"

101 PRINT"PARTIAL CORRELATION, THEN R VALUE OF EACH WITH VARIABLE TO"

102 PRINT"BE ELIMINATED CTWO VALUES):"

120 INPUT A, B* C

180 LET M=(1-(B*B))*(1-(C*O)

200 LET M=CA-CB*C))/SQR(M)

290 PRINT

300 PRINT "PARTIAL CORRELATION FOR"*DJ"IS:"JM

301 PRINT

320 G0 T0 90

1000 END

Sample Run of SIP248

IDENTIFICATION NUMBER OF TEST C5.0E25 IF AT END OF TESTS)

!1

ENTER R VALUE FOR COMBINATION OF VARIABLES TO BE TESTED FOR

PARTIAL CORRELATION* THEN R VALUE OF EACH l-.'ITH VARIABLE TO

BE ELIMINATED CTWO VALUES):

! .355* .795* -.046

PARTIAL CORRELATION FOR 1 IS: .64619

IDENTIFICATION NUMBER OF TGST C5.0E25 IF AT END OF TESTS)

! 2

ENTER R VALUE FOR COMBINATION OF VARIABLES TO BE TESTED FOR

PARTIAL CORRELATION* THEN R VALUE OF EACH WITH VARIABLE TO

BE ELIMINATED (TWO VALUES):

! .795* .355* -.046

PARTIAL CORRELATION FOR 2 IS: .868777

IDENTIFICATION NUMBER OF TEST (5.0E25 IF AT END OF TESTS)

!3

ENTER R VALUE FOR COMBINATION OF VARIABLES TO BE TESTED FOR

PARTIAL CORRELATION* THEN R VALUE OF EACH WITH VARIABLE TO

BE ELIMINATED CTWO VALUES):

! -.046* .355* .795
NUMBER 69 29

PARTIAL CORRELATION FOR 3 IS: -.57878

IDENTIFICATION NUMBER OF TEST (5.OE25 IF AT END OF TESTS)

5.0E25

SIP254

No program has been prepared for the formula on page 254. While it is feasible, such a program would be long

and cumbersome, and to calculate the "C" value it would appear simpler to use the method as shown in the

example on page 255.

SIP27O

001 REM SIP270 RUNS AN ANALYSIS OF VARIANCE* ONE-FACTOR DESIGN.

002 REM DATA BEGINS IN LINE 900* WITH EACH SERIES OF INDIVIDUAL

003 REM VARIABLES ENDING WITH VALUE 2.0E25* INCLUDING FINAL SERIES.

004 REM AFTER FINAL 2.0E25* PUT IN THE VALUE 5.0E25. DATA STORED IN

005 REM PROGRAM IS FROM EXAMPLE 80* P. 2 72.

006 REM

022 PRINT

023 PRINT

02 4 LET 1=0

025 LET C=0

026 LET D=0

027 LET E=0

028 LET F=0

029 PRINT " "*" TOTAL"

030 PRINT "BASIC DATA"*" VALUE"*" NUMBER"*" MEAN"

035 Lfc.1 A = 0

036 LET B=0

037 LET N=0

095 LET C=C+1

100 READ X

105 IF X=5.0E25 THEN 300

110 IF X=2.0E25 THEN 160

120 LET A=A+X

130 LET B=B+CX*X>

140 LET N=N+1

150 G0 T0 100

160 PRINT

170 PRINT "FOR SERIES";C* A, N* A/N

180 LET D=D+A

200 LET E=E+B

220 LET F=F+N

225 LET H=<A*A)/N

230 LET I=I+H

240 G0 T0 35

300 LET G=CD*D)/F

310 LET K=E-G

320 LET J=I-G

340 LET L=E-I

360 LET M=C-2
30 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

380 LET N=F-(C-1)

390 PRINT

400 PRINT

420 PRINT " "," SUM 0F">" "," MEAN"

430 PRINT "SOURCE"," SQUARES"," D.F."," SQUARE"

440 PRINT

450 PRINT "MAIN EFFECT",J, M,J/M

460 PRINT"DEVIATIONS",L,N,L/N

500 PRINT

510 PRINT "F RATIO="J <J/M)/(L/N)

900 DATA 120, 120, 121, 122, 122, 122, 123, 125, 125, 126, 126

901 DATA 2.0E25, 123, 124, 125, 125, 126, 127, 127, 127, 128, 128

902 DATA 129, 129, 2.0E25, 122, 122, 125, 127, 127, 127, 128

903 DATA 129, 2.0E25, 5.0E25

999 DATA 5.0E2 5

1000 END

Sample Run of SIP270

BASIC DATA

FOR SERIES

FOR SERIES

FOR SERIES

SOURCE

MAIN EFFECT

DEVIATIONS

F RATI0=

1

2

3

1

TOTAL

VALUE

1352

1518

1007

SUM OF

SQUARES

81

140.813

8.05326

NUMBER

1 1

12

8

D.F.

2

2 8

MEAN

122.909

126.5

125.875

MEAN

SQUARE

40.5

5.02902

001 Kfc>

G0£

003

004 Rfc.fi

005 REM

006 REM

007 REM

015 PRINT

020 LET C=0

021 LET P=0

SIP276

SIP276 RUNS AN ANALYSIS OF VARIANCE I t\i KEthE SSION ClAfcLE, F

274) USING t»(AChIiML FORMULAE. <P. 276) . 10 HUN, PUT

IN DATA SlAhTlNt Ullh LINE 90U, IJ1H VALUE OF X FlhSl AND

VALUE OF Y SECOND. TERMINATE EACH SET OF XS AND YS Ullh

THE VALUE 2.0E25 REPEATED ONCE, AND TERMINATE THE FINAL SET

WITH 2.0E2 5 TWICE AND 5.0E25 TWICE. STORED DATA FROM P. 278 .
NUMBER 69 31

023

02 4

025

02 6

027

028

029

030

03 5

03 6

037

038

039

040

090

100

110

120

130

140

160

180

200

220

230

235

240

260

265

270

280

290

300

310

320

340

350

360

400

420

440

450

500

520

540

550

560

598

599

600

61C

LET N=0

LET L=0

LET K=0

LET H=0

LET J=0

LET 1=0

PRINT" "* " "> "MEAN"*" MEAN"*" TOTAL";" TOTAL"

PRINT" "*" NUMBER"*" OF X">" OF Y";" OF X";"

LET A=0

LET B=0

LET F=0

LET G=0

LET D=0

LET E=0

LET C=C+1

READ X* Y

IF X=5.0E25 THEN 400

IF X=2.0E25 THEN 260

LET F=F+1

LET A=A+X

LET B=B+Y

LET G=G+CX*Y>

LET D=D+CX*X>

LET E=E+(Y*Y>

LET Q1=F*X

LET U2=F*<XT2)

G0 T0 100

PRINT

PRINT "FOR GROUP"; C; F; <A/F>; CB/F); A; B

LL1 Msft-Kb/i-)

LET N=N+CCB*B)/F)

LET L=L+E

LET K=K+D

LET W1=W1+G1

LET H=H+F

LET W2=W2+Q2

LET I=I+B

LET J=J+A

LET P=P+G

G« T0 35

LET B=CP-C<J*I)/H)>/CK-CCJ*J)/H)>

LET A=(I/H)-<B*CJ/H>)

PRINT

PRINT "THE REGRESSION EQUATION IS: Y=";A;M +";B;ff X"

LET G=L-N

LET D=CB*B*W2)-CB*B*CClvl*Wl )/H>)

LET E=N-(<I*I>/H)-D

LET T=E/CCC-1)-2)

LET V=G/CH-CO1 ))

PRINT

PRINT

PRINT "SOURCE"*" SUM OF"*

OF Y"

Phi N SQUARES"*"

DEGREES OF"* " MEAN"

FREEDOM"*" SQUARE"
32 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

620 PRINT

630 PRINT "IN LEVELS",G, H-(C-1),G/(H-(C-l ))

640 PRINT"REGRESSIONS",D, " 1", D

650 PRINT"DEVIATIONS", F., (C-l)-2, E/((C-l)-2>

680 PRINT

685 PRINT "TOTAL", L-((I*I)/H), H-l

695 PRINT

700 PRINT "F RATIO (SIGNIFICANCE OF REGRESSION COEFFICIENTS"; D/T

705 PRINT "F RATIO (TEST FOR RECTILINEARITY)="; T/V

900 DATA 1, 139.7, 1, 127.0, 1, 133.4, 1, 177.8, 2.0E25,2.0E25

901 DATA 2, 139.7, 2, 215.9, 2, 171.5, 2, 152.4, 2, 228.6, 2

902 DATA 190.5, 2, 149.2, 2.0E25, 2.0E25, 3, 203.2, 3, 241.3, 3

903 DATA 209.6, 3, 215.9, 3, 190.5, 2.0E25, 2.0E25, 4, 241.3, 4

904 DATA 247.7, 4, 235.0, 2.0F25, 2.0E25, 5.OE25, 5.0E25

1000 END

Sample Run of SIP276

FOR

FOR

FOR

FOR

THE

SOU

GROUP

GROUP

GROUP

GROUP

REGRESSION

nCL

IN LEVELS

REGRESSIONS

DEVIATIONS

TOTAL

NUMBER

1 4

2 7

3 5

4 3

EQUATION I

SUfr OF

SGUARES

1C207.6

19577.1

25.6563

29810.5

MEAN

OF X

1

2

3

4

S: Y=

1

1

2

MEAiM

OF Y

44.475

78.2 57

12.1

241.333

1 12.8

DECREES OF

FREEDOM

15

1

2

18

TOTAL

OF X

4

14

TOTAL

OF Y

577 .

1247 .

15 1060-5

12

+ 32.6

M EAN

SQUARE

£80.517

19 577.1

12.828

7 2 4

X

1

9

fa

F RATIO (SIGNIFICANCE OF REGRESSION COEFFICIENTS 1526.1 1

F RATIO (TEST FOR RLCT ILINLARIT Y)= .188506E-0 1

SIP283

001 HEM SIP283 PERMITS CALCULATION OF AN ANALYSIS OF VARIANCE FOR

002 REM A TWO FACTOR DESIGN, AS IN EXAMPLE 82, P. 284. PUT DATA IN

003 HEM LINE 900, LISTING VARIABLES FROM EACH CELL AS A CONTINUOUS

004 REM SERIES, FOLLOWED IMMEDIATELY BY VARIABLES OF SECOND SERIES,
NUMBER 69 33

005 HEM AND SO ON. NOTE THAT THE PROGRAM WILL CALL FOR INPUT FOR

006 REM YOU TO SUPPLY.

100 PRINT "WHAT IS NUMBER OF SAMPLES IN EACH CELL?"

110 INPUT A

120 PRINT "WHAT IS NUMBER OF CELLS?"

130 INPUT B

140 F0R J=l T0 CB*2)

150 F0R I = 1 T0 A

161 READ ZU*J )

165 LET T=T+ZCI,J>

167 LET R=R + Z(I, J)*2d,j)

170 NEXT I

180 NEXT J

184 REST0RE

190 F0R K=1 T0 2

200 F0R J=l T0 B

210 FOR 1=1 T0 A

220 READ X

230 LET D=D+X

250 NEXT I

260 LET V.'(J*K)=D

270 LET V(J*K)=D*D

275 LET E=VCJ*K> + E

277 LET D=0

280 NEXT J

290 NEXT K

350 LET P=K-CT*T>/(A*B*2>

355 LET K=l

360 F0K J=l T0 B

380 LET S=WCJ*K)+WCJ*K+1 >

410 LET Q=Q+<S*S)

420 LET S=0

430 NEXT J

440 LET S=CQ/CA*2>>-CCT*T)/<A*B*2>>

450 F0R K=1 T0 2

460 F0R J=l T0 B

470 LET N=N + V.'CJ*K>

480 NEXT J

485 LET N=N*N

490 LET M=M+N

500 LET N=00

510 NEXT K

600 LET N=(M/(B*A))-<(T*T)/(A*B*2))

625 LET L=CE/A)-CQ/(A*2)>-CM/(B*A))+(CT*T)/(A*B*2))

650 LET F=R-(E/A)

651 LET X=B-1

652 LET Y=2*B*(A-1>

653 LET U=S+N+L+F

654 LET T=l

690 PRINT

691 PRINT

700 PRINT

 MM j "SUM 0F"# "DEG. OF"* "MEAN"

701 PRINT "SOURCE:"* "SQUARES"* "FREEDOM"* "SQUARE"* " F VALUES"
34

702 PRINT

703 PRINT "ROVS", S,

706 PRINT

710 PRINT "COLUMNS"* N,

711 PRINT

720 PRINT "INTERACTION", L

721 PRINT

730 PRINT "DEVIATIONS", F,

731 PRINT

740 PRINTQ"TOTALS", U,

SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

S/X.

T, N,

X,

X+X+l+Y

L/X,

F/Y

CS/X)/(F/Y)

N/CF/Y)

(L/X)/(F/Y)

900 DATA 7, 19, 18, 9, 1, 15, 29, 114, 24, 37, 49, 64, 124, 63

901 DATA83, 51, 81, 106, 72, 100, 67, 87, 68, 9, 25, 16, 10, 9

902 DATA 28, 14, 35, 22, 18, 45, 29, 27, 20, 26, 38, 44, 127, 52

903 DATA 40, 263, 129, 45, 100, 115

1000 END

Sample Run of SIP283

tihAT IS NUiBEft OF SAhFLES IN EACH CELL?

J6

V.HAT IS NUMBER CF CELLS?

!4

SOURCE:

ROWS

COLUMNS

INTERACTION

DEVIATIONS

TOTALS

SUM OF

SQUARES

3993C9

8.34375

12066

55482

. 107467E 0*

DEfc. OF

FREEDOM

3

1

3

40

^ 7

MEAN

SQUARE

13310 .

8 .

4022

1387.

3

34375

05

t VAL UE S

9-59612

•601546E-02

2-89968

SIP287-SIP297

The programs for the calculations on these pages have not been written, primarily because the authors have given

no example that would permit the verification of any program prepared. If any user of this manual has actually

calculated and verified an analysis of variance for a three-factor design and if he will submit the data and answers

to the author, a program can be prepared. The same can be done for the random models, if a user needs them.

SIP300

001 REM SIP300 PERMITS CALCULATION OF A HIERARCHICAL ANALYSIS OF

002 REM VARIANCE. PUT DATA IN FOLLOWING SEQUENCE, STARTING IN LINE

003 REM 900: FIRST, ALL SAMPLES FROM ONE LOCALITY, THEN SAMPLES FROM
NUMBER 69 35

004 REM EACH ADDITIONAL LOCALITY IN SAME SEQUENCE AS FIRST. DATA

005 REM IN PROGRAM FROM EXAMPLE 83, ON P. 302.

006 REM

100 PRINT "ViHAT IS NUMBER OF LOCALITIES?"

110 INPUT A

120 PRINT "V.'HAT IS NUMBER OF SUBSAMPLES PER LOCALITY?"

130 INPUT B

140 PRINT "WHAT IS NUMBER OF SPECIMENS IN EACH SUBSAMPLE?"

150 INPUT C

160 F0R J=1 T0 A

170 F0R 1=1 T0 B

180 F0R X=l T0 C

190 READ X

200 LET S=S+X

210 LET V;=X*X

220 LET V=V+W

230 LET U=U+X

240 NEXT K

250 LET P=P+CS*S)

260 LET S=0

270 NEXT I

280 LET T=T+U

290 LET R=R+(U*U>

300 LET U=0

310 NEXT J

320 LET S = R/CB*O-CT*T/(A*B*C>>

330 LET M=P/C-CR/CB*O)

340 LET N=V-CP/C>

350 LET L=V-CT*T/CA*B*C>>

360 LET F1=A-1

370 LET F2=A*CB-1)

380 LET F3=A*B*<C-1)

390 PRINT "","SUM 0F"," DEG. OF"," MEAN"

391 PRINT "S0URCE","SQUARES"," FREEDOM"," SQUARE"

392 PRINT

400 PRINT "LOCALITIES",S,F1,S/F1

401 PRINT

402 PRINT "SAMPLES",M,F2,M/F2

405 PRINT

410 PRINT "SPECIMENS",N,F3,N/F3

411 PRINT

420 PRINT "TOTALS",L,F1+F2+F3

421 PRINT

422 PRINT

430 PRINT "F-TESTS:"

440 PRINT " FOR LOCALITIES, F=";CS/Fl)/CM/F2)

441 PRINT " KITH DEGREES 0F FREEDOM:";Fl;"AND";F2

450 PRINT

451 PRINT " FOR SAMPLES, F=";(M/F2)/CN/F3>

452 PRINT " WITH DEGREES 0F FREED0M:";F2;"AND";F3

900 DATA 27, 31, 30, 30, 27

901 DATA 26, 28, 29, 31* 29

902 DATA 28, 31, 31* 28, 33
36 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

904 DATA 29*

905 DATA 35*

906 DATA 33*

907 DATA 32*

908 DATA 32*

909 DATA 41 *

910 DATA 41 *

911 DATA 37*

912 DATA 45*

10000 END

2 5*

33*

33*

36*

35*

3 4*

40*

4 2,

38*

28*

33*

31*

33*

31*

40*

43*

36*

31*

2 7*

35*

33*

33*

34*

41*

37*

41*

36*

30

38

37

33

33

42

41

37

43

Sample Run of SIP300

BASIC SIP300

RUN

WHAT IS NUMBER OF LOCALITIES?

!3

WHAT IS NUMBER OF SUBSAMPLES PEK LOCALITY?

! 4

WHAT IS NUMBER OF SPECIMENS IN EACH SUBSAMPLE?

!5

S0URCE

LOCALITIES

SAMPLES

SPECIMENS

TOTALS

SUM 0F

SQUARES

1084.3

35.75

330.797

1450.84

DEG. OF

FREEDOM

2

9

48

59

MEAN

SQUARE

542.148

3.9 7222

6.8916

F-TESTS:

FOR LOCALITIES* F= 136.485

WITH DEGREES 0F FREEDOM: 2 AND

FOR SAMPLES* F= .576386

VITH DEGREES 0F FREED0M: 9 AND 48

001

002

004

005

006

007

008

HEM

REM

REM

RFM

REM

REM

RFM

SIP306

SIP306 CALCULATES CHI SGUAKE TO TEST GOODNESS-OF-FIT FOR

FREQUENCY DATA. THE ASSUMPTION IS MADE THAT THEORETICAL

FREQUENCIES HAVE BEEN CALCULATED AS SHOWN IN EXAMPLE ON

P. 308. IN DATA LINE 900 AND FOLLOWING* PUT THE FIRST OBSERVED

OR FIRST LUMPED FREQUENCIES* THEN THE FIRST EXPECTED FREQUENCY*

THEN THE SECOND "0"* THE SECOND "Eff* AND SO ON (DATA FROM

EXAMPLE ON P. 308). TERMINATE WITH VALUE 5.0E25.
NUMBER 69 37

009

020 LET -u s 0

025 LET C = 0

040 READ 0* E

050 IF 0=5.OE25 THEN 300

060 LET A=(C0-E)t2)/E

090 LET B=B+A

100 LET C=C+1

110 G0 T0 40

300 PRINT "CHI SQUARE="iB

305 PRINT

310 PRINT "DEGREES OP FREED0M=";C-3

900 DATA 4* 4.47* 11* 9.87* 18* 18-37* 21* 21.90* SO* 17.59* 9

901 DATA 9.48* 3* 4.05* 5.0E25

999 DATA 5.0E25

1000 END

Sample Run of SIP306

t n l :bt»ibAF<L= .84994B

DECKELS OF FREfe.LOtt= 4

SIP309

001 REM SIP309 USES THE DATA FROM SIP129 TO CALCULATE CHI SQUARE FOR

002 REM A POISSON DISTRIBUTION* AND MUST BE MERGED V.'ITH IT TO RUN,

003 REM THIS PROGRAM CANNOT BE KUN INDEPENDENTLY. TEST DATA IN PkO004 REM GRAM TAKEN FROM P. 310* EXAMPLE 86.

363 LET N=0

365 PRINT"FOR AN"*" POISSON"," THEORETICAL"

370 PRINT"X VALUE"*"PROBABILITY"*" FREQUENCY"

375 PRINT" OF:"*" IS:"*" IS:"

390 IF X=5.0E25 THEN 590

395 LET N=N+1

520 PRINT F* J* J*C

540 LET S=J*C

550 PRINT F* E* E*C

560 LET S=E*C

565 G0 T0 580

570 FhINT F* D*L* L*E.*C

575 LET S=D*E*C

580 LET T=T+<((Y-S>r2)/S)

585 G0 T0 380

590 PRINT

595 PRINT "CHI SQUARE=";T

600 PRINT

610 PRINT "DEGREES OF FREED0M="*N-2
38 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

Sample Run of SIP309

MEAN=

VAKIANCE=

FOR AN

X VALUE

OF :

0

1

2

3

4

5

Chi St'UARL=

•733334

1.029B9

PGISSGN

FROBAblLl'iY

IS

.480306

•3b2224

.129149

.31569 7E-G1

•57877SL-G2

•848874L-03

4.56661

Thh-GKtTICAL

FhtUULNCY

Ib:

14.4092

1C5667

3*8744 7

.9 47092

. 17363 3

•254662E-01

DECREES OF KRELL0iv.=

SIP312

SIP312 RUNS THE VARIANCE RATIO TEST FOR EITHER A POISSON OK

A NORMAL DISTRIBUTION. DATA IN PROGRAM IS FOR A P

POISSON DISTRIBUTION. DATA SHOULD GO IN LINF 900 AS

FOLLOWS: VALUE OF FIRST CATEGORY, THEN OBSERVED FREQUENCY

OF THAT CATEGORY, THEN SECOND CATEGORY AND FREQUENCY,

FINALLY TERMINATED WITH 5.0E25 REPEATED ONCE.

FOR NORMAL DIST."

001 RFNi

002 REM

003 REM

004 KEM

005 REM

006 REM

007 REM

080 PRINT "TYPE 1 FOR POISSON DISTRIBUTION, 2

085 INPUT Z

100 READ X,Y

110 IF Y=0 THEN 100

130 IF X=5.0E25 THEN 180

140 LET B=B+CX*Y>

160 LET C=C+Y

165 LET W=W+CY*X*X>

170 GO T0 100

180 LET D=B/C

190 LET E=C(W>-CC*D*D))/CC-1 )

195 PRINT

196 PRINT

197 IF Z=2 THEN 215

200 LET F=(E*O/D

210 LET G=C-1

211 G0 T0 220

215 LET F=(E*C)/C(D*(C-D))/C)
NUMBER 69

220 PRINT "SAMPLE MEAN=";D

225 PRINT "OBSERVED VARIANCE=";E

226 PRINT

230 PRINT "CHI SQUARE IS"*F; " KITH";GJ"DEGREES OF FREEDOM"

900 DATA 0* 16* I* 9, 2, 3, 3, i, A, \ , 5.0E25

999 DATA 5.0E25* 5.0F25

1000 END

Sample Run of SIP312

TYJ-t. 1 hGk FOISSON LISTRIBUTION* 2 FOR NURKAL

! 1

.73333 4

GBSLRVED VARIANCE= 1.02989

CHI SGUARE IS 42.131 7 VI Th 29 DECREES OF FRF£DOi«j

SIP313-SIP338

The tests shown in these pages, including the small sample correction (p. 322) and the list of expected values

are in program SIP318. Data organized as on page 330 must be run in program SIP331.

SIP318

SIP318 WILL HANDLE ALL SIZES OF CONTIGENCY TABLES. DATA GOES

IN LINE 900. START WITH FIKST ROW, PUTTING IN ALL OBSERVED

VALUES ACROSS TABLE> FOLLOWED IMMEDIATELY BY ALL OBSERVED

VALUES IN SECOND K0W# AND SO ON. BE PREPARED TO INDICATE

FIRST THE NUMBER OF ROWS> THEN THE NUMBER OF COLUMNS.

DATA IN PROGRAM TAKEN FROM EXAMPLE 91# P. 322.

001 REM

002 REM

003 REM

004 REM

005 REM

006 REM

007 REM

100 PRINT "WHAT IS NUMBER OF KOWS?"

110 INPUT A

120 PRINT "WHAT IS NUMBER OF COLUMNS?"

130 INPUT B

140 F0R 1=1 T0 A

150 F0R J=l T0 B

160 READ Z<I»J)

170 LET C=C+ZCI,J)

180 NEXT J

190 LET V(I)=C

200 LET E=E+C

210 LET C=0

220 NEXT I

230 F0R J=l T0 B

240 F0R 1=1 T0 A

250 LET D=D+ZCI,J>

260 NEXT I
40 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

280

290

300

305

306

307

310

330

340

3bO

360

370

380

38b

390

39b

400

410

420

421

430

440

450

460

470

480

490

500

510

515

520

522

52 5

530

540

5b0

900

WISH TO USE SMALL SAMPLE

2, IF NOT* TYPE 1"

CORRECTION (P. 322)1

WANT A LIST OF THE

2, IF NOT* TYPE 1"

4 6 0

SJ5" C0LUMN="JWCI,J)

OF

CALCULATED EXPECTED VALUES"

LET U(J)=D

LET D=0

NEXT J

PRINT "IF YOU

PRINT " TYPE

INPUT C

FfcR 1=1 TO A

FOR J=l TG b

LEI W(I*J) = (V<I)*U(J))/b:

LET T=Z(I, J)*Z(I>J)/l. (I, J)

LF.:T K=K+ I

IXEXI J

NEXT I

LEI h=K-E

LET K=(A-1)*(b-1)

IF Cafe THENblb

PRINT "CHI SQUARE IS";K;"W

PRINT

PRINT"IF YOU

PRINT" TYPE

INPUT Q

IF Q=2 G0 T0

G0 T0 10000

FOR 1=1 T0 A

FOR J=l T0 B

PRINT I,"R0WJ

NEXT J

NEXT I

RETURN

IF CZC1,1>*Z(2,2))<(Z(2,1>*Z(1,2)) THEN 525

LET P=(Z(1,1>*Z(2,2))-(Z(2,1)*Z(1,2))-(E/2>

G0 T0 530

LET P=(Z(2,1)*Z(1,2))-(Z(1,1>*Z(2,2)>-(E/2>

LET Ps(E*(P*P)>/(U(l)*U(2)*V(1>*V(2>>

PRINT "CHI SQUARE IS:";P;"WITH 1 DEGREE OF FREEDOM"

GO TG 4 10

DATA 1,10,8,3

DATA 5.0F.2S

1000 END

Sample Ron of SIP318

WHAT ! i NUMBER OF ROVJS?

!2

WHAT IS NUMBER OF COLUMNS?

!2

IF YOU WISH TO USE SMALL SAMPLE C0RKEC1ION (P.

TYPE 2, IF NOT, TYPE 1

!2

CHI SQUARE IS: 6.76923WI1H 1 DEGREE OF FREEDOM
NUMBER 69 41

IF YOU

TYPE

•2

1

1

2

2

WANT A LIST OF THE CALCULATED

2, IF NOT, TYPE 1

EXPECTED VALUES

f-0 W ,

K0W ,

R0 U ,

R 0 If.",

CGLUMN=

COLUMN^

COLUMN*

COLUMN*

4.6

6.6

SIP331

SIP331 C0MBINES A SERIFS OF KNOWN CHI SQUARES TO CALCULATE

THE STANDARDIZED NORMAL DEVIATE. THE DATA, ENTERED IN LINE

900* ARE IN THIS ORDER: FOR FIRST SAMPLE, FIRST PERCENTAGE,

SECOND PERCENTAGE, AND CHI SQUARE FOR FIRST SAMPLE CFROM

SIP318 FOR EACH 2X2 TEST9, THEN SAME VALUES FOR SECOND SAMPLE,

ETC. TERMINATE KITH 5.OE25 AND TWO ZEROES. DATA IN PROGRAM

FROM EXAMPLE 95, P. 330.

001 REM

002 REM

003 REM

004 REM

005 REM

006 REM

007 REM

100 LET C=0

110 READ X, Y, Z

120 IF X=5.0E25 THEN 200

130 LET C=C+1

140 IF Y>X THEN 170

150 LET A=SGR<Z)

160 G0 T0 180

170 LET A=SGRCZ>

175 LET A=-A

180 LET B=E+A

190 G0 T0 110

200 PRINT

210 PRINT "STANDARDIZED NORMAL DEVlATE =

 ft; B/SURCO

900 DATA 30.6* 36.7, 1.18, 52.9, 53.4, 1.20, 42.9, 41.9, .18, 39.6

901 DATA 3/1.4, .69, 50.0, 44.3* .62, 53.1, 48.9, 12.06, 5.0E25, 0, 0

999 DATA 5.0E25,

1000 END

5.0E25

Sample Run of SIP331

STANDARDIZED NORMAL DLVlA'it= 1-36064

SIP339-SBP372

Most of the material in this chapter is not amenable to time-shared computer use, although plotters that can be

attached to computers, including time-shared machines, are available. No attempt is made here to program for

plotting. An X,Y plot program usually is standard in library programs of time-share companies. One operation

discussed in this chapter is easily performed by the computer, however, and advantage should be taken of it in

graphs using log or semilog plots. SIP357 will convert all given values into logs, either natural logs or logs to the

base 10.
42 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

SIP357

SIP357 CONVERTS ACTUAL VALUES TO LOG VALUES. YOU HAVE A

CHOICE OF NATURAL LOGS OH LOGS TO A BASE 10. PUT YOUK DATA

IN LINE 900* TERMINATING WITH THE VALUE 5.0E25. DATA FROM

STANDARD LENGTHS* EXAMPLE 102* P. 399* t-.'ITH LOGS AS LISTED

IN EXAMPLE 103* P. 403.

001 REM

002 REM

003 REM

004 REM

005 REM

006 REM

080 PRINT

090 PRINT

100 PRINT "FOR NATURAL LOGS* TYPE 1* FOR BASE 10 LOGS TYPE 2"

110 INPUT A

120 PRINT

130 PRINT "ACTUAL VALUE"*" LOG VALUE"

135 PRINT

140 IF A=2 THEN 200

150 READ X

160 IF X=5.0E25 THEN 1000

170 PRINT X* L0GCX)

180 G0 T0 150

200 READ X

210 IF X=5.0E25 THEN 1000

220 PRINT X*C.4342945*L0GCX>)

230 G0 T0 200

900 DATA 37.6* 44.8* 54.1* 64.5* 74.1* 84.0* 93.1* 106* 116

901 DATA 5.0E2 5

999 DATA 5.0E25

1000 END

Sample Run of SIP357

FOR NATURAL LOGS* TYPE 1 * FOR BASE 10 LOGS TYPE 2

!2

JAL VALUE

37.6

44.8

54.1

64.5

74.1

84

93.1

106

116

LOG

•

2.

2.

VALUE

57519

65128

7332

80956

86982

92428

96895

02531

06446

001 REM

002 REM

SIP391

SIP391 WILL CALCULATE BOTH THE REGRESSION COEFFICIENT OF

Y CK 1 ) AND THE GEOMETRIC RATE OF INCREASE (fK SUB G*)
NUMBER 69 43

003

004

005

006

090

100

110

112

115

120

130

135

138

140

150

160

170

180

190

900

1000

"WHAT

A

IS NUMBER OF ROWS?"

REM FOR A GROWTH CURVE* DATA GOES IN LINE 900, WITH TIME C7T1)

REM VALUE FIRST AND MEASUREMENT CY 1 ) VALUE SECOND* CONTINUING

REM THROUGH SERIES. YOU WILL BE ASKED FOR THE NUMBER OF ROWS.

REM EXAMPLE IN PROGRAM FROM P. 392.

PRINT

PRINT

INPUT

PRINT

PRINT " T"," Y","INCREMENT"," K">" K-G"

F0R 1=0 T0 CA-1)

READ TCI), YCI)

IF I<>0 THEN 140

PRINT TCI), YCI)

NEXT I

F0R 1=1 T0 CA-1)

LET KCI)=CYCI)-YCI-1))/CTCI)-TCI-1))

LET GCI) = CL0GCYCI))-L0GCYCI-1)))/CTCI)-TCI-1 ))

PRINTTCI),YCI),YCI)-YCI-1),KCI),GCI)

NEXT I

DATA 0, 36.1, 14, 53.4, 28, 68.1, 43, 79.3, 57, 87.3

END

Sample Run of SIP391

WHAT IS NUMBER OF ROWS?

!5

T

0

14

2 8

4 3

57

Y

36.1

53.4

68.1

79.3

87.3

INCREMENT

17.3

14.7

11.2

8

K

1.23571

1.05

.746667

.571429

K -G

•279655E-01

•173690E-01

.101508E-01

.686516E-02

SIP410

S1P410 CALCULATES THE VALUL tfh 1ME Ctt> f iO l Ltv'J Ci- ALLCMLIhY

C"ALPHA") FOR GROWTH PLRIGli / ^iwf c ll%E LiNGfcih EQUATION.

P I T DATA IN LIN E 900 , V.I Th VALUES I N X-Y FAIKS Ci\u'lE Ihfi l

THESE DATA CAN BE PUT IN SIP233 IF Tht. "uU' i FIT " uwvVc. IS

NEEDED). PR0GRAM WILL NUMBER PAIRS STARTING WITH ONE, AND

PRINT RESULTS FOR EACH PERIOD CT 1) CHANGF. PROGRAM WILL

CALL FOR TOTAL NUMBER OF PERIODS. DATA IN PROGRAM FROM

EXAMPLE 105 , P. 410 .

0 01 KLM

002 REM

003 REM

004 REM

005 REM

006 REM

007 REM

008 REM

009 REM

090 PRINT

100 PRINT "WHAT IS NUMBER OF GROWTH PERIODS?"

110 INPUT Z

115 PRINT
44 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

120 PRINT " GROWTH PERIOD"," ALPHA"

130 PRINT

140 F0R 1=1 T0 Z

150 READ X<I>, YCI)

160 IF XCI)=5.0E25 THEN 1000

170 IF 1=1 THEN 250

180 LET A=CL0GCY<I>)-L0G<YCI-1>)>/<L0GCX<I>>-L0GCX<I-l)>>

200 PRINT CI-1 >"--••!* A

250 NEXT I

900 DATA 2.138* .818, 3.188, .747, 4.792, .683, 6.245, .681

901 DATA 8.648, .572, 11.561, .447, 5.0E25

999 DATA 5.0E2 5

1000 END

Sample Run of SIP410

UHAT IS NUh&tK OF tROUH PERIODS?

!6

C-ROfcTH PERIOD ALPHA

2

3

4

5

fc

-•22726 4

-•21977 b

-•11O73OE-O1

-•5357&b

-•8493 7

SIP411

001 REM SIP411 RUNS THE RICHARDS AND KAVANAUGH TEST FOR DETECTING

002 REM DEVIATIONS FROM SIMPLE ALLOMETRY. DATA FOR A PAIR OF

003 REM COUNTS OR MEASUREMENTS GOES IN LINE 900, l-.'ITH X AND Y

004 REM VALUFS FOR FACH INDIVIDUAL IN SAMPLE. END DATA STRING VITH

005 RFM VALUE 5.0E25. DATA IN PROGRAM FROM EXAMPLE 106, P. 412.

006 RFM

100 PRINT " LOG X", " LOG Y"," CALC. LOG Y11," DEVIATION"

110 PRINT

120 READ X, Y

130 IF X=5.0E25 THEN 1000

140 PRINT L0G(X>, L0GCY), (-1.00 + .7O*L0GCX)),CL0GCY)-(-1.00+.7O*L0G<X) ) >

150 G0 TO 120

900 DATA .9, .3, 1.3, .4, 1.1, .3, 1.6, .5, 1.7, .6, 1.9, .6, 2.1, .6

901 DATA 2.1, .7, 2-6* .8, 2.6, .8, 6.6, 1.3, 4.3, 1.1, 4.3, 1.3, 6

902 DATA 1.3, 6, 1.3, 8, 1.6, 11.1, 1.7, 11.9, 1.7, 5.0E25, 5.0E25

999 DATA 5.0E25

1000 END
NUMBER 69 45

Sample Run of SIP411

Lit A

-• 105361

.262364

•953101E-G1

• 470003

.530628

• 641853

.741937

.741937

.955511

.955511

1 .88707

1.45861

1.45861

1.79176

1.79176

2.07944

2.40694

2.47654

LOC Y

-1.20397

-.916291

-1.20397

-.693147

-•510826

-.510826

-.510826

-.3566 75

-.223144

-.223144

•262364

•953101E-01

•262364

•262364

•262364

•470003

•530628

.530628

CALC. LOG Y

-1.07375

-.816346

-.933283

-•670998

-.628 561

-.5 50703

-•480644

-.480644

-•331142

-.331142

•320948

•210300E-01

•21G3G0E-01

•254231

•254231

•455609

•68 4861

•7335 7 7

DEVIATION

-• 13022

-•999456E-01

-.27069

-.221493E-01

•117735

•396770E-01

-•301814E-C1

• 123969

• 107999

•107999

-•58 5844E-01

•742801E-01

•241334

•813293E-02

•813293E-02

•143944E-01

-•154233

-.2029 49

Index

Allometry, coefficient of, 43

constant of, 43

deviations from simple, 44

Alpha-coefficient of allometry, 43

Alpha-intercept, 20

Analysis of variance, 29

in regression, 30

hierarchical, 43

one-factor design, 29

two-factor design, 32

Arithmetic mean, 4

confidence limits of, 12

standard errors of, 12

Average, see Mean

Bartlett's "best-fit" line, 23

Base "e" logs, 42

Base ten logs, 42

"best-fit" line, Bartlett's, 23

Capture-mark-recapture method, 6

Central tendency, measures of, 3

Chi square test, in comparison of two samples, 17

in confidence limits of variance, 11

in contingency tables, 39

in goodness of fit for frequency data, 36

in Poisson distribution, 37

in small samples, 17

in standardized normal deviate, 41

in Yate's continuity correction, 17

Coefficient, of allometry, 43

of correlation, 19

of kurtosis, 9

of skewness, 8

of variation, 5

Comparison of samples, 13,15,16,17

Confidence limits, of actual value in prediction in regression, 26

of coefficient of variation, 12

of intercept, 20, 31

of mean,12

of mean deviation, 12

of mean value for prediction in regression, 26

of median, 12

of quartiles, 12

of slope, 21,31

of standard deviation, 12

of variance, 10,12

Contingency tables, 39

small sample correction for, 39

Continuity correction, Yates's, 17,18

Correction factor, Yatesfs

continuity, 17

Correlation, partial, 27

Correlation coefficient(s), 19

significance of difference between two, 27

transformation to z value, 19,27
46 SMITHSONIAN CONTRIBUTIONS TO ZOOLOGY

Degrees of freedom, in association tests, 40

in F testa, 15

in goodness-of-fit tests, 38

in Student's t tests, 15,16

Dependent variable, prediction of, 22

Deviation, standard, 5

Deviations from simple allometry, 44

Dispersion, measures of, 4

Distribution, Poisson, 6,37,38

"F" ratio, 29

in analysis of variance in regression, 33

in hierarchical analysis of variance, 34

in one-factor design analysis of variance, 29

in two-factor design analysis of variance, 32

F value. 13

Geometric mean, 4

Geometric rate of increase in growth curve, 42

Goodness-of-fit for frequency data, 36

Growth curve, 43

geometric rate of increase in, 42

Harmonic mean, 4

Hierarchical analysis of variance, 34

Homogeneity tests, 39

Intercept, 20

confidence limits of, 20

in Bartlett's "best-fit" line, 23

Rurtosis, coefficient of, 9

limits, confidence, see Confidence limits

Logarithms, natural, 42

Logarithm values, 42

to base "e," 42

to base ten, 42

Mean, arithmetic, see Arithmetic mean

geometric, 4

harmonic, 4

of means, 3

quadratic, 4

Mean deviation, confidence limits of, 12

standard error of, 12

Mean square, 32

Measures of central tendency, 3

Measures of dispersion, 4

Median, 3

confidence limits of, 12

standard error of, 12

precise estimate of, 9

Mode,3

Natural logarithms, 42

Normal deviate, standardized, 27

Normal distribution, measures of dispersion in, 6

variance ratio test of, 51

One-factor design analysis of variance, 29

Paired regressions, Student's t in, 22

Paired samples, 15

Student's t in, 27

Partial correlation, 27

Poisson distribution, 6

chi square calculation in, 38

variance ratio test, 38

Population, estimated size of, 6

Prediction, confidence limits in, 26

from regression equation, 22

Probabilities, in Poisson distribution, 6

Quadratic mean, 4

Quartiles, confidence limits of, 12

standard errors of, 12

"r" value, 19

Ratio between sample variances, 16

Rectilinearity, test for, 32

Regression, 19

analysis of variance in, 30

Regression coefficient, of dependent variable, 42

significance of, 32

Regression equation, 20

Richards and Kavanaugh test, 44

Sample variances, ratio between, 18

Skewness, coefficient of, 8

Slope, 20

confidence limits of, 20

in Bartlett's "best-fit" line, 23

Small sample correction for contingency tables, 40

Standard deviation, 5

confidence limits of, 12

standard error of, 12

Standard error, of coefficient of variation, 12

of mean, 12

of mean deviation, 12

of median, 12

of quartiles, 12

of standard deviation, 12

Standardized normal deviate, 27,41

calculation from known chi square values, 41

Student's t, 13,15

for two samples, 13

for paired samples, 15

for regressions, 22

Transformed correlation coefficient ("z"), 19,27

Two-factor design analysis of variance, 32

Variance, 5

of estimate, in regression, 19

Variation, coefficient of, 5,12

Yates's continuity correction, 17,18

'V value, 19
Publication in Smithsonian Contributions to Zoology

Manuscripts for serial publications are accepted by the Smithsonian Institution Press, subject

to substantive review, only through departments of the various Smithsonian museums. NonSmithsonian authors should address inquiries to the appropriate department. If submission is

invited, the following format requirements of the Press will govern the preparation of copy.

(An instruction sheet for the preparation of illustrations is available from the Press on request.)

Copy must be typewritten, double-spaced, on one side of standard white bond paper, with

\y<x" top and left margins, submitted in ribbon copy with a carbon or duplicate, and accompanied

by the original artwork. Duplicate copies of all material, including illustrations, should be retained

by the author. There may be several paragraphs to a page, but each page should begin with a new

paragraph. Number consecutively all pages, including title page, abstract, text, literature cited,

legends, and tables. The minimum length is 30 pages of typescript and illustrations.

The title should be complete and clear for easy indexing by abstracting services. Taxonomic

titles will carry a final line indicating the higher categories to which the taxon is referable:

"(Hymenoptera: Sphecidae)." Include an abstract as an introductory part of the text. Identify

the author on the first page of text with an unnumbered footnote that includes his professional

mailing address. A table of contents is optional. An index, if required, may be supplied by the

author when he returns page proof.

Two headings are used: (1) text heads (boldface in print) for major sections and chapters

and (2) paragraph sideheads (caps and small caps in print) for subdivisions. Further headings

may be worked out with the editor.

In taxonomic keys, number only the first item of each couplet; if there is only one couplet,

omit the number. For easy reference, number also the taxa and their corresponding headings

throughout the text; do not incorporate, page references in the key.

In synonymy, use the short form (taxon, author, date, page) with a full reference at the end

of the paper under "Literature Cited." Begin each taxon at the left margin with subsequent lines

indented about three spaces. Within a taxon, use a period-dash (.—) to separate each reference.

Enclose with square brackets any annotation in or at the end of the taxon. For references within

the text, use the author-date system: "(Jones, 1910)" or "Jones (1910)." If the reference is

expanded, abbreviate the data: "Jones (1910, p. 122, pi. 20: fig. 1)."

Simple tabulations in the text (e.g., columns of data) may carry headings or not, but they

should not contain rules. Formal tables must be submitted as pages separate from the text, and

each table, no matter how large, should be pasted up as a single sheet of copy.

For measurements and weights, use the metric system instead of (or in addition to) the

English system.

Illustrations (line drawings, maps, photographs, shaded drawings) can be intermixed

throughout the printed text. They will be termed Figures and should be numbered consecutively;

however, if a group of figures is treated as a single figure, the individual components should be

indicated by lowercase italic letters on the illustration, in the legend, and in text references:

"Figure 9b." If illustrations (usually tone photographs) are printed separately from the text as

full pages on a different stock of paper, they will be termed Plates, and individual components

should be lettered (Plate 9b) but may be numbered (Plate 9: figure 2). Never combine the

numbering system of text illustrations with that of plate illustrations. Submit all legends on pages

separate from the text and not attached to the artwork.

In the bibliography (usually called "Literature Cited"), spell out book, journal, and article

titles, using initial caps with all words except minor terms such as "and, of, the." (For capitalization of titles in foreign languages, follow the national practice of each language.) Underscore

(for italics) book and journal titles. Use the colon-parentheses system for volume, number, and

page citations: "10(2) :5-9." Spell out such words as "figures" and "plates" (or "pages" when

used alone).

For free copies of his own paper, a Smithsonian author should indicate his requirements on

"Form 36" (submitted to the Press with the manuscript). A non-Smithsonian author will receive

50 free copies; order forms for quantities above this amount with instructions for payment will be

supplied when page proof is forwarded.