Probability with R, 2nd Edition

Book description

Provides a comprehensive introduction to probability with an emphasis on computing-related applications

This self-contained new and extended edition outlines a first course in probability applied to computer-related disciplines. As in the first edition, experimentation and simulation are favoured over mathematical proofs. The freely down-loadable statistical programming language is used throughout the text, not only as a tool for calculation and data analysis, but also to illustrate concepts of probability and to simulate distributions. The examples in Probability with R: An Introduction with Computer Science Applications, Second Edition cover a wide range of computer science applications, including: testing program performance; measuring response time and CPU time; estimating the reliability of components and systems; evaluating algorithms and queuing systems. 

Chapters cover: The R language; summarizing statistical data; graphical displays; the fundamentals of probability; reliability; discrete and continuous distributions; and more. 

This second edition includes:

  • improved R code throughout the text, as well as new procedures, packages and interfaces;
  • updated and additional examples, exercises and projects covering recent developments of computing;
  • an introduction to bivariate discrete distributions together with the R functions used to handle large matrices of conditional probabilities, which are often needed in machine translation;
  • an introduction to linear regression with particular emphasis on its application to machine learning using testing and training data;
  • a new section on spam filtering using Bayes theorem to develop the filters;
  • an extended range of Poisson applications such as network failures, website hits, virus attacks and accessing the cloud;
  • use of new allocation functions in R to deal with hash table collision, server overload and the general allocation problem.

The book is supplemented with a Wiley Book Companion Site featuring data and solutions to exercises within the book.

Primarily addressed to students of computer science and related areas, Probability with R: An Introduction with Computer Science Applications, Second Edition is also an excellent text for students of engineering and the general sciences. Computing professionals who need to understand the relevance of probability in their areas of practice will find it useful.

