Probability with R. Jane M. Horgan
Чтение книги онлайн.
Читать онлайн книгу Probability with R - Jane M. Horgan страница 13
![Probability with R - Jane M. Horgan Probability with R - Jane M. Horgan](/cover_pre848404.jpg)
Part IV deals with continuous random variables. The exponential distribution is introduced as the waiting time between Poisson occurrences, and the graphical facilities of R illustrate the models. The Markov memoryless property is simulated using R. Some applications of the exponential distribution are investigated, notably in the areas of reliability and queues. R is used to model response times with varying traffic intensities. We have examined models for server queue lengths without using any of the formulae typical in a traditional approach. The normal distribution and some of its applications are discussed. It is shown how R can be used, both to illustrate limiting distributions and as a set of statistical tables.
Part V addresses the problem of obtaining probability bounds on the runtime of new algorithms when the distribution is unknown. Here Markov and Chebyshev inequalities provide estimates of probability when the information about the random variable is limited.
The exercises and projects at the end of each chapter are an integral part of the exposition. Many of them require the use of R, in some cases to perform routine calculations and in others to conduct experiments on simulated data. The projects are designed to improve the students' understanding of how probability interacts with computing.
This is a self‐contained book with no need for ancillary material, other than, of course, the programming language R. There is a freely downloadable manual (Venables, W.N., Smith, D.M., and the R Development Core Team (2004). An Introduction to R: A Programming Environment for Data Analysis and Graphics, Version 2.6.2).
Students should be encouraged to use this in conjunction with the text. One of the big attractions of R is that it is open source. Most other systems, such as Matlab and Mathematica, require a license; apart from the expense, this makes access more difficult, and the student more likely not to use them.
Jane M. Horgan
Dublin City University 2008
Acknowledgments
The generous contributions of James Power from Maynooth University and Charlie Daly from Dublin City University have much improved this second edition. I am deeply appreciative of their advice and help, and their provision of many relevant examples in areas of computing that have evolved since the first edition was published. They also read much of the new material and supplied valuable feedback. As I write this, we are in a state of shock at the sudden and untimely death of our close friend and colleague James Power. Maynooth University, Computer Science in Ireland and the Academic World generally are greatly diminished by his departure. It is difficult to accept his absence. We had so much more to learn from him.
I owe a huge debt of gratitude to Helen Fallon, Deputy Librarian at Maynooth University, who provided library facilities and ongoing assistance with the tracking down of material, relevant articles, and books.
A special word of thanks to my technical advisors: Systems analyst Rosaleen McGrath provided invaluable advice and help with file management. Jim Doyle and Eugene Curran continued to ensure that I had the best hardware and best software. Mathematician Robin Harte checked the mathematical derivations in the appendices and helped with the final edit.
As teachers, we should always remember that not only do we teach but also we are taught. Throughout my working life, I have been privileged to work with students, both in Ireland and abroad, who never ceased to inspire me. I am indebted to all who took this course over the years, and provided invaluable comments and constructive suggestions. I also appreciate the feedback from instructors who used the original version of the book, as well as those who reviewed it. Thank you to those who sent me words of appreciation, alerted me to errata and made useful suggestions. I hope you will continue to do so. My email address is
I continue to be indebted to the developers and the core team of R for maintaining and extending the R system which is so important for teaching and research. As always, it has been a pleasure to work with the production team of John Wiley & Sons.
Thanks to my colleague and neighbor Margaret Byrne for her ongoing catchphrase “will that book of yours ever get finished?”; to all my friends in Kuşadası for putting up with me; apologies for those cancelled Turkish classes, missed appointments, lunch dates, and nights out.
Finally, let me thank my gambling trio. Jane, the former princess, is now a queen of hearts, Amy, once a pirate, is now the club ace, and the precious diamond Ava, not around in time for the first edition, is the youngest member of the club, and a force to be reckoned with.
Jane M. Horgan
2019
About the Companion Website
This book is accompanied by a companion website:
www.wiley.com/go/Horgan/probabilitywithr2e
The website includes the following materials:
the data file in electronic form;
solutions to selected exercises for students;
full set of solutions for instructors.
1 Basics of R
This chapter introduces R and describes some of its basic operations and editing procedures. The syntax used to read and edit statistical data and to perform some basic statistical calculations is given.
It is not the intention to provide a complete set of features of the language, but rather to give a flavor of the structure of R and how to get help to proceed further. Additional features are introduced in later chapters as the need for them arises.
1.1 What Is R?
R is a data‐analysis system, a sophisticated calculator and an object‐oriented programming language. It provides an environment for statistical analysis and graphics that differs from standard statistical packages such as SPSS and Minitab; these provide point‐and‐click graphical‐user interfaces (GUIs), while R is command‐driven. Users type commands at a prompt, and the R interpreter responds.
It is possible to get quite far using R to execute simple