BASIC Microcomputing and Biostatistics

Similar documents
STA 225: Introductory Statistics (CT)

Probability and Statistics Curriculum Pacing Guide

Algebra 1, Quarter 3, Unit 3.1. Line of Best Fit. Overview

S T A T 251 C o u r s e S y l l a b u s I n t r o d u c t i o n t o p r o b a b i l i t y

Lecture 1: Machine Learning Basics

Analysis of Enzyme Kinetic Data

PROFESSIONAL TREATMENT OF TEACHERS AND STUDENT ACADEMIC ACHIEVEMENT. James B. Chapman. Dissertation submitted to the Faculty of the Virginia

EGRHS Course Fair. Science & Math AP & IB Courses

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

Lecture Notes on Mathematical Olympiad Courses

Python Machine Learning

Theory of Probability

GRADUATE STUDENT HANDBOOK Master of Science Programs in Biostatistics

THE PROMOTION OF SOCIAL AWARENESS

Mathematics subject curriculum

Introducing the New Iowa Assessments Mathematics Levels 12 14

Learning Disability Functional Capacity Evaluation. Dear Doctor,

Mathematics Program Assessment Plan

CHALLENGES FACING DEVELOPMENT OF STRATEGIC PLANS IN PUBLIC SECONDARY SCHOOLS IN MWINGI CENTRAL DISTRICT, KENYA

Chapters 1-5 Cumulative Assessment AP Statistics November 2008 Gillespie, Block 4

State University of New York at Buffalo INTRODUCTION TO STATISTICS PSC 408 Fall 2015 M,W,F 1-1:50 NSC 210

Physics 270: Experimental Physics

THE PENNSYLVANIA STATE UNIVERSITY SCHREYER HONORS COLLEGE DEPARTMENT OF MATHEMATICS ASSESSING THE EFFECTIVENESS OF MULTIPLE CHOICE MATH TESTS

School of Innovative Technologies and Engineering

Mathematics. Mathematics

Using Calculators for Students in Grades 9-12: Geometry. Re-published with permission from American Institutes for Research

Biology Keystone Questions And Answers

Excel Formulas & Functions

A Program Evaluation of Connecticut Project Learning Tree Educator Workshops

c o l l e g e o f Educ ation

10.2. Behavior models

Detailed course syllabus

Linking the Ohio State Assessments to NWEA MAP Growth Tests *

Research Design & Analysis Made Easy! Brainstorming Worksheet

LOUISIANA HIGH SCHOOL RALLY ASSOCIATION

Edexcel GCSE. Statistics 1389 Paper 1H. June Mark Scheme. Statistics Edexcel GCSE

Improving Conceptual Understanding of Physics with Technology

VOL. 3, NO. 5, May 2012 ISSN Journal of Emerging Trends in Computing and Information Sciences CIS Journal. All rights reserved.

Practical Research. Planning and Design. Paul D. Leedy. Jeanne Ellis Ormrod. Upper Saddle River, New Jersey Columbus, Ohio

CONSTRUCTION OF AN ACHIEVEMENT TEST Introduction One of the important duties of a teacher is to observe the student in the classroom, laboratory and

The Good Judgment Project: A large scale test of different methods of combining expert predictions

Statewide Framework Document for:

Ph.D. in Behavior Analysis Ph.d. i atferdsanalyse

Probability and Game Theory Course Syllabus

CS/SE 3341 Spring 2012

Full text of O L O W Science As Inquiry conference. Science as Inquiry

Ryerson University Sociology SOC 483: Advanced Research and Statistics

Shockwheat. Statistics 1, Activity 1

STT 231 Test 1. Fill in the Letter of Your Choice to Each Question in the Scantron. Each question is worth 2 point.

School of Basic Biomedical Sciences College of Medicine. M.D./Ph.D PROGRAM ACADEMIC POLICIES AND PROCEDURES

Hardhatting in a Geo-World

Status of the MP Profession in Europe

EDPS 859: Statistical Methods A Peer Review of Teaching Project Benchmark Portfolio

Instructor: Matthew Wickes Kilgore Office: ES 310

Syllabus ENGR 190 Introductory Calculus (QR)

THE UNIVERSITY OF WESTERN ONTARIO. Department of Psychology

Sociology 521: Social Statistics and Quantitative Methods I Spring Wed. 2 5, Kap 305 Computer Lab. Course Website

Foothill College Summer 2016

An application of student learner profiling: comparison of students in different degree programs