Table of contents

  1. Cover
  2. Preface to the Second Edition
  3. Preface to the First Edition
  4. Acknowledgments
  5. About the Companion Website
  6. Part I: The R Language
    1. 1 Basics of R
      1. 1.1 What Is R?
      2. 1.2 Installing R
      3. 1.3 R Documentation
      4. 1.4 Basics
      5. 1.5 Getting Help
      6. 1.6 Data Entry
      7. 1.7 Missing Values
      8. 1.8 Editing
      9. 1.9 Tidying Up
      10. 1.10 Saving and Retrieving
      11. 1.11 Packages
      12. 1.12 Interfaces
      13. 1.13 Project
      14. Reference
    2. 2 Summarizing Statistical Data
      1. 2.1 Measures of Central Tendency
      2. 2.2 Measures of Dispersion
      3. 2.3 Overall Summary Statistics
      4. 2.4 Programming in R
      5. 2.5 Project
    3. 3 Graphical Displays
      1. 3.1 BOXPLOTS
      2. 3.2 HISTOGRAMS
      3. 3.3 STEM AND LEAF
      4. 3.4 SCATTER PLOTS
      5. 3.5 THE LINE OF BEST FIT
      6. 3.6 MACHINE LEARNING AND THE LINE OF BEST FIT
      7. 3.7 GRAPHICAL DISPLAYS VERSUS SUMMARY STATISTICS
      8. 3.8 Projects
      9. References
  7. Part II: Fundamentals of Probability
    1. 4 Probability Basics
      1. 4.1 Experiments, Sample Spaces, and Events
      2. 4.2 Classical Approach to Probability
      3. 4.3 Permutations and Combinations
      4. 4.4 The Birthday Problem
      5. 4.5 Balls and Bins
      6. 4.6 R Functions for Allocation
      7. 4.7 Allocation Overload
      8. 4.8 Relative Frequency Approach to Probability
      9. 4.9 Simulating Probabilities
      10. 4.10 Projects
      11. Recommended Reading
    2. 5 Rules of Probability
      1. 5.1 Probability and Sets
      2. 5.2 Mutually Exclusive Events
      3. 5.3 Complementary Events
      4. 5.4 Axioms of Probability
      5. 5.5 Properties of Probability
      6. Supplementary Reading
    3. 6 Conditional Probability
      1. 6.1 Multiplication Law of Probability
      2. 6.2 Independent Events
      3. 6.3 Independence of More than Two Events
      4. 6.4 The Intel FIASCO
      5. 6.5 Law of Total Probability
      6. 6.6 Trees
      7. 6.7 Project
      8. Note
    4. 7 Posterior Probability and Bayes
      1. 7.1 Bayes' Rule
      2. 7.2 Hardware Fault Diagnosis
      3. 7.3 Machine Learning and Classification
      4. 7.4 Spam Filtering
      5. 7.5 Machine Translation
      6. Reference
    5. 8 Reliability
      1. 8.1 Series Systems
      2. 8.2 Parallel Systems
      3. 8.3 Reliability of a System
      4. 8.4 Series–Parallel Systems
      5. 8.5 The Design of Systems
      6. 8.6 The General System
  8. Part III: Discrete Distributions
    1. 9 Introduction to Discrete Distributions
      1. 9.1 Discrete Random Variables
      2. 9.2 Cumulative Distribution Function
      3. 9.3 Some Simple Discrete Distributions
      4. 9.4 Benford's Law
      5. 9.5 Summarizing Random Variables: Expectation
      6. 9.6 Properties of Expectations
      7. 9.7 Simulating Discrete Random Variables and Expectations
      8. 9.8 Bivariate Distributions
      9. 9.9 Marginal Distributions
      10. 9.10 Conditional Distributions
      11. 9.11 Project
      12. References
    2. 10 The Geometric Distribution
      1. 10.1 GEOMETRIC RANDOM VARIABLES
      2. 10.2 CUMULATIVE DISTRIBUTION FUNCTION
      3. 10.3 THE QUANTILE FUNCTION
      4. 10.4 GEOMETRIC EXPECTATIONS
      5. 10.5 SIMULATING GEOMETRIC PROBABILITIES AND EXPECTATIONS
      6. 10.6 AMNESIA
      7. 10.7 SIMULATING MARKOV
      8. 10.8 PROJECTS
    3. 11 The Binomial Distribution
      1. 11.1 Binomial Probabilities
      2. 11.2 Binomial Random Variables
      3. 11.3 Cumulative Distribution Function
      4. 11.4 The Quantile Function
      5. 11.5 Reliability: The General System
      6. 11.6 Machine Learning
      7. 11.7 Binomial Expectations
      8. 11.8 Simulating Binomial Probabilities and Expectations
      9. 11.9 Projects
    4. 12 The Hypergeometric Distribution
      1. 12.1 Hypergeometric Random Variables
      2. 12.2 Cumulative Distribution Function
      3. 12.3 The Lottery
      4. 12.4 Hypergeometric or Binomial?
      5. 12.5 Projects
    5. 13 The Poisson Distribution
      1. 13.1 Death by Horse Kick
      2. 13.2 Limiting Binomial Distribution
      3. 13.3 Random Events in Time and Space
      4. 13.4 Probability Density Function
      5. 13.5 Cumulative Distribution Function
      6. 13.6 The Quantile Function
      7. 13.7 Estimating Software Reliability
      8. 13.8 Modeling Defects In Integrated Circuits
      9. 13.9 Simulating Poisson Probabilities
      10. 13.10 Projects
      11. References
    6. 14 Sampling Inspection Schemes
      1. 14.1 Introduction
      2. 14.2 Single Sampling Inspection Schemes
      3. 14.3 Acceptance Probabilities
      4. 14.4 Simulating Sampling Inspection Schemes
      5. 14.5 Operating Characteristic Curve
      6. 14.6 Producer's and Consumer's Risks
      7. 14.7 Design of Sampling Schemes
      8. 14.8 Rectifying Sampling Inspection Schemes
      9. 14.9 Average Outgoing Quality
      10. 14.10 Double Sampling Inspection Schemes
      11. 14.11 Average Sample Size
      12. 14.12 Single Versus Double Schemes
      13. 14.13 Projects
  9. Part IV: Continuous Distributions
    1. 15 Introduction to Continuous Distributions
      1. 15.1 Introduction to Continuous Random Variables
      2. 15.2 Probability Density Function
      3. 15.3 Cumulative Distribution Function
      4. 15.4 The Uniform Distribution
      5. 15.5 Expectation of a Continuous Random Variable
      6. 15.6 Simulating Continuous Variables
    2. 16 The Exponential Distribution
      1. 16.1 Modeling Waiting Times
      2. 16.2 Probability Density Function of Waiting Times
      3. 16.3 Cumulative Distribution Function
      4. 16.4 Modeling Lifetimes
      5. 16.5 Quantiles
      6. 16.6 Exponential Expectations
      7. 16.7 Simulating Exponential Probabilities and Expectations
      8. 16.8 Amnesia
      9. 16.9 Simulating Markov
      10. 16.10 Project
    3. 17 Queues
      1. 17.1 The Single Server Queue
      2. 17.2 Traffic Intensity
      3. 17.3 Queue Length
      4. 17.4 Average Response Time
      5. 17.5 Extensions of the M/M/1 Queue
      6. 17.6 Project
      7. Reference
      8. Notes
    4. 18 The Normal Distribution
      1. 18.1 The Normal Probability Density Function
      2. 18.2 The Cumulative Distribution Function
      3. 18.3 Quantiles
      4. 18.4 The Standard Normal Distribution
      5. 18.5 Achieving Normality: Limiting Distributions
      6. 18.6 Projects
    5. 19 Process Control
      1. 19.1 Control Charts
      2. 19.2 Cusum Charts
      3. 19.3 Charts for Defective Rates
      4. 19.4 Project
  10. Part V: Tailing Off
    1. 20 The Inequalities of Markov and Chebyshev
      1. 20.1 Markov's Inequality
      2. 20.2 Algorithm Runtime
      3. 20.3 Chebyshev's Inequality
  11. Appendix A: Data: Examination Results
  12. Appendix B: The Line of Best Fit: Coefficient Derivations
  13. Appendix C: Variance Derivations
    1. C.1 Variance of the Geometric Distribution (Chapter 10)
    2. C.2 Variance of the Binomial Distribution (Chapter 11)
    3. C.3 Variance of the Poisson Distribution (Chapter 13)
    4. C.4 Variance of the Uniform Distribution (Chapter 15)
    5. C.5 Variance of the Exponential Distribution (Chapter 16)
  14. Appendix D: Binomial Approximation to the Hypergeometric
  15. Appendix E: Normal Tables
  16. Appendix F: The Inequalities of Markov and Chebyshev
    1. F.1 Markov's Inequality: A Proof Without Words
    2. F.2 Chebyshev's Inequality: Markov's in Disguise
  17. Index to R Commands
  18. Index
  19. Postface
  20. End User License Agreement

Product information

  • Title: Probability with R, 2nd Edition
  • Author(s): Jane M. Horgan
  • Release date: January 2020
  • Publisher(s): Wiley
  • ISBN: 9781119536949