A Primer of Ecological Statistics SECOND EDITION This page intentionally left blank A Primer of Ecological Statistics Second Edition Nicholas J. Gotelli University ofVermont Aaron M. Ellison Harvard Forest Sinauer Associates, Inc. Publishers Sunderland,Massachusetts U.S.A. Cover art copyright © 2004 Elizabeth Farnsworth.See pages xx–xxi. APRIMEROFECOLOGICALSTATISTICS,SECONDEDITION Copyright © 2013 by Sinauer Associates,Inc.All rights reserved. This book may not be reproduced without permission ofthe publisher. For information address Sinauer Associates Inc.,23 Plumtree Road, Sunderland,MA 01375 U.S.A. FAX413-549-1118 [email protected],[email protected] WEBSITE www.sinauer.com Library ofCongress Cataloging-in-Publication Data Gotelli,Nicholas J.,1959- A primer ofecological statistics / Nicholas J.Gotelli,University ofVermont,Aaron M.Ellison,Harvard University.-- Second edition. pages ;cm Includes bibliographical references and index. ISBN 978-1-60535-064-6 1. Ecology--Statistical methods. I.Ellison,Aaron M.,1960- II.Title. QH541.15.S72G68 2013 577.072--dc23 2012037594 Printed in U.S.A. 5 4 3 2 1 For Maryanne & Elizabeth Who measures heaven,earth,sea,and sky Thus seeking lore or gaiety Let him beware a fool to be. SEBASTIANBRANT,Ship ofFools,1494.Basel,Switzerland. [N]umbers are the words without which exact description ofany natural phenomenon is impossible….Assuredly,every objective phenomenon,of whatever kind,is quantitative as well as qualitative; and to ignore the for- mer,or to brush it aside as inconsequential,virtually replaces objective nature by abstract toys wholly devoid ofdimensions —toys that neither exist nor can be conceived to exist. E.L.MICHAEL,“Marine ecology and the coefficient ofassociation:A plea in behalfofquantitative biology,”1920.Journal ofEcology 8:54–59. [W]e now know that what we term natural laws are merely statistical truths and thus must necessarily allow for exceptions.…[W]e need the laboratory with its incisive restrictions in order to demonstrate the invari- able validity ofnatural law.Ifwe leave things to nature,we see a very dif- ferent picture: every process is partially or totally interfered with by chance,so much so that under natural circumstances a course ofevents absolutely conforming to specific laws is almost an exception. CARLJUNG,Foreword to The I Ching or Book ofChanges.Third Edition, 1950,translated by R.Wilhelm and C.F.Baynes.Bollingen Series XIX, Princeton University Press. Brief Contents PART I FUNDAMENTALS OF PROBABILITY AND STATISTICAL THINKING 1 An Introduction to Probability 3 2 Random Variables and Probability Distributions 25 3 Summary Statistics: Measures of Location and Spread 57 4 Framing and Testing Hypotheses 79 5 Three Frameworks for Statistical Analysis 107 PART II DESIGNING EXPERIMENTS 6 Designing Successful Field Studies 137 7 A Bestiary of Experimental and Sampling Designs 163 8 Managing and Curating Data 207 PART III DATA ANALYSIS 9 Regression 239 10 The Analysis ofVariance 289 11 The Analysis of Categorical Data 349 12 The Analysis of Multivariate Data 383 PART IV ESTIMATION 13 The Measurement ofBiodiversity 449 14 Detecting Populations and Estimating their Size 483 Appendix Matrix Algebra for Ecologists 523 Contents PART I Fundamentals of Probability and Statistical Thinking CHAPTER 1 An Introduction to Probability 3 Bayes’Theorem 22 Summary 24 What Is Probability? 4 Measuring Probability 4 CHAPTER 2 The Probability ofa Single Event: Prey Capture by Carnivorous Plants 4 Random Variables and Estimating Probabilities by Sampling 7 Probability Distributions 25 Problems in the Definition ofProbability 9 The Mathematics ofProbability 11 Discrete Random Variables 26 Defining the Sample Space 11 Bernoulli Random Variables 26 Complex and Shared Events:Combining An Example ofa Bernoulli Trial 27 Simple Probabilities 13 Many Bernoulli Trials = A Binomial Random Probability Calculations:Milkweeds and Variable 28 Caterpillars 15 The Binomial Distribution 31 Complex and Shared Events:Rules for Poisson Random Variables 34 Combining Sets 18 An Example ofa Poisson Random Variable: Conditional Probabilities 21 Distribution ofa Rare Plant 36 Contents ix The Expected Value ofa Discrete Random CHAPTER 4 Variable 39 Framing and Testing The Variance ofa Discrete Random Variable 39 Continuous Random Variables 41 Hypotheses 79 Uniform Random Variables 42 Scientific Methods 80 The Expected Value ofa Continuous Random Deduction and Induction 81 Variable 45 Modern-Day Induction:Bayesian Inference 84 Normal Random Variables 46 The Hypothetico-Deductive Method 87 Useful Properties ofthe Normal Testing Statistical Hypotheses 90 Distribution 48 Statistical Hypotheses versus Scientific Other Continuous Random Variables 50 Hypotheses 90 The Central Limit Theorem 53 Statistical Significance and P-Values 91 Summary 54 Errors in Hypothesis Testing 100 Parameter Estimation and Prediction 104 CHAPTER 3 Summary 105 Summary Statistics: Measures CHAPTER 5 of Location and Spread 57 Three Frameworks for Measures ofLocation 58 Statistical Analysis 107 The Arithmetic Mean 58 Other Means 60 Sample Problem 107 Other Measures ofLocation:The Median and Monte Carlo Analysis 109 the Mode 64 Step 1:Specifying the Test Statistic 111 When to Use Each Measure ofLocation 65 Step 2:Creating the Null Distribution 111 Measures ofSpread 66 Step 3:Deciding on a One- or Two-Tailed The Variance and the Standard Deviation 66 Test 112 The Standard Error ofthe Mean 67 Step 4:Calculating the Tail Probability 114 Skewness,Kurtosis,and Central Moments 69 Assumptions ofthe Monte Carlo Method 115 Quantiles 71 Advantages and Disadvantages ofthe Monte Using Measures ofSpread 72 Carlo Method 115 Parametric Analysis 117 Some Philosophical Issues Surrounding Summary Statistics 73 Step 1:Specifying the Test Statistic 117 Confidence Intervals 74 Step 2:Specifying the Null Distribution 119 Generalized Confidence Intervals 76 Step 3:Calculating the Tail Probability 119 Assumptions ofthe Parametric Method 120 Summary 78 Advantages and Disadvantages ofthe Parametric Method 121