Math 96: Intermediate Algebra in Context

MAHATMA GANDHI KASHI VIDYAPITH Deptt. of Library and Information Science B.Lib. I.Sc. Syllabus

The lab is designed to remind you how to work with scientific data (including dealing with uncertainty) and to review experimental design.

This Performance Standards include four major components. They are

American Journal of Business Education October 2009 Volume 2, Number 7

Course Syllabus for Math

Mathematics Assessment Plan

OFFICE SUPPORT SPECIALIST Technical Diploma

Math 181, Calculus I

EECS 700: Computer Modeling, Simulation, and Visualization Fall 2014

Office Hours: Mon & Fri 10:00-12:00. Course Description

Probability estimates in a scenario tree

(Includes a Detailed Analysis of Responses to Overall Satisfaction and Quality of Academic Advising Items) By Steve Chatman

Honors Mathematics. Introduction and Definition of Honors Mathematics

Mcgraw Hill 2nd Grade Math

Audit Of Teaching Assignments. An Integrated Analysis of Teacher Educational Background and Courses Taught October 2007

NCEO Technical Report 27

B.S/M.A in Mathematics

Conducting the Reference Interview:

TIMSS ADVANCED 2015 USER GUIDE FOR THE INTERNATIONAL DATABASE. Pierre Foy

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Evidence for Reliability, Validity and Learning Effectiveness

Economics 201 Principles of Microeconomics Fall 2010 MWF 10:00 10:50am 160 Bryan Building

Problem-Solving with Toothpicks, Dots, and Coins Agenda (Target duration: 50 min.)

ACTL5103 Stochastic Modelling For Actuaries. Course Outline Semester 2, 2014

The Internet as a Normative Corpus: Grammar Checking with a Search Engine

Instructor: Mario D. Garrett, Ph.D. Phone: Office: Hepner Hall (HH) 100

Sociology 521: Social Statistics and Quantitative Methods I Spring 2013 Mondays 2 5pm Kap 305 Computer Lab. Course Website

Julia Smith. Effective Classroom Approaches to.

AP Statistics Summer Assignment 17-18

A Model to Predict 24-Hour Urinary Creatinine Level Using Repeated Measurements

Evidence-based Practice: A Workshop for Training Adult Basic Education, TANF and One Stop Practitioners and Program Administrators

This table contains the extended descriptors for Active Learning on the Technology Integration Matrix (TIM).

AGRICULTURAL AND EXTENSION EDUCATION

MTH 141 Calculus 1 Syllabus Spring 2017

Instrumentation, Control & Automation Staffing. Maintenance Benchmarking Study

Learning Resource Center COLLECTION DEVELOPMENT POLICY

On-the-Fly Customization of Automated Essay Scoring

Transfer of Training

UW-Stout--Student Research Fund Grant Application Cover Sheet. This is a Research Grant Proposal This is a Dissemination Grant Proposal

Transcription:

BASIC Microcomputing and Biostatistics

BASIC Microcomputing and Biostatistics How to Program and Use Your Microcomputer for Data Analysis in the Physical and Life Sciences, Including Medicine WITH A PERMANENT library OF MANY HELPFUL PROGRAMS, CHALLENGING PROBLEMS, AND WORKED EXERCISES by Donald W. Rogers Humana Press Inc Clifton, New Jersey

To Doris M. Rogers With other men, perhaps, such things would not have been inducements; but as for me, I am tormented with an everlasting itch for things remote. I love to sail forbidden seas, and land on barbarous coasts. -Melville Library of Congress Cataloging in Publication Data Rogers, Donald, 1932- Basic microcomputing and biostatistics. (Contemporary instrumentation and analysis) Includes bibliographies and index. 1. Life sciences-data processing. II. Series. QH324.2.R63 574'.028'54 I. Title. 81-85465 AACR2 TSBN-13: 978-1-4612-9776-5 e-tsbn-13: 978-1-4612-5300-6 DOT: 10.1007/978-1-4612-5300-6 1983 the HUMANA Press Inc. Crescent Manor P.O. Box 2148 Clifton, NJ 07015 All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted, in any form of by any means, electronic, mechanical, photocopying, microfilming, recording, or otherwise without written permission from the Publisher. iv

