## Preface

I have three vivid memories about learning statistics as an undergraduate that all involve misconceptions. Firstly, I remember my lecturer telling me that, after obtaining a result that was not statistically significant, I should conclude that timber harvesting did not have an effect (on what, I cannot remember). While the logic was flawed, I have since realized that it is a misconception shared by many ecologists.

My second memory is of reading about Bayesian analyses in journal articles. I wondered what Bayesian methods were, how they differed from the statistical approaches I had been taught (frequentist methods such as null hypothesis testing and construction of confidence intervals), and why I had never heard of them before. On reading the articles, I concluded that Bayesian methods must be hard to do. It turns out that I was incorrect again.

My third memory is that statistics was boring. I was wrong again. I was reasonably good at the mathematics involved, but it was not until I started doing my own data analyses during my Ph.D. that I saw the benefits of using statistics. I began to learn about different ways to do statistics (e.g. likelihood-based methods), and also re-learnt some old topics (e.g. realizing the importance of and learning how to calculate statistical power). For me, statistics and probability continue to be a world of learning.

This book represents a stage in my journey through the world of statistics. It is born out of a frustration with how conventional statistical methods are misused in ecology on a routine basis, and a belief that Bayesian methods are relevant and useful. I hope this book convinces readers of the value of Bayesian methods and helps them learn Bayesian methods more quickly than me.

Approximately five years ago I used null hypothesis significance testing to evaluate the predictions of some models of population viability. An astute reviewer questioned this approach because the models were surely known to be wrong a priori. The reviewer provided a glorious list of quotes that attacked null hypothesis significance testing (not unlike the quotes in Chapter 2). I started thinking about alternatives, leading me to Hilborn and Mangel's (1997) The Ecological Detective, and beyond.

The Ecological Detective (Hilborn and Mangel, 1997) is one of the best books available to ecologists for learning about Bayesian methods. However, ecologists wishing to use the suggested methods need at least some skills in computer programming. I intend my book to provide a bridge between a desire to conduct Bayesian analyses and the book by Hilborn and Mangel (1997). WinBUGS code for the analyses in this book is available from http://arcue.botany.unimelb.edu.au/bayes.html.

The bridge is built by using the freely available program WinBUGS (Spiegelhalter et al., 2005; Appendix A) to conduct the vast majority of analyses in this book. I try to start gently, illustrating the most basic analyses, before giving some more complicated examples. More experienced users will find some analyses trivial, and novices may find some examples impenetrable. The aim is to provide a sufficient diversity of examples that the reader will be able to learn how to construct their own statistical models and conduct their own analyses.

This book is not necessarily designed to be read from cover to cover. Read Chapters 1 and 2 if you wish to know more about the differences between Bayesian and frequentist methods. If you just want to learn how to conduct Bayesian analyses, start with Chapter 1, Appendix A, and then move to Chapter 3 or whichever topic is most relevant. As you become more familiar with Bayesian methods, the entire content of the book will become more accessible.

I have many people to thank for their help while writing this book. Ralph Mac Nally and Alan Crowden's suggestion to write this book started the ball rolling. Brendan Wintle has been extremely important as a colleague, a source of advice and insights, and a sounding board for ideas. Kirsten Parris, David Lindenmayer, Jane Elith, Pip Masters, Linda Broome, Tara Martin, Mark McDonnell, Michael Harper, Brendan Wintle, Amy Hahs, Rodney van der Ree and many others have provided data for analysis over the years. I would have learnt very little without them.

This book owes much to the availability of WinBUGS, and I thank the team that developed the software. In particular, David Spiegelhalter,

Andrew Thomas and Bob O'Hara have answered questions and investigated software bugs from time to time.

Hugh Possingham, Mark Burgman, David Lindenmayer and Mark McDonnell have provided opportunities for me to conduct research into risk assessment, and the use of Bayesian methods. They have been influential, as have Fiona Fidler, Neil Thomason and my colleagues listed above. Various funding agencies have supported my research, with the Australian Research Council and The Baker Foundation being particularly generous.

I'd like to thank my parents David and Sue for fostering my interests in mathematics and ecology, and Dr John Gault for his enthusiastic interest in Bayesian issues of a medical nature.

Finally, thank you to everyone who has provided comments, in particular Mark Burgman, Geoff Cumming, Aaron Ellison, Ralph Mac Nally, Kirsten Parris, Gerry Quinn and Julia Stammers, who read most if not all of earlier drafts. Peter Baxter, Barry Brook, Ryan Chisholm, Gareth Davies, Lou Elliott, Fiona Fidler, Bill Langford, Terry Walshe and Nick Williams also provided helpful comments on various sections.