Preface BASIC Microcomputing and Biostatistics is designed as the first practical "how to" guide to both computer programming in BASIC and the statistical data processing techniques needed to analyze experimental, clinical, and other numerical data. It provides a small vocabulary of essential computer statements and shows how they are used to solve problems in the biological, physical, and medical sciences. No mathematical background beyond algebra and an inkling of the principles of calculus is assumed. All more advanced mathematical techniques are developed from "scratch" before they are used. The computing language is BASIC, a high-level language that is easy to learn and widely available using time-sharing computer systems and personal microcomputers. The strategy of the book is to present computer programming at the outset and to use it throughout. BASIC is developed in a way reminiscent of graded readers used in human languages; the first programs are so simple that they can be read almost without an introduction to the language. Each program thereafter contains new vocabulary and one or more concepts, explained in the text, not used in the previous ones. By gradual stages, the reader can progress from programs that do nothing more than count from one to ten to sophisticated programs for nonlinear curve fitting, matrix algebra, and multiple regression. There are 33 working programs and, except for the introductory ones, each performs a useful function in everyday data processing problems encountered by the experimentalist in many diverse fields. BASIC Microcomputing and Biostatistics arose as the result of a twofold need perceived by the author almost a decade ago. Students of statistics were overwhelmed by masses of trivial calculations that were meant to illustrate statistical principles, but obscured them instead. Even routine techniques, such as constructing simple and cumulative frequency distributions, were made complicated by the need to sort many numbers into arbitrarily sized' 'bins" while wondering what to do with the data that fall on the border separating one bin from its neighbor. On the other hand, in computer programming courses, then rare, now ubiquitous, programming principles were taught using exercises that illustrated them more or less well, depending on the textbook, but solved no problem anyone needed or wanted to solve. v

vi Preface Statistics courses needed a means of handling routine number crunching so that the student might see the conceptual forest for the trees and neophyte computer programmers needed meaningful problems to solve with their newfound programming skills. Why not combine statistics and programming and teach two courses in one? I tried it; it worked. The course outline became the framework for this book and it has been filled in and modified from then until now. Taught in its entirety, this book is intended as a text for a onesemester course in biostatistics, biomedical statistics, or related fields such as quantitative courses in agriculture, agronomy, ecology, botany, experimental psychology, indeed any field in which masses of numerical data are treated. Students have finished one semester of this combined course with an understanding of statistics roughly equivalent to the level attained in the traditional one-semester statistics course, and they have mastered the fundamentals of computer programming in BASIC at about the level achieved by students in the usual one-semester course in that subject. Not the fine points, mind you, but enough to make the machine work for them, solving the quantitative problems that life scientists encounter in the laboratory or in the field. Although complete coverage of this book is at the advanced undergraduate-beginning graduate level, experience has shown that, by selective deletion, it can be modified for use in quite a broad spectrum of programming courses. By cutting out all the calculus (presenting the integral as merely an area and giving several equations ex cathedra) I have used the manuscript as a basis for a crash review of high-level programming for juniors who are about to embark on an assemblylanguage course, a one-week short course for junior biologists entering an NIH research program, the computer component of an honors course in introductory chemistry, and a similar honors course for beginning biologists. By deleting almost all of the theory and concentrating on games and graphics, I have had considerable success using programs in this book in a two-and-a-half week orientation course. for entering freshmen at L.I. U. in the summer of 1982. All the programs in this book have been run on a DEC 20-60 time-sharing system. With a very few modifications, discussed in the text, they have also been run on a home microcomputer. These short, simple programs are ideally suited to bring the microcomputer into playas a powerful laboratory research tool.

Table of Contents Preface... v Chapter 1. Introduction to the Computer......... 1 Computer Memory................................... 2 Data Processing..................................... 5 Control............................................ 7 Kinds of Computers.................................. 8 Batch Processing and Time Sharing..................... 10 When Not to Use the Computer........................ 11 Glossary........................................... 16 Problems............................................ 18 Bibliography........................................ 18 Chapter 2. Understanding Experimental Error and Averages...................... 19 Significant Figures................................... 20 Sources of Errors.................................... 21 Truncation Errors.................................... 22 Propagation of Errors................................. 23 Euler's Theorem and Variations........................ 27 Geometrical Interpretation of Euler's Theorem............ 28 Measures of Central Tendency......................... 30 The Means of Means................................. 39 Glossary........................................... 43 Problems........................................... 45 Bibliography........................................ 45 vii

viii Contents Chapter 3. Understanding Experimental Data Dispersion........................ 47 The Average Deviation............................... 47 The Mean Deviation Independent of the Sign............. 48 Population Parameters and Sample Statistics.............. 49 The Standard Deviation............................... 49 Relative Standard Deviation........................... 52 Grouped Data and Frequency Distributions............... 52 Cumulative Frequency Distributions..................... 58 Application: Dose-Response Curve..................... 61 Frequency Grouping and Pictorial Representation of Continuous Data................................... 63 Quartiles and Percentiles.............................. 64 Skewness and Kurtosis............................... 65 Glossary........................................... 67 Problems........................................... 68 Bibliography........................................ 69 Chapter 4. Understanding Probability........... 71 Simultaneous and Equally Acceptable Probabilities........ 72 Application: Heredity... 76 The Urn Problem: Dependent Probabilities............... 77 Conditional Probabilities.............................. 79 Bayes' Theorem..................................... 80 Application of Bayes' Theorem: Diagnosis............... 82 Permutations........................................ 84 Combinations....................................... 85 The Binomial Coefficient............................. 88 Glossary........................................... 89 Problems........................................... 90 Bibliography........................................ 90 Chapter 5. Determining Probability Distributions.. 91 Tree Diagrams...................................... 92 Application: Heredity... 97 Modal and Mean Scores... " 103 The Binomial Distribution... " 107 Effect of p on the Binomial Distribution... " 111 Mean Occurrences for Data Groups of N.... " 112 Application: Evaluation of a New Treatment.... " 114

Contents ix Glossary........................................... 114 Problems... 115 Bibliography........................................ 116 Chapter 6. Using the Poisson Distribution... 117 Application: Disintegration of Radioactive Nuclei... 120 Mean, Variance, and Standard Deviation for the Poisson Distribution....................................... 121 Computer Graphics.................................. 123 Glossary........................................... 129 Problems........................................... 129 Bibliography........................................ 130 Chapter 7. Using the Normal Distribution... 131 Relative Areas by Computer Graphics... " 134 Normalization of the Gaussian Distribution... " 136 The Mean, Variance, and Standard Deviation of the Gaussian Distribution....................................... 138 The Standard Normal Deviate, Z................ 139 Computer Integration................................. 142 Tabulated Areas Under the Normal Curve................ 147 The Most Common Areas and Limits on Z.......... 148 One- and Two-Tailed Tests............................ 150 Glossary........................................... 152 Problems........................................... 152 Bibliography........................................ 153 Chapter 8. Determining Probabilities: How to Apply the Chi Square Test and the Student's t-test.... 155 Chi Square Detection of a Biased Coin.................. 158 Degrees of Freedom.................................. 160 The Central Limit Theorem.................. 160 Situations in Which the Population Mean Is Known But Not Its Standard Deviation................................. 165 Determination of Confidence Limits When No Population Parameters Are Known............................. 168 Confidence Limits................................... 169 The Difference Between Means........................ 170

x Contents Glossary........................................... 172 Problems........................................... 173 Bibliography........................................ 174 Chapter 9. Finding Linear Functions: The Principle of Least Squares................... 175 Linear Functions........................... 179 Least Squares Treatment of Linear Functions Passing Through the Origin........................................ 181 The Correlation Coefficient............................ 185 Applications........................................ 186 Least Squares with Two Minimization Parameters......... 188 Simultaneous Equations............................... 194 Solution of Simultaneous Equations by Cramer's Rule...... 195 The Determinant of the Coefficients..................... 196 Cramer's Rule...................................... 199 Solution of the Normal Equations for Linear Curve Fitting by Cramer's Rule.................................... 200 Glossary........................................... 201 Problems........................................... 202 Bibliography........................................ 204 Chapter 10. Fitting Nonlinear Curves... 205 Boyle's Law........................................ 205 Exponential Decay................................... 209 Second-Order Reaction Kinetics........................ 214 Enzyme-Catalyzed Reactions.......................... 219 Unlimited Population Growth.......................... 224 Limited Population Growth............................ 227 Nearly Linear Functions.............................. 230 Glossary........................................... 235 Problems........................................... 236 Bibliography........................................ 237 Chapter 11. Solving Simultaneous Equations... 239 Simultaneous Equations in Matrix Form... " 239 Matrix Algebra...................................... 241 Simultaneous Equations by Matrix Inversion.............. 248 Simultaneous Analysis................................ 250

Contents xi Multiple Regression.................................. 253 Least Squares Treatment of Multiple Regression... 255 Glossary........................................... 261 Problems........................................... 263 Bibliography........................................ 263 Answers to Problems.... 265 Index.... 269