*Table of contents : Probability.- Discrete Random Variables and Probability Distributions.- Continuous Random Variables and Probability Distributions.- Joint probability distributions and their applications.- The Basics of Statistical Inference.- Markov chains.- Random processes.- Introduction to signal processing.*

Springer Texts in Statistics

Matthew A. Carlton Jay L. Devore

Probability with Applications in Engineering, Science, and Technology Second Edition

Springer Texts in Statistics Series Editors R. DeVeaux S.E. Fienberg I. Olkin

More information about this series at http://www.springer.com/series/417

Matthew A. Carlton • Jay L. Devore

Probability with Applications in Engineering, Science, and Technology Second Edition

Editors Matthew A. Carlton Department of Statistics California Polytechnic State University San Luis Obispo, CA, USA

Jay L. Devore Department of Statistics California Polytechnic State University San Luis Obispo, CA, USA

Additional material to this book can be downloaded from http://extras.springer.com. ISSN 1431-875X ISSN 2197-4136 (eBook) Springer Texts in Statistics ISBN 978-3-319-52400-9 ISBN 978-3-319-52401-6 (eBook) DOI 10.1007/978-3-319-52401-6 Library of Congress Control Number: 2017932278 # Springer International Publishing AG 2014, 2017 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. Printed on acid-free paper This Springer imprint is published by Springer Nature The registered company is Springer International Publishing AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

Preface

Purpose Our objective is to provide a post-calculus introduction to the subject of probability that • • • •

Has mathematical integrity and contains some underlying theory Shows students a broad range of applications involving real problem scenarios Is current in its selection of topics Is accessible to a wide audience, including mathematics and statistics majors (yes, there are a few of the latter, and their numbers are growing), prospective engineers and scientists, and business and social science majors interested in the quantitative aspects of their disciplines • Illustrates the importance of software for carrying out simulations when answers to questions cannot be obtained analytically A number of currently available probability texts are heavily oriented toward a rigorous mathematical development of probability, with much emphasis on theorems, proofs, and derivations. Even when applied material is included, the scenarios are often contrived (many examples and exercises involving dice, coins, cards, and widgets). So in our exposition we have tried to achieve a balance between mathematical foundations and the application of probability to real-world problems. It is our belief that the theory of probability by itself is often not enough of a “hook” to get students interested in further work in the subject. We think that the best way to persuade students to continue their probabilistic education beyond a first course is to show them how the methodology is used in practice. Let’s first seduce them (figuratively speaking, of course) with intriguing problem scenarios and applications. Opportunities for exposure to mathematical rigor will follow in due course.

Content The book begins with an Introduction, which contains our attempt to address the following question: “Why study probability?” Here we are trying to tantalize students with a number of intriguing problem scenarios—coupon collection, birth and death processes, reliability engineering, finance, queuing models, and various conundrums involving the misinterpretation of probabilistic information (e.g., Benford’s Law and the detection of fraudulent data, birthday problems, and the likelihood of having a rare disease when a diagnostic test result is positive). Most of the exposition contains references to recently published results. It is not necessary or even desirable to cover very much of this motivational material in the classroom. Instead, we suggest that instructors ask their students to read selectively outside class (a bit of pleasure reading at the very beginning of the term should not be

v

vi

Preface

an undue burden!). Subsequent chapters make little reference to the examples herein, and separating out our “pep talk” should make it easier to cover as little or much as an instructor deems appropriate. Chapter 1 covers sample spaces and events, the axioms of probability and derived properties, counting, conditional probability, and independence. Discrete random variables and distributions are the subject of Chap. 2, and Chap. 3 introduces continuous random variables and their distributions. Joint probability distributions are the focus of Chap. 4, including marginal and conditional distributions, expectation of a function of several variables, correlation, modes of convergence, the Central Limit Theorem, reliability of systems of components, the distribution of a linear combination, and some results on order statistics. These four chapters constitute the core of the book. The remaining chapters build on the core in various ways. Chapter 5 introduces methods of statistical inference—point estimation, the use of statistical intervals, and hypothesis testing. In Chap. 6 we cover basic properties of discrete-time Markov chains. Various other random processes and their properties, including stationarity and its consequences, Poisson processes, Brownian motion, and continuous-time Markov chains, are discussed in Chap. 7. The final chapter presents some elementary concepts and methods in the area of signal processing. One feature of our book that distinguishes it from the competition is a section at the end of almost every chapter that considers simulation methods for getting approximate answers when exact results are difficult or impossible to obtain. Both the R software and Matlab are employed for this purpose. Another noteworthy aspect of the book is the inclusion of roughly 1100 exercises; the first four core chapters together have about 700 exercises. There are numerous exercises at the end of each section and also supplementary exercises at the end of every chapter. Probability at its heart is concerned with problem solving. A student cannot hope to really learn the material simply by sitting passively in the classroom and listening to the instructor. He/she must get actively involved in working problems. To this end, we have provided a wide spectrum of exercises, ranging from straightforward to reasonably challenging. It should be easy for an instructor to find enough problems at various levels of difficulty to keep students gainfully occupied.

Mathematical Level The challenge for students at this level should be to master the concepts and methods to a sufficient degree that problems encountered in the real world can be solved. Most of our exercises are of this type, and relatively few ask for proofs or derivations. Consequently, the mathematical prerequisites and demands are reasonably modest. Mathematical sophistication and quantitative reasoning ability are, of course, crucial to the enterprise. Univariate calculus is employed in the continuous distribution calculations of Chap. 3 as well as in obtaining maximum likelihood estimators in the inference chapter. But even here the functions we ask students to work with are straightforward—generally polynomials, exponentials, and logs. A stronger background is required for the signal processing material at the end of the book (we have included a brief mathematical appendix as a refresher for relevant properties). Multivariate calculus is used in the section on joint distributions in Chap. 4 and thereafter appears rather rarely. Exposure to matrix algebra is needed for the Markov chain material.

Recommended Coverage Our book contains enough material for a year-long course, though we expect that many instructors will use it for a single term (one semester or one quarter). To give a sense of what might be reasonable, we now briefly describe three courses at our home institution, Cal Poly State University (in San Luis Obispo, CA), for which this book is appropriate. Syllabi with expanded course outlines are available for download on the book’s website at Springer.com.

Preface

vii

Title:

Introduction to Probability and Simulation

Introduction to Probability Models

Probability and Random Processes for Engineers

Main audience:

Statistics and math majors

Statistics and math majors

Electrical and computer engineering majors

Prerequisites:

Univariate calculus, computer programming

Univariate calculus, computer programming, matrix algebra

Multivariate calculus, continuoustime signals incl. Fourier analysis

Sections covered:

1.1–1.6

1.1–1.6

1.1–1.5

2.1–2.6, 2.8

2.1–2.5, 2.8

2.1–2.5

3.1–3.4, 3.8

3.1–3.4, 3.8

3.1–3.5

4.1–4.3, 4.5

4.1–4.3, 4.5, 4.8

4.1–4.3, 4.5, 4.7

6.1–6.5

7.1–7.3, 7.5–7.6

7.5

8.1–8.2

Both of the first two courses place heavy emphasis on computer simulation of random phenomena; instructors typically have students work in R. As is evident from the lists of sections covered, Introduction to Probability Models takes the earlier material at a faster pace in order to leave a few weeks at the end for Markov chains and some other applications (typically reliability theory and a bit about Poisson processes). In our experience, the computer programming prerequisite is essential for students’ success in those two courses. The third course listed, Probability and Random Processes for Engineers, is our university’s version of the traditional “random signals and noise” course offered by many electrical engineering departments. Again, the first four chapters are covered at a somewhat accelerated pace, with about 30–40% of the course dedicated to time and frequency representations of random processes (Chaps. 7 and 8). Simulation of random phenomena is not emphasized in our course, though we make liberal use of Matlab for demonstrations. We are able to cover as much material as indicated on the foregoing syllabi with the aid of a notso-secret weapon: we prepare and require that students bring to class a course booklet. The booklet contains most of the examples we present as well as some surrounding material. A typical example begins with a problem statement and then poses several questions (as in the exercises in this book). After each posed question there is some blank space so the student can either take notes as the solution is developed in class or else work the problem on his/her own if asked to do so. Because students have a booklet, the instructor does not have to write as much on the board as would otherwise be necessary and the student does not have to do as much writing to take notes. Both the instructor and the students benefit. We also like to think that students can be asked to read an occasional subsection or even section on their own and then work exercises to demonstrate understanding, so that not everything needs to be presented in class. For example, we have found that assigning a take-home exam problem that requires reading about the Weibull and/or lognormal distributions is a good way to acquaint students with them. But instructors should always keep in mind that there is never enough time in a course of any duration to teach students all that we’d like them to know. Hopefully students will like the book enough to keep it after the course is over and use it as a basis for extending their knowledge of probability!

viii

Preface

Acknowledgments We gratefully acknowledge the plentiful feedback provided by the following reviewers: Allan Gut, Murad Taqqu, Mark Schilling and Robert Heiny. We very much appreciate the production services provided by the folks at SPi Technologies. Our production editors, Sasireka. K and Maria David did a first-rate job of moving the book through the production process and were always prompt and considerate in communications with us. Thanks to our copyeditors at SPi for employing a light touch and not taking us too much to task for our occasional grammatical and stylistic lapses. The staff at Springer U.S. has been especially supportive during both the developmental and production stages; special kudos go to Michael Penn and Rebekah McClure.

A Final Thought It is our hope that students completing a course taught from this book will feel as passionately about the subject of probability as we still do after so many years of living with it. Only teachers can really appreciate how gratifying it is to hear from a student after he/she has completed a course that the experience had a positive impact and maybe even affected a career choice. San Luis Obispo, CA San Luis Obispo, CA

Matthew A. Carlton Jay L. Devore

Contents

1

Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Sample Spaces and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 The Sample Space of an Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3 Some Relations from Set Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.4 Exercises: Section 1.1 (1–12) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Axioms, Interpretations, and Properties of Probability . . . . . . . . . . . . . . . . . . . . 1.2.1 Interpreting Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 More Probability Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Determining Probabilities Systematically . . . . . . . . . . . . . . . . . . . . . . 1.2.4 Equally Likely Outcomes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.5 Exercises: Section 1.2 (13–30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Counting Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 The Fundamental Counting Principle . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.3 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.4 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.5 Exercises: Section 1.3 (31–49) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Conditional Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 The Definition of Conditional Probability . . . . . . . . . . . . . . . . . . . . . . 1.4.2 The Multiplication Rule for P(A \ B) . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 The Law of Total Probability and Bayes’ Theorem . . . . . . . . . . . . . . . 1.4.4 Exercises: Section 1.4 (50–78) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5.1 P(A \ B) When Events Are Independent . . . . . . . . . . . . . . . . . . . . . . . 1.5.2 Independence of More than Two Events . . . . . . . . . . . . . . . . . . . . . . . 1.5.3 Exercises: Section 1.5 (79–100) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Simulation of Random Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.1 The Backbone of Simulation: Random Number Generators . . . . . . . . . 1.6.2 Precision of Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.3 Exercises: Section 1.6 (101–120) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7 Supplementary Exercises (121–150) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 1 1 3 4 5 7 9 11 13 14 14 18 18 19 20 22 25 29 30 32 34 37 43 44 45 47 51 51 55 56 60

2

Discrete Random Variables and Probability Distributions . . . . . . . . . . . . . . . . . . 2.1 Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Two Types of Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Exercises: Section 2.1 (1–10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . .

67 67 69 70

. . . .

ix

x

Contents

2.2

Probability Distributions for Discrete Random Variables . . . . . . . . . . . . . . . . . . 2.2.1 A Parameter of a Probability Distribution . . . . . . . . . . . . . . . . . . . . . . 2.2.2 The Cumulative Distribution Function . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Another View of Probability Mass Functions . . . . . . . . . . . . . . . . . . . . 2.2.4 Exercises: Section 2.2 (11–28) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expected Value and Standard Deviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 The Expected Value of X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 The Expected Value of a Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.3 The Variance and Standard Deviation of X . . . . . . . . . . . . . . . . . . . . . 2.3.4 Properties of Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.5 Exercises: Section 2.3 (29–48) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 The Binomial Random Variable and Distribution . . . . . . . . . . . . . . . . . 2.4.2 Computing Binomial Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 The Mean and Variance of a Binomial Random Variable . . . . . . . . . . . 2.4.4 Binomial Calculations with Software . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.5 Exercises: Section 2.4 (49–74) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Poisson Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 The Poisson Distribution as a Limit . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 The Mean and Variance of a Poisson Random Variable . . . . . . . . . . . . 2.5.3 The Poisson Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.4 Poisson Calculations with Software . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.5 Exercises: Section 2.5 (75–89) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Discrete Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6.1 The Hypergeometric Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6.2 The Negative Binomial and Geometric Distributions . . . . . . . . . . . . . . 2.6.3 Alternative Definition of the Negative Binomial Distribution . . . . . . . . 2.6.4 Exercises: Section 2.6 (90–106) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moments and Moment Generating Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7.1 The Moment Generating Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7.2 Obtaining Moments from the MGF . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7.3 MGFs of Common Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7.4 Exercises: Section 2.7 (107–128) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation of Discrete Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8.1 Simulations Implemented in R and Matlab . . . . . . . . . . . . . . . . . . . . . 2.8.2 Simulation Mean, Standard Deviation, and Precision . . . . . . . . . . . . . . 2.8.3 Exercises: Section 2.8 (129–141) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supplementary Exercises (142–170) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71 74 75 78 79 83 83 86 88 90 91 95 97 99 101 102 102 107 107 110 110 111 111 114 114 117 120 120 123 125 127 128 129 131 134 135 138 140

Continuous Random Variables and Probability Distributions . . . . . . . . . . . . . . . . 3.1 Probability Density Functions and Cumulative Distribution Functions . . . . . . . . 3.1.1 Probability Distributions for Continuous Variables . . . . . . . . . . . . . . . . 3.1.2 The Cumulative Distribution Function . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Using F(x) to Compute Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.4 Obtaining f(x) from F(x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.5 Percentiles of a Continuous Distribution . . . . . . . . . . . . . . . . . . . . . . . 3.1.6 Exercises: Section 3.1 (1–18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Expected Values and Moment Generating Functions . . . . . . . . . . . . . . . . . . . . . 3.2.1 Expected Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Moment Generating Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.3 Exercises: Section 3.2(19–38) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . .

147 147 148 152 154 155 156 158 162 162 166 168

2.3

2.4

2.5

2.6

2.7

2.8

2.9 3

Contents

3.3

3.4

3.5

3.6

3.7 3.8

3.9 4

xi

The Normal (Gaussian) Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 The Standard Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Non-standardized Normal Distributions . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 The Normal MGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4 The Normal Distribution and Discrete Populations . . . . . . . . . . . . . . . . 3.3.5 Approximating the Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . 3.3.6 Normal Distribution Calculations with Software . . . . . . . . . . . . . . . . . 3.3.7 Exercises: Section 3.3 (39–70) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Exponential and Gamma Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 The Exponential Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 The Gamma Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3 The Gamma MGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4 Gamma and Exponential Calculations with Software . . . . . . . . . . . . . . 3.4.5 Exercises: Section 3.4 (71–83) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Continuous Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 The Weibull Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 The Lognormal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.3 The Beta Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.4 Exercises: Section 3.5 (84–100) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Probability Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.1 Sample Percentiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.2 A Probability Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.3 Departures from Normality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.4 Beyond Normality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.5 Probability Plots in Matlab and R . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.6 Exercises: Section 3.6 (101–111) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transformations of a Random Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7.1 Exercises: Section 3.7 (112–128) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation of Continuous Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.1 The Inverse CDF Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.2 The Accept–Reject Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.3 Built-In Simulation Packages for Matlab and R . . . . . . . . . . . . . . . . . . 3.8.4 Precision of Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.5 Exercises: Section 3.8 (129–139) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supplementary Exercises (140–172) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Joint Probability Distributions and Their Applications . . . . . . . . . . . . . . . . . . . . . 4.1 Jointly Distributed Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 The Joint Probability Mass Function for Two Discrete Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 The Joint Probability Density Function for Two Continuous Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.3 Independent Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.4 More Than Two Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.5 Exercises: Section 4.1 (1–22) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Expected Values, Covariance, and Correlation . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Properties of Expected Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Covariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

172 173 175 178 179 180 182 182 187 188 190 193 193 194 196 196 199 201 202 205 205 206 209 211 213 213 216 220 221 221 224 227 227 228 230

. 239 . 239 . 240 . . . . . . . .

241 245 246 249 255 256 257 259

xii

Contents

4.2.4 Correlation Versus Causation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.5 Exercises: Section 4.2 (23–42) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Properties of Linear Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 The PDF of a Sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Moment Generating Functions for Linear Combinations . . . . . . . . . . . . 4.3.3 Exercises: Section 4.3 (43–65) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conditional Distributions and Conditional Expectation . . . . . . . . . . . . . . . . . . . 4.4.1 Conditional Distributions and Independence . . . . . . . . . . . . . . . . . . . . 4.4.2 Conditional Expectation and Variance . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.3 The Laws of Total Expectation and Variance . . . . . . . . . . . . . . . . . . . . 4.4.4 Exercises: Section 4.4 (66–84) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Limit Theorems (What Happens as n Gets Large) . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Random Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2 The Central Limit Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.3 Other Applications of the Central Limit Theorem . . . . . . . . . . . . . . . . 4.5.4 The Law of Large Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.5 Exercises: Section 4.5 (85–102) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transformations of Jointly Distributed Random Variables . . . . . . . . . . . . . . . . . 4.6.1 The Joint Distribution of Two New Random Variables . . . . . . . . . . . . 4.6.2 The Joint Distribution of More Than Two New Variables . . . . . . . . . . 4.6.3 Exercises: Section 4.6 (103–110) . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Bivariate Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.1 Conditional Distributions of X and Y . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.2 Regression to the Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.3 The Multivariate Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.4 Bivariate Normal Calculations with Software . . . . . . . . . . . . . . . . . . . 4.7.5 Exercises: Section 4.7 (111–120) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.1 The Reliability Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2 Series and Parallel Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.3 Mean Time to Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.4 Hazard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.5 Exercises: Section 4.8 (121–132) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Order Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.1 The Distributions of Yn and Y1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.2 The Distribution of the ith Order Statistic . . . . . . . . . . . . . . . . . . . . . . 4.9.3 The Joint Distribution of the n Order Statistics . . . . . . . . . . . . . . . . . . 4.9.4 Exercises: Section 4.9 (133–142) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation of Joint Probability Distributions and System Reliability . . . . . . . . . 4.10.1 Simulating Values from a Joint PMF . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.2 Simulating Values from a Joint PDF . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3 Simulating a Bivariate Normal Distribution . . . . . . . . . . . . . . . . . . . . . 4.10.4 Simulation Methods for Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.5 Exercises: Section 4.10 (143–153) . . . . . . . . . . . . . . . . . . . . . . . . . . . Supplementary Exercises (154–192) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

262 262 264 268 270 272 277 279 280 281 286 290 290 293 297 299 300 302 303 306 307 309 311 312 312 313 313 315 315 317 320 321 323 326 326 328 329 331 332 332 334 336 338 340 342

The Basics of Statistical Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Point Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Estimates and Estimators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2 Assessing Estimators: Accuracy and Precision . . . . . . . . . . . . . . . . . . . 5.1.3 Exercises: Section 5.1 (1–23) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . .

351 352 354 357 360

4.3

4.4

4.5

4.6

4.7

4.8

4.9

4.10

4.11 5

Contents

5.2

Maximum Likelihood Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Some Properties of MLEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Exercises: Section 5.2 (24–36) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Confidence Intervals for a Population Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 A Confidence Interval for a Normal Population Mean . . . . . . . . . . . . . 5.3.2 A Large-Sample Confidence Interval for μ . . . . . . . . . . . . . . . . . . . . . 5.3.3 Software for Confidence Interval Calculation . . . . . . . . . . . . . . . . . . . . 5.3.4 Exercises: Section 5.3 (37–50) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing Hypotheses About a Population Mean . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.1 Hypotheses and Test Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.2 Test Procedures for Hypotheses About a Population Mean μ . . . . . . . . 5.4.3 P-Values and the One-Sample t Test . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.4 Errors in Hypothesis Testing and the Power of a Test . . . . . . . . . . . . . 5.4.5 Software for Hypothesis Test Calculation . . . . . . . . . . . . . . . . . . . . . . 5.4.6 Exercises: Section 5.4 (51–76) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inferences for a Population Proportion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.1 Confidence Intervals for p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.2 Hypothesis Testing for p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.3 Software for Inferences about p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.4 Exercises: Section 5.5 (77–97) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bayesian Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.1 The Posterior Distribution of a Parameter . . . . . . . . . . . . . . . . . . . . . . 5.6.2 Inferences from the Posterior Distribution . . . . . . . . . . . . . . . . . . . . . . 5.6.3 Further Comments on Bayesian Inference . . . . . . . . . . . . . . . . . . . . . . 5.6.4 Exercises: Section 5.6 (98–106) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supplementary Exercises (107–138) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . .

366 372 373 375 376 380 381 382 386 386 388 389 392 395 396 401 401 403 405 405 409 410 413 413 414 416

Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Terminology and Basic Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 The Markov Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Exercises: Section 6.1 (1–10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 The Transition Matrix and the Chapman–Kolmogorov Equations . . . . . . . . . . . 6.2.1 The Transition Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Computation of Multistep Transition Probabilities . . . . . . . . . . . . . . . . 6.2.3 Exercises: Section 6.2 (11–22) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Specifying an Initial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.1 A Fixed Initial State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.2 Exercises: Section 6.3 (23–30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Regular Markov Chains and the Steady-State Theorem . . . . . . . . . . . . . . . . . . . 6.4.1 Regular Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.2 The Steady-State Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.3 Interpreting the Steady-State Distribution . . . . . . . . . . . . . . . . . . . . . . 6.4.4 Efficient Computation of Steady-State Probabilities . . . . . . . . . . . . . . . 6.4.5 Irreducible and Periodic Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.6 Exercises: Section 6.4 (31–43) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 Markov Chains with Absorbing States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.1 Time to Absorption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.2 Mean Time to Absorption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.3 Mean First Passage Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.4 Probabilities of Eventual Absorption . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.5 Exercises: Section 6.5 (44–58) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

423 423 426 428 431 431 432 436 440 443 444 446 446 448 450 451 453 454 457 458 461 465 466 469

5.3

5.4

5.5

5.6

5.7 6

xiii

xiv

Contents

6.6 6.7

Simulation of Markov chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 6.6.1 Exercises: Section 6.6 (59–66) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 Supplementary Exercises (67–82) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

7

Random Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Types of Random Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.1 Classification of Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.2 Random Processes Regarded as Random Variables . . . . . . . . . . . . . . . 7.1.3 Exercises: Section 7.1 (1–10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Properties of the Ensemble: Mean and Autocorrelation Functions . . . . . . . . . . . 7.2.1 Mean and Variance Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2 Autocovariance and Autocorrelation Functions . . . . . . . . . . . . . . . . . . 7.2.3 The Joint Distribution of Two Random Processes . . . . . . . . . . . . . . . . 7.2.4 Exercises: Section 7.2 (11–24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Stationary and Wide-Sense Stationary Processes . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 Properties of Wide-Sense Stationary Processes . . . . . . . . . . . . . . . . . . 7.3.2 Ergodic Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.3 Exercises: Section 7.3 (25–40) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Discrete-Time Random Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Special Discrete Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.2 Exercises: Section 7.4 (41–52) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Poisson Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.1 Relation to Exponential and Gamma Distributions . . . . . . . . . . . . . . . . 7.5.2 Combining and Decomposing Poisson Processes . . . . . . . . . . . . . . . . . 7.5.3 Alternative Definition of a Poisson Process . . . . . . . . . . . . . . . . . . . . . 7.5.4 Nonhomogeneous Poisson Processes . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.5 The Poisson Telegraphic Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.6 Exercises: Section 7.5 (53–72) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6 Gaussian Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.1 Brownian Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.2 Brownian Motion as a Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.3 Further Properties of Brownian Motion . . . . . . . . . . . . . . . . . . . . . . . . 7.6.4 Variations on Brownian Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6.5 Exercises: Section 7.6 (73–85) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7 Continuous-Time Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7.1 Infinitesimal Parameters and Instantaneous Transition Rates . . . . . . . . . 7.7.2 Sojourn Times and Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7.3 Long-Run Behavior of Continuous-Time Markov Chains . . . . . . . . . . . 7.7.4 Explicit Form of the Transition Matrix . . . . . . . . . . . . . . . . . . . . . . . . 7.7.5 Exercises: Section 7.7 (86–97) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.8 Supplementary Exercises (98–114) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

489 489 493 493 494 496 496 499 502 503 504 508 511 514 516 518 520 522 524 526 528 530 531 532 535 536 538 538 541 541 544 546 548 552 554 556 559

8

Introduction to Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Power Spectral Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 Properties of the Power Spectral Density . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 Power in a Frequency Band . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.3 White Noise Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.4 Power Spectral Density for Two Processes . . . . . . . . . . . . . . . . . . . . . 8.1.5 Exercises: Section 8.1 (1–21) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Random Processes and LTI Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.1 Statistical Properties of the LTI System Output . . . . . . . . . . . . . . . . . .

. . . . . . . . .

563 563 566 569 570 572 573 576 577

Contents

8.3

xv

8.2.2 Ideal Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.3 Signal Plus Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.4 Exercises: Section 8.2 (22–38) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discrete-Time Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Random Sequences and LTI Systems . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2 Random Sequences and Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.3 Exercises: Section 8.3 (39–50) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . .

580 583 586 589 591 593 595

Appendix A: Statistical Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 Appendix B: Background Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 Appendix C: Important Probability Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 Answers to Odd-Numbered Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639

Introduction: Why Study Probability?

Some of you may enjoy mathematics for its own sake—it is a beautiful subject which provides many wonderful intellectual challenges. Of course students of philosophy would say the same thing about their discipline, ditto for students of linguistics, and so on. However, many of us are not satisfied just with aesthetics and mental gymnastics. We want what we’re studying to have some utility, some applicability to real-world problems. Fortunately, mathematics in general and probability in particular provide a plethora of tools for answering important professional and societal questions. In this section, we’ll attempt to provide some preliminary motivation before forging ahead. The initial development of probability as a branch of mathematics goes back over 300 years, where it had its genesis in connection with questions involving games of chance. One of the earliest recorded instances of probability calculation appeared in correspondence between the two very famous mathematicians, Blaise Pascal and Pierre de Fermat. The issue was which of the following two outcomes of die-tossing was more favorable to a bettor: (1) getting at least one 6 in four rolls of a fair die (“fair” here means that each of the six outcomes 1, 2, 3, 4, 5, and 6 is equally likely to occur) or (2) getting at least one pair of 6s when two fair dice are rolled 24 times in succession. By the end of Chap. 1, you shouldn’t have any difficulty showing that there is a slightly better than 50-50 chance of (1) occurring, whereas the odds are slightly against (2) occurring. Games of chance have continued to be a fruitful area for the application of probability methodology. Savvy poker players certainly need to know the odds of being dealt various hands, such as a full house or straight (such knowledge is necessary but not at all sufficient for achieving success in card games, as such endeavors also involve much psychology). The same holds true for the game of blackjack. In fact, in 1962 the mathematics professor Edward O. Thorp published the book Beat the Dealer; in it he employed probability arguments to show that as cards were dealt sequentially from a deck, there were situations in which the likelihood of success favored the player rather than the dealer. Because of this work, casinos changed the way cards were dealt in order to prevent card-counting strategies from bankrupting them. A recent variant of this is described in the paper “Card Counting in Continuous Time” (Journal of Applied Probability, 2012: 184-198), in which the number of decks utilized is large enough to justify the use of a continuous approximation to find an optimal betting strategy. In the last few decades, game theory has developed as a significant branch of mathematics devoted to the modeling of competition, cooperation, and conflict. Much of this work involves the use of probability properties, with applications in such diverse fields as economics, political science, and biology. However, especially over the course of the last 60 years, the scope of probability applications has expanded way beyond gambling and games. In this section, we present some contemporary examples of how probability is being used to solve important problems.

xvii

xviii

Introduction: Why Study Probability?

Software Use in Probability Modern probability applications often require the use of a calculator or software. Of course, we rely on machines to perform every conceivable computation from adding numbers to evaluating definite integrals. Many calculators and most computer software packages even have built-in functions that make a number of specific probability calculations more convenient; we will highlight these throughout the text. But the real utility of modern software comes from its ability to simulate random phenomena, which proves invaluable in the analysis of very complicated probability models. We will introduce the key elements of probability simulation in Sect. 1.7 and then revisit simulation in a variety of settings throughout the book. Numerous software packages can be used to implement a simulation. We will focus on two: Matlab and R. Matlab is a powerful engineering software package published by MathWorks; many universities and technology companies have a license for Matlab. A freeware package called Octave has been designed to implement the majority of Matlab functions using identical syntax; consult http://www.gnu.org/software/octave/. (Readers using Mac OS or Windows rather than GNU/Linux will find links to compatible versions of Octave on this same website.) R is a freeware statistical software package maintained by a core user group. The R base package and numerous add-ons are available at http://cran.r-project.org/. Throughout this textbook, we will provide side by side Matlab and R code for both probability computations and simulation. It is not the goal, however, to serve as a primer in either language (certainly, some prior knowledge of elementary programming is required). Both software packages have extensive help menus and active online user support groups. Readers interested in a more thorough treatment of these software packages should consult Matlab Primer by Timothy A. Davis or The R Book by Michael J. Crawley.

Modern Application of Classic Probability Problems The coupon collector problem has been well known for decades in the probability community. As an example, suppose each box of a certain type of cereal contains a small toy. The manufacturer of this cereal has included a total of ten toys in its cereal boxes, with each box being equally likely to yield one of the ten toys. Suppose you want to obtain a complete set of these toys for a young relative or friend. Clearly you will have to purchase at least ten boxes, and intuitively it would seem as though you might have to purchase many more than that. How many boxes would you expect to have to purchase in order to achieve your goal? Methods from Chap. 4 can be used to show that the average number of boxes required is 10(1 + 1/2 + 1/3 + + 1/10). If instead there are n toys, then n replaces 10 in this expression. And when n is large, more sophisticated mathematical arguments yield the approximation n(ln(n) + .58). The article “A Generalized Coupon Collector Problem” (Journal of Applied Probability, 2011: 1081-1094) mentions applications of the classic problem to dynamic resource allocation, hashing in computer science, and the analysis of delays in certain wireless communication channels (in this latter application, there are n users, each receiving packets of data from a transmitter). The generalization considered in the article involves each cereal box containing d different toys with the purchaser then selecting the least collected toy thus far. The expected number of purchases to obtain a complete collection is again investigated, with special attention to the case of n being quite large. An application to the wireless communication scenario is mentioned.

Introduction: Why Study Probability?

xix

Applications to Business The article “Newsvendor-Type Models with Decision-Dependent Uncertainty” (Mathematical Methods of Operations Research, 2012, published online) begins with an overview of a class of decision problems involving uncertainty. In the classical newsvendor problem, a seller has to choose the amount of inventory to obtain at the beginning of a selling season. This ordering decision is made only once, with no opportunity to replenish inventory during the season. The amount of demand D is uncertain (what we will call in Chap. 2 a random variable). The cost of obtaining inventory is c per unit ordered, the sale price is r per unit, and any unsold inventory at the end of the season has a salvage value of v per unit. The optimal policy, that which maximizes expected profit, is easily characterized in terms of the probability distribution of D (this distribution specifies how likely it is that various values of D will occur). In the revenue management problem, there are S units of inventory to sell. Each unit is sold for a price of either r1 or r2 (r1 > r2). During the first phase of the selling season, customers arrive who will buy at the price r2 but not at r1. In the second phase, customers arrive who will pay the higher price. The seller wishes to know how much of the initial inventory should be held in reserve for the second phase. Again the general form of the optimal policy that maximizes expected profit is easily determined in terms of the distributions for demands in the two periods. The article cited in the previous paragraph goes on to consider situations in which the distribution(s) of demand(s) must be estimated from data and how such estimation affects decision making. A cornerstone of probabilistic inventory modeling is a general result established more than 50 years ago: Suppose that the amount of inventory of a commodity is reviewed every T time periods to decide whether more should be ordered. Under rather general conditions, it was shown that the optimal policy—the policy that minimizes the long-run expected cost—is to order nothing if the current level of inventory is at least an amount s but to order enough to bring the inventory level up to an amount S if the current level is below s. The values of s and S are determined by various costs, the price of the commodity, and the nature of demand for the commodity (how customer orders and order amounts occur over time). The article “A Periodic-Review Base-Stock Inventory System with Sales Rejection” (Operations Research, 2011: 742-753) considers a policy appropriate when backorders are possible and lost sales may occur. In particular, an order is placed every T time periods to bring inventory up to some level S. Demand for the commodity is filled until the inventory level reaches a sales rejection threshold M for some M < S. Various properties of the optimal values of M and S are investigated.

Applications to the Life Sciences Examples of the use of probability and probabilistic modeling can be found in many subdisciplines of the life sciences. For example, Pseudomonas syringae is a bacterium which lives in leaf surfaces. The article “Stochastic Modeling of Pseudomonas Syringae Growth in the Phyllosphere” (Mathematical Biosciences, 2012: 106-116) proposed a probabilistic (synonymous with “stochastic”) model called a birth and death process with migration to describe the aggregate distribution of such bacteria and determine the mechanisms which generated experimental data. The topic of birth and death processes is considered briefly in Chap. 7 of our book. Another example of such modeling appears in the article “Means and Variances in Stochastic Multistage Cancer Models” (Journal of Applied Probability, 2012: 590-594). The authors discuss a widely used model of carcinogenesis in which division of a healthy cell may give rise to a healthy cell and a mutant cell, whereas division of a mutant cell may result in two mutant cells of the same type or possibly one of the same types and one with a further mutation. The objective is to obtain an

xx

Introduction: Why Study Probability?

expression for the expected number of cells at each stage and also a quantitative assessment of how much the actual number might deviate from what is expected (that is what “variance” does). Epidemiology is the branch of medicine and public health that studies the causes and spread of various diseases. Of particular interest to epidemiologists is how epidemics are propagated in one or more populations. The general stochastic epidemic model assumes that a newly infected individual is infectious for a random amount of time having an exponential distribution (this distribution is discussed in Chap. 3) and during this infectious period encounters other individuals at times determined by a Poisson process (one of the topics in Chap. 7). The article “The Basic Reproduction Number and the Probability of Extinction for a Dynamic Epidemic Model” (Mathematical Biosciences, 2012: 31-35) considers an extension in which the population of interest consists of a fixed number of subpopulations. Individuals move between these subpopulations according to a Markov transition matrix (the subject of Chap. 6) and infectives can only make infectious contact with members of their current subpopulation. The effect of variation in the infectious period on the probability that the epidemic ultimately dies out is investigated. Another approach to the spread of epidemics is based on branching processes. In the simplest such process, a single individual gives birth to a random number of individuals; each of these in turn gives birth to a random number of progeny, and so on. The article “The Probability of Containment for Multitype Branching Process Models for Emerging Epidemics” (Journal of Applied Probability, 2011: 173-188) uses a model in which each individual “born” to an existing individual can have one of a finite number of severity levels of the disease. The resulting theory is applied to construct a simulation model of how influenza spread in rural Thailand.

Applications to Engineering and Operations Research We want products that we purchase and systems that we rely on (e.g., communication networks, electric power grids) to be highly reliable—have long lifetimes and work properly during those lifetimes. Product manufacturers and system designers therefore need to have testing methods that will assess various aspects of reliability. In the best of all possible worlds, data bearing on reliability could be obtained under normal operating conditions. However, this may be very time consuming when investigating components and products that have very long lifetimes. For this reason, there has been much research on “accelerated” testing methods which induce failure or degradation in a much shorter time frame. For products that are used only a fraction of the time in a typical day, such as home appliances and automobile tires, acceleration might entail operating continuously in time but under otherwise normal conditions. Alternatively, a sample of units could be subjected to stresses (e.g., temperature, vibration, voltage) substantially more severe than what is usually experienced. Acceleration can also be applied to entities in which degradation occurs over time—stiffness of springs, corrosion of metals, and wearing of mechanical components. In all these cases, probability models must then be developed to relate lifetime behavior under such acceleration to behavior in more customary situations. The article “Overview of Reliability Testing” (IEEE Transactions on Reliability, 2012: 282-291) gives a survey of various testing methodologies and models. The article “A Methodology for Accelerated Testing by Mechanical Actuation of MEMS Devices” (Microelectronics Reliability, 2012: 1382-1388) applies some of these ideas in the context of predicting lifetimes for micro-electro-mechanical systems. An important part of modern reliability engineering deals with building redundancy into various systems in order to decrease substantially the likelihood of failure. A k-out-of-n:G system works or is good only if at least k amongst the n constituent components work or are good, whereas a k-out-of-n:F system fails if and only if at least k of the n components fail. The article “Redundancy Issues in Software and Hardware Systems: An Overview” (Intl. Journal of Reliability, Quality, and Safety Engineering, 2011: 61-98) surveys these and various other systems that can improve the performance

Introduction: Why Study Probability?

xxi

of computer software and hardware. The so-called triple modular redundant systems, with 2-out-of-3: G configuration, are now commonplace (e.g., Hewlett-Packard’s original NonStop server, and a variety of aero, auto, and rail systems). The article “Reliability of Various 2-Out-of-4:G Redundant Systems with Minimal Repair” (IEEE Transactions on Reliability, 2012: 170-179) considers using a Poisson process with time-varying rate function to model how component failures occur over time so that the rate of failure increases as a component ages; in addition, a component that fails undergoes repair so that it can be placed back in service. Several failure modes for combined k-out-of-n systems are studied in the article “Reliability of Combined m-Consecutive-k-out-of-n:F and Consecutive-kcout-of-n:F Systems” (IEEE Transactions on Reliability, 2012: 215-219); these have applications in the areas of infrared detecting and signal processing. A compelling reason for manufacturers to be interested in reliability information about their products is that they can establish warranty policies and periods that help control costs. Many warranties are “one dimensional,” typically characterized by an interval of age (time). However, some warranties are “two dimensional” in that warranty conditions depend on both age and cumulative usage; these are common in the automotive industry. The article “Effect of Use-Rate on System Lifetime and Failure Models for 2D Warranty” (Intl. Journal of Quality and Reliability Management, 2011: 464-482) describes how certain bivariate probability models for jointly describing the behavior of time and usage can be used to investigate the reliability of various system configurations. The word queue is used chiefly by the British to mean “waiting line,” i.e., a line of customers or other entities waiting to be served or brought into service. The mathematical development of models for how a waiting line expands and contracts as customers arrive at a service facility, enter service, and then finish began in earnest in the middle part of the 1900s and continues unabated today as new application scenarios are encountered. For example, the arrival and service of patients at some type of medical unit are often described by the notation M/M/s, where the first M signifies that arrivals occur according to a Poisson process, the second M indicates that the service time of each patient is governed by an exponential probability distribution, and there are s servers available for the patients. The article “Nurse Staffing in Medical Units: A Queueing Perspective” (Operations Research, 2011: 1320-1331) proposes an alternative closed queueing model in which there are s nurses within a single medical unit servicing n patients, where each patient alternates between requiring assistance and not needing assistance. The performance of the unit is characterized by the likelihood that delay in serving a patient needing assistance will exceed some critical threshold. A staffing rule based on the model and assumptions is developed; the resulting rule differs significantly from the fixed nurse-to-patient staffing ratios mandated by the state of California. A variation on the medical unit situation just described occurs in the context of call centers, where effective management entails a trade-off between operational costs and the quality of service offered to customers. The article “Staffing Call Centers with Impatient Customers” (Operations Research, 2012: 461-474) considers an M/M/s queue in which customers who have to wait for service may become frustrated and abandon the facility (don’t you sometimes feel like doing that in a doctor’s office?). The behavior of such a system when n is large is investigated, with particular attention to the staffing principle that relates the number of servers to the square root of the workload offered to the call center. The methodology of queueing can also be applied to find optimal settings for traffic signals. The article “Delays at Signalized Intersections with Exhaustive Traffic Control” (Probability in Engineering and Informational Sciences, 2012: 337-373) utilizes a “polling model,” which entails multiple queues of customers (corresponding to different traffic flows) served by a single server in cyclic order. The proposed vehicle-actuated rule is that traffic lights stay green until all lanes within a group are emptied. The mean traffic delay is studied for a variety of vehicle interarrival-time distributions in both light-traffic and heavy-traffic situations.

xxii

Introduction: Why Study Probability?

Suppose two different types of customers, primary and secondary, arrive for service at a facility where the servers have different service rates. How should customers be assigned to the servers? The article “Managing Queues with Heterogeneous Servers” (Journal of Applied Probability, 2011: 435-452) shows that the optimal policy for minimizing mean wait time has a “threshold structure”: for each server, there is a different threshold such that a primary customer will be assigned to that server if and only if the queue length of primary customers meets or exceeds the threshold.

Applications to Finance The most explosive growth in the use of probability theory and methodology over the course of the last several decades has undoubtedly been in the area of finance. This has provided wonderful career opportunities for people with advanced degrees in statistics, mathematics, engineering, and physics (the son-in-law of one of the authors earned a Ph.D. in mechanical engineering and taught for several years, but then switched to finance). Edward O. Thorp, whom we previously met as the man who figured out how to beat blackjack, subsequently went on to success in finance, where he earned much more money managing hedge funds and giving advice than he could ever have hoped to earn in academia (those of us in academia love it for the intangible rewards we get—psychic income, if you will). One of the central results in mathematical finance is the Black-Scholes theorem, named after the two Nobel-prize-winning economists who discovered it. To get the flavor of what is involved here, a bit of background is needed. Suppose the present price of a stock is $20 per share, and it is known that at the end of 1 year, the price will either double to $40 or decrease to $10 per share (where those prices are expressed in current dollars, i.e., taking account of inflation over the 1-year period). You can enter into an agreement, called an option contract, that allows you to purchase y shares of this stock (for any value y) 1 year from now for the amount cy (again in current dollars). In addition, right now you can buy x shares of the stock for 20x with the objective of possibly selling those shares 1 year from now. The values x and y are both allowed to be negative; if, for example, x were negative, then you would actually be selling shares of the stock now that you would have to purchase at either a cost of $40 per share or $10 per share 1 year from now. It can then be shown that there is only one value of c, specifically 50/3, for which the gain from this investment activity is 0 regardless of the choices of x and y and the value of the stock 1 year from now. If c is anything other than 50/3, then there is an arbitrage, an investment strategy involving choices of x and y that is guaranteed to result in a positive gain. A general result called the Arbitrage Theorem specifies conditions under which a collection of investments (or bets) has expected return 0 as opposed to there being an arbitrage strategy. The basis for the Black-Sholes theorem is that the variation in the price of an asset over time is described by a stochastic process called geometric Brownian motion (see Sect. 7.6). The theorem then specifies a fair price for an option contract on that asset so that no arbitrage is possible. Modern quantitative finance is very complex, and many of the basic ideas are unfamiliar to most novices (like the authors of this text!). It is therefore difficult to summarize the content of recently published articles as we have done for some other application areas. But a sampling of recently published titles emphasizes the role of probability modeling. Articles that appeared in the 2012 Annals of Finance included “Option Pricing Under a Stressed Beta Model” and “Stochastic Volatility and Stochastic Leverage”; in the 2012 Applied Mathematical Finance, we found “Determination of Probability Distribution Measures from Market Prices Using the Method of Maximum Entropy in the Mean” and “On Cross-Currency Models with Stochastic Volatility and Correlated Interest Rates”; the 2012 Quantitative Finance yielded “Probability Unbiased Value-at-

Introduction: Why Study Probability?

xxiii

Risk Estimators” and “A Generalized Birth-Death Stochastic Model for High-Frequency Order Book Dynamics.” If the application of mathematics to problems in finance is of interest to you, there are now many excellent masters-level graduate programs in quantitative finance. Entrance to these programs typically requires a very solid background in undergraduate mathematics and statistics (including especially the course for which you are using this book). Be forewarned, though, that not all financially savvy individuals are impressed with the direction in which finance has recently moved. Former Federal Reserve Chairman Paul Volcker was quoted not long ago as saying that the ATM cash machine was the most significant financial innovation of the last 20 years; he has been a very vocal critic of the razzle-dazzle of modern finance.

Probability in Everyday Life In the hopefully unlikely event that you do not end up using probability concepts and methods in your professional life, you still need to face the fact that ideas surrounding uncertainty are pervasive in our world. We now present some amusing and intriguing examples to illustrate this. The behavioral psychologists Amos Tversky and Daniel Kahneman spent much of their academic careers carrying out studies to demonstrate that human beings frequently make logical errors when processing information about uncertainty (Kahneman won a Nobel prize in economics for his work, and Tversky would surely have also done so had the awards been given posthumously). Consider the following variant of one Tversky-Kahneman scenario. Which of the following two statements is more likely? (A) Dr. D is a former professor. (B) Dr. D is a former professor who was accused of inappropriate relations with some students, investigation substantiated the charges, and he was stripped of tenure. T-K’s research indicated that many people would regard statement B as being more likely, since it gives a more detailed explanation of why Dr. D is no longer a professor. However, this is incorrect. Statement B implies statement A. One of our basic probability rules will be that if one event B is contained in another event A (i.e., if B implies A), then the smaller event B is less likely to occur or have occurred than the larger event A. After all, other possible explanations for A are that Dr. D is deceased or that he is retired or that he deserted academia for investment banking—all of those plus B would figure in to the likelihood of A. The survey article “Judgment under Uncertainty; Heuristics and Biases” (Science, 1974: 11241131) by T-K described a certain town served by two hospitals. In the larger hospital about 45 babies are born each day, whereas about 15 are born each day in the smaller one. About 50% of births are boys, but of course the percentage fluctuates from day to day. For a 1-year period, each hospital recorded days on which more than 60% of babies born were boys. Each of a number of individuals was then asked which of the following statements he/she thought was correct: (1) the larger hospital recorded more such days, (2) the smaller hospital recorded more such days, or (3) the number of such days was about the same for the two hospitals. Of the 95 participants, 21 chose (1), 21 chose (2), and 53 chose (3). In Chap. 5 we present a general result which implies that the correct answer is in fact (2), because the sample percentage is less likely to stray from the true percentage (in this case about 50%) when the sample size is larger rather than small. In case you think that mistakes of this sort are made only by those who are unsophisticated or uneducated, here is yet another T-K scenario. Each of a sample of 80 physicians was presented with the following information on treatment for a particular disease:

xxiv

Introduction: Why Study Probability?

With surgery, 10% will die during treatment, 32% will die within a year, 66% will die within 5 years. With radiation, 0% will die during treatment, 23% will die within a year, 78% will die within 5 years.

Each of the 87 physicians in a second sample was presented with the following information: With surgery, 90% will survive the treatment, 68% will survive at least 1 year, and 34% will survive at least 5 years. With radiation, 100% will survive the treatment, 77% will survive at least 1 year, and 22% will survive at least 5 years.

When each physician was asked to indicate whether he/she would recommend surgery or radiation based on the supplied information, 50% of those in the first group said surgery whereas 84% of those in the second group said surgery. The distressing thing about this conclusion is that the information provided to the first group of physicians is identical to that provided to the second group, but described in a slightly different way. If the physicians were really processing information rationally, there should be no significant difference between the two percentages. It would be hard to find a book containing even a brief exposition of probability that did not contain examples or exercises involving coin tossing. Many such scenarios involve tossing a “fair” coin, one that is equally likely to result in H (head side up) or T (tail side up) on any particular toss. Are real coins actually fair, or is there a bias of some sort? Various analyses have shown that the result of a coin toss is predicable at least to some degree if initial conditions (position, velocity, angular momentum) are known. In practice, most people who toss coins (e.g., referees in a football game trying to determine which team will kick off and which will receive) are not conversant in the physics of coin tossing. The mathematician and statistician Persi Diaconis, who was a professional magician for 10 years prior to earning his Ph.D. and mastered many coin and card tricks, has engaged in ongoing collaboration with other researchers to study coin tossing. One result of these investigations was the conclusion based on physics that for a caught coin, there is a slight bias toward heads—about .51 versus .49. It is not, however, clear under which real-world circumstances this or some other bias will occur. Simulation of fair-coin tossing can be done using a random number generator available in many software packages (about which we’ll say more shortly). If the resulting random number is between 0 and .5, we say that the outcome of the toss was H, and if the number is between .5 and 1, then a T occurred (there is an obvious modification of this to incorporate bias). Now consider the following sequence of 200 Hs and Ts: THTHTTTHTTTTTHTHTTTHTTHHHTHHTHTHTHTTTTHHTTHHTTHHHT HHHTTHHHTTTHHHTHHHHTTTHTHTHHHHTHTTTHHHTHHTHTTTHHTH HHTHHHHTTHTHHTHHHTTTHTHHHTHHTTTHHHTTTTHHHTHTHHHHTH TTHHTTTTHTHTHTTHTHHTTHTTTHTTTTHHHHTHTHHHTTHHHHHTHH

Did this sequence result from actually tossing a fair coin (equivalently, using computer simulation as described), or did it come from someone who was asked to write down a sequence of 200 Hs and Ts that he/she thought would come from tossing a fair coin? One way to address this question is to focus on the longest run of Hs in the sequence of tosses. This run is of length 4 for the foregoing sequence. Probability theory tells us that the expected length of the longest run in a sequence of n fair-coin tosses is approximately log2(n) 2/3. For n = 200, this formula gives an expected longest run of length about 7. It can also be shown that there is less than a 10% chance that the longest run will have a length of 4 or less. This suggests that the given sequence is fictitious rather than real, as in fact was the case; see the very nice expository article “The Longest Run of Heads” (Mathematics Magazine, 1990, 196-207). As another example, consider giving a fair coin to each of the two authors of this textbook. Carlton tosses his coin repeatedly until obtaining the sequence HTT. Devore tosses his coin repeatedly until the sequence HTH is observed. Is Carlton’s expected number of tosses to obtain his desired sequence

Introduction: Why Study Probability?

xxv

the same as Devore’s, or is one expected number of tosses smaller than the other? Most students to whom we have asked these questions initially answered that the two expected numbers should be the same. But this is not true. Some rather tricky probability arguments can be used to show that Carlton’s expected number of tosses is eight, whereas Devore expects to have to make ten tosses. Very surprising, no? A bit of intuition makes this more plausible. Suppose Carlton merrily tosses away until at some point he has just gotten HT. So he is very excited, thinking that just one more toss will enable him to stop tossing the coin and move on to some more interesting pursuit. Unfortunately his hopes are dashed because the next toss is an H. However, all is not lost, as even though he must continue tossing, at this point he is partway toward reaching his goal of HTT. If Devore sees HT at some point and gets excited by light at the end of the tunnel but then is crushed by the appearance of a T rather than an H, he essentially has to start over again from scratch. The charming nontechnical book Probabilities: The Little Numbers That Rule Our Lives by Peter Olofsson has more detail on this and other probability conundrums. One of the all-time classic probability puzzles that stump most people is called the Birthday Problem. Consider a group of individuals, all of whom were born in the same year (one that did not have a February 29). If the group size is 400, how likely is it that at least two members of the group share the same birthday? Hopefully a moment’s reflection will bring you to the realization that a shared birthday here is a sure thing (100% chance), since there are only 365 possible birthdays for the 400 people. On the other hand, it is intuitively quite unlikely that there will be a shared birthday if the group size is only five; in this case we would expect that all five individuals would have different birthdays. Clearly as the group size increases, it becomes more likely that two or more individuals will have the same birthday. So how large does the group size have to be in order for it to be more likely than not that at least two people share a birthday (i.e., that the likelihood of a shared birthday is more than 50%)? Which one of the following four group-size categories do you believe contains the correct answer to this question? (1) At least 100 (3) At least 25 but less than 50

(2) At least 50 but less than 100 (4) Fewer than 25

When we have asked this of students in our classes, a substantial majority opted for the first two categories. Very surprisingly, the correct answer is category (4). In Chapter 1 we will show that with as few as 23 people in the group, it is a bit more likely than not that at least two group members will have the same birthday. Two people having the same birthday implies that they were born within 24 h of one another, but the converse is not true; e.g., one person might be born just before midnight on a particular day and another person just after midnight on the next day. This implies that it is more likely that two people will have been born within 24 h of one another than it is that they have the same birthday. It follows that a smaller group size than 23 is needed to make it more likely than not that at least two people will have been born within 24 h of one another. In Sect. 4.9 we show how this group size can be determined. Two people in a group having the same birthday is an example of a coincidence, an accidental and seemingly surprising occurrence of events. The fact that even for a relatively small group size it is more likely than not that this coincidence will occur should suggest that coincidences are often not as surprising as they might seem. This is because even if a particular coincidence (e.g., “graduated from the same high school” or “visited the same small town in Croatia”) is quite unlikely, there are so many opportunities for coincidences that quite a few are sure to occur.

xxvi

Introduction: Why Study Probability?

Back to the follies of misunderstanding medical information: Suppose the incidence rate of a particular disease in a certain population is 1 in 1000. The presence of the disease cannot be detected visually, but a diagnostic test is available. The diagnostic test correctly detects 98% of all diseased individuals (this is the sensitivity of the test, its ability to detect the presence of the disease), and 93% of non-diseased individuals test negative for the disease (this is the specificity of the test, an indicator of how specific the test is to the disease under consideration). Suppose a single individual randomly selected from the population is given the test and the test result is positive. In light of this information, how likely is it that the individual will have the disease? First note that if the sensitivity and the specificity were both 100%, then it would be a sure thing that the selected individual has the disease. The reason this is not a sure thing is that the test sometimes makes mistakes. Which one of the following five categories contains the actual likelihood of having the disease under the described conditions? 1. 2. 3. 4. 5.

At least a 75% chance (quite likely) At least 50% but less than 75% (moderately likely) At least 25% but less than 50% (somewhat likely) At least 10% but less than 25% (rather unlikely) Less than 10% (quite unlikely)

Student responses to this question have overwhelmingly been in categories (1) or (2)—another case of intuition going awry. The correct answer turns out to be category (5). In fact, even in light of the positive test result, there is still only a bit more than a 1% chance that the individual is diseased! What is the explanation for this counterintuitive result? Suppose we start with 100,000 individuals from the population. Then we’d expect 100 of those, or 100, to be diseased (from the 1 in 1000 incidence rate) and 99,900 to be disease free. From the 100 we expect to be diseased, we’d expect 98 positive test results (98% sensitivity). And from the 99,900 we expect to be disease free, we’d expect 7% of those or 6993 to yield positive test results. Thus we expect many more false positives than true positives. This is because the disease is quite rare and the diagnostic test is rather good but not stunningly so. (In case you think our sensitivity and specificity are low, consider a certain D-dimer test for the presence of a coronary embolism; its sensitivity and specificity are 88% and 75%, respectively.) Later in Chapter 1 (Example 1.31) we develop probability rules which can be used to show that the posterior probability of having the disease conditional on a positive test result is .0138—a bit over 1%. This should make you very cautious about interpreting the results of diagnostic tests. Before you panic in light of a positive test result, you need to know the incidence rate for the condition under consideration and both the sensitivity and specificity of the test. There are also implications for situations involving detection of something other than a disease. Consider airport procedures that are used to detect the presence of a terrorist. What do you think is the incidence rate of terrorists at a given airport, and how sensitive and specific do you think detection procedures are? The overwhelming number of positive test results will be false, greatly inconveniencing those who test positive! Here’s one final example of probability applied in everyday life: One of the following columns contains the value of the closing stock index as of August 8, 2012, for each of a number of countries, and the other column contains fake data obtained with a random number generator. Just by looking at the numbers, without considering context, can you tell which column is fake and which is real?

Introduction: Why Study Probability? China Japan Britain Canada Euro area Austria France Germany Italy Spain Norway Russia Sweden Turkey Hong Kong India Pakistan Singapore Thailand Argentina ⋮

xxvii 2264 8881 5846 11,781 797 2053 3438 6966 14,665 722 480 1445 1080 64,699 20,066 17,601 14,744 3052 1214 2459 ⋮

3058 9546 7140 6519 511 4995 2097 4628 8461 598 1133 4100 2594 35,027 42,182 3388 10,076 5227 7460 2159 ⋮

The key to answering this question is a result called Benford’s Law. Suppose you start reading through a particular issue of a publication like the New York Times or The Economist, and each time you encounter any number (the amount of donations to a particular political candidate, the age of an actor, the number of members of a union, and so on), you record the first digit of that number. Possible first digits are 1, 2, 3, . . ., or 9. In the long run, how frequently do you think each of these nine possible first digits will be encountered? Your first thought might be that each one should have the same longrun frequency, 1/9 (roughly 11%). But for many sets of numbers this turns out not to be the case. Instead the long-run frequency is given by the formula log10[(x + 1)/x], which gives .301, .176, .125, . . ., .051, .046 for x = 1, 2, 3, . . ., 8, 9. Thus a leading digit is much more likely to be 1, 2, or 3 than 7, 8, or 9. Examination of the foregoing lists of numbers shows that the first column conforms much more closely to Benford’s Law than does the second column. In fact, the first column is real, whereas the second one is fake. For Benford’s Law to be valid, it is generally required that the set of numbers under consideration span several orders of magnitude. It does not work, for example, with batting averages of major league baseball players, most of which are between .200 and .299, or with fuel efficiency ratings (miles per gallon) for automobiles, most of which are currently between 15 and 30. Benford’s Law has been employed to detect fraud in accounting reports, and in particular to detect fraudulent tax returns. So beware when you file your taxes next year! This list of amusing probability appetizers could be continued for quite a while. Hopefully what we have shown thus far has sparked your interest in knowing more about the discipline. So without further ado . . .

1

Probability

Probability is the subdiscipline of mathematics that focuses on a systematic study of randomness and uncertainty. In any situation in which one of a number of possible outcomes may occur, the theory of probability provides methods for quantifying the chances, or likelihoods, associated with the various outcomes. The language of probability is constantly used in an informal manner in both written and spoken contexts. Examples include such statements as “It is likely that the Dow Jones Industrial Average will increase by the end of the year,” “There is a 50–50 chance that the incumbent will seek reelection,” “There will probably be at least one section of that course offered next year,” “The odds favor a quick settlement of the strike,” and “It is expected that at least 20,000 concert tickets will be sold.” In this chapter, we introduce some elementary probability concepts, indicate how probabilities can be interpreted, and show how the rules of probability can be applied to compute the chances of many interesting events. The methodology of probability will then permit us to express in precise language such informal statements as those given above.

1.1

Sample Spaces and Events

In probability, an experiment refers to any action or activity whose outcome is subject to uncertainty. Although the word experiment generally suggests a planned or carefully controlled laboratory testing situation, we use it here in a much wider sense. Thus experiments that may be of interest include tossing a coin once or several times, selecting a card or cards from a deck, weighing a loaf of bread, measuring the commute time from home to work on a particular morning, determining blood types from a group of individuals, or calling people to conduct a survey.

1.1.1

The Sample Space of an Experiment

DEFINITION

The sample space of an experiment, denoted by S, is the set of all possible outcomes of that experiment.

# Springer International Publishing AG 2017 M.A. Carlton, J.L. Devore, Probability with Applications in Engineering, Science, and Technology, Springer Texts in Statistics, DOI 10.1007/978-3-319-52401-6_1

1

2

1

Probability

Example 1.1 The simplest experiment to which probability applies is one with two possible outcomes. One such experiment consists of examining a single fuse to see whether it is defective. The sample space for this experiment can be abbreviated as S ¼ {N, D}, where N represents not defective, D represents defective, and the braces are used to enclose the elements of a set. Another such experiment would involve tossing a thumbtack and noting whether it landed point up or point down, with sample space S ¼ {U, D}, and yet another would consist of observing the gender of the next child born at the local hospital, with S ¼ {M, F}. ■ Example 1.2 If we examine three fuses in sequence and note the result of each examination, then an outcome for the entire experiment is any sequence of Ns and Ds of length 3, so S ¼ {NNN, NND, NDN, NDD, DNN, DND, DDN, DDD} If we had tossed a thumbtack three times, the sample space would be obtained by replacing N by U in S above. A similar notational change would yield the sample space for the experiment in which the genders of three newborn children are observed. ■ Example 1.3 Two gas stations are located at a certain intersection. Each one has six gas pumps. Consider the experiment in which the number of pumps in use at a particular time of day is observed for each of the stations. An experimental outcome specifies how many pumps are in use at the first station and how many are in use at the second one. One possible outcome is (2, 2), another is (4, 1), and yet another is (1, 4). The 49 outcomes in S are displayed in the accompanying table. First station 0 1 2 3 4 5 6

0 (0, 0) (1, 0) (2, 0) (3, 0) (4, 0) (5, 0) (6, 0)

1 (0, 1) (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1)

2 (0, 2) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2)

Second station 3 (0, 3) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3)

4 (0, 4) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4)

5 (0, 5) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5)

6 (0, 6) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6)

The sample space for the experiment in which a six-sided die is thrown twice results from deleting the 0 row and 0 column from the table, giving 36 outcomes. ■ Example 1.4 A reasonably large percentage of C++ programs written at a particular company compile on the first run, but some do not. Suppose an experiment consists of selecting and compiling C++ programs at this location until encountering a program that compiles on the first run. Denote a program that compiles on the first run by S (for success) and one that doesn’t do so by F (for failure). Although it may not be very likely, a possible outcome of this experiment is that the first 5 (or 10 or 20 or . . .) are Fs and the next one is an S. That is, for any positive integer n we may have to examine n programs before seeing the first S. The sample space is S ¼ {S, FS, FFS, FFFS, . . .}, which contains an infinite number of possible outcomes. The same abbreviated form of the sample space is appropriate for an experiment in which, starting at a specified time, the gender of each newborn infant is recorded until the birth of a female is observed. ■

1.1

Sample Spaces and Events

1.1.2

3

Events

In our study of probability, we will be interested not only in the individual outcomes of S but also in any collection of outcomes from S. DEFINITION

An event is any collection (subset) of outcomes contained in the sample space S. An event is said to be simple if it consists of exactly one outcome and compound if it consists of more than one outcome. When an experiment is performed, a particular event A is said to occur if the resulting experimental outcome is contained in A. In general, exactly one simple event will occur, but many compound events will occur simultaneously. Example 1.5 Consider an experiment in which each of three vehicles taking a particular freeway exit turns left (L ) or right (R) at the end of the off-ramp. The eight possible outcomes that comprise the sample space are LLL, RLL, LRL, LLR, LRR, RLR, RRL, and RRR. Thus there are eight simple events, among which are E1 ¼ {LLL} and E5 ¼ {LRR}. Some compound events include A ¼ {RLL, LRL, LLR} ¼ the event that exactly one of the three vehicles turns right B ¼ {LLL, RLL, LRL, LLR} ¼ the event that at most one of the vehicles turns right C ¼ {LLL, RRR} ¼ the event that all three vehicles turn in the same direction Suppose that when the experiment is performed, the outcome is LLL. Then the simple event E1 has occurred and so also have the events B and C (but not A). ■ Example 1.6 (Example 1.3 continued) When the number of pumps in use at each of two six-pump gas stations is observed, there are 49 possible outcomes, so there are 49 simple events: E1 ¼ {(0, 0)}, E2 ¼ {(0, 1)}, . . . , E49 ¼ {(6, 6)}. Examples of compound events are A ¼ {(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)} ¼ the event that the number of pumps in use is the same for both stations B ¼ {(0, 4), (1, 3), (2, 2), (3, 1), (4, 0)} ¼ the event that the total number of pumps in use is four C ¼ {(0, 0), (0, 1), (1, 0), (1, 1)} ¼ the event that at most one pump is in use at each station ■

Example 1.7 (Example 1.4 continued) The sample space for the program compilation experiment contains an infinite number of outcomes, so there are an infinite number of simple events. Compound events include A ¼ {S, FS, FFS} ¼ the event that at most three programs are examined B ¼ {S, FFS, FFFFS} ¼ the event that exactly one, three, or five programs are examined C ¼ {FS, FFFS, FFFFFS, . . .} ¼ the event that an even number of programs are examined

■

4

1

1.1.3

Probability

Some Relations from Set Theory

An event is nothing but a set, so relationships and results from elementary set theory can be used to study events. The following operations will be used to construct new events from given events. DEFINITION

1. The complement of an event A, denoted by A0 , is the set of all outcomes in S that are not contained in A. 2. The intersection of two events A and B, denoted by A \ B and read “A and B,” is the event consisting of all outcomes that are in both A and B. 3. The union of two events A and B, denoted by A [ B and read “A or B,” is the event consisting of all outcomes that are either in A or in B or in both events (so that the union includes outcomes for which both A and B occur as well as outcomes for which exactly one occurs)—that is, all outcomes in at least one of the events. Example 1.8 (Example 1.3 continued) For the experiment in which the number of pumps in use at a single six-pump gas station is observed, let A ¼ {0, 1, 2, 3, 4}, B ¼ {3, 4, 5, 6}, and C ¼ {1, 3, 5}. Then A [ B ¼ f0; 1; 2; 3; 4; 5; 6g ¼ S A \ B ¼ f3; 4g

A [ C ¼ f0; 1; 2; 3; 4; 5g

A \ C ¼ f1; 3g A0 ¼ f5; 6g

ðA [ CÞ0 ¼ f6g

■

Example 1.9 (Example 1.4 continued) In the program compilation experiment, define A, B, and C as in Example 1.7. Then A [ B ¼ {S, FS, FFS, FFFFS} A \ B ¼ {S, FFS} A0 ¼ {FFFS, FFFFS, FFFFFS, . . .} and C0 ¼ {S, FFS, FFFFS, . . .} ¼ the event that an odd number of programs are examined

■

The complement, intersection, and union operators from set theory correspond to the not, and, and or operators from computer science. Readers with prior programming experience may be aware of an important relationship between these three operators, first discovered by the nineteenth-century British mathematician Augustus De Morgan. DE MORGAN’S LAWS

Let A and B be two events in the sample space of some experiment. Then 1. (A [ B)0 ¼ A0 \ B0 2. (A \ B)0 ¼ A0 [ B0 De Morgan’s laws state that the complement of a union is an intersection of complements, and the complement of an intersection is a union of complements.

1.1

Sample Spaces and Events

5

Sometimes A and B have no outcomes in common, so that the intersection of A and B contains no outcomes (see Exercise 11). DEFINITION

When A and B have no outcomes in common, they are said to be disjoint or mutually exclusive events. Mathematicians write this compactly as A \ B ¼ ∅, where ∅ denotes the event consisting of no outcomes whatsoever (the “null” or “empty” event). Example 1.10 A small city has three automobile dealerships: a GM dealer selling Chevrolets and Buicks; a Ford dealer selling Fords and Lincolns; and a Chrysler dealer selling Jeeps and Chryslers. If an experiment consists of observing the brand of the next car sold, then the events A ¼ {Chevrolet, Buick} and B ¼ {Ford, Lincoln} are mutually exclusive because the next car sold cannot be both a GM product and a Ford product. ■ Venn diagrams are often used to visually represent samples spaces and events. To construct a Venn diagram, draw a rectangle whose interior will represent the sample space S. Then any event A is represented as the interior of a closed curve (often a circle) contained in S. Figure 1.1 shows examples of Venn diagrams.

a

b A

B

c A

B

d A

B

e A

A

B

Fig. 1.1 Venn diagrams. (a) Venn diagram of events A and B (b) Shaded region is A \ B (c) Shaded region is A [ B (d) Shaded region is A0 (e) Mutually exclusive events

The operations of union and intersection can be extended to more than two events. For any three events A, B, and C, the event A \ B \ C is the set of outcomes contained in all three events, whereas A [ B [ C is the set of outcomes contained in at least one of the three events. A collection of several events is said to be mutually exclusive (or pairwise disjoint) if no two events have any outcomes in common.

1.1.4

Exercises: Section 1.1 (1–12)

1. Ann and Bev have each applied for several jobs at a local university. Let A be the event that Ann is hired and let B be the event that Bev is hired. Express in terms of A and B the events (a) Ann is hired but not Bev. (b) At least one of them is hired. (c) Exactly one of them is hired. 2. Two voters, Al and Bill, are each choosing between one of three candidates—1, 2, and 3—who are running for city council. An experimental outcome specifies both Al’s choice and Bill’s choice, e.g., the pair (3,2). (a) List all elements of S. (b) List all outcomes in the event A that Al and Bill make the same choice. (c) List all outcomes in the event B that neither of them votes for candidate 2.

6

1

Probability

3. Four universities—1, 2, 3, and 4—are participating in a holiday basketball tournament. In the first round, 1 will play 2 and 3 will play 4. Then the two winners will play for the championship, and the two losers will also play. One possible outcome can be denoted by 1324: 1 beats 2 and 3 beats 4 in first-round games, and then 1 beats 3 and 2 beats 4. (a) List all outcomes in S. (b) Let A denote the event that 1 wins the tournament. List outcomes in A. (c) Let B denote the event that 2 gets into the championship game. List outcomes in B. (d) What are the outcomes in A [ B and in A \ B? What are the outcomes in A0 ? 4. Suppose that vehicles taking a particular freeway exit can turn right (R), turn left (L), or go straight (S). Consider observing the direction for each of three successive vehicles. (a) List all outcomes in the event A that all three vehicles go in the same direction. (b) List all outcomes in the event B that all three vehicles take different directions. (c) List all outcomes in the event C that exactly two of the three vehicles turn right. (d) List all outcomes in the event D that exactly two vehicles go in the same direction. (e) List the outcomes in D0 , C [ D, and C \ D. 5. Three components are connected to form a system as shown in the accompanying diagram. Because the components in the 2–3 subsystem are connected in parallel, that subsystem will function if at least one of the two individual components functions. For the entire system to function, component 1 must function and so must the 2–3 subsystem. 2 1 3

The experiment consists of determining the condition of each component: S (success) for a functioning component and F (failure) for a nonfunctioning component. (a) What outcomes are contained in the event A that exactly two out of the three components function? (b) What outcomes are contained in the event B that at least two of the components function? (c) What outcomes are contained in the event C that the system functions? (d) List outcomes in C0 , A [ C, A \ C, B [ C, and B \ C. 6. Each of a sample of four home mortgages is classified as fixed rate (F) or variable rate (V ). (a) What are the 16 outcomes in S ? (b) Which outcomes are in the event that exactly three of the selected mortgages are fixed rate? (c) Which outcomes are in the event that all four mortgages are of the same type? (d) Which outcomes are in the event that at most one of the four is a variable-rate mortgage? (e) What is the union of the events in parts (c) and (d), and what is the intersection of these two events? (f) What are the union and intersection of the two events in parts (b) and (c)? 7. A family consisting of three persons—A, B, and C—belongs to a medical clinic that always has a doctor at each of stations 1, 2, and 3. During a certain week, each member of the family visits the clinic once and is assigned at random to a station. The experiment consists of recording the station number for each member. One outcome is (1, 2, 1) for A to station 1, B to station 2, and C to station 1. (a) List the 27 outcomes in the sample space. (b) List all outcomes in the event that all three members go to the same station. (c) List all outcomes in the event that all members go to different stations. (d) List all outcomes in the event that no one goes to station 2.

1.2

Axioms, Interpretations, and Properties of Probability

7

8. A college library has five copies of a certain text on reserve. Two copies (1 and 2) are first printings, and the other three (3, 4, and 5) are second printings. A student examines these books in random order, stopping only when a second printing has been selected. One possible outcome is 5, and another is 213. (a) List the outcomes in S. (b) Let A denote the event that exactly one book must be examined. What outcomes are in A? (c) Let B be the event that book 5 is the one selected. What outcomes are in B? (d) Let C be the event that book 1 is not examined. What outcomes are in C? 9. An academic department has just completed voting by secret ballot for a department head. The ballot box contains four slips with votes for candidate A and three slips with votes for candidate B. Suppose these slips are removed from the box one by one. (a) List all possible outcomes. (b) Suppose a running tally is kept as slips are removed. For what outcomes does A remain ahead of B throughout the tally? 10. A construction firm is currently working on three different buildings. Let Ai denote the event that the ith building is completed by the contract date. Use the operations of union, intersection, and complementation to describe each of the following events in terms of A1, A2, and A3, draw a Venn diagram, and shade the region corresponding to each one. (a) At least one building is completed by the contract date. (b) All buildings are completed by the contract date. (c) Only the first building is completed by the contract date. (d) Exactly one building is completed by the contract date. (e) Either the first building or both of the other two buildings are completed by the contract date. 11. Use Venn diagrams to verify De Morgan’s laws: (a) (A [ B)0 ¼ A0 \ B0 (b) (A \ B)0 ¼ A0 [ B0 12. (a) In Example 1.10, identify three events that are mutually exclusive. (b) Suppose there is no outcome common to all three of the events A, B, and C. Are these three events necessarily mutually exclusive? If your answer is yes, explain why; if your answer is no, give a counterexample using the experiment of Example 1.10.

1.2

Axioms, Interpretations, and Properties of Probability

Given an experiment and its sample space S, the objective of probability is to assign to each event A a number P(A), called the probability of the event A, which will give a precise measure of the chance that A will occur. To ensure that the probability assignments will be consistent with our intuitive notions of probability, all assignments should satisfy the following axioms (basic properties) of probability. AXIOM 1

For any event A, P(A) 0.

8

1

Probability

AXIOM 2

P(S) ¼ 1.

AXIOM 3

If A1, A2, A3, . . . is an infinite collection of disjoint events, then P ð A1 [ A2 [ A3 [ Þ ¼

1 X

Pð Ai Þ

i¼1

Axiom 1 reflects the intuitive notion that the chance of A occurring should be nonnegative. The sample space is by definition the event that must occur when the experiment is performed (S contains all possible outcomes), so Axiom 2 says that the maximum possible probability of 1 is assigned to S. The third axiom formalizes the idea that if we wish the probability that at least one of a number of events will occur and no two of the events can occur simultaneously, then the chance of at least one occurring is the sum of the chances of the individual events. You might wonder why the third axiom contains no reference to a finite collection of disjoint events. It is because the corresponding property for a finite collection can be derived from our three axioms. We want our axiom list to be as short as possible and not contain any property that can be derived from others on the list. PROPOSITION

P(∅) ¼ 0, where ∅ is the null event. This, in turn, implies that the property contained in Axiom 3 is valid for a finite collection of disjoint events. Proof First consider the infinite collection A1 ¼ ∅, A2 ¼ ∅, A3 ¼ ∅, . . .. Since ∅ \ ∅ ¼ ∅, the events in this collection are disjoint and [Ai ¼ ∅. Axiom 3 then gives X Pð∅Þ ¼ Pð ∅ Þ This can happen only if P(∅) ¼ 0. Now suppose that A1, A2, . . ., Ak are disjoint events, and append to these the infinite collection Ak+1 ¼ ∅, Ak+2 ¼ ∅, Ak+3 ¼ ∅, . . .. Then the events A1, A2, . . ., Ak, Ak+1,. . . are disjoint, since A \ ∅ ¼ ∅ for all events. Again invoking Axiom 3, ! ! k 1 1 k 1 k 1 k X X X X X X P Ai ¼ P Ai ¼ Pð Ai Þ ¼ Pð Ai Þ þ Pð Ai Þ ¼ P ð Ai Þ þ 0¼ Pð A i Þ

[ i¼1

as desired.

[ i¼1

i¼1

i¼1

i¼kþ1

i¼1

i¼kþ1

i¼1

■

Example 1.11 Consider tossing a thumbtack in the air. When it comes to rest on the ground, either its point will be up (the outcome U ) or down (the outcome D). The sample space for this event is therefore S ¼ {U, D}. The axioms specify P(S) ¼ 1, so the probability assignment will be completed by determining P(U ) and P(D). Since U and D are disjoint and their union is S, the foregoing proposition implies that

1.2

Axioms, Interpretations, and Properties of Probability

9

1 ¼ PðS Þ ¼ PðU Þ þ PðDÞ It follows that P(D) ¼ 1 P(U ). One possible assignment of probabilities is P(U ) ¼ .5, P(D) ¼ .5, whereas another possible assignment is P(U ) ¼ .75, P(D) ¼ .25. In fact, letting p represent any fixed number between 0 and 1, P(U ) ¼ p, P(D) ¼ 1 p is an assignment consistent with the axioms. ■ Example 1.12 Consider testing batteries coming off an assembly line one by one until a battery having a voltage within prescribed limits is found. The simple events are E1 ¼ {S}, E2 ¼ {FS}, E3 ¼ {FFS}, E4 ¼ {FFFS}, . . .. Suppose the probability of any particular battery being satisfactory is .99. Then it can be shown that the probability assignment P(E1) ¼ .99, P(E2) ¼ (.01)(.99), P(E3) ¼ (.01)2(.99), . . . satisfies the axioms. In particular, because the Eis are disjoint and S ¼ E1 [ E2 [ E3 [ . . . , Axioms 2 and 3 require that 1 ¼ Pð S Þ ¼ P ð E 1 Þ þ Pð E2 Þ þ Pð E3 Þ þ h i ¼ :99 1 þ :01 þ ð:01Þ2 þ ð:01Þ3 þ This can be verified using the formula for the sum of a geometric series: a þ ar þ ar 2 þ ar 3 þ ¼

a 1r

However, another legitimate (according to the axioms) probability assignment of the same “geometric” type is obtained by replacing.99 by any other number p between 0 and 1 (and .01 by 1 p). ■

1.2.1

Interpreting Probability

Examples 1.11 and 1.12 show that the axioms do not completely determine an assignment of probabilities to events. The axioms serve only to rule out assignments inconsistent with our intuitive notions of probability. In the tack-tossing experiment of Example 1.11, two particular assignments were suggested. The appropriate or correct assignment depends on the nature of the thumbtack and also on one’s interpretation of probability. The interpretation that is most often used and most easily understood is based on the notion of relative frequencies. Consider an experiment that can be repeatedly performed in an identical and independent fashion, and let A be an event consisting of a fixed set of outcomes of the experiment. Simple examples of such repeatable experiments include the tack-tossing and die-tossing experiments previously discussed. If the experiment is performed n times, on some of the replications the event A will occur (the outcome will be in the set A), and on others, A will not occur. Let n(A) denote the number of replications on which A does occur. Then the ratio n(A)/n is called the relative frequency of occurrence of the event A in the sequence of n replications. For example, let A be the event that a package sent within the state of California for 2-day delivery actually arrives within 1 day. The results from sending ten such packages (the first ten replications) are as follows. Package # Did A occur? Relative frequency of A

1 N 0

2 Y .5

3 Y .667

4 Y .75

5 N .6

6 N .5

7 Y .571

8 Y .625

9 N .556

10 N .5

10

1

b Relative frequency delivered in one day

Relative frequency delivered in one day

a

Probability

1.0 9 Relative = = .60 frequency 15

.8

.6

.4

5 Relative = = .50 frequency 10

.2

.7

Approaches .6 .6

.5

0 0

10

20

30

40

Number of packages

50

100 200 300 400 500 600 700 800 900 1000 Number of packages

Fig. 1.2 Behavior of relative frequency: (a) Initial fluctuation (b) Long-run stabilization

Figure 1.2a shows how the relative frequency n(A)/n fluctuates rather substantially over the course of the first 50 replications. But as the number of replications continues to increase, Fig. 1.2b illustrates how the relative frequency stabilizes. More generally, both empirical evidence and mathematical theory indicate that any relative frequency of this sort will stabilize as the number of replications n increases. That is, as n gets arbitrarily large, n(A)/n approaches a limiting value we refer to as the long-run (or limiting) relative frequency of the event A. The objective interpretation of probability identifies this limiting relative frequency with P(A). A formal justification of this interpretation is provided by the Law of Large Numbers, a theorem we’ll encounter in Chap. 4. Suppose that probabilities are assigned to events in accordance with their limiting relative frequencies. Then a statement such as “the probability of a package being delivered within 1 day of mailing is .6” means that of a large number of mailed packages, roughly 60% will arrive within 1 day. Similarly, if B is the event that a certain brand of dishwasher will need service while under warranty, then P(B) ¼ .1 is interpreted to mean that in the long run 10% of all such dishwashers will need warranty service. This does not mean that exactly 1 out of every 10 will need service, or exactly 20 out of 200 will need service, because 10 and 200 are not the long run. Such mis-interpretations of probability as a guarantee on short-term outcomes are at the heart of the infamous gambler’s fallacy. This relative frequency interpretation of probability is said to be objective because it rests on a property of the experiment rather than on any particular individual concerned with the experiment. For example, two different observers of a sequence of coin tosses should both use the same probability assignments since the observers have nothing to do with limiting relative frequency. In practice, this interpretation is not as objective as it might seem, because the limiting relative frequency of an event will not be known. Thus we will have to assign probabilities based on our beliefs about the limiting relative frequency of events under study. Fortunately, there are many experiments for which there will be a consensus with respect to probability assignments. When we speak of a fair coin, we shall mean P(H ) ¼ P(T) ¼ .5, and a fair die is one for which limiting relative frequencies of the six outcomes are all equal, suggesting probability assignments P(⚀) ¼ ¼ P(⚅) ¼ 1/6. Because the objective interpretation of probability is based on the notion of limiting frequency, its applicability is limited to experimental situations that are repeatable. Yet the language of probability is often used in connection with situations that are inherently unrepeatable. Examples include: “The chances are good for a peace agreement”; “It is likely that our company will be awarded the

1.2

Axioms, Interpretations, and Properties of Probability

11

contract”; and “Because their best quarterback is injured, I expect them to score no more than 10 points against us.” In such situations we would like, as before, to assign numerical probabilities to various outcomes and events (e.g., the probability is .9 that we will get the contract). We must therefore adopt an alternative interpretation of these probabilities. Because different observers may have different prior information and opinions concerning such experimental situations, probability assignments may now differ from individual to individual. Interpretations in such situations are thus referred to as subjective. The book by Winkler listed in the references gives a very readable survey of several subjective interpretations. Importantly, even subjective interpretations of probability must satisfy the three axioms (and all properties that follow from the axioms) in order to be valid.

1.2.2

More Probability Properties

COMPLEMENT RULE

For any event A, P(A) ¼ 1 P(A0 ). Proof Since by definition of A0 , A [ A0 ¼ S while A and A0 are disjoint, 1 ¼ P(S) ¼P(A [ A0 ) ¼ P(A) + P(A0 ), from which the desired result follows. ■ This proposition is surprisingly useful because there are many situations in which P(A0 ) is more easily obtained by direct methods than is P(A). Example 1.13 Consider a system of five identical components connected in series, as illustrated in Fig. 1.3. 1

2

3

4

5

Fig. 1.3 A system of five components connected in series

Denote a component that fails by F and one that doesn’t fail by S (for success). Let A be the event that the system fails. For A to occur, at least one of the individual components must fail. Outcomes in A include SSFSS (1, 2, 4, and 5 all work, but 3 does not), FFSSS, and so on. There are, in fact, 31 different outcomes in A! However, A0 , the event that the system works, consists of the single outcome SSSSS. We will see in Sect. 1.5 that if 90% of all these components do not fail and different components fail independently of one another, then P(A0 ) ¼ .95 ¼ .59. Thus P(A) ¼ 1 .59 ¼ .41; so among a large number of such systems, roughly 41% will fail. ■ In general, the Complement Rule is useful when the event of interest can be expressed as “at least . . .,” because the complement “less than . . .” may be easier to work with. (In some problems, “more than . . .” is easier to deal with than “at most . . .”) When you are having difficulty calculating P(A) directly, think of determining P(A0 ). PROPOSITION

For any event A, P(A) 1.

12

1

Probability

This follows from the previous proposition: 1 ¼ P(A) + P(A0 ) P(A), because P(A0 ) 0 by Axiom 1. When A and B are disjoint, we know that P(A [ B) ¼ P(A) + P(B). How can this union probability be obtained when the events are not disjoint? ADDITION RULE

For any events A and B, P(A [ B) ¼ P(A) + P(B) P(A \ B). Notice that the proposition is valid even if A and B are disjoint, since then P(A \ B) ¼ 0. The key idea is that, in adding P(A) and P(B), the probability of the intersection A \ B is actually counted twice, so P(A \ B) must be subtracted out. Proof Note first that A [ B ¼ A [ (B \ A0 ), as illustrated in Fig. 1.4. Because A and (B \ A0 ) are disjoint, P(A [ B) ¼ P(A) + P(B \ A0 ). But B ¼ (B \ A) [ (B \ A0 ) (the union of that part of B in A and that part of B not in A). Furthermore, (B \ A) and (B \ A0 ) are disjoint, so that P(B) ¼ P(B \ A) + P(B \ A0 ). Combining these results gives PðA [ BÞ ¼ PðAÞ þ PðB \ A0 Þ ¼ PðAÞ þ ½PðBÞ PðA \ BÞ ¼ PðAÞ þ PðBÞ PðA \ BÞ

A

B

=

Fig. 1.4 Representing A [ B as a union of disjoint events

■

Example 1.14 In a certain residential suburb, 60% of all households get internet service from the local cable company, 80% get television service from that company, and 50% get both services from the company. If a household is randomly selected, what is the probability that it gets at least one of these two services from the company, and what is the probability that it gets exactly one of the services from the company? With A ¼ {gets internet service from the cable company} and B ¼ {gets television service from the cable company}, the given information implies that P(A) ¼ .6, P(B) ¼ .8, and P(A \ B) ¼ .5. The Addition Rule then applies to give Pðgets at least one of thesetwo Þ¼ services from the company PðA [ BÞ ¼ P A þ P B P A \ B ¼ :6 þ :8 :5 ¼ :9 The event that a household gets only television service from the company can be written as A0 \ B, i.e., (not internet) and television. Now Fig. 1.4 implies that :9 ¼ PðA [ BÞ ¼ PðAÞ þ PðA0 \ BÞ ¼ :6 þ PðA0 \ BÞ from which P(A0 \ B) ¼ .3. Similarly, P(A \ B0 ) ¼ P(A [ B) P(B) ¼ .1. This is all illustrated in Fig. 1.5, from which we see that Pðexactly oneÞ ¼ PðA \ B0 Þ þ PðA0 \ BÞ ¼ :1 þ :3 ¼ :4

1.2

Axioms, Interpretations, and Properties of Probability

13

P(A B′)

P(A′ B)

.1

.5

.3

■

Fig. 1.5 Probabilities for Example 1.14

The probability of a union of more than two events can be computed analogously. For three events A, B, and C, the result is PðA [ B [ CÞ ¼ PðAÞ þ PðBÞ þ PðCÞ PðA \ BÞ PðA \ CÞ PðB \ CÞ þ PðA \ B \ CÞ This can be seen by examining a Venn diagram of A [ B [ C, which is shown in Fig. 1.6. When P(A), P(B), and P(C) are added, outcomes in certain intersections are double counted and the corresponding probabilities must be subtracted. But this results in P(A \ B \ C) being subtracted once too often, so it must be added back. One formal proof involves applying the Addition Rule to P((A [ B) [ C), the probability of the union of the two events A [ B and C; see Exercise 30. More generally, a result concerning P(A1 [ [ Ak) can be proved by induction or by other methods. The pattern of additions and subtractions (or, equivalently, the method of deriving such union probability formulas) is often called the inclusion–exclusion principle.

B

A C

Fig. 1.6 A [ B [ C

1.2.3

Determining Probabilities Systematically

When the number of possible outcomes (simple events) is large, there will be many compound events. A simple way to determine probabilities for these events that avoids violating the axioms and derived properties is to first determine probabilities P(Ei) for all simple events. These should satisfy P(Ei) 0 and Σi P(Ei) ¼ 1. Then the probability of any compound event A is computed by adding together the P(Ei)s for all Eis in A: X Pð Ei Þ Pð A Þ ¼ all Ei s in A

Example 1.15 During off-peak hours a commuter train has five cars. Suppose a commuter is twice as likely to select the middle car (#3) as to select either adjacent car (#2 or #4), and is twice as likely to select either adjacent car as to select either end car (#1 or #5). Let pi ¼ P(car i is selected) ¼ P(Ei). Then we have p3 ¼ 2p2 ¼ 2p4 and p2 ¼ 2p1 ¼ 2p5 ¼ p4. This gives X 1¼ PðEi Þ ¼ p1 þ 2p1 þ 4p1 þ 2p1 þ p1 ¼ 10p1 implying p1 ¼ p5 ¼ .1, p2 ¼ p4 ¼ .2, and p3 ¼ .4. The probability that one of the three middle cars is selected (a compound event) is then p2 + p3 + p4 ¼ .8. ■

14

1

1.2.4

Probability

Equally Likely Outcomes

In many experiments consisting of N outcomes, it is reasonable to assign equal probabilities to all N simple events. These include such obvious examples as tossing a fair coin or fair die once (or any fixed number of times), or selecting one or several cards from a well-shuffled deck of 52. With p ¼ P(Ei) for every i, 1¼

N X

Pð Ei Þ ¼

i¼1

N X

p¼pN

so

p¼

i¼1

1 N

That is, if there are N possible outcomes, then the probability assigned to each is 1/N. Now consider an event A, with N(A) denoting the number of outcomes contained in A. Then Pð A Þ ¼

X

Pð Ei Þ ¼

Ei in A

X 1 N ð AÞ ¼ N N E in A i

Once we have counted the number N of outcomes in the sample space, to compute the probability of any event we must count the number of outcomes contained in that event and take the ratio of the two numbers. Thus when outcomes are equally likely, computing probabilities reduces to counting.

⚁

⚂

⚂

⚁

Example 1.16 When two dice are rolled separately, there are N ¼ 36 outcomes (delete the first row and column from the table in Example 1.3). If both the dice are fair, all 36 outcomes are equally likely, so P(Ei) ¼ 1/36. Then the event A ¼ {sum of two numbers is 8} consists of the five outcomes ( , ⚅), ( , ⚄), (⚃, ⚃), (⚄, ), and (⚅, ), so PðAÞ ¼

N ð AÞ 5 ¼ N 36

■

The next section of this book investigates counting methods in depth.

1.2.5

Exercises: Section 1.2 (13–30)

13. A mutual fund company offers its customers several different funds: a money-market fund, three different bond funds (short, intermediate, and long-term), two stock funds (moderate and high-risk), and a balanced fund. Among customers who own shares in just one fund, the percentages of customers in the different funds are as follows: Money-market Short bond Intermediate bond Long bond

20% 15% 10% 5%

High-risk stock Moderate-risk stock Balanced

18% 25% 7%

A customer who owns shares in just one fund is randomly selected. (a) What is the probability that the selected individual owns shares in the balanced fund? (b) What is the probability that the individual owns shares in a bond fund? (c) What is the probability that the selected individual does not own shares in a stock fund? 14. Consider randomly selecting a student at a certain university, and let A denote the event that the selected individual has a Visa credit card and B be the analogous event for a MasterCard. Suppose that P(A) ¼ .5, P(B) ¼ .4, and P(A \ B) ¼ .25.

1.2

15.

16.

17.

18.

19.

20.

21.

Axioms, Interpretations, and Properties of Probability

15

(a) Compute the probability that the selected individual has at least one of the two types of cards (i.e., the probability of the event A [ B). (b) What is the probability that the selected individual has neither type of card? (c) Describe, in terms of A and B, the event that the selected student has a Visa card but not a MasterCard, and then calculate the probability of this event. A computer consulting firm presently has bids out on three projects. Let Ai ¼ {awarded project i}, for i ¼ 1, 2, 3, and suppose that P(A1) ¼ .22, P(A2) ¼ .25, P(A3) ¼ .28, P(A1 \ A2) ¼ .11, P(A1 \ A3) ¼ .05, P(A2 \ A3) ¼ .07, P(A1 \ A2 \ A3) ¼ .01. Express in words each of the following events, and compute the probability of each event: (a) A1 [ A2 (b) A10 \ A20 [Hint: Use De Morgan’s Law.] (c) A1 [ A2 [ A3 (d) A10 \ A20 \ A30 (e) A10 \ A20 \ A3 (f) (A10 \ A20 ) [ A3 Suppose that 55% of all adults regularly consume coffee, 45% regularly consume soda, and 70% regularly consume at least one of these two products. (a) What is the probability that a randomly selected adult regularly consumes both coffee and soda? (b) What is the probability that a randomly selected adult doesn’t regularly consume either of these two products? Consider the type of clothes dryer (gas or electric) purchased by each of five different customers at a certain store. (a) If the probability that at most one of these customers purchases an electric dryer is .428, what is the probability that at least two purchase an electric dryer? (b) If P(all five purchase gas) ¼ .116 and P(all five purchase electric) ¼ .005, what is the probability that at least one of each type is purchased? An individual is presented with three different glasses of cola, labeled C, D, and P. He is asked to taste all three and then list them in order of preference. Suppose the same cola has actually been put into all three glasses. (a) What are the simple events in this ranking experiment, and what probability would you assign to each one? (b) What is the probability that C is ranked first? (c) What is the probability that C is ranked first and D is ranked last? Let A denote the event that the next request for assistance from a statistical software consultant relates to the SPSS package, and let B be the event that the next request is for help with SAS. Suppose that P(A) ¼ .30 and P(B) ¼ .50. (a) Why is it not the case that P(A) + P(B) ¼ 1? (b) Calculate P(A0 ). (c) Calculate P(A [ B). (d) Calculate P(A0 \ B0 ). A box contains six 40-W bulbs, five 60-W bulbs, and four 75-W bulbs. If bulbs are selected one by one in random order, what is the probability that at least two bulbs must be selected to obtain one that is rated 75 W? Human visual inspection of solder joints on printed circuit boards can be very subjective. Part of the problem stems from the numerous types of solder defects (e.g., pad nonwetting, knee visibility, voids) and even the degree to which a joint possesses one or more of these defects.

16

1

Probability

Consequently, even highly trained inspectors can disagree on the disposition of a particular joint. In one batch of 10,000 joints, inspector A found 724 that were judged defective, inspector B found 751 such joints, and 1159 of the joints were judged defective by at least one of the inspectors. Suppose that one of the 10,000 joints is randomly selected. (a) What is the probability that the selected joint was judged to be defective by neither of the two inspectors? (b) What is the probability that the selected joint was judged to be defective by inspector B but not by inspector A? 22. A factory operates three different shifts. Over the last year, 200 accidents have occurred at the factory. Some of these can be attributed at least in part to unsafe working conditions, whereas the others are unrelated to working conditions. The accompanying table gives the percentage of accidents falling in each type of accident–shift category. Shift Day Swing Night

Unsafe conditions 10% 8% 5%

Unrelated to conditions 35% 20% 22%

Suppose one of the 200 accident reports is randomly selected from a file of reports, and the shift and type of accident are determined. (a) What are the simple events? (b) What is the probability that the selected accident was attributed to unsafe conditions? (c) What is the probability that the selected accident did not occur on the day shift? 23. An insurance company offers four different deductible levels—none, low, medium, and high— for its homeowner’s policyholders and three different levels—low, medium, and high—for its automobile policyholders. The accompanying table gives proportions for the various categories of policyholders who have both types of insurance. For example, the proportion of individuals with both low homeowner’s deductible and low auto deductible is .06 (6% of all such individuals).

Auto L M H

N .04 .07 .02

Homeowner’s L M .06 .05 .10 .20 .03 .15

H .03 .10 .15

Suppose an individual having both types of policies is randomly selected. (a) What is the probability that the individual has a medium auto deductible and a high homeowner’s deductible? (b) What is the probability that the individual has a low auto deductible? A low homeowner’s deductible? (c) What is the probability that the individual is in the same category for both auto and homeowner’s deductibles? (d) Based on your answer in part (c), what is the probability that the two categories are different? (e) What is the probability that the individual has at least one low deductible level? (f) Using the answer in part (e), what is the probability that neither deductible level is low? 24. The route used by a driver in commuting to work contains two intersections with traffic signals. The probability that he must stop at the first signal is .4, the analogous probability for the second

1.2

25.

26.

27.

28.

Axioms, Interpretations, and Properties of Probability

17

signal is .5, and the probability that he must stop at one or more of the two signals is .6. What is the probability that he must stop (a) At both signals? (b) At the first signal but not at the second one? (c) At exactly one signal? The computers of six faculty members in a certain department are to be replaced. Two of the faculty members have selected laptop machines and the other four have chosen desktop machines. Suppose that only two of the setups can be done on a particular day, and the two computers to be set up are randomly selected from the six (implying 15 equally likely outcomes; if the computers are numbered 1, 2, . . . , 6, then one outcome consists of computers 1 and 2, another consists of computers 1 and 3, and so on). (a) What is the probability that both selected setups are for laptop computers? (b) What is the probability that both selected setups are desktop machines? (c) What is the probability that at least one selected setup is for a desktop computer? (d) What is the probability that at least one computer of each type is chosen for setup? Show that if one event A is contained in another event B (i.e., A is a subset of B), then P(A) P(B). [Hint: For such A and B, A and B \ A0 are disjoint and B ¼ A [ (B \ A0 ), as can be seen from a Venn diagram.] For general A and B, what does this imply about the relationship among P(A \ B), P(A), and P(A [ B)? The three most popular options on a certain type of new car are a built-in GPS (A), a sunroof (B), and an automatic transmission (C). If 40% of all purchasers request A, 55% request B, 70% request C, 63% request A or B, 77% request A or C, 80% request B or C, and 85% request A or B or C, compute the probabilities of the following events. (a) The next purchaser will request at least one of the three options. (b) The next purchaser will select none of the three options. (c) The next purchaser will request only an automatic transmission and neither of the other two options. (d) The next purchaser will select exactly one of these three options. [Hint: “A or B” is the event that at least one of the two options is requested; try drawing a Venn diagram and labeling all regions.] A certain system can experience three different types of defects. Let Ai (i ¼ 1, 2, 3) denote the event that the system has a defect of type i. Suppose that P(A1) ¼ .12 P(A1 [ A2) ¼ .13 P(A2 [ A3) ¼ .10

P(A2) ¼ .07 P(A1 [ A3) ¼ .14 P(A1 \ A2 \ A3) ¼ .01

P(A3) ¼ .05

(a) What is the probability that the system does not have a type 1 defect? (b) What is the probability that the system has both type 1 and type 2 defects? (c) What is the probability that the system has both type 1 and type 2 defects but not a type 3 defect? (d) What is the probability that the system has at most two of these defects? 29. In Exercise 7, suppose that any incoming individual is equally likely to be assigned to any of the three stations irrespective of where other individuals have been assigned. What is the probability that (a) All three family members are assigned to the same station? (b) At most two family members are assigned to the same station? (c) Every family member is assigned to a different station? 30. Apply the proposition involving the probability of A [ B to the union of the two events (A [ B) and C in order to verify the result for P(A [ B [ C).

18

1

1.3

Probability

Counting Methods

When the various outcomes of an experiment are equally likely (the same probability is assigned to each simple event), the task of computing probabilities reduces to counting. Equally likely outcomes arise in many games, including the six sides of a fair die, the two sides of a fair coin, and the 38 slots of a fair roulette wheel. As mentioned at the end of the last section, if N is the number of outcomes in a sample space and N(A) is the number of outcomes contained in an event A, then Pð AÞ ¼

N ð AÞ N

ð1:1Þ

If a list of the outcomes is available or easy to construct and N is small, then the numerator and denominator of Eq. (1.1) can be obtained without the benefit of any general counting principles. There are, however, many experiments for which the effort involved in constructing such a list is prohibitive because N is quite large. By exploiting some general counting rules, it is possible to compute probabilities of the form (1.1) without a listing of outcomes. These rules are also useful in many problems involving outcomes that are not equally likely. Several of the rules developed here will be used in studying probability distributions in the next chapter.

1.3.1

The Fundamental Counting Principle

Our first counting rule applies to any situation in which an event consists of ordered pairs of objects and we wish to count the number of such pairs. By an ordered pair, we mean that, if O1 and O2 are objects, then the pair (O1, O2) is different from the pair (O2, O1). For example, if an individual selects one airline for a trip from Los Angeles to Chicago and a second one for continuing on to New York, one possibility is (American, United), another is (United, American), and still another is (United, United). PROPOSITION

If the first element or object of an ordered pair can be selected in n1 ways, and for each of these n1 ways the second element of the pair can be selected in n2 ways, then the number of pairs is n1n 2. Example 1.17 A homeowner doing some remodeling requires the services of both a plumbing contractor and an electrical contractor. If there are 12 plumbing contractors and 9 electrical contractors available in the area, in how many ways can the contractors be chosen? If we denote the plumbers by P1, . . ., P12 and the electricians by Q1, . . ., Q9, then we wish the number of pairs of the form (Pi, Qj). With n1 ¼ 12 and n2 ¼ 9, the proposition yields N ¼ (12)(9) ¼ 108 possible ways of choosing the two types of contractors. ■ In Example 1.17, the choice of the second element of the pair did not depend on which first element was chosen or occurred. As long as there is the same number of choices of the second element for each first element, the proposition above is valid even when the set of possible second elements depends on the first element.

1.3

Counting Methods

19

Example 1.18 A family has just moved to a new city and requires the services of both an obstetrician and a pediatrician. There are two easily accessible medical clinics, each having two obstetricians and three pediatricians. The family will obtain maximum health insurance benefits by joining a clinic and selecting both doctors from that clinic. In how many ways can this be done? Denote the obstetricians by O1, O2, O3, and O4 and the pediatricians by P1, . . ., P6. Then we wish the number of pairs (Oi, Pj) for which Oi and Pj are associated with the same clinic. Because there are four obstetricians, n1 ¼ 4, and for each there are three choices of pediatrician, so n2 ¼ 3. Applying the proposition gives N ¼ n1n2 ¼ 12 possible choices. ■

⚁ ⚁ ⚁

⚁

⚂

If a six-sided die is tossed five times in succession, then each possible outcome is an ordered collection of five numbers such as (⚀, , ⚀, , ⚃) or (⚅, ⚄, , , ). We will call an ordered collection of k objects a k-tuple (so a pair is a 2-tuple and a triple is a 3-tuple). Each outcome of the die-tossing experiment is then a 5-tuple. The following theorem, called the Fundamental Counting Principle, generalizes the previous proposition to k-tuples. FUNDAMENTAL COUNTING PRINCIPLE

Suppose a set consists of ordered collections of k elements (k-tuples) and that there are n1 possible choices for the first element; for each choice of the first element, there are n2 possible choices of the second element;. . .; for each possible choice of the first k 1 elements, there are nk choices of the kth element. Then there are n1n2 nk possible k-tuples. Example 1.19 (Example 1.17 continued) Suppose the home remodeling job involves first purchasing several kitchen appliances. They will all be purchased from the same dealer, and there are five dealers in the area. With the dealers denoted by D1, . . ., D5, there are N ¼ n1n2n3 ¼ (5)(12)(9) ¼ 540 3-tuples of the form (Di, Pj, Qk), so there are 540 ways to choose first an appliance dealer, then a plumbing contractor, and finally an electrical contractor. ■ Example 1.20 (Example 1.18 continued) If each clinic has both three specialists in internal medicine and two general surgeons, there are n1n2n3n4 ¼ (4)(3)(3)(2) ¼ 72 ways to select one doctor of each type such that all doctors practice at the same clinic. ■

1.3.2

Tree Diagrams

In many counting and probability problems, a tree diagram can be used to represent pictorially all the possibilities. The tree diagram associated with Example 1.18 appears in Fig. 1.7. Starting from a point on the left side of the diagram, for each possible first element of a pair a straight-line segment emanates rightward. Each of these lines is referred to as a first-generation branch. Now for any given first-generation branch we construct another line segment emanating from the tip of the branch for each possible choice of a second element of the pair. Each such line segment is a second-generation branch. Because there are four obstetricians, there are four first-generation branches, and three pediatricians for each obstetrician yields three second-generation branches emanating from each first-generation branch.

20

1

Probability P1

Fig. 1.7 Tree diagram for Example 1.18

P2 O1

P3 P1

O2

P2

O3

P3 P4

O4

P5 P6 P4 P5 P6

Generalizing, suppose there are n1 first-generation branches, and for each first-generation branch there are n2 second-generation branches. The total number of second-generation branches is then n1n2. Since the end of each second-generation branch corresponds to exactly one possible pair (choosing a first element and then a second puts us at the end of exactly one second-generation branch), there are n1n2 pairs, verifying our first proposition. The Fundamental Counting Principle can also be illustrated by a tree diagram; simply construct a more elaborate diagram by adding third-generation branches emanating from the tip of each second generation, then fourth-generation branches, and so on, until finally kth-generation branches are added. The construction of a tree diagram does not depend on having the same number of secondgeneration branches emanating from each first-generation branch. If the second clinic had four pediatricians, then there would be only three branches emanating from two of the first-generation branches and four emanating from each of the other two first-generation branches. A tree diagram can thus be used to represent experiments for which the Fundamental Counting Principle does not apply.

1.3.3

Permutations

⚂

⚂

⚁ ⚂

So far the successive elements of a k-tuple were selected from entirely different sets (e.g., appliance dealers, then plumbers, and finally electricians). In several tosses of a die, the set from which successive elements are chosen is always {⚀, , , ⚃, ⚄, ⚅}, but the choices are made “with replacement” so that the same element can appear more than once. If the die is rolled once, there are obviously 6 possible outcomes; for two rolls, there are 62 ¼ 36 possibilities, since we distinguish ( , ⚄) from (⚄, ). In general, if k selections are made with replacement from a set of n distinct objects (such as the six sides of a die), then the total number of possible outcomes is nk. We now consider a fixed set consisting of n distinct elements and suppose that a k-tuple is formed by selecting successively from this set without replacement, so that an element can appear in at most one of the k positions.

1.3

Counting Methods

21

DEFINITION

Any ordered sequence of k objects taken without replacement from a set of n distinct objects is called a permutation of size k of the objects. The number of permutations of size k that can be constructed from the n objects is denoted by nPk. The number of permutations of size k is obtained immediately from the Fundamental Counting Principle. The first element can be chosen in n ways; for each of these n ways the second element can be chosen in n 1 ways; and so on. Finally, for each way of choosing the first k 1 elements, the kth element can be chosen in n (k 1) ¼ n k + 1 ways, so n Pk

¼ nðn 1Þðn 2Þ ðn k þ 2Þðn k þ 1Þ

Example 1.21 Ten teaching assistants are available for grading papers in a particular course. The first exam consists of four questions, and the professor wishes to select a different assistant to grade each question (only one assistant per question). In how many ways can assistants be chosen to grade the exam? Here n ¼ the number of assistants ¼ 10 and k ¼ the number of questions ¼ 4. The number of different grading assignments is then 10P4 ¼ (10)(9)(8)(7) ¼ 5040. ■ Example 1.22 The Birthday Problem. Disregarding the possibility of a February 29 birthday, suppose a randomly selected individual is equally likely to have been born on any one of the other 365 days. If ten people are randomly selected, what is the probability that all have different birthdays? Imagine selecting 10 days, with replacement, from the calendar to represent the birthdays of the ten randomly selected people. One possible outcome of this selection would be (March 31, December 30, . . ., September 27, February 12). There are 36510 such outcomes. The number of outcomes among them with no repeated birthdays is ð365Þð364Þ ð356Þ ¼ 365 P10 (any of the 365 calendar days may be selected first; if March 31 is chosen, any of the other 364 days is acceptable for the second selection; and so on). Hence, the probability all ten randomly selected people have different birthdays equals 365P10/36510 ¼ .883. Equivalently, there’s only a .117 chance that at least two people out of these ten will share a birthday. It’s worth noting that the first probability can be rewritten as 365 P10 10

365

¼

365 364 356 365 365 365

We may think of each fraction as representing the chance the next birthday selected will be different from all previous ones. (This is an example of conditional probability, the topic of the next section.) Now replace 10 with k (i.e., k randomly selected birthdays); what is the smallest k for which there is at least a 50–50 chance that two or more people will have the same birthday? Most people incorrectly guess that we need a very large group of people for this to be true; the most common guess is that 183 people are required (half the days on the calendar). But the required value of k is actually much smaller: the probability that k randomly selected people all have different birthdays equals 365Pk/365k, which not surprisingly decreases as k increases. Figure 1.8 displays this probability for increasing values of k. As it turns out, the smallest k for which this probability falls below .5 is just k ¼ 23. That is, there is less than a 50–50 chance (.4927, to be precise) of 23 randomly selected people all having different birthdays, and thus a probability.5073 that at least two people in a random sample of 23 will share a birthday.

1

P(no shared birthdays among k people)

22

Probability

1.00

0.75

0.50

0.25

0.00 1

10

20

30

40

50

60

70

k

■

Fig. 1.8 P(no birthday match) in Example 1.22

The expression for nPk can be rewritten with the aid of factorial notation. Recall that 7! (read “7 factorial”) is compact notation for the descending product of integers (7)(6)(5)(4)(3)(2)(1). More generally, for any positive integer m, m! ¼ m(m 1)(m 2) (2)(1). This gives 1! ¼ 1, and we also define 0! ¼ 1. Using factorial notation, (10)(9)(8)(7) ¼ (10)(9)(8)(7)(6!)/6! ¼ 10!/6!. More generally, n Pk

nð n 1Þ ð n k þ 1Þ ð n k Þ ð n k 1Þ ð 2Þ ð 1Þ ¼ nð n 1Þ n k þ 1 ¼ ðn kÞðn k 1Þ ð2Þð1Þ

which becomes n Pk

¼

n! ðn kÞ!

For example, 9P3 ¼ 9!/(9 3)! ¼ 9!/6! ¼ 9 8 7 6!/6! ¼ 9 8 7. Note also that because 0! ¼ 1, nPn ¼ n!/(n n)! ¼ n!/0! ¼ n!/1 ¼ n!, as it should.

1.3.4

Combinations

Often the objective is to count the number of unordered subsets of size k that can be formed from a set consisting of n distinct objects. For example, in bridge it is only the 13 cards in a hand and not the order in which they are dealt that is important; in the formation of a committee, the order in which committee members are listed is frequently unimportant. DEFINITION

Given a set of n distinct objects, any unordered subset of size k of the objects is called a combination. The number of combinations of size k that can be formed from n distinct objects n will be denoted by or nCk. k

1.3

Counting Methods

23

The number of combinations of size k from a particular set is smaller than the number of permutations because, when order is disregarded, some of the permutations correspond to the same combination. Consider, for example, the set {A, B, C, D, E} consisting of five elements. There are 5P3 ¼ 5!/(5 3)! ¼ 60 permutations of size 3. There are six permutations of size 3 consisting of the elements A, B, and C because these three can be ordered 3 2 1 ¼ 3! ¼ 6 ways: (A, B, C), (A, C, B), (B, A, C), (B, C, A), (C, A, B), and (C, B, A). But these six permutations are equivalent to the single combination {A, B, C}. Similarly, for any other combination of size 3, there are 3! permutations, each obtained by ordering the three objects. Thus, 60 5 5 60 ¼ 5 P3 ¼ ¼ 10 3! so ¼ 3 3 3! These ten combinations are fA; B; CgfA; B; DgfA; B; EgfA; C; DgfA; C; Eg fA; D; EgfB; C; DgfB; C; EgfB; D; EgfC; D; Eg When there are n distinct objects, any permutation of size k is obtained by ordering the k unordered objects of a combination in one of k! ways, so the number of permutations is the product of k! and the number of combinations. This gives P n! n ¼n k¼ n Ck ¼ k k!ðn kÞ! k! n n Notice that ¼ 1 and ¼ 1 because there is only one way to choose a set of (all) n 0 n n elements or of no elements, and ¼ n since there are n subsets of size 1. 1 Example 1.23 A bridge hand consists of any 13 cards selected from a 52-card deck without regard to 52 order. There are ¼ 52!=ð13! 39!Þ different bridge hands, which works out to approximately 13 635 billion. Since there are 13 cards in each suit, the number of hands consisting entirely of clubs 26 26 and/or spades (no red cards) is ¼ 26!=ð13! 13!Þ ¼ 10, 400, 600. One of these hands 13 13 26 consists entirely of spades, and one consists entirely of clubs, so there are 2 hands that 13 consist entirely of clubs and spades with both suits represented in the hand. Suppose a bridge hand is dealt from a well-shuffled deck (i.e., 13 cards are randomly selected from among the 52 possibilities) and let A ¼ {the hand consists entirely of spades and clubs with both suits represented} B ¼ {the hand consists of exactly two suits} 52 The N ¼ possible outcomes are equally likely, so 13

24

1

Pð AÞ ¼

N ð AÞ ¼ N

Probability

26 2 13 ¼ :0000164 52 13

4 Since there are ¼ 6 combinations consisting of two suits, of which spades and clubs is one 2 such combination, 26 6 2 13 N ð BÞ ¼ :0000983 ¼ PðBÞ ¼ N 52 13 That is, a hand consisting entirely of cards from exactly two of the four suits will occur roughly once in every 10,000 hands. If you play bridge only once a month, it is likely that you will never be dealt such a hand. ■ Example 1.24 A university warehouse has received a shipment of 25 printers, of which 10 are laser printers and 15 are inkjet models. If 6 of these 25 are selected at random to be checked by a particular technician, what is the probability that exactly 3 of those selected are laser printers (so that the other 3 are inkjets)? Let D3 ¼ {exactly 3 of the 6 selected are inkjet printers}. Assuming that any particular set of 6 printers is as likely to be chosen as is any other set, we have equally likely outcomes, so P(D3) ¼ N(D3)/N, where N is the number of ways of choosing 6 printers from the 25 and N(D3) is the number 25 of ways of choosing 3 laser printers and 3 inkjet models. Thus N ¼ . To obtain N(D3), think of 6 15 first choosing 3 of the 15 inkjet models and then 3 of the laser printers. There are ways of 3 10 choosing the 3 inkjet models, and there are ways of choosing the 3 laser printers; by the 3 Fundamental Counting Principle, N(D3) is the product of these two numbers. So 15 10 15! 10! 3 3 N ðD 3 Þ 3!12! 3!7! ¼ :3083 ¼ ¼ PðD3 Þ ¼ 25! N 25 6 6!19! Let D4 ¼ {exactly 4 of the 6 printers selected are inkjet models} and define D5 and D6 in an analogous manner. Notice that the events D3, D4, D5, and D6 are disjoint. Thus, the probability that at least 3 inkjet printers are selected is PðD3 [ D4 [ D5 [ D6 Þ ¼ PðD3 Þ þ PðD4 Þ þ PðD5 Þ þ PðD6 Þ ¼

15 10 15 10 15 10 15 10 3 3 4 2 5 1 6 0 þ þ þ ¼ :8530 25 25 25 25 6 6 6 6

■

1.3

Counting Methods

25

Example 1.25 The article “Does Your iPod Really Play Favorites?” (The Amer. Statistician, 2009: 263-268) investigated the randomness of the iPod’s shuffling process. One professor’s iPod playlist contains 100 songs, of which 10 are by the Beatles. Suppose the shuffle feature is used to play the songs in random order. What is the probability that the first Beatles song heard is the fifth song played? In order for this event to occur, it must be the case that the first four songs played are not Beatles songs (NBs) and that the fifth song is by the Beatles (B). The total number of ways to select the first five songs is (100)(99)(98)(97)(96), while the number of ways to select these five songs so that the first four are NBs and the next is a B is (90)(89)(88)(87)(10). The random shuffle assumption implies that every sequence of 5 songs from amongst the 100 has the same chance of being selected as the first 5 played, i.e., each outcome (a list of 5 songs) is equally likely. Therefore the desired probability is P 10 90 89 88 87 10 P 1st B is the 5th song played ¼ ¼ 90 4 ¼ :0679 100 99 98 97 96 100 P5 Here is an alternative line of reasoning involving combinations. Rather than focusing on selecting just the first 5 songs, think of playing all 100 songs in random order. The number of ways of choosing 100 10 of these songs to be the Bs (without regard to the order in which they are played) is . Now 10 95 if we choose 9 of the last 95 songs to be Bs, which can be done in ways, that leaves four NBs 9 and one B for the first five songs. Finally, there is only one way for these first five songs to start with four NBs and then follow with a B (remember that we are considering unordered subsets). Thus 95 st 9 P 1 B is the 5th song played ¼ 100 10 It is easily verified that this latter expression is in fact identical to the previous expression for the desired probability, so the numerical result is again .0679. By similar reasoning, the probability that one of the first five songs played is a Beatles song is P(1st B is the 1st or 2nd or 3rd or 4th or 5th song played) 99 98 97 96 95 9 9 9 9 9 þ þ þ þ ¼ :4162 ¼ 100 100 100 100 100 10 10 10 10 10 It is thus rather likely that a Beatles song will be one of the first five songs played. Such a “coincidence” is not as surprising as might first appear to be the case. ■

1.3.5

Exercises: Section 1.3 (31–49)

31. An ATM personal identification number (PIN) consists of a four-digit sequence. (a) How many different possible PINs are there if there are no restrictions on the possible choice of digits? (b) According to a representative at the authors’ local branch of Chase Bank, there are in fact restrictions on the choice of digits. The following choices are prohibited: (1) all four digits

26

32.

33.

34.

35.

1

Probability

identical; (2) sequences of consecutive ascending or descending digits, such as 6543; (3) any sequence starting with 19 (birth years are too easy to guess). So if one of the PINs in (a) is randomly selected, what is the probability that it will be a legitimate PIN (i.e., not be one of the prohibited sequences)? (c) Someone has stolen an ATM card and knows the first and last digits of the PIN are 8 and 1, respectively. He also knows about the restrictions described in (b). If he gets three chances to guess the middle two digits before the ATM “eats” the card, what is the probability the thief gains access to the account? (d) Recalculate the probability in (c) if the first and last digits are 1 and 1. The College of Science Council has one student representative from each of the five science departments (biology, chemistry, statistics, mathematics, physics). In how many ways can (a) Both a council president and a vice president be selected? (b) A president, a vice president, and a secretary be selected? (c) Two council members be selected for the Dean’s Council? A friend of ours is giving a dinner party. Her current wine supply includes 8 bottles of zinfandel, 10 of merlot, and 12 of cabernet (she drinks only red wine), all from different wineries. (a) If she wants to serve 3 bottles of zinfandel and serving order is important, how many ways are there to do this? (b) If 6 bottles of wine are to be randomly selected from the 30 for serving, how many ways are there to do this? (c) If 6 bottles are randomly selected, how many ways are there to obtain two bottles of each variety? (d) If 6 bottles are randomly selected, what is the probability that this results in two bottles of each variety being chosen? (e) If 6 bottles are randomly selected, what is the probability that all of them are the same variety? (a) Beethoven wrote 9 symphonies and Mozart wrote 27 piano concertos. If a university radio station announcer wishes to play first a Beethoven symphony and then a Mozart concerto, in how many ways can this be done? (b) The station manager decides that on each successive night (7 days per week), a Beethoven symphony will be played, followed by a Mozart piano concerto, followed by a Schubert string quartet (of which there are 15). For roughly how many years could this policy be continued before exactly the same program would have to be repeated? A stereo store is offering a special price on a complete set of components (receiver, compact disc player, speakers, turntable). A purchaser is offered a choice of manufacturer for each component: Receiver: Compact disc player: Speakers: Turntable:

Kenwood, Onkyo, Pioneer, Sony, Yamaha Onkyo, Pioneer, Sony, Panasonic Boston, Infinity, Polk Onkyo, Sony, Teac, Technics

A switchboard display in the store allows a customer to hook together any selection of components (consisting of one of each type). Use the Fundamental Counting Principle to answer the following questions: (a) In how many ways can one component of each type be selected? (b) In how many ways can components be selected if both the receiver and the compact disc player are to be Sony? (c) In how many ways can components be selected if none is to be Sony?

1.3

Counting Methods

27

(d) In how many ways can a selection be made if at least one Sony component is to be included? (e) If someone flips switches on the selection in a completely random fashion, what is the probability that the system selected contains at least one Sony component? Exactly one Sony component? 36. In five-card poker, a straight consists of five cards in adjacent ranks (e.g., 9 of clubs, 10 of hearts, jack of hearts, queen of spades, king of clubs). Assuming that aces can be high or low, if you are dealt a five-card hand, what is the probability that it will be a straight with high card 10? What is the probability that it will be a straight? What is the probability that it will be a straight flush (all cards in the same suit)? 37. A local bar stocks 12 American beers, 8 Mexican beers, and 9 German beers. You ask the bartender to pick out a five-beer “sampler” for you. Assume the bartender makes the five selections at random and without replacement. (a) What is the probability you get at least four American beers? (b) What is the probability you get five beers from the same country? 38. Computer keyboard failures can be attributed to electrical defects or mechanical defects. A repair facility currently has 25 failed keyboards, 6 of which have electrical defects and 19 of which have mechanical defects. (a) How many ways are there to randomly select 5 of these keyboards for a thorough inspection (without regard to order)? (b) In how many ways can a sample of 5 keyboards be selected so that exactly 2 have an electrical defect? (c) If a sample of 5 keyboards is randomly selected, what is the probability that at least 4 of these will have a mechanical defect? 39. The statistics department at the authors’ university participates in an annual volleyball tournament. Suppose that all 16 department members are willing to play. (a) How many different six-person volleyball rosters could be generated? (That is, how many years could the department participate in the tournament without repeating the same six-person team?) (b) The statistics department faculty consist of 5 women and 11 men. How many rosters comprising exactly 2 women and 4 men can be generated? (c) The tournament’s rules actually require that each team include at least two women. Under this rule, how many valid teams could be generated? (d) Suppose this year the department decides to randomly select its six players. What is the probability the randomly selected team has exactly two women? At least two women? 40. A production facility employs 20 workers on the day shift, 15 workers on the swing shift, and 10 workers on the graveyard shift. A quality control consultant is to select 6 of these workers for in-depth interviews. Suppose the selection is made in such a way that any particular group of 6 workers has the same chance of being selected as does any other group (drawing 6 slips without replacement from among 45). (a) How many selections result in all 6 workers coming from the day shift? What is the probability that all 6 selected workers will be from the day shift? (b) What is the probability that all 6 selected workers will be from the same shift? (c) What is the probability that at least two different shifts will be represented among the selected workers? (d) What is the probability that at least one of the shifts will be unrepresented in the sample of workers?

28

1

Probability

41. An academic department with five faculty members narrowed its choice for department head to either candidate A or candidate B. Each member then voted on a slip of paper for one of the candidates. Suppose there are actually three votes for A and two for B. If the slips are selected for tallying in random order, what is the probability that A remains ahead of B throughout the vote count (e.g., this event occurs if the selected ordering is AABAB, but not for ABBAA)? 42. An experimenter is studying the effects of temperature, pressure, and type of catalyst on yield from a chemical reaction. Three different temperatures, four different pressures, and five different catalysts are under consideration. (a) If any particular experimental run involves the use of a single temperature, pressure, and catalyst, how many experimental runs are possible? (b) How many experimental runs involve use of the lowest temperature and two lowest pressures? (c) Suppose that five different experimental runs are to be made on the first day of experimentation. If the five are randomly selected from among all the possibilities, so that any group of five has the same probability of selection, what is the probability that a different catalyst is used on each run? 43. A box in a certain supply room contains four 40-W lightbulbs, five 60-W bulbs, and six 75-W bulbs. Suppose that three bulbs are randomly selected. (a) What is the probability that exactly two of the selected bulbs are rated 75 W? (b) What is the probability that all three of the selected bulbs have the same rating? (c) What is the probability that one bulb of each type is selected? (d) Suppose now that bulbs are to be selected one by one until a 75-W bulb is found. What is the probability that it is necessary to examine at least six bulbs? 44. Fifteen telephones have just been received at an authorized service center. Five of these telephones are cellular, five are cordless, and the other five are corded phones. Suppose that these components are randomly allocated the numbers 1, 2, . . ., 15 to establish the order in which they will be serviced. (a) What is the probability that all the cordless phones are among the first ten to be serviced? (b) What is the probability that after servicing ten of these phones, phones of only two of the three types remain to be serviced? (c) What is the probability that two phones of each type are among the first six serviced? 45. Three molecules of type A, three of type B, three of type C, and three of type D are to be linked together to form a chain molecule. One such chain molecule is ABCDABCDABCD, and another is BCDDAAABDBCC. (a) How many such chain molecules are there? [Hint: If the three A’s were distinguishable from one another—A1, A2, A3—and the B’s, C’s, and D’s were also, how many molecules would there be? How is this number reduced when the subscripts are removed from the A’s?] (b) Suppose a chain molecule of the type described is randomly selected. What is the probability that all three molecules of each type end up next to each other (such as in BBBAAADDDCCC)? 46. A popular Dilbert cartoon strip (popular among statisticians, anyway) shows an allegedly “random” number generator produce the sequence 999999 with the accompanying comment, “That’s the problem with randomness: you can never be sure.” Most people would agree that 999999 seems less “random” than, say, 703928, but in what sense is that true? Imagine we randomly generate a six-digit number, i.e., we make six draws with replacement from the digits 0 through 9. (a) What is the probability of generating 999999? (b) What is the probability of generating 703928?

1.4

Conditional Probability

29

(c) What is the probability of generating a sequence of six identical digits? (d) What is the probability of generating a sequence with no identical digits? (Comparing the answers to (c) and (d) gives some sense of why some sequences feel intuitively more random than others.) (e) Here’s a real challenge: what is the probability of generating a sequence with exactly one repeated digit? 47. Three married couples have purchased theater tickets and are seated in a row consisting of just six seats. If they take their seats in a completely random fashion (random order), what is the probability that Jim and Paula (husband and wife) sit in the two seats on the far left? What is the probability that Jim and Paula end up sitting next to one another? What is the probability that at least one of the wives ends up sitting next to her husband? 48. A starting lineup in basketball consists of two guards, two forwards, and a center. (a) A certain college team has on its roster five guards, four forwards, and three centers. How many different starting lineups can be created? (b) Their opposing team in one particular game has three centers, four guards, four forwards, and one individual (X) who can play either guard or forward. How many different starting lineups can the opposing team create? [Hint: Consider lineups without X, with X as a guard, and with X as a forward.] (c) Now suppose a team has 4 guards, 4 forwards, 2 centers, and two players (X and Y) who can play either guard or forward. If 5 of the 12 players on this team are randomly selected, what is the probability that they constitute a legitimate starting lineup? n n 49. Show that ¼ . Give an interpretation involving subsets. k nk

1.4

Conditional Probability

The probabilities assigned to various events depend on what is known about the experimental situation when the assignment is made. Subsequent to the initial assignment, partial information about or relevant to the outcome of the experiment may become available. Such information may cause us to revise some of our probability assignments. For a particular event A, we have used P(A) to represent the probability assigned to A; we now think of P(A) as the original or “unconditional” probability of the event A. In this section, we examine how the information “an event B has occurred” affects the probability assigned to A. For example, A might refer to an individual having a particular disease in the presence of certain symptoms. If a blood test is performed on the individual and the result is negative (B ¼ negative blood test), then the probability of having the disease will change (it should decrease, but not usually to zero, since blood tests are not infallible). Example 1.26 Complex components are assembled in a plant that uses two different assembly lines, A and A0 . Line A uses older equipment than A0 , so it is somewhat slower and less reliable. Suppose on a given day line A has assembled 8 components, of which 2 have been identified as defective (B) and 6 as nondefective (B0 ), whereas A0 has produced 1 defective and 9 nondefective components. This information is summarized in the accompanying table.

30

1

Probability

Condition Line A A0

B0 6 9

B 2 1

Unaware of this information, the sales manager randomly selects 1 of these 18 components for a demonstration. Prior to the demonstration Pðline A component selectedÞ ¼ PðAÞ ¼

N ð AÞ 8 ¼ ¼ :444 N 18

However, if the chosen component turns out to be defective, then the event B has occurred, so the component must have been one of the 3 in the B column of the table. Since these 3 components are equally likely among themselves, the probability the component was selected from line A, given that event B has occurred, is PðA, given BÞ ¼

2 2=18 PðA \ BÞ ¼ ¼ 3 3=18 Pð BÞ

ð1:2Þ ■

In Eq. (1.2), the conditional probability is expressed as a ratio of unconditional probabilities. The numerator is the probability of the intersection of the two events, whereas the denominator is the probability of the conditioning event B. A Venn diagram illuminates this relationship (Fig. 1.9). A B = what remains of event A

A “conditioning” on event B B

B = new “sample space”

Fig. 1.9 Motivating the definition of conditional probability

Given that B has occurred, the relevant sample space is no longer S but consists of just outcomes in B, and A has occurred if and only if one of the outcomes in the intersection A \ B occurred. So the conditional probability of A given B should, logically, be the ratio of the likelihoods of these two events.

1.4.1

The Definition of Conditional Probability

Example 1.26 demonstrates that when outcomes are equally likely, computation of conditional probabilities can be based on intuition. When experiments are more complicated, though intuition may fail us, we want to have a general definition of conditional probability that will yield intuitive answers in simple problems. Figure 1.9 and Eq. (1.2) suggest the appropriate definition.

1.4

Conditional Probability

31

DEFINITION

For any two events A and B with P(B) > 0, the conditional probability of A given that B has occurred, denoted P(A|B), is defined by Pð A \ BÞ P AB ¼ : Pð BÞ

ð1:3Þ

Example 1.27 Suppose that of all individuals buying a certain digital camera, 60% include an optional memory card in their purchase, 40% include an extra battery, and 30% include both a card and battery. Consider randomly selecting a buyer and let A ¼ {memory card purchased} and B ¼ {battery purchased}. Then P(A) ¼ .60, P(B) ¼ .40, and P(both purchased) ¼ P(A \ B) ¼ .30. Given that the selected individual purchased an extra battery, the probability that an optional card was also purchased is PðA \ BÞ :30 P A B ¼ ¼ ¼ :75 Pð BÞ :40 That is, of all those purchasing an extra battery, 75% purchased an optional memory card. Similarly, PðA \ BÞ :30 P batterymemory card ¼ P BA ¼ ¼ ¼ :50 Pð AÞ :60 Notice that P(A|B) 6¼ P(A) and P(B|A) 6¼ P(B). Notice also that P(A|B) 6¼ P(B|A): these represent two different probabilities computed using difference pieces of “given” information. ■ Example 1.28 A news magazine includes three columns entitled “Art” (A), “Books” (B), and “Cinema” (C). Reading habits of a randomly selected reader with respect to these columns are Read regularly Probability

A .14

B .23

C .37

A\B .08

A\C .09

B\C .13

A\B\C .05

(See Fig. 1.10 on the next page.) We thus have PðA \ BÞ :08 P A B ¼ ¼ ¼ :348 Pð BÞ :23 PðA \ ðB [ CÞÞ :04 þ :05 þ :03 :12 P A B [ C ¼ ¼ ¼ ¼ :255 PðB [ CÞ :47 :47 PðA \ ðA [ B [ CÞÞ P Areads at least one ¼ P AA [ B [ C ¼ PðA [ B [ CÞ Pð AÞ :14 ¼ ¼ ¼ :286 PðA [ B [ CÞ :49 and PððA [ BÞ \ CÞ :04 þ :05 þ :08 P A [ B C ¼ ¼ ¼ :459 PðCÞ :37

32

1

A

Probability

B

.0 2 .04

.03 .05

.07 .08

.20 C

.51

■

Fig. 1.10 Venn diagram for Example 1.28

1.4.2

The Multiplication Rule for P(A \ B)

The definition of conditional probability yields the following result, obtained by multiplying both sides of Eq. (1.3) by P(B). MULTIPLICATION RULE

P(A \ B) ¼ P(A|B) P(B)

This rule is important because it is often the case that P(A \ B) is desired, whereas both P(B) and P(A|B) can be specified from the problem description. By reversing the roles of A and B, the Multiplication Rule can also be written as P(A \ B) ¼ P(B|A) P(A). Example 1.29 Four individuals have responded to a request by a blood bank for blood donations. None of them has donated before, so their blood types are unknown. Suppose only type O+ is desired and only one of the four actually has this type. If the potential donors are selected in random order for typing, what is the probability that at least three individuals must be typed to obtain the desired type? Define B ¼ {first type not O+} and A ¼ {second type not O+}. Since three of the four potential donors are not O+, P(B) ¼ 3/4. Given that the first person typed is not O+, two of the three individuals left are not O+, and so P(A|B) ¼ 2/3. The Multiplication Rule now gives Pðat least three individuals are typedÞ ¼ Pðfirst two typed are not OþÞ ¼ Pð A \ BÞ ¼ P A B Pð BÞ 2 3 6 ¼ 3 4 12 ¼ :5 ¼

■

The Multiplication Rule is most useful when the experiment consists of several stages in succession. The conditioning event B then describes the outcome of the first stage and A the outcome of the second, so that P(A|B)—conditioning on what occurs first—will often be known. The rule is easily extended to experiments involving more than two stages. For example, PðA1 \ A2 \ A3 Þ ¼ P A3 A1 \ A2 P A1 \ A2 ¼ P A3 A1 \ A2 P A 2 A1 Pð A1 Þ where A1 occurs first, followed by A2, and finally A3. Example 1.30 For the blood typing experiment of Example 1.29,

1.4

Conditional Probability

33

Pðthird type is OþÞ ¼ P third isfirst isn’t \ second isn’t P second isn’tfirst isn’t Pðfirst isn’tÞ ¼

1 2 3 1 ¼ ¼ :25 2 3 4 4

■

When the experiment of interest consists of a sequence of several stages, it is convenient to represent these with a tree diagram. Once we have an appropriate tree diagram, probabilities and conditional probabilities can be entered on the various branches; this will make repeated use of the Multiplication Rule quite straightforward. Example 1.31 A chain of electronics stores sells three different brands of DVD players. Of its DVD player sales, 50% are brand 1 (the least expensive), 30% are brand 2, and 20% are brand 3. Each manufacturer offers a 1-year warranty on parts and labor. It is known that 25% of brand 1’s DVD players require warranty repair work, whereas the corresponding percentages for brands 2 and 3 are 20% and 10%, respectively. 1. What is the probability that a randomly selected purchaser has bought a brand 1 DVD player that will need repair while under warranty? 2. What is the probability that a randomly selected purchaser has a DVD player that will need repair while under warranty? 3. If a customer returns to the store with a DVD player that needs warranty repair work, what is the probability that it is a brand 1 DVD player? A brand 2 DVD player? A brand 3 DVD player? The first stage of the problem involves a customer selecting one of the three brands of DVD player. Let Ai ¼ {brand i is purchased}, for i ¼ 1, 2, 3. Then P(A1) ¼ .50, P(A2) ¼ .30, and P(A3) ¼ .20. Once a brand of DVD player is selected, the second stage involves observing whether the selected DVD player needs warranty repair. With B ¼ {needs repair} and B0 ¼ {doesn’t need repair}, the given information implies that P(B|A1) ¼ .25, P(B|A2) ¼ .20, and P(B|A3) ¼ .10. .25 A)= P(B 1 ir Repa

P(B'

.50

)= 1 A1 d P( an r B

P(A2) = .30 Brand 2 P( A Br an

3)

d

=

P(B A1) P(A1) = P(B A1) = .125

A1 ) = .75 No r epair

.20 A 2) = P(B ir Repa

P(B A2) P(A2) = P(B A2) = .060

P(B'

A2 ) = .80 No r epair

.20

3

.10 A)= P(B 3 ir Repa P(B' A3 ) = .90 No r epair

P(B A3) P(A3) = P(B A3) = .020

P(B) = .205

Fig. 1.11 Tree diagram for Example 1.31

34

1

Probability

The tree diagram representing this experimental situation is shown in Fig. 1.11. The initial branches correspond to different brands of DVD players; there are two second-generation branches emanating from the tip of each initial branch, one for “needs repair” and the other for “doesn’t need repair.” The probability P(Ai) appears on the ith initial branch, whereas the conditional probabilities P(B|Ai) and P(B0 |Ai) appear on the second-generation branches. To the right of each secondgeneration branch corresponding to the occurrence of B, we display the product of probabilities on the branches leading out to that point. This is simply the Multiplication Rule in action. The answer to question 1 is thus P(A1 \ B) ¼ P(B|A1) P(A1) ¼ .125. The answer to question 2 is PðBÞ ¼ P½ðbrand 1 and repairÞ or ðbrand 2 and repairÞ or ðbrand 3 and repairÞ ¼ PðA1 \ BÞ þ P A2 \ B þ P A3 \ B ¼ :125 þ :060 þ :020 ¼ :205 Finally, PðA1 \ BÞ :125 ¼ ¼ :61 P A1 B ¼ PðBÞ :205 PðA2 \ BÞ :060 P A2 B ¼ ¼ ¼ :29 PðBÞ :205 and P A3 B ¼ 1 P A1 B P A2 B ¼ :10 Notice that the initial or prior probability of brand 1 is .50, whereas once it is known that the selected DVD player needed repair, the posterior probability of brand 1 increases to .61. This is because brand 1 DVD players are more likely to need warranty repair than are the other brands. The posterior probability of brand 3 is P(A3|B) ¼ .10, which is much less than the prior probability P(A3) ¼ .20. ■

1.4.3

The Law of Total Probability and Bayes’ Theorem

The computation of a posterior probability P(Aj|B) from given prior probabilities P(Ai) and conditional probabilities P(B|Ai) occupies a central position in elementary probability. The general rule for such computations, which is really just a simple application of the Multiplication Rule, goes back to the Reverend Thomas Bayes, who lived in the eighteenth century. To state it we first need another result. Recall that events A1, . . ., Ak are mutually exclusive if no two have any common outcomes. The events are exhaustive if A1 [ [ Ak ¼ S, so that one Ai must occur. LAW OF TOTAL PROBABILITY

Let A1, . . ., Ak be mutually exclusive and exhaustive events. Then for any other event B, PðBÞ ¼ P BA1 P A1 þ þ P BAk P Ak k X ð1:4Þ ¼ P B Ai P ð Ai Þ i¼1

1.4

Conditional Probability

35

Proof Because the Ais are mutually exclusive and exhaustive, if B occurs it must be in conjunction with exactly one of the Ais. That is, B ¼ (A1 and B) or . . . or (Ak and B) ¼ (A1 \ B) [ [ (Ak \ B), where the events (Ai \ B) are mutually exclusive. This “partitioning of B” is illustrated in Fig. 1.12. Thus Pð BÞ ¼

k X

Pð A i \ BÞ ¼

i¼1

k X P B Ai P ð Ai Þ i¼1

as desired. B A3

A1

A4

A2

Fig. 1.12 Partition of B by mutually exclusive and exhaustive Ais

■

An example of the use of Eq. (1.4) appeared in answering question 2 of Example 1.31, where A1 ¼ {brand 1}, A2 ¼ {brand 2}, A3 ¼ {brand 3}, and B ¼ {repair}. Example 1.32 A student has three different e-mail accounts. Most of her messages, in fact 70%, come into account #1, whereas 20% come into account #2 and the remaining 10% into account #3. Of the messages coming into account #1, only 1% are spam, compared to 2% and 5% for account #2 and account #3, respectively. What is the student’s overall spam rate, i.e., what is the probability a randomly selected e-mail message received by her is spam? To answer this question, let’s first establish some notation: Ai ¼ {message is from account #i} for i ¼ 1, 2, 3; B ¼ {message is spam} The given percentages imply that PðA1 Þ ¼ :70, P A2 ¼ :20, P A3 ¼ :10 P BA1 ¼ :01, P BA2 ¼ :02, P BA3 ¼ :05 Now it’s simply a matter of substituting into the equation for the Law of Total Probability: PðBÞ ¼ ð:01Þð:70Þ þ ð:02Þð:20Þ þ ð:05Þð:10Þ ¼ :016 In the long run, 1.6% of her messages will be spam. BAYES’ THEOREM

Let A1, . . ., Ak be a collection of mutually exclusive and exhaustive events with P(Ai) > 0 for i ¼ 1, . . ., k. Then for any other event B for which P(B) > 0, P Aj \ B P B Aj P Aj P Aj B ¼ ¼ k j ¼ 1, . . . , k ð1:5Þ X Pð BÞ P B Ai Pð Ai Þ i¼1

■

36

1

Probability

The transition from the second to the third expression in Eq. (1.5) rests on using the Multiplication Rule in the numerator and the Law of Total Probability in the denominator. The proliferation of events and subscripts in Eq. (1.5) can be a bit intimidating to probability newcomers. When k ¼ 2, so that the partition of S consists of just A1 ¼ A and A2 ¼ A0 , Bayes’ Theorem becomes P ð A ÞP B A 0 0 P A B ¼ PðAÞP BA þ P A P BA As long as there are relatively few events in the partition, a tree diagram (as in Example 1.29) can be used as a basis for calculating posterior probabilities without ever referring explicitly to Bayes’ Theorem. Example 1.33 Incidence of a rare disease. In the book’s Introduction, we presented the following example as a common misunderstanding of probability in everyday life. Only 1 in 1000 adults is afflicted with a rare disease for which a diagnostic test has been developed. The test is such that when an individual actually has the disease, a positive result will occur 99% of the time, whereas an individual without the disease will show a positive test result only 2% of the time. If a randomly selected individual is tested and the result is positive, what is the probability that the individual has the disease? [Note: The sensitivity of this test is 99%, whereas the specificity—how specific positive results are to this disease—is 98%. As an indication of the accuracy of medical tests, an article in the October 29, 2010 New York Times reported that the sensitivity and specificity for a new DNA test for colon cancer were 86% and 93%, respectively. The PSA test for prostate cancer has sensitivity 85% and specificity about 30%, while the mammogram for breast cancer has sensitivity 75% and specificity 92%. All tests are less than perfect.] To use Bayes’ Theorem, let A1 ¼ {individual has the disease}, A2 ¼ {individual does not have the disease}, and B ¼ {positive test result}. Then P(A1) ¼ .001, P(A2) ¼ .999, P(B|A1) ¼ .99, and P(B|A2) ¼ .02. The tree diagram for this problem is in Fig. 1.13.

Fig. 1.13 Tree diagram for the rare-disease problem

.99

P(A1

B) = .00099

P(A2

B) = .01998

t

s +Te B=

A1 A

2

=D o

se .001 sea s di a =H

esn

.999 ’t h av

ed isea se

.01 B′ = − Tes t

.02 st +Te B= .98 B′ = − Tes t

1.4

Conditional Probability

37

Next to each branch corresponding to a positive test result, the Multiplication Rule yields the recorded probabilities. Therefore, P(B) ¼ .00099 + .01998 ¼ .02097, from which we have PðA1 \ BÞ :00099 ¼ ¼ :047 P A1 B ¼ Pð B Þ :02097 This result seems counterintuitive; because the diagnostic test appears so accurate, we expect someone with a positive test result to be highly likely to have the disease, whereas the computed conditional probability is only .047. However, because the disease is rare and the test only moderately reliable, most positive test results arise from errors rather than from diseased individuals. The probability of having the disease has increased by a multiplicative factor of 47 (from prior .001 to posterior .047); but to get a further increase in the posterior probability, a diagnostic test with much smaller error rates is needed. If the disease were not so rare (e.g., 25% incidence in the population), then the error rates for the present test would provide good diagnoses. This example shows why it makes sense to be tested for a rare disease only if you are in a high-risk group. For example, most of us are at low risk for HIV infection, so testing would not be indicated, but those who are in a high-risk group should be tested for HIV. For some diseases the degree of risk is strongly influenced by age. Young women are at low risk for breast cancer and should not be tested, but older women do have increased risk and need to be tested. There is some argument about where to draw the line. If we can find the incidence rate for our group and the sensitivity and specificity for the test, then we can do our own calculation to see if a positive test result would be informative. ■

1.4.4

Exercises: Section 1.4 (50–78)

50. The population of a particular country consists of three ethnic groups. Each individual belongs to one of the four major blood groups. The accompanying joint probability table gives the proportions of individuals in the various ethnic group–blood group combinations.

Ethnic group 1 2 3

O .082 .135 .215

Blood group A B .106 .008 .141 .018 .200 .065

AB .004 .006 .020

Suppose that an individual is randomly selected from the population, and define events by A ¼ {type A selected}, B ¼ {type B selected}, and C ¼ {ethnic group 3 selected}. (a) Calculate P(A), P(C), and P(A \ C). (b) Calculate both P(A|C) and P(C|A) and explain in context what each of these probabilities represents. (c) If the selected individual does not have type B blood, what is the probability that he or she is from ethnic group 1? 51. Suppose an individual is randomly selected from the population of all adult males living in the USA. Let A be the event that the selected individual is over 6 ft in height, and let B be the event that the selected individual is a professional basketball player. Which do you think is larger, P(A|B) or P(B|A)? Why?

38

1

Probability

52. Return to the credit card scenario of Exercise 14, where A ¼ {Visa}, B ¼ {MasterCard}, P(A) ¼ .5, P(B) ¼ .4, and P(A \ B) ¼ .25. Calculate and interpret each of the following probabilities (a Venn diagram might help). (a) P(B|A) (b) P(B0 |A) (c) P(A|B) (d) P(A0 |B) (e) Given that the selected individual has at least one card, what is the probability that he or she has a Visa card? 53. Reconsider the system defect situation described in Exercise 28. (a) Given that the system has a type 1 defect, what is the probability that it has a type 2 defect? (b) Given that the system has a type 1 defect, what is the probability that it has all three types of defects? (c) Given that the system has at least one type of defect, what is the probability that it has exactly one type of defect? (d) Given that the system has both of the first two types of defects, what is the probability that it does not have the third type of defect? 54. The accompanying table gives information on the type of coffee selected by someone purchasing a single cup at a particular airport kiosk. Small 14% 20%

Regular Decaf

Medium 20% 10%

Large 26% 10%

Consider randomly selecting such a coffee purchaser. (a) What is the probability that the individual purchased a small cup? A cup of decaf coffee? (b) If we learn that the selected individual purchased a small cup, what now is the probability that s/he chose decaf coffee, and how would you interpret this probability? (c) If we learn that the selected individual purchased decaf, what now is the probability that a small size was selected, and how does this compare to the corresponding unconditional probability from (a)? 55. A department store sells sport shirts in three sizes (small, medium, and large), three patterns (plaid, print, and stripe), and two sleeve lengths (long and short). The accompanying tables give the proportions of shirts sold in the various category combinations. Short-sleeved Size S M L

Plaid .04 .08 .03

Pattern Print .02 .07 .07

Stripe .05 .12 .08

Long-sleeved Size S M L

Plaid .03 .10 .04

Pattern Print .02 .05 .02

Stripe .03 .07 .08

(a) What is the probability that the next shirt sold is a medium, long-sleeved, print shirt? (b) What is the probability that the next shirt sold is a medium print shirt?

1.4

56.

57.

58.

59.

60.

61. 62. 63. 64.

Conditional Probability

39

(c) What is the probability that the next shirt sold is a short-sleeved shirt? A long-sleeved shirt? (d) What is the probability that the size of the next shirt sold is medium? That the pattern of the next shirt sold is a print? (e) Given that the shirt just sold was a short-sleeved plaid, what is the probability that its size was medium? (f) Given that the shirt just sold was a medium plaid, what is the probability that it was shortsleeved? Long-sleeved? One box contains six red balls and four green balls, and a second box contains seven red balls and three green balls. A ball is randomly chosen from the first box and placed in the second box. Then a ball is randomly selected from the second box and placed in the first box. (a) What is the probability that a red ball is selected from the first box and a red ball is selected from the second box? (b) At the conclusion of the selection process, what is the probability that the numbers of red and green balls in the first box are identical to the numbers at the beginning? A system consists of two identical pumps, #1 and #2. If one pump fails, the system will still operate. However, because of the added strain, the extra remaining pump is now more likely to fail than was originally the case. That is, r ¼ P(#2 fails | #1 fails) > P(#2 fails) ¼ q. If at least one pump fails by the end of the pump design life in 7% of all systems and both pumps fail during that period in only 1%, what is the probability that pump #1 will fail during the pump design life? A certain shop repairs both audio and video components. Let A denote the event that the next component brought in for repair is an audio component, and let B be the event that the next component is a compact disc player (so the event B is contained in A). Suppose that P(A) ¼ .6 and P(B) ¼ .05. What is P(B|A)? In Exercise 15, Ai ¼ {awarded project i}, for i ¼ 1, 2, 3. Use the probabilities given there to compute the following probabilities, and explain in words the meaning of each one. (a) P(A2|A1) (b) P(A2 \ A3|A1) (c) P(A2 [ A3|A1) (d) P(A1 \ A2 \ A3|A1 [ A2 [ A3) Three plants manufacture hard drives and ship them to a warehouse for distribution. Plant I produces 54% of the warehouse’s inventory with a 4% defect rate. Plant II produces 35% of the warehouse’s inventory with an 8% defect rate. Plant III produces the remainder of the warehouse’s inventory with a 12% defect rate. (a) Draw a tree diagram to represent this information. (b) A warehouse inspector selects one hard drive at random. What is the probability that it is a defective hard drive and from Plant II? (c) What is the probability that a randomly selected hard drive is defective? (d) Suppose a hard drive is defective. What is the probability that it came from Plant II? For any events A and B with P(B) > 0, show that P(A|B) + P(A0 |B) ¼ 1. If P(B|A) > P(B) show that P(B0 |A) < P(B0 ). [Hint: Add P(B0 |A) to both sides of the given inequality and then use the result of the previous exercise.] Show that for any three events A, B, and C with P(C) > 0, P(A [ B|C) ¼ P(A|C) + P(B|C) P(A \ B|C). At a certain gas station, 40% of the customers use regular gas (A1), 35% use mid-grade gas (A2), and 25% use premium gas (A3). Of those customers using regular gas, only 30% fill their tanks

40

65.

(a) (b) 66.

1

Probability

(event B). Of those customers using mid-grade gas, 60% fill their tanks, whereas of those using premium, 50% fill their tanks. (a) What is the probability that the next customer will request mid-grade gas and fill the tank (A2 \ B)? (b) What is the probability that the next customer fills the tank? (c) If the next customer fills the tank, what is the probability that regular gas is requested? mid-grade gas? Premium gas? Suppose a single gene controls the color of hamsters: black (B) is dominant and brown (b) is recessive. Hence, a hamster will be black unless its genotype is bb. Two hamsters, each with genotype Bb, mate and produce a single offspring. The laws of genetic recombination state that each parent is equally likely to donate either of its two alleles (B or b), so the offspring is equally likely to be any of BB, Bb, bB, or bb (the middle two are genetically equivalent). What is the probability their offspring has black fur? Given that their offspring has black fur, what is the probability its genotype is Bb? Refer back to the scenario of the previous exercise. In the figure below, the genotypes of both members of Generation I are known, as is the genotype of the male member of Generation II. We know that hamster II2 must be black-colored thanks to her father, but suppose that we don’t know her genotype exactly (as indicated by B- in the figure). Generation I

Generation II

Bb

BB

1

2

Bb

B–

1

2

Generation III 1

(a) What are the possible genotypes of hamster II2, and what are the corresponding probabilities? (b) If we observe that hamster III1 has a black coat (and hence at least one B gene), what is the probability her genotype is Bb? (c) If we later discover (through DNA testing on poor little hamster III1) that her genotype in BB, what is the posterior probability that her mom is also BB? 67. Seventy percent of the light aircraft that disappear while in flight in a certain country are subsequently discovered. Of the aircraft that are discovered, 60% have an emergency locator, whereas 90% of the aircraft not discovered do not have such a locator. Suppose a light aircraft has disappeared. (a) If it has an emergency locator, what is the probability that it will not be discovered? (b) If it does not have an emergency locator, what is the probability that it will be discovered? 68. Components of a certain type are shipped to a supplier in batches of ten. Suppose that 50% of all such batches contain no defective components, 30% contain one defective component, and 20% contain two defective components. Two components from a batch are randomly selected and tested. What are the probabilities associated with 0, 1, and 2 defective components being in the batch under each of the following conditions? (a) Neither tested component is defective. (b) One of the two tested components is defective. [Hint: Draw a tree diagram with three first-generation branches for the three different types of batches.]

1.4

Conditional Probability

41

69. Show that P(A \ B|C) ¼ P(A|B \ C) P(B|C). 70. For customers purchasing a full set of tires at a particular tire store, consider the events A ¼ {tires purchased were made in the USA} B ¼ {purchaser has tires balanced immediately} C ¼ {purchaser requests front-end alignment} along with A0 , B0 , and C0 . Assume the following unconditional and conditional probabilities: P(A) ¼ .75 P(C|A \ B0 ) ¼ .6

71.

72.

73.

74.

P(B|A) ¼ .9 P(C|A0 \ B) ¼ .7

P(B|A0 ) ¼ .8 P(C|A0 \ B0 ) ¼ .3

P(C|A \ B) ¼ .8

(a) Construct a tree diagram consisting of first-, second-, and third-generation branches and place an event label and appropriate probability next to each branch. (b) Compute P(A \ B \ C). (c) Compute P(B \ C). (d) Compute P(C). (e) Compute P(A|B \ C), the probability of a purchase of US tires given that both balancing and an alignment were requested. A professional organization (for statisticians, of course) sells term life insurance and major medical insurance. Of those who have just life insurance, 70% will renew next year, and 80% of those with only a major medical policy will renew next year. However, 90% of policyholders who have both types of policy will renew at least one of them next year. Of the policy holders, 75% have term life insurance, 45% have major medical, and 20% have both. (a) Calculate the percentage of policyholders that will renew at least one policy next year. (b) If a randomly selected policy holder does in fact renew next year, what is the probability that he or she has both life and major medical insurance? The Reviews editor for a certain scientific journal decides whether the review for any particular book should be short (1–2 pages), medium (3–4 pages) or long (5–6 pages). Data on recent reviews indicate that 60% of them are short, 30% are medium, and the other 10% are long. Reviews are submitted in either Word or LaTeX. For short reviews, 80% are in Word, whereas 50% of medium reviews and 30% of long reviews are in Word. Suppose a recent review is randomly selected. (a) What is the probability that the selected review was submitted in Word? (b) If the selected review was submitted in Word, what are the posterior probabilities of it being short, medium, and long? A large operator of timeshare complexes requires anyone interested in making a purchase to first visit the site of interest. Historical data indicates that 20% of all potential purchasers select a day visit, 50% choose a one-night visit, and 30% opt for a two-night visit. In addition, 10% of day visitors ultimately make a purchase, 30% of night visitors buy a unit, and 20% of those visiting for two nights decide to buy. Suppose a visitor is randomly selected and found to have bought a timeshare. How likely is it that this person made a day visit? A one-night visit? A two-night visit? Consider the following information about travelers (based partly on a recent Travelocity poll): 40% check work e-mail, 30% use a cell phone to stay connected to work, 25% bring a laptop with them, 23% both check work e-mail and use a cell phone to stay connected, and 51% neither check work e-mail nor use a cell phone to stay connected nor bring a laptop. Finally, 88 out of every 100 who bring a laptop check work e-mail, and 70 out of every 100 who use a cell phone to stay connected also bring a laptop. (a) What is the probability that a randomly selected traveler who checks work e-mail also uses a cell phone to stay connected?

42

75.

76.

77.

78.

1

Probability

(b) What is the probability that someone who brings a laptop on vacation also uses a cell phone to stay connected? (c) If a randomly selected traveler checked work e-mail and brought a laptop, what is the probability that s/he uses a cell phone to stay connected? There has been a great deal of controversy over the last several years regarding what types of surveillance are appropriate to prevent terrorism. Suppose a particular surveillance system has a 99% chance of correctly identifying a future terrorist and a 99.9% chance of correctly identifying someone who is not a future terrorist. Imagine there are 1000 future terrorists in a population of 300 million (roughly the US population). If one of these 300 million people is randomly selected and the system determines him/her to be a future terrorist, what is the probability the system is correct? Does your answer make you uneasy about using the surveillance system? Explain. At a large university, in the never-ending quest for a satisfactory textbook, the Statistics Department has tried a different text during each of the last three quarters. During the fall quarter, 500 students used the text by Professor Mean; during the winter quarter, 300 students used the text by Professor Median; and during the spring quarter, 200 students used the text by Professor Mode. A survey at the end of each quarter showed that 200 students were satisfied with Mean’s book, 150 were satisfied with Median’s book, and 160 were satisfied with Mode’s book. If a student who took statistics during one of these quarters is selected at random and admits to having been satisfied with the text, is the student most likely to have used the book by Mean, Median, or Mode? Who is the least likely author? [Hint: Draw a tree-diagram or use Bayes’ theorem.] A friend who lives in Los Angeles makes frequent consulting trips to Washington, D.C.; 50% of the time she travels on airline #1, 30% of the time on airline #2, and the remaining 20% of the time on airline #3. For airline #1, flights are late into D.C. 30% of the time and late into L.A. 10% of the time. For airline #2, these percentages are 25% and 20%, whereas for airline #3 the percentages are 40% and 25%. If we learn that on a particular trip she arrived late at exactly one of the two destinations, what are the posterior probabilities of having flown on airlines #1, #2, and #3? Assume that the chance of a late arrival in L.A. is unaffected by what happens on the flight to D.C. [Hint: From the tip of each first-generation branch on a tree diagram, draw three secondgeneration branches labeled, respectively, 0 late, 1 late, and 2 late.] In Exercise 64, consider the following additional information on credit card usage: 70% of all regular fill-up customers use a credit card. 50% of all regular non-fill-up customers use a credit card. 60% of all mid-grade fill-up customers use a credit card. 50% of all mid-grade non-fill-up customers use a credit card. 50% of all premium fill-up customers use a credit card. 40% of all premium non-fill-up customers use a credit card. Compute the probability of each of the following events for the next customer to arrive (a tree diagram might help). (a) {mid-grade and fill-up and credit card} (b) {premium and non-fill-up and credit card} (c) {premium and credit card} (d) {fill-up and credit card} (e) {credit card} (f) If the next customer uses a credit card, what is the probability that s/he purchased premium gasoline?

1.5

Independence

1.5

43

Independence

The definition of conditional probability enables us to revise the probability P(A) originally assigned to A when we are subsequently informed that another event B has occurred; the new probability of A is P(A|B). In our examples, it was frequently the case that P(A|B) differed from the unconditional probability P(A), indicating that the information “B has occurred” resulted in a change in the chance of A occurring. There are other situations, however, in which the chance that A will occur or has occurred is not affected by knowledge that B has occurred, so that P(A|B) ¼ P(A). It is then natural to think of A and B as independent events, meaning that the occurrence or nonoccurrence of one event has no bearing on the chance that the other will occur. DEFINITION

Two events A and B are independent if P(A|B) ¼ P(A) and are dependent otherwise. The definition of independence might seem “unsymmetrical” because we do not demand that P(B|A) ¼ P(B) also. However, using the definition of conditional probability and the Multiplication Rule, PðA \ BÞ P AB PðBÞ ¼ ð1:6Þ P BA ¼ Pð AÞ Pð AÞ The right-hand side of Eq. (1.6) is P(B) if and only if P(A|B) ¼ P(A) (independence), so the equality in the definition implies the other equality (and vice versa). It is also straightforward to show that if A and B are independent, then so are the following pairs of events: (1) A0 and B, (2) A and B0 , and (3) A0 and B0 . See Exercise 82. Example 1.34 Consider an ordinary deck of 52 cards comprising the four suits spades, hearts, diamonds, and clubs, with each suit consisting of the 13 ranks ace, king, queen, jack, ten, . . ., and two. Suppose someone randomly selects a card from the deck and reveals to you that it is a picture card (that is, a king, queen, or jack). What now is the probability that the card is a spade? If we let A ¼ {spade} and B ¼ {face card}, then P(A) ¼ 13/52, P(B) ¼ 12/52 (there are three face cards in each of the four suits), and P(A \ B) ¼ P(spade and face card) ¼ 3/52. Thus Pð A \ BÞ 3=52 3 1 13 ¼ ¼ ¼ ¼ ¼ Pð AÞ P A B ¼ Pð BÞ 12=52 12 4 52 Therefore, the likelihood of getting a spade is not affected by knowledge that a face card had been selected. Intuitively this is because the fraction of spades among face cards (3 out of 12) is the same as the fraction of spades in the entire deck (13 out of 52). It is also easily verified that P(B|A) ¼ P(B), so knowledge that a spade has been selected does not affect the likelihood of the card being a jack, queen, or king. ■ Example 1.35 Consider a gas station with six pumps numbered 1, 2, . . ., 6 and let Ei denote the simple event that a randomly selected customer uses pump i. Suppose that PðE1 Þ ¼ PðE6 Þ ¼ :10, Define events A, B, C by

PðE2 Þ ¼ PðE5 Þ ¼ :15,

PðE3 Þ ¼ PðE4 Þ ¼ :25

44

1

Probability

A ¼ f2; 4; 6g, B ¼ f1; 2; 3g, C ¼ f2; 3; 4; 5g It is easy to determine that P(A) ¼ .50, P(A|B) ¼ .30, and P(A|C) ¼ .50. Therefore, events A and B are dependent, whereas events A and C are independent. Intuitively, A and C are independent because the relative division of probability among even- and odd-numbered pumps is the same among pumps 2, 3, 4, 5 as it is among all six pumps. ■ Example 1.36 Let A and B be any two mutually exclusive events with P(A) > 0. For example, for a randomly chosen automobile, let A ¼ {car is blue} and B ¼ {car is red}. Since the events are mutually exclusive, if B occurs, then A cannot possibly have occurred, so P(A|B) ¼ 0 6¼ P(A). The message here is that if two events are mutually exclusive, they cannot be independent. When A and B are mutually exclusive, the information that A occurred says something about the chance of B (namely, it cannot have occurred), so independence is precluded. ■

1.5.1

P(A \ B) When Events Are Independent

Frequently the nature of an experiment suggests that two events A and B should be assumed independent. This is the case, for example, if a manufacturer receives a circuit board from each of two different suppliers, each board is tested on arrival, and A ¼ {first is defective} and B ¼ {second is defective}. If P(A) ¼ .1, it should also be the case that P(A|B) ¼ .1; knowing the condition of the second board shouldn’t provide information about the condition of the first. Our next result shows how to compute P(A \ B) when the events are independent. PROPOSITION

A and B are independent if and only if PðA \ BÞ ¼ PðAÞ PðBÞ

ð1:7Þ

Proof By the Multiplication Rule, P(A \ B) ¼ P(A|B) P(B), and this equals P(A) P(B) if and only if P(A|B) ¼ P(A). ■ Because of the equivalence of independence with Eq. (1.7), the latter can be used as a definition of independence.1 Example 1.37 It is known that 30% of a certain company’s washing machines require service while under warranty, whereas only 10% of its dryers need such service. If someone purchases both a washer and a dryer made by this company, what is the probability that both machines need warranty service? Let A denote the event that the washer needs service while under warranty, and let B be defined analogously for the dryer. Then P(A) ¼ .30 and P(B) ¼ .10. Assuming that the two machines function independently of each other, the desired probability is

However, the multiplication property is satisfied if P(B) ¼ 0, yet P(A|B) is not defined in this case. To make the multiplication property completely equivalent to the definition of independence, we should append to that definition that A and B are also independent if either P(A) ¼ 0 or P(B) ¼ 0. 1

1.5

Independence

45

PðA \ BÞ ¼ PðAÞ PðBÞ ¼ ð:30Þð:10Þ ¼ :03 The probability that neither machine needs service is PðA0 \ B0 Þ ¼ PðA0 Þ PðB0 Þ ¼ ð:70Þð:90Þ ¼ :63 Note that, although the independence assumption is reasonable here, it can be questioned. In particular, if heavy usage causes a breakdown in one machine, it could also cause trouble for the other one. ■ Example 1.38 Each day, Monday through Friday, a batch of components sent by a first supplier arrives at a certain inspection facility. Two days a week, a batch also arrives from a second supplier. Eighty percent of all supplier 1’s batches pass inspection, and 90% of supplier 2’s do likewise. What is the probability that, on a randomly selected day, two batches pass inspection? We will answer this assuming that on days when two batches are tested, whether the first batch passes is independent of whether the second batch does so. Figure 1.14 displays the relevant information. .8 ses Pas

.2 Fails

.6 atch 1b

2b at

.4

.8 s asse st p

che

1

s

.2 1st fa ils

.9

.4

(.8

.9)

es pass

2nd .1 2nd fa

ils

.9

es

pass 2nd .1 2nd fails

Fig. 1.14 Tree diagram for Example 1.38

Pðtwo passÞ ¼ Pðtwo received \ both passÞ ¼ P both passtwo received Pðtwo receivedÞ ¼ ½ð:8Þð:9Þð:4Þ ¼ :288

1.5.2

■

Independence of More than Two Events

The notion of independence can be extended to collections of more than two events. Although it is possible to extend the definition for two independent events by working in terms of conditional and unconditional probabilities, it is more direct and less cumbersome to proceed along the lines of the last proposition.

46

1

Probability

DEFINITION

Events A1, . . ., An are mutually independent if for every k (k ¼ 2, 3, . . ., n) and every subset of indices i1, i2,. . . ., ik, PðAi1 \ Ai2 \ \ Aik Þ ¼ PðAi1 Þ PðAi2 Þ PðAik Þ To paraphrase the definition, the events are mutually independent if the probability of the intersection of any subset of the n events is equal to the product of the individual probabilities. In using this multiplication property for more than two independent events, it is legitimate to replace one or more of the Ais by their complements (e.g., if A1, A2, and A3 are independent events, then so are A10 , A20 , and A30 .) As was the case with two events, we frequently specify at the outset of a problem the independence of certain events. The definition can then be used to calculate the probability of an intersection. Example 1.39 The article “Reliability Evaluation of Solar Photovoltaic Arrays” (Solar Energy, 2002: 129–141) presents various configurations of solar photovoltaic arrays consisting of crystalline silicon solar cells. Consider first the system illustrated in Fig. 1.15a. There are two subsystems connected in parallel, each one containing three cells. In order for the system to function, at least one of the two parallel subsystems must work. Within each subsystem, the three cells are connected in series, so a subsystem will work only if all cells in the subsystem work. Consider a particular lifetime value t0, and suppose we want to determine the probability that the system lifetime exceeds t0. Let Ai denote the event that the lifetime of cell i exceeds t0 (i ¼ 1, 2, . . ., 6). We assume that the Ais are independent events (whether any particular cell lasts more than t0 hours has no bearing on whether any other cell does) and that P(Ai) ¼ .9 for every i since the cells are identical. Then applying the Addition Rule followed by independence,

Pðsystem lifetime exceeds t0 Þ ¼ P ðA1 \ A2 \ A3 Þ [ A4 \ A5 \ A6 ¼ Pð A1 \ A 2 \ A3 Þ þ P A4 \ A5 \ A 6

P A1 \ A2 \ A3 \ A4 \ A5 \ A6 ¼ ð:9Þð:9Þð:9Þ þ ð:9Þð:9Þð:9Þ ð:9Þð:9Þð:9Þð:9Þð:9Þð:9Þ ¼ :927 Alternatively, Pðsystem lifetime exceeds t0 Þ ¼ 1 Pðboth subsystem lives are t0 Þ ¼ 1 ½Pðsubsystem life is t0 Þ2 ¼ 1 ½1 Pðsubsystem life is > t0 Þ2 h i2 ¼ 1 1 ð:9Þ3 ¼ :927

a

1

2

3

4

5

6

b

1

2

3

4

5

6

Fig. 1.15 System configurations for Example 1.39: (a) series–parallel; (b) total-cross-tied

1.5

Independence

47

Next consider the total-cross-tied system shown in Fig. 1.15b, obtained from the series–parallel array by connecting ties across each column of junctions. Now the system fails as soon as an entire column fails, and system lifetime exceeds t0 only if the life of every column does so. For this configuration, Pðsystem lifetime exceeds t0 Þ ¼ ½Pðcolumn lifetime exceeds t0 Þ3 ¼ ½1 Pðcolumn lifetime is t0 Þ3 ¼ ½1 Pðboth cells in a column have lifetime t0 Þ3 h i3 ¼ 1 1 ð:9Þ2 ¼ :970

■

Probabilities like those calculated in Example 1.39 are often referred to as the reliability of a system. In Sect. 4.8, we consider in more detail the analysis of system reliability.

1.5.3

Exercises: Section 1.5 (79–100)

79. Reconsider the credit card scenario of Exercise 52, and show that A and B are dependent first by using the definition of independence and then by verifying that the multiplication property does not hold. 80. An oil exploration company currently has two active projects, one in Asia and the other in Europe. Let A be the event that the Asian project is successful and B be the event that the European project is successful. Suppose that A and B are independent events with P(A) ¼ .4 and P(B) ¼ .7. (a) If the Asian project is not successful, what is the probability that the European project is also not successful? Explain your reasoning. (b) What is the probability that at least one of the two projects will be successful? (c) Given that at least one of the two projects is successful, what is the probability that only the Asian project is successful? 81. In Exercise 15, is any Ai independent of any other Aj? Answer using the multiplication property for independent events. 82. If A and B are independent events, show that A0 and B are also independent. [Hint: First use a Venn diagram to establish a relationship among P(A0 \ B), P(B), and P(A \ B).] 83. Suppose that the proportions of blood phenotypes in a particular population are as follows: A .40

B .11

AB .04

O .45

Assuming that the phenotypes of two randomly selected individuals are independent of each other, what is the probability that both phenotypes are O? What is the probability that the phenotypes of two randomly selected individuals match? 84. The probability that a grader will make a marking error on any particular question of a multiplechoice exam is .1. If there are ten questions on the exam and questions are marked independently, what is the probability that no errors are made? That at least one error is made? If there are n questions on the exam and the probability of a marking error is p rather than .1, give expressions for these two probabilities.

48

1

Probability

85. In October, 1994, a flaw in a certain Pentium chip installed in computers was discovered that could result in a wrong answer when performing a division. The manufacturer initially claimed that the chance of any particular division being incorrect was only 1 in 9 billion, so that it would take thousands of years before a typical user encountered a mistake. However, statisticians are not typical users; some modern statistical techniques are so computationally intensive that a billion divisions over a short time period is not unrealistic. Assuming that the 1 in 9 billion figure is correct and that results of divisions are independent from one another, what is the probability that at least one error occurs in 1 billion divisions with this chip? 86. An aircraft seam requires 25 rivets. The seam will have to be reworked if any of these rivets is defective. Suppose rivets are defective independently of one another, each with the same probability. (a) If 20% of all seams need reworking, what is the probability that a rivet is defective? (b) How small should the probability of a defective rivet be to ensure that only 10% of all seams need reworking? 87. A boiler has five identical relief valves. The probability that any particular valve will open on demand is .95. Assuming independent operation of the valves, calculate P(at least one valve opens) and P(at least one valve fails to open). 88. Two pumps connected in parallel fail independently of each other on any given day. The probability that only the older pump will fail is. 10, and the probability that only the newer pump will fail is .05. What is the probability that the pumping system will fail on any given day (which happens if both pumps fail)? 89. Consider the system of components connected as in the accompanying picture. Components 1 and 2 are connected in parallel, so that subsystem works iff either 1 or 2 works; since 3 and 4 are connected in series, that subsystem works iff both 3 and 4 work. If components work independently of one another and P(component works) ¼ .9, calculate P(system works). 1

2

3

4

90. Refer back to the series–parallel system configuration introduced in Example 1.39, and suppose that there are only two cells rather than three in each parallel subsystem [in Fig. 1.15a, eliminate cells 3 and 6, and renumber cells 4 and 5 as 3 and 4]. Using P(Ai) ¼ .9, the probability that system lifetime exceeds t0 is easily seen to be .9639. To what value would .9 have to be changed in order to increase the system lifetime reliability from .9639 to .99? [Hint: Let P(Ai) ¼ p, express system reliability in terms of p, and then let x ¼ p2.] 91. Consider independently rolling two fair dice, one red and the other green. Let A be the event that the red die shows 3 dots, B be the event that the green die shows 4 dots, and C be the event that the total number of dots showing on the two dice is 7. (a) Are these events pairwise independent (i.e., are A and B independent events, are A and C independent, and are B and C independent)? (b) Are the three events mutually independent? 92. Components arriving at a distributor are checked for defects by two different inspectors (each component is checked by both inspectors). The first inspector detects 90% of all defectives that

1.5

Independence

49

are present, and the second inspector does likewise. At least one inspector fails to detect a defect on 20% of all defective components. What is the probability that the following occur? (a) A defective component will be detected only by the first inspector? By exactly one of the two inspectors? (b) All three defective components in a batch escape detection by both inspectors (assuming inspections of different components are independent of one another)? 93. Seventy percent of all vehicles examined at a certain emissions inspection station pass the inspection. Assuming that successive vehicles pass or fail independently of one another, calculate the following probabilities: (a) P(all of the next three vehicles inspected pass) (b) P(at least one of the next three inspected fails) (c) P(exactly one of the next three inspected passes) (d) P(at most one of the next three vehicles inspected passes) (e) Given that at least one of the next three vehicles passes inspection, what is the probability that all three pass (a conditional probability)? 94. A quality control inspector is inspecting newly produced items for faults. The inspector searches an item for faults in a series of independent fixations, each of a fixed duration. Given that a flaw is actually present, let p denote the probability that the flaw is detected during any one fixation (this model is discussed in “Human Performance in Sampling Inspection,” Human Factors, 1979: 99– 105). (a) Assuming that an item has a flaw, what is the probability that it is detected by the end of the second fixation (once a flaw has been detected, the sequence of fixations terminates)? (b) Give an expression for the probability that a flaw will be detected by the end of the nth fixation. (c) If when a flaw has not been detected in three fixations, the item is passed, what is the probability that a flawed item will pass inspection? (d) Suppose 10% of all items contain a flaw [P(randomly chosen item is flawed) ¼ .1]. With the assumption of part (c), what is the probability that a randomly chosen item will pass inspection (it will automatically pass if it is not flawed, but could also pass if it is flawed)? (e) Given that an item has passed inspection (no flaws in three fixations), what is the probability that it is actually flawed? Calculate for p ¼ .5. 95. (a) A lumber company has just taken delivery on a lot of 10,000 2 4 boards. Suppose that 20% of these boards (2000) are actually too green to be used in first-quality construction. Two boards are selected at random, one after the other. Let A ¼ {the first board is green} and B ¼ {the second board is green}. Compute P(A), P(B), and P(A \ B) (a tree diagram might help). Are A and B independent? (b) With A and B independent and P(A) ¼ P(B) ¼ .2, what is P(A \ B)? How much difference is there between this answer and P(A \ B) in part (a)? For purposes of calculating P(A \ B), can we assume that A and B of part (a) are independent to obtain essentially the correct probability? (c) Suppose the lot consists of ten boards, of which two are green. Does the assumption of independence now yield approximately the correct answer for P(A \ B)? What is the critical difference between the situation here and that of part (a)? When do you think that an independence assumption would be valid in obtaining an approximately correct answer to P(A \ B)?

50

1

Probability

96. Refer to the assumptions stated in Exercise 89 and answer the question posed there for the system in the accompanying picture. How would the probability change if this were a subsystem connected in parallel to the subsystem pictured in Fig. 1.15a? 1

3

4 7

2

5

6

97. Professor Stander Deviation can take one of two routes on his way home from work. On the first route, there are four railroad crossings. The probability that he will be stopped by a train at any particular one of the crossings is .1, and trains operate independently at the four crossings. The other route is longer but there are only two crossings, independent of each other, with the same stoppage probability for each as on the first route. On a particular day, Professor Deviation has a meeting scheduled at home for a certain time. Whichever route he takes, he calculates that he will be late if he is stopped by trains at at least half the crossings encountered. (a) Which route should he take to minimize the probability of being late to the meeting? (b) If he tosses a fair coin to decide on a route and he is late, what is the probability that he took the four-crossing route? 98. For a customer who test drives three vehicles, define events Ai ¼ customer likes vehicle #i for i ¼ 1, 2, 3. Suppose that P(A1) ¼ .55, P(A2) ¼ .65, P(A3) ¼ .70, P(A1 [ A2) ¼ .80, P(A2 \ A3) ¼ .40, and P(A1 [ A2 [ A3) ¼ .88. (a) What is the probability that a customer likes both vehicle #1 and vehicle #2? (b) Determine and interpret P(A2|A3). (c) Are A2 and A3 independent events? Answer in two different ways. (d) If you learn that the customer did not like vehicle #1, what now is the probability that s/he liked at least one of the other two vehicles? 99. It’s a commonly held misconception that if you play the lottery n times, and the probability of winning each time is 1/N, then your chance of winning at least once is n/N. That’s true if you buy n tickets in 1 week, but not if you buy a single ticket in each of n independent weeks. Let’s explore further. (a) Suppose you play a game n independent times, with P(win) ¼ 1/N each time. Find an expression for the probability you win at least once. [Hint: Consider the complement.] (b) How does your answer to (a) compare to n/N for the easy task of rolling a ⚃ on a fair die (so 1/N ¼ 1/6) in n ¼ 3 tries? In n ¼ 6 tries? In n ¼ 10 tries? (c) How does your answer to (a) compare to n/N in the setting of Exercise 85: probability ¼ 1 in 9 billion, number of tries ¼ 1 billion? (d) Show that when n is much smaller than N, the fraction n/N is not a bad approximation to (a). [Hint: Use the binomial theorem from high school algebra.] 100. Suppose identical tags are placed on both the left ear and the right ear of a fox. The fox is then let loose for a period of time. Consider the two events C1 ¼ {left ear tag is lost} and C2 ¼ {right ear tag is lost}. Let p ¼ P(C1) ¼ P(C2), and assume C1 and C2 are independent events. Derive an expression (involving p) for the probability that exactly one tag is lost, given that at most one is lost (“Ear Tag Loss in Red Foxes,” J. Wildlife Manag., 1976: 164–167). [Hint: Draw a tree diagram in which the two initial branches refer to whether the left ear tag was lost.]

1.6

Simulation of Random Events

1.6

51

Simulation of Random Events

As probability models in engineering and the sciences have grown in complexity, many problems have arisen that are too difficult to attack “analytically,” i.e., using mathematical tools such as those in the previous sections. Instead, computer simulation provides us an effective way to estimate probabilities of very complicated events (and, in later chapters, of other properties of random phenomena). Here we introduce the principles of probability simulation, demonstrate a few examples with Matlab and R code, and discuss the precision of simulated probabilities. Suppose an investigator wishes to determine P(A), but either the experiment on which A is defined or the A event itself is so complicated as to preclude the use of probability rules and properties. The general method for estimating this probability via computer simulation is as follows: – Write a program that simulates (mimics) the underlying random experiment. – Run the program many times, with each run independent of all others. – During each run, record whether or not the event A of interest occurs. ^ ðAÞ, is If the simulation is run a total of n independent times, then the estimate of P(A), denoted by P ^ ðAÞ ¼ number of times A occurs ¼ nðAÞ P number of runs n For example, if we run a simulation program 10,000 times and the event of interest A occurs in ^ ðAÞ ¼ 6174=10, 000 ¼ :6174. Notice that our 6174 of those runs, then our estimate of P(A) is P definition is consistent with the long-run relative frequency interpretation of probability discussed in Sect. 1.2.

1.6.1

The Backbone of Simulation: Random Number Generators

All modern software packages are equipped with a function called a random number generator (RNG). A typical call to this function (such as ran or rand) will return a single, supposedly “random” number, though such functions typically permit the user to request a vector or even a matrix of “random” numbers. It is more proper to call these results pseudo-random numbers, since there is actually a deterministic (i.e., non-random) algorithm by which the software generates these values. We will not discuss the details of such algorithms here; see the book by Law listed in the references. What will matter to us are the following two characteristics: 1. Each number created by an RNG is as likely to be any particular number in the interval [0, 1) as it is to be any other number in this interval (up to computer precision, anyway).2 2. Successive values created by RNGs are independent, in the sense that we cannot predict the next value to be generated from the current value (unless we somehow know the exact parameters of the underlying algorithm).

2

In the language of Chap. 3, the numbers produced by an RNG follow essentially a uniform distribution on the interval [0, 1).

52

1

Probability

A typical simulation program manipulates numbers on the interval [0, 1) in a way that mimics the experiment of interest; several examples are provided below. Arguably the most important building block for such programs is the ability to simulate a basic event that occurs with a known probability, p. Since RNGs produce values equally likely to be anywhere in the interval [0, 1), it follows that in the long run a proportion p of them will lie in the interval [0, p). So, suppose we need to simulate an event B with P(B) ¼ p. In each run of our simulation program, we can call for a single “random” number, which we’ll call u, and apply the following rules: – If 0 u < p, then event B has occurred on this run of the program. – If p u < 1, then event B has not occurred on this run of the program. Example 1.40 Let’s begin with an example in which the exact probability can be obtained analytically, so that we may verify that our simulation method works. Suppose we have two independent devices which function with probabilities .6 and .7, respectively. What is the probability both devices function? That at least one device functions? Let B1 and B2 denote the events that the first and second devices function, respectively; we know that P(B1) ¼ .6, P(B2) ¼ .7, and B1 and B2 are independent. Our first goal is to estimate the probability of A ¼ B1 \ B2, the event that both devices function. The following “pseudo-code” ^ ðAÞ. will allow us to find P 0. Set a counter for the number of times A occurs to zero. Repeat n times: 1. Generate two random numbers, u1 and u2. (These will help us determine whether B1 and B2 occur, respectively.) 2. If u1 < .6 AND u2 < .7, then A has occurred. Add 1 to the count of occurrences of A. ^ ðAÞ ¼ ðcount of the occurrences of AÞ=n. Once the n runs are complete, then P Figure 1.16 shows actual implementation code in both Matlab and R. We ran each program with n ¼ 10,000 (as in the code); the event A occurred 4215 times in Matlab and 4181 times in R, ^ ðAÞ ¼ :4215 and :4181, respectively. Compare this to the providing estimated probabilities of P exact probability of A: by independence, P(A) ¼ P(B1)P(B2) ¼ (.6)(.7) ¼ .42. Both of our simulation estimates were “in the ballpark” of the right answer. We’ll discuss the precision of these estimates shortly.

a

A=0; for i=1:10000 u1=rand; u2=rand; if u1 :92 4 x < 5 > > > > > :97 5 x < 6 > : 1 6x Calculate the following probabilities directly from the cdf: (a) p(2), that is, P(X ¼ 2) (b) P(X > 3)

82

2 Discrete Random Variables and Probability Distributions

(c) P(2 X 5) (d) P(2 < X < 5) 24. An insurance company offers its policyholders a number of different premium payment options. For a randomly selected policyholder, let X ¼ the number of months between successive payments. The cdf of X is as follows: 8 0 x > > > :30 1 x > < :40 3 x < 4 Fð x Þ ¼ :45 4 x < 6 > > > > :60 6 x < 12 > > : 1 12 x (a) What is the pmf of X? (b) Using just the cdf, compute P(3 X 6) and P(4 X). 25. In Example 2.10, let Y ¼ the number of girls born before the experiment terminates. With p ¼ P(B) and 1 p ¼ P(G), what is the pmf of Y? [Hint: First list the possible values of Y, starting with the smallest, and proceed until you see a general formula.] 26. Alvie Singer lives at 0 in the accompanying diagram and has four friends who live at A, B, C, and D. One day Alvie decides to go visiting, so he tosses a fair coin twice to decide which of the four to visit. Once at a friend’s house, he will either return home or else proceed to one of the two adjacent houses (such as 0, A, or C when at B), with each of the three possibilities having probability 1/3. In this way, Alvie continues to visit friends until he returns home. A

B

0 D

C

(a) Let X ¼ the number of times that Alvie visits a friend. Derive the pmf of X. (b) Let Y ¼ the number of straight-line segments that Alvie traverses (including those leading to and from 0). What is the pmf of Y? (c) Suppose that female friends live at A and C and male friends at B and D. If Z ¼ the number of visits to female friends, what is the pmf of Z? 27. After all students have left the classroom, a statistics professor notices that four copies of the text were left under desks. At the beginning of the next lecture, the professor distributes the four books in a completely random fashion to each of the four students (1, 2, 3, and 4) who claim to have left books. One possible outcome is that 1 receives 2’s book, 2 receives 4’s book, 3 receives his or her own book, and 4 receives 1’s book. This outcome can be abbreviated as (2, 4, 3, 1). (a) List the other 23 possible outcomes. (b) Let X denote the number of students who receive their own book. Determine the pmf of X. 28. Show that the cdf F(x) is a nondecreasing function; that is, x1 < x2 implies that F(x1) F(x2). Under what condition will F(x1) ¼ F(x2)?

2.3

Expected Value and Standard Deviation

2.3

83

Expected Value and Standard Deviation

Consider a university with 15,000 students and let X ¼ the number of courses for which a randomly selected student is registered. The pmf of X follows. Since p(1) ¼ .01, we know that (.01) (15,000) ¼ 150 of the students are registered for one course, and similarly for the other x values. x p(x) Number registered

1 .01 150

2 .03 450

3 .13 1950

4 .25 3750

5 .39 5850

6 .17 2550

7 .02 300

(2.6)

To compute the average number of courses per student, i.e., the average value of X in the population, we should calculate the total number of courses and divide by the total number of students. Since each of 150 students is taking one course, these 150 contribute 150 courses to the total. Similarly, 450 students contribute 2(450) courses, and so on. The population average value of X is then 1ð150Þ þ 2ð450Þ þ 3ð1950Þ þ þ 7ð300Þ ¼ 4:57 15,000

ð2:7Þ

Since 150/15,000 ¼ .01 ¼ p(1), 450/15,000 ¼ .03 ¼ p(2), and so on, an alternative expression for Eq. (2.7) is 1 pð 1Þ þ 2 pð 2Þ þ þ 7 pð 7Þ

ð2:8Þ

Expression (2.8) shows that to compute the population average value of X, we need only the possible values of X along with their probabilities (proportions). In particular, the population size is irrelevant as long as the pmf is given by (2.6). The average or mean value of X is then a weighted average of the possible values 1, . . ., 7, where the weights are the probabilities of those values.

2.3.1

The Expected Value of X

DEFINITION

Let X be a discrete rv with set of possible values D and pmf p(x). The expected value or mean value of X, denoted by E(X) or μX or just μ, is X EðXÞ ¼ μX ¼ μ ¼ x pð x Þ x2 D

Example 2.15 For the pmf of X ¼ number of courses in (2.6), μ ¼ 1 pð1Þ þ 2 pð2Þ þ þ 7 pð7Þ ¼ ð1Þð:01Þ þ ð2Þð:03Þ þ þ ð7Þð:02Þ ¼ :01 þ :06 þ :39 þ 1:00 þ 1:95 þ 1:02 þ :14 ¼ 4:57 If we think of the population as consisting of the X values 1, 2, . . ., 7, then μ ¼ 4.57 is the population mean (we will often refer to μ as the population mean rather than the mean of X in the population). Notice that μ here is not 4, the ordinary average of 1, . . ., 7, because the distribution puts more weight on 4, 5, and 6 than on other X values. ■

84

2 Discrete Random Variables and Probability Distributions

In Example 2.15, the expected value μ was 4.57, which is not a possible value of X. The word expected should be interpreted with caution because one would not expect to see an X value of 4.57 when a single student is selected. Example 2.16 Just after birth, each newborn child is rated on a scale called the Apgar scale. The possible ratings are 0, 1, . . ., 10, with the child’s rating determined by color, muscle tone, respiratory effort, heartbeat, and reflex irritability (the best possible score is 10). Let X be the Apgar score of a randomly selected child born at a certain hospital during the next year, and suppose that the pmf of X is x p(x)

0 .002

1 .001

2 .002

3 .005

4 .02

5 .04

6 .18

7 .37

8 .25

9 .12

10 .01

Then the mean value of X is EðXÞ ¼ μ ¼ ð0Þð:002Þ þ ð1Þð:001Þ þ ð2Þð:002Þ þ þ ð8Þð:25Þ þ ð9Þð:12Þ þ ð10Þð:01Þ ¼ 7:15 (Again, μ is not a possible value of the variable X.) If the stated model is correct, then the mean Apgar score for the population of all children born at this hospital next year will be 7.15. ■ Example 2.17 Let X ¼ 1 if a randomly selected component needs warranty service and ¼ 0 otherwise. If the chance a component needs warranty service is p, then X is a Bernoulli rv with pmf p(1) ¼ p and p(0) ¼ 1 p, from which Eð X Þ ¼ 0 pð 0Þ þ 1 pð 1Þ ¼ 0ð 1 p Þ þ 1ð pÞ ¼ p That is, the expected value of X is just the probability that X takes on the value 1. If we conceptualize a population consisting of 0s in proportion 1 p and 1s in proportion p, then the population average is μ ¼ p. ■ There is another frequently used interpretation of μ. Consider observing a first value x1 of X, then a second value x2, a third value x3, and so on. After doing this a large number of times, calculate the sample average of the observed xis. This average will typically be close to μ; a more rigorous version of this statement is provided by the Law of Large Numbers in Chap. 4. That is, μ can be interpreted as the long-run average value of X when the experiment is performed repeatedly. This interpretation is often appropriate for games of chance, where the “population” is not a concrete set of individuals but rather the results of all hypothetical future instances of playing the game. Example 2.18 A standard American roulette wheel has 38 spaces. Players bet on which space a marble will land in once the wheel has been spun. One of the simplest bets is based on the color of the space: 18 spaces are black, 18 are red, and 2 are green. So, if a player “bets on black,” s/he has an 18/38 chance of winning. Casinos consider color bets an “even wager,” meaning that a player who bets $1 on black, say, will profit $1 if the marble lands in a black space (and lose the wagered $1 otherwise). Let X ¼ the return on a $1 wager on black. Then the pmf of X is x p(x)

$1 20/38

+$1 18/38

2.3

Expected Value and Standard Deviation

85

and the expected value of X is E(X) ¼ (1)(20/38) + (1)(18/38) ¼ 2/38 ¼ $.0526. If a player makes $1 bets on black on successive spins of the roulette wheel, in the long run s/he can expect to lose about 5.26 cents per wager. Since players don’t necessarily make a large number of wagers, this long-run average interpretation is perhaps more apt from the casino’s perspective: in the long run, they will gain an average of 5.26 cents for every $1 wagered on black at the roulette table. ■ Thus far, we have assumed that the mean of any given distribution exists. If the set of possible values of X is unbounded, so that the sum for μX is actually an infinite series, the expected value of X might or might not exist (depending on whether the series converges or diverges). Example 2.19 From Example 2.10, the general form for the pmf of X ¼ the number of children born up to and including the first boy is ð1 pÞx1 p x ¼ 1, 2, 3, . . . pð x Þ ¼ 0 otherwise The expected value of X therefore entails evaluating an infinite summation: 1 1 1 X X X X d x1 x1 x Eð X Þ ¼ x pð x Þ ¼ xpð1 pÞ ¼p x ð 1 pÞ ¼p ð 1 pÞ dp D x¼1 x¼1 x¼1

ð2:9Þ

If we interchange the order of taking the derivative and the summation in Eq. (2.9), the sum is that of a geometric series. (In particular, the infinite series converges for 0 < p < 1.) After the sum is computed and the derivative is taken, the final result is E(X) ¼ 1/p. That is, the expected number of children born up to and including the first boy is the reciprocal of the chance of getting a boy. This is actually quite intuitive: if p is near 1, we expect to see a boy very soon, whereas if p is near 0, we expect many births before the first boy. For p ¼ .5, E(X) ¼ 2. Exercise 48 at the end of this section presents an alternative method for computing the mean of this particular distribution. ■ Example 2.20 Let X, the number of interviews a student has prior to getting a job, have pmf k=x2 x ¼ 1, 2, 3, . . . pð x Þ ¼ 0 otherwise 2 2 2 2 1 where k is such that ∑ 1 x ¼ 1(k/x ) ¼ 1. (Because ∑ x ¼ 1(1/x ) ¼ π /6, the value of k is 6/π .) The expected value of X is

μ ¼ EðXÞ ¼

1 1 X X k 1 x 2¼k x x x¼1 x¼1

ð2:10Þ

The sum on the right of Eq. (2.10) is the famous harmonic series of mathematics and can be shown to diverge. E(X) is not finite here because p(x) does not decrease sufficiently fast as x increases; statisticians say that the probability distribution of X has “a heavy tail.” If a sequence of X values is chosen using this distribution, the sample average will not settle down to some finite number but will tend to grow without bound. ■

86

2 Discrete Random Variables and Probability Distributions

2.3.2

The Expected Value of a Function

Often we will be interested in the expected value of some function h(X) rather than X itself. An easy way of computing the expected value of h(X) is suggested by the following example. Example 2.21 The cost of a certain vehicle diagnostic test depends on the number of cylinders X in the vehicle’s engine. Suppose the cost function is h(X) ¼ 20 + 3X + .5X2. Since X is a random variable, so is Y ¼ h(X). The pmf of X and the derived pmf of Y are as follows: x p(x)

4 .5

6 .3

8 .2

)

y p( y)

40 .5

56 .3

76 .2

With D* denoting possible values of Y, X

EðY Þ ¼ E hðXÞ ¼ y pðyÞ ¼ ð40Þ :5 þ 56 :3 þ 76 :2 ¼ $52 y 2 D*

X ¼ hð4Þ :5 þ h 6 :3 þ h 8 :2 ¼ hðxÞ pðxÞ

ð2:11Þ

D

According to Eq. (2.11), it was not necessary to determine the pmf of Y to obtain E(Y ); instead, the desired expected value is a weighted average of the possible h(x) (rather than x) values. ■ PROPOSITION

If the rv X has a set of possible values D and pmf p(x), then the expected value of any function h(X), denoted by E[h(X)] or μh(X), is computed by X E½hðXÞ ¼ hðxÞ pðxÞ D

This is sometimes referred to as the Law of the Unconscious Statistician. According to this proposition, E[h(X)] is computed in the same way that E(X) itself is, except that h(x) is substituted in place of x. That is, E[h(X)] is a weighted average of possible h(X) values, where the weights are the probabilities of the corresponding original X values. Example 2.22 A computer store has purchased three computers at $500 apiece. It will sell them for $1,000 apiece. The manufacturer has agreed to repurchase any computers still unsold after a specified period at $200 apiece. Let X denote the number of computers sold, and suppose that p(0) ¼ .1, p(1) ¼ .2, p(2) ¼ .3, and p(3) ¼ .4. With h(X) denoting the profit associated with selling X units, the given information implies that h(X) ¼ revenue cost ¼ 1000X + 200(3 X) 1500 ¼ 800X 900. The expected profit is then E½ h ð X Þ ¼ hð 0Þ pð 0Þ þ hð 1Þ pð 1Þ þ hð 2Þ pð 2Þ þ hð 3Þ pð 3Þ ¼ ð800ð0Þ 900Þð:1Þ þ ð800ð1Þ 900Þð:2Þ þ ð800ð2Þ 900Þð:3Þ þ ð800ð3Þ 900Þð:4Þ ¼ ð900Þð:1Þ þ ð100Þð:2Þ þ ð700Þð:3Þ þ ð1500Þð:4Þ ¼ $700

■

Because an expected value is a sum, it possesses the same properties as any summation; specifically, the expected value “operator” can be distributed across addition and across multiplication by constants. This important property is known as linearity of expectation.

2.3

Expected Value and Standard Deviation

87

LINEARITY OF EXPECTATION

For any functions h1(X) and h2(X) and any constants a1, a2, and b, E½a1 h1 ðXÞ þ a2 h2 ðXÞ þ b ¼ a1 E½h1 ðXÞ þ a2 E½h2 ðXÞ þ b In particular, for any linear function aX + b, EðaX þ bÞ ¼ a EðXÞ þ b

ð2:12Þ

(or, using alternative notation, μaX+b ¼ a μX + b). Proof Let h(X) ¼ a1h1(X) + a2h2(X) + b, and apply the previous proposition: X

a1 h1 ð x Þ þ a2 h2 ð x Þ þ b p x E a1 h1 ð X Þ þ a2 h2 X þ b ¼ D

¼ a1

X

h1 ðxÞ pðxÞ þ a2

D

þb

X

X

h2 ðxÞ pðxÞ

D

pð x Þ

distributive property of addition

D

¼ a 1 E h1 ð X Þ þ a2 E h2 X þ b 1 ¼ a1 E h1 X þ a2 E h2 X þ b The special case of aX + b is obtained by setting a1 ¼ a, h1(X) ¼ X, and a2 ¼ 0.

■

By induction, linearity of expectation applies to any finite number of terms. In Example 2.21, it is easily computed that E(X) ¼ 4(.5) + 6(.3) + 8(.2) ¼ 5.4 and E(X2) ¼ ∑ x2 p(x) ¼ 42(.5) + 62(.3) + 82(.2) ¼ 31.6. Applying linearity of expectation to Y ¼ h(X) ¼ 20 + 3X + .5X2, we obtain

μY ¼ E 20 þ 3X þ :5X2 ¼ 20 þ 3EðXÞ þ :5E X2 ¼ 20 þ 3ð5:4Þ þ :5ð31:6Þ ¼ $52, which matches the result of Example 2.21. The special case Eq. (2.12) states that the expected value of a linear function equals the linear function evaluated at the expected value E(X). Since h(X) in Example 2.22 is linear and E(X) ¼ 2, E[h(X)] ¼ 800(2) 900 ¼ $700, as before. Two special cases of Eq. (2.12) yield two important rules of expected value. 1. For any constant a, μaX ¼ a μX (take b ¼ 0). 2. For any constant b, μX+b ¼ μX + b ¼ E(X) + b (take a ¼ 1). Multiplication of X by a constant a changes the unit of measurement (from dollars to cents, where a ¼ 100, inches to cm, where a ¼ 2.54, etc.). Rule 1 says that the expected value in the new units equals the expected value in the old units multiplied by the conversion factor a. Similarly, if the constant b is added to each possible value of X, then the expected value will be shifted by that same amount. One commonly made error is to substitute μX directly into the function h(X) when h is a nonlinear function, in which case Eq. (2.12) does not apply. Consider Example 2.21: the mean of X is 5.4, and it’s tempting to infer that the mean of Y ¼ h(X) is simply h(5.4). However, since the function h(X) ¼ 20 + 3X +.5X2 is not linear, this does not yield the correct answer: hð5:4Þ ¼ 20 þ 3ð5:4Þ þ :5ð5:4Þ2 ¼ 50:78 6¼ 52 ¼ μY In general, μh(X) does not equal h(μX) unless the function h(x) is linear.

88

2 Discrete Random Variables and Probability Distributions

2.3.3

The Variance and Standard Deviation of X

The expected value of X describes where the probability distribution is centered. Using the physical analogy of placing point mass p(x) at the value x on a one-dimensional axis, if the axis were then supported by a fulcrum placed at μ, there would be no tendency for the axis to tilt. This is illustrated for two different distributions in Fig. 2.7.

a

b

p(x)

p(x)

.5

.5

1

2

3

5

x

1

2

3

5

6

7

8

x

Fig. 2.7 Two different probability distributions with μ ¼ 4

Although both distributions pictured in Fig. 2.7 have the same mean/fulcrum μ, the distribution of Fig. 2.7b has greater spread or variability or dispersion than does that of Fig. 2.7a. Our goal now is to obtain a quantitative assessment of the extent to which the distribution spreads out about its mean value. DEFINITION

Let X have pmf p(x) and expected value μ. Then the variance of X, denoted by Var(X) or σ X2 or just σ 2, is i h i Xh ðx μÞ2 pðxÞ ¼ E ðX μÞ2 VarðXÞ ¼ D

The standard deviation (SD) of X, denoted by SD(X) or σ X or just σ, is pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ σ X ¼ VarðXÞ The quantity h(X) ¼ (X μ)2 is the squared deviation of X from its mean, and σ 2 is the expected squared deviation—i.e., a weighted average of the squared deviations from μ. Taking the square root of the variance to obtain standard deviation returns us to the original units of the variable, e.g., if X is measured in dollars, then both μ and σ also have units of dollars. If most of the probability distribution is close to μ, as in Fig. 2.7a, then σ will typically be relatively small. However, if there are x values far from μ that have large probabilities (as in Fig. 2.7b), then σ will be larger. Example 2.23 Consider again the distribution of the Apgar score X of a randomly selected newborn described in Example 2.16. The mean value of X was calculated as μ ¼ 7.15, so VarðXÞ ¼ σ 2 ¼

10 X

ðx 7:15Þ2 pðxÞ ¼ ð0 7:15Þ2 ð:002Þ þ . . . þ ð10 7:15Þ2 ð:01Þ ¼ 1:5815

x¼0

The standard deviation of X is SDðXÞ ¼ σ ¼

pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 1:5815 ¼ 1:26.

■

2.3

Expected Value and Standard Deviation

89

A rough interpretation of σ is that its value gives the size of a typical or representative distance from μ (hence, “standard deviation”). Because σ ¼ 1.26 in the preceding example, we can say that some of the possible X values differ by more than 1.26 from the mean value 7.15 whereas other possible X values are closer than this to 7.15; roughly, 1.26 is the size of a typical deviation from the mean Apgar score. Example 2.24 (Example 2.18 continued) The variance of X ¼ the return on a $1 bet on black is σ 2X ¼ ð1 ð2=38ÞÞ2 ð20=38Þ þ ð1 ð2=38ÞÞ2 18=38 ¼ 0:99723 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ and the standard deviation is σ X ¼ 0:99723 ¼ 0:9986 $1. The two possible values of X are $1 and +$1; since betting on black is almost a break-even wager (the mean is quite close to 0), the typical difference between an actual return X and the average return μX is roughly one dollar. ■ A natural probability question arises: how often does X fall within this “typical distance of the mean”? That is, what’s the chance that a rv X lies between μX σ X and μX + σ X? What about the likelihood that X is within two standard deviations of its mean? There are no universal answers: for different pmfs, varying amounts of probability may lie within one (or two or three) standard deviation(s) of the expected value. That said, the following theorem, due to Russian mathematician Pafnuty Chebyshev, partially addresses questions of this sort. CHEBYSHEV’S INEQUALITY

Let X be a discrete rv with mean μ and standard deviation σ. Then, for any k 1, 1 P X μ kσ 2 k That is, the probability X is at least k standard deviations away from its mean is at most 1/k2. An equivalent statement to Chebyshev’s inequality is that every random variable has a probability of at least 1 1/k2 to fall within k standard deviations of its mean. Proof Let A denote the event |X μ| kσ; or, equivalently, the set of values {x : |x μ| kσ}. Begin by writing out the definition of Var(X): i Xh i Xh i Xh VarðXÞ ¼ ð x μ Þ 2 pð x Þ ¼ ðx μÞ2 pðxÞ þ ðx μÞ2 pðxÞ D

Xh

ð x μ Þ 2 pð x Þ

A

Xh

ðkσ Þ2 pðxÞ

A

¼ ðkσ Þ2

X

i

i

A

A

because the discarded term is 0 because ðx μÞ2 kσ 2 on the set A

pðxÞ ¼ kσ 2 P A ¼ k2 σ 2 P X μ kσ

A

The Var(X) term on the left-hand side is the same as the σ 2 term on the right-hand side; cancelling the two, we are left with 1 k2P(|X μ| kσ), and Chebyshev’s inequality follows. ■

90

2 Discrete Random Variables and Probability Distributions

For k ¼ 1, Chebyshev’s inequality states that P(|X μ| σ) 1, which isn’t very informative since all probabilities are bounded above by 1. In fact, distributions can be constructed for which 100% of the distribution is at least 1 standard deviation from the mean, so that the rv X has probability 0 of falling less than one standard deviation from its mean (see Exercise 47). Substituting k ¼ 2, Chebyshev’s inequality states that the chance any rv is at least 2 standard deviations from its mean cannot exceed 1/22 ¼ .25 ¼ 25%. Equivalently, every distribution has the property that at least 75% of its “mass” lies within 2 standard deviations of its mean value (in fact, for many distributions, the exact probability is much larger than this lower bound).

2.3.4

Properties of Variance

An alternative to the defining formula for Var(X) reduces the computational burden. PROPOSITION

VarðXÞ ¼ σ 2 ¼ E X2 μ2 This equation is referred to as the variance shortcut formula. In using this formula, E(X2) is computed first without any subtraction; then μ is computed, squared, and subtracted (once) from E(X2). This formula is more efficient because it entails only one subtraction, and E(X2) does not require calculating squared deviations from μ. Example 2.25 Referring back to the Apgar score scenario of Examples 2.16 and 2.23, 10 X E X2 ¼ x2 pðxÞ ¼ 02 ð:002Þ þ 12 ð:001Þ þ þ 102 ð:01Þ ¼ 52:704 x¼1

Thus, σ 2 ¼ 52.704 (7.15)2 ¼ 1.5815 as before, and again σ ¼ 1.26.

■

Proof of the Variance Shortcut Formula Expand (X μ)2 in the definition of Var(X), and then apply linearity of expectation:

VarðXÞ ¼ E ðX μÞ2 ¼ E X2 2μX þ μ2 ¼ E X2 2μE X þ μ2 by linearity of expectation 2 2 2 ■ ¼ E X 2μ μ þ μ ¼ E X 2μ2 þ μ2 ¼ E X2 μ2 The quantity E(X2) in the variance shortcut formula is called the mean-square value of the random variable X. Engineers may be familiar with the root-mean-square, or RMS, which is the square root of E(X2). Do not confuse this with the square of the mean of X, i.e., μ2! For example, if X has a mean of 7.15, the mean-square value of X is not (7.15)2, because h(x) ¼ x2 is not linear. (In Example 2.25, the mean-square value of X is 52.704.) It helps to look at the two formulas sideby-side:

2.3

Expected Value and Standard Deviation

E X

2

¼

X

x pð x Þ 2

91

versus

X

μ ¼ 2

D

!2 x pð x Þ

D

The order of operations is clearly different. In fact, it can be shown (see Exercise 46) that E(X2) μ2 for every random variable, with equality if and only if X is constant. The variance of a function h(X) is the expected value of the squared difference between h(X) and its expected value: # " #2 "X 2 X X 2 2 Var½hðXÞ ¼ σ hðXÞ ¼ hðxÞ μhðXÞ pðxÞ ¼ h ðxÞ pðxÞ hð x Þ pð x Þ D

D

D

When h(x) is a linear function, Var[h(X)] has a much simpler expression (see Exercise 43 for a proof). PROPOSITION

VarðaX þ bÞ ¼ σ 2aXþb ¼ a2 σ 2X

and

σ aXþb ¼ a σ X

ð2:13Þ

In particular, σ aX ¼ jaj σ X

and σ Xþb ¼ σ X

The absolute value is necessary because a might be negative, yet a standard deviation cannot be. Usually multiplication by a corresponds to a change in the unit of measurement (e.g., kg to lb or dollars to euros); the sd in the new unit is just the original sd multiplied by the conversion factor. On the other hand, the addition of the constant b does not affect the variance, which is intuitive, because the addition of b changes the location (mean value) but not the spread of values. Together, Eqs. (2.12) and (2.13) comprise the rescaling properties of mean and standard deviation. Example 2.26 In the computer sales scenario of Example 2.22, E(X) ¼ 2 and E X2 ¼ 02 ð:1Þ þ 12 ð:2Þ þ 22 ð:3Þ þ 32 ð:4Þ ¼ 5 so Var(X) ¼ 5 (2)2 ¼ 1. The profit function Y ¼ h(X) ¼ 800X 900 is linear, so Eq. (2.13) applies with a ¼ 800 and b ¼ 900. Hence Y has variance a2σ X2 ¼ (800)2(1) ¼ 640,000 and standard deviation $800. ■

2.3.5

Exercises: Section 2.3 (29–48)

29. The pmf of the amount of memory X (GB) in a purchased flash drive was given in Example 2.11 as x p(x) (a) (b) (c) (d)

1 .05

2 .10

4 .35

Compute and interpret E(X). Compute Var(X) directly from the definition. Obtain and interpret the standard deviation of X. Compute Var(X) using the shortcut formula.

8 .40

16 .10

92

2 Discrete Random Variables and Probability Distributions

30. An individual who has automobile insurance from a company is randomly selected. Let Y be the number of moving violations for which the individual was cited during the last 3 years. The pmf of Y is y p( y)

0 .60

1 .25

2 .10

3 .05

(a) Compute E(Y ). (b) Suppose an individual with Y violations incurs a surcharge of $100Y2. Calculate the expected amount of the surcharge. 31. Refer to Exercise 12 and calculate Var(Y) and σ Y. Then determine the probability that Y is within 1 standard deviation of its mean value. 32. An appliance dealer sells three different models of upright freezers having 13.5, 15.9, and 19.1 cubic feet of storage space, respectively. Let X ¼ the amount of storage space purchased by the next customer to buy a freezer. Suppose that X has pmf x p(x)

13.5 .2

15.9 .5

19.1 .3

(a) Compute E(X), E(X2), and Var(X). (b) If the price of a freezer having capacity X cubic feet is 17X + 180, what is the expected price paid by the next customer to buy a freezer? (c) What is the standard deviation of the price 17X + 180 paid by the next customer? (d) Suppose that although the rated capacity of a freezer is X, the actual capacity is h(X) ¼ X .01X2. What is the expected actual capacity of the freezer purchased by the next customer? 33. Let X be a Bernoulli rv with pmf as in Example 2.17. (a) Compute E(X2). (b) Show that Var(X) ¼ p(1 p). (c) Compute E(X79). 34. Suppose that the number of plants of a particular type found in a rectangular sampling region (called a quadrat by ecologists) in a certain geographic area is an rv X with pmf c=x3 x ¼ 1, 2, 3, . . . pð x Þ ¼ 0 otherwise Is E(X) finite? Justify your answer. (This is another distribution that statisticians would call heavy-tailed.) 35. A small market orders copies of a certain magazine for its magazine rack each week. Let X ¼ demand for the magazine, with pmf x p(x)

1 1 15

2 2 15

3 3 15

4 4 15

5 3 15

6 2 15

Suppose the store owner actually pays $2.00 for each copy of the magazine and the price to customers is $4.00. If magazines left at the end of the week have no salvage value, is it better to order three or four copies of the magazine? [Hint: For both three and four copies ordered, express net revenue as a function of demand X, and then compute the expected revenue.]

2.3

Expected Value and Standard Deviation

93

36. Let X be the damage incurred (in $) in a certain type of accident during a given year. Possible X values are 0, 1000, 5000, and 10,000, with probabilities .8, .1, .08, and .02, respectively. A particular company offers a $500 deductible policy. If the company wishes its expected profit to be $100, what premium amount should it charge? 37. The n candidates for a job have been ranked 1, 2, 3, . . ., n. Let X ¼ the rank of a randomly selected candidate, so that X has pmf 1=n x ¼ 1, 2, 3, . . . , n pð x Þ ¼ 0 otherwise (this is called the discrete uniform distribution). Compute E(X) and Var(X) using the shortcut formula. [Hint: The sum of the first n positive integers is n(n + 1)/2, whereas the sum of their squares is n(n + 1)(2n + 1)/6.] 38. Let X ¼ the outcome when a fair die is rolled once. If before the die is rolled you are offered either $100 dollars or h(X) ¼ 350/X dollars, would you accept the guaranteed amount or would you gamble? [Hint: Determine E[h(X)], but be careful: the mean of 350/X is not 350/μ.] 39. In the popular game Plinko on The Price Is Right, contestants drop a circular disk (a “chip”) down a pegged board; the chip bounces down the board and lands in a slot corresponding to one of five dollar mounts. The random variable X ¼ winnings from one chip dropped from the middle slot has roughly the following distribution. x p(x)

$0 .39

$100 .03

$500 .11

$1000 .24

$10,000 .23

(a) Graph the probability mass function of X. (b) What is the probability a contestant makes money on a chip? (c) What is the probability a contestant makes at least $1000 on a chip? (d) Determine the expected winnings. Interpret this number. (e) Determine the corresponding standard deviation. 40. A supply company currently has in stock 500 lb of fertilizer, which it sells to customers in 10-lb bags. Let X equal the number of bags purchased by a randomly selected customer. Sales data shows that X has the following pmf: x p(x)

1 .2

2 .4

3 .3

4 .1

(a) Compute the average number of bags bought per customer. (b) Determine the standard deviation for the number of bags bought per customer. (c) Define Y to be the amount of fertilizer left in stock, in pounds, after the first customer. Construct the pmf of Y. (d) Use the pmf of Y to find the expected amount of fertilizer left in stock, in pounds, after the first customer. (e) Write Y as a linear function of X. Then use rescaling properties to find the mean and standard deviation of Y. (f) The supply company offers a discount to each customer based on the formula W ¼ (X 1)2. Determine the expected discount for a customer. (g) Does your answer in part (f) equal (μX 1)2? Why or why not? (h) Calculate the standard deviation of W.

94

2 Discrete Random Variables and Probability Distributions

41. Refer back to the roulette scenario in Examples 2.18 and 2.24. Two other ways to wager at roulette are betting on a single number, or on a four-number “square.” The pmfs for the returns on a $1 wager on a number and a square are displayed below. (Payoffs for winning are always based on the odds of losing a wager under the assumption the two green spaces didn’t exist.) Single number: x p(x)

$1 37/38

+$35 1/38

x p(x)

$1 34/38

+$8 4/38

Square:

42.

43. 44.

45. 46. 47.

48.

(a) Determine the expected return from a $1 wager on a single number, and then on a square. (b) Compare your answers from (a) to Example 2.18. What can be said about the expected return for a $1 wager? Based on this, does expected return reflect most players’ intuition that betting on black is “safer” and betting on a single number is “riskier”? (c) Now calculate the standard deviations for the two pmfs above. (d) How do the standard deviations of the three betting schemes (color, single number, square) compare? How do these values appear to relate to players’ intuitive sense of risk? (a) Draw a line graph of the pmf of X in Exercise 35. Then determine the pmf of X and draw its line graph. From these two pictures, what can you say about Var(X) and Var(X)? (b) Use the proposition involving Var(aX + b) to establish a general relationship between Var(X) and Var(X). Use the definition of variance to prove that Var(aX + b) ¼ a2σ X2. [Hint: From Eq. (2.12), μaX+b ¼ aμX + b.] Suppose E(X) ¼ 5 and E[X(X 1)] ¼ 27.5. (a) Determine E(X2). [Hint: E[X(X 1)] ¼ E(X2 X) ¼ E(X2) E(X).] (b) What is Var(X)? (c) What is the general relationship among the quantities E(X), E[X(X 1)], and Var(X)? Write a general rule for E(X c) where c is a constant. What happens when you let c ¼ μ, the expected value of X? Let X be a rv with mean μ. Show that E(X2) μ2, and that E(X2) > μ2 unless X is a constant. [Hint: Consider variance.] Refer to Chebyshev’s inequality in this section. (a) What is the value of the upper bound for k ¼ 2? k ¼ 3? k ¼ 4? k ¼ 5? k ¼ 10? (b) Compute μ and σ for the distribution of Exercise 13. Then evaluate for the values of k given in part (a). What does this suggest about the upper bound relative to the corresponding probability? (c) Suppose you will win $d if a fair coin flips heads and lose $d if it lands tails. Let X be the amount you get from a single coin flip. Compute E(X) and SD(X). What is the probability X will be less than one standard deviation from its mean value? 1 8 1 (d) Let X have three possible values, 1, 0, and 1, with probabilities 18 , 9, and 18 respectively. What is P(|X μ| 3σ), and how does it compare to the corresponding Chebyshev bound? (e) Give a distribution for which P(|X μ| 5σ) ¼ .04. For a discrete rv X taking values in {0, 1, 2, 3, . . .}, we shall derive the following alternative formula for the mean:

2.4

The Binomial Distribution

95

μX ¼

1 X

½1 FðxÞ

x¼0

(a) Suppose for now the range of X is {0, 1, . . . N} for some positive integer N. By regrouping terms, show that N X

½ x pð x Þ ¼ pð 1Þ þ p 2 þ p 3 þ þ p N

x¼0

þpð2Þ þ p 3 þ þ p N þpð3Þ þ þ p N ⋮ þpðN Þ

(b) Rewrite each row in the above expression in terms of the cdf of X, and use this to establish that N X

½ x pð x Þ ¼

x¼0

N 1 X

½1 FðxÞ

x¼0

(c) Let N ! 1 in part (b) to establish the desired result, and explain why the resulting formula works even if the maximum value of X is finite. [Hint: If the largest possible value of X is N, what does 1 F(x) equal for x N?] (This derivation also implies that a discrete rv X has a finite mean iff the series ∑ [1 F(x)] converges.) (d) Let X have the pmf from Examples 2.10 and 2.19. Use the cdf of X and the alternative mean formula just derived to determine μX.

2.4

The Binomial Distribution

Many experiments conform either exactly or approximately to the following list of requirements: 1. The experiment consists of a sequence of n smaller experiments called trials, where n is fixed in advance of the experiment. 2. Each trial can result in one of the same two possible outcomes (dichotomous trials), which we denote by success (S) or failure (F). 3. The trials are independent, so that the outcome on any particular trial does not influence the outcome on any other trial. 4. The probability of success is constant from trial to trial (homogeneous trials); we denote this probability by p.

DEFINITION

An experiment for which Conditions 1–4 are satisfied—a fixed number of dichotomous, independent, homogeneous trials—is called a binomial experiment.

96

2 Discrete Random Variables and Probability Distributions

Example 2.27 The same coin is tossed successively and independently n times. We arbitrarily use S to denote the outcome H (heads) and F to denote the outcome T (tails). Then this experiment satisfies Conditions 1–4. Tossing a thumbtack n times, with S ¼ point up and F ¼ point down, also results in a binomial experiment. ■ Some experiments involve a sequence of independent trials for which there are more than two possible outcomes on any one trial. A binomial experiment can then be created by dividing the possible outcomes into two groups. Example 2.28 The color of pea seeds is determined by a single genetic locus. If the two alleles at this locus are AA or Aa (the genotype), then the pea will be yellow (the phenotype), and if the allele is aa, the pea will be green. Suppose we pair off 20 Aa seeds and cross the two seeds in each of the ten pairs to obtain ten new genotypes. Call each new genotype a success S if it is aa and a failure otherwise. Then with this identification of S and F, the experiment becomes binomial with n ¼ 10 and p ¼ P(aa genotype). If each member of the pair is equally likely to contribute a or A, then p ¼ P(a) P(a) ¼ (1/2)(1/2) ¼ .25. ■ Example 2.29 A student has an iPod playlist containing 50 songs, of which 35 were recorded prior to the year 2015 and the other 15 were recorded more recently. Suppose the random play function is used to select five from among these 50 songs, without replacement, for listening during a walk between classes. Each selection of a song constitutes a trial; we regard a trial as a success if the selected song was recorded before 2015. Then clearly PðS on first trialÞ ¼

35 ¼ :70 50

It may surprise you that the (unconditional) chance the second song is a success also equals .70! To see why, apply the Law of Total Probability: PðS on second trialÞ ¼ PðSS [ FSÞ ¼ PðS on firstÞPðS on secondjS on firstÞ þ PðF on firstÞPðS on secondjF on firstÞ 35 34 15 35 35 34 15 35 ¼ þ ¼ þ ¼ :70 ¼ 50 49 50 49 50 49 49 50 Similarly, it can be shown that P(S on ith trial) ¼ .70 for i ¼ 3, 4, 5, so the trials are homogeneous (Condition 4), with p ¼ .70. However the trials are not independent (Condition 3), because for example, 31 35 P S on fifth trialSSSS ¼ ¼ :67 whereas P S on fifth trialFFFF ¼ ¼ :76 46 46 (This matches our intuitive sense that later song selections “depend on” what was chosen before them.) The experiment is not binomial because the trials are not independent. In general, if sampling is without replacement, the experiment will not yield independent trials. If songs had been selected with replacement, then trials would have been independent, but this might have resulted in the same song being listened to more than once. ■ Example 2.30 Suppose a state has 500,000 licensed drivers, of whom 400,000 are insured. A sample of 10 drivers is chosen without replacement. The ith trial is labeled S if the ith driver chosen is

2.4

The Binomial Distribution

97

insured. Although this situation would seem identical to that of Example 2.29, the important difference is that the size of the population being sampled is very large relative to the sample size. In this case 399, 999 :80000 P S on secondS on first ¼ 499, 999 and 399, 991 ¼ :799996 :80000 P S on tenthS on first nine ¼ 499, 991 These calculations suggest that although the trials are not exactly independent, the conditional probabilities differ so slightly from one another that for practical purposes the trials can be regarded as independent with constant P(S) ¼ .8. Thus, to a very good approximation, the experiment is binomial with n ¼ 10 and p ¼ .8. ■ We will use the following convention in deciding whether a “without-replacement” experiment can be treated as being (approximately) binomial. RULE

Consider sampling without replacement from a dichotomous population of size N. If the sample size (number of trials) n is at most 5% of the population size, the experiment can be analyzed as though it were exactly a binomial experiment. By “analyzed,” we mean that probabilities based on the binomial experiment assumptions will be quite close to the actual “without-replacement” probabilities, which are typically more difficult to calculate. In Example 2.29, n/N ¼ 5/50 ¼ .1 > .05, so the binomial experiment is not a good approximation, but in Example 2.30, n/N ¼ 10/500,000 < .05.

2.4.1

The Binomial Random Variable and Distribution

In most binomial experiments, it is the total number of successes, rather than knowledge of exactly which trials yielded successes, that is of interest. DEFINITION

Given a binomial experiment consisting of n trials, the binomial random variable X associated with this experiment is defined as X ¼ the number of successes among the n trials Suppose, for example, that n ¼ 3. Then there are eight possible outcomes for the experiment: SSS SSF SFS SFF FSS FSF FFS FFF From the definition of X, X(SSF) ¼ 2, X(SFF) ¼ 1, and so on. Possible values for X in an n-trial experiment are x ¼ 0, 1, 2, . . ., n.

98

2 Discrete Random Variables and Probability Distributions

NOTATION

We will write X ~ Bin(n, p) to indicate that X is a binomial rv based on n trials with success probability p. Because the pmf of a binomial rv X depends on the two parameters n and p, we denote the pmf by b(x; n, p). Our next goal is to derive a formula for the binomial pmf. Consider first the case n ¼ 4 for which each outcome, its probability, and corresponding x value are listed in Table 2.1. For example, PðSSFSÞ ¼ PðSÞ P S P F P S independent trials ¼ p p ð 1 pÞ p constant PðSÞ ¼ p 3 ð 1 pÞ Table 2.1 Outcomes and probabilities for a binomial experiment with four trials Outcome SSSS SSSF SSFS SSFF SFSS SFSF SFFS SFFF

x 4 3 3 2 3 2 2 1

Probability p4 p3(1 p) p3(1 p) p2(1 p)2 p3(1 p) p2(1 p)2 p2(1 p)2 p(1 p)3

Outcome FSSS FSSF FSFS FSFF FFSS FFSF FFFS FFFF

x 3 2 2 1 2 1 1 0

Probability p3(1 p) p2(1 p)2 p2(1 p)2 p(1 p)3 p2(1 p)2 p(1 p)3 p(1 p)3 (1 p)4

In this special case, we wish to determine b(x; 4, p) for x ¼ 0, 1, 2, 3, and 4. For b(3; 4, p), we identify which of the 16 outcomes yield an x value of 3 and sum the probabilities associated with each such outcome: bð3; 4; pÞ ¼ PðFSSSÞ þ PðSFSSÞ þ PðSSFSÞ þ PðSSSFÞ ¼ 4p3 ð1 pÞ There are four outcomes with x ¼ 3 and each has probability p3(1 p); the probability depends only on the number of S’s, not the order of S’s and F’s. So number of outcomes probability of any particular bð3; 4; pÞ ¼ with X ¼ 3 outcome with X ¼ 3 Similarly, b(2; 4, p) ¼ 6p2(1 p)2, which is also the product of the number of outcomes with X ¼ 2 and the probability of any such outcome. In general, number of sequences of probability of any bðx; n; pÞ ¼ length n consisting of x S’s particular such sequence Since the ordering of S’s and F’s is not important, the second factor in the previous equation is px(1 p)nx (for example, the first x trials resulting in S and the last n x resulting in F). The first factor is the number of ways of choosing x of the n trials to be S’s—that is, the number of combinations of size x that can be constructed from n distinct objects (trials here).

2.4

The Binomial Distribution

99

THEOREM

8 < n x p ð1 pÞnx bðx; n; pÞ ¼ x : 0

x ¼ 0, 1, 2, . . . , n otherwise

Example 2.31 Each of six randomly selected cola drinkers is given a glass containing cola S and one containing cola F. The glasses are identical in appearance except for a code on the bottom to identify the cola. Suppose there is actually no tendency among cola drinkers to prefer one cola to the other. Then p ¼ P(a selected individual prefers S) ¼ .5, so with X ¼ the number among the six who prefer S, X ~ Bin(6, .5). Thus 6 PðX ¼ 3Þ ¼ bð3; 6; :5Þ ¼ ð:5Þ3 ð:5Þ3 ¼ 20ð:5Þ6 ¼ :313 3 The probability that at least three prefer S is 6 X 6 ð:5Þx ð:5Þ6x ¼ :656 bðx; 6; :5Þ ¼ Pð X 3 Þ ¼ x x¼3 x¼3 6 X

and the probability that at most one prefers S is Pð X 1 Þ ¼

1 X

bðx; 6; :5Þ ¼ :109

■

x¼0

2.4.2

Computing Binomial Probabilities

Even for a relatively small value of n, the computation of binomial probabilities can be tedious. Software and statistical tables are both available for this purpose; both are typically in terms of the cdf F(x) ¼ P(X x) of the distribution, either in lieu of or in addition to the pmf. Various other probabilities can then be calculated using the proposition on cdfs from Sect. 2.2. NOTATION

For X ~ Bin(n, p), the cdf will be denoted by Bðx; n; pÞ ¼ PðX xÞ ¼

x X

bðy; n; pÞ

x ¼ 0, 1, . . . , n

y¼0

Table 2.2 at the end of this section provides the code for performing binomial calculations in both Matlab and R. In addition, Appendix Table A.1 tabulates the binomial cdf for n ¼ 5, 10, 15, 20, 25 in combination with selected values of p. Example 2.32 Suppose that 20% of all copies of a particular textbook fail a binding strength test. Let X denote the number among 15 randomly selected copies that fail the test. Then X has a binomial distribution with n ¼ 15 and p ¼ .2.

100

2 Discrete Random Variables and Probability Distributions

(a) The probability that at most 8 fail the test is Pð X 8 Þ ¼

8 X

bðy; 15; :2Þ ¼ Bð8; 15; :2Þ

y¼0

This is found at the intersection of the p ¼ .2 column and x ¼ 8 row in the n ¼ 15 part of Table A.1: B(8; 15, .2) ¼ .999. In Matlab, we may type binocdf(8,15,.2); in R, the command is pbinom(8,15,.2). 15 (b) The probability that exactly 8 fail is PðX ¼ 8Þ ¼ bð8; 15; :2Þ ¼ ð:2Þ8 ð:8Þ7 ¼ :0034. We 8 can calculate this in Matlab or R with binopdf(8,15,.2)and dbinom(8,15,.2), respectively. To use Table A.1, write PðX ¼ 8Þ ¼ PðX 8Þ PðX 7Þ ¼ Bð8; 15; :2Þ Bð7; 15; :2Þ which is the difference between two consecutive entries in the p ¼ .2 column. The result is .999 .996 ¼ .003. (c) The probability that at least 8 fail is P(X 8) ¼ 1 P(X 7) ¼ 1 B(7; 15, .2). The cdf may be evaluated using Matlab or R as above, or by looking up the entry in the x ¼ 7 row of the p ¼ .2 column in Table A.1. In any case, we find P(X 8) ¼ 1 .996 ¼ .004. (d) Finally, the probability that between 4 and 7, inclusive, fail is Pð4 X 7Þ ¼ PðX ¼ 4, 5, 6, or7Þ ¼ P X 7 P X 3 ¼ Bð7; 15; :2Þ B 3; 15, :2 ¼ :996 :648 ¼ :348 Notice that this latter probability is the difference between the cdf values at x ¼ 7 and x ¼ 3, not x ¼ 7 and x ¼ 4. ■

Example 2.33 An electronics manufacturer claims that at most 10% of its power supply units need service during the warranty period. To investigate this claim, technicians at a testing laboratory purchase 20 units and subject each one to accelerated testing to simulate use during the warranty period. Let p denote the probability that a power supply unit needs repair during the period (i.e., the proportion of all such units that need repair). The laboratory technicians must decide whether the data resulting from the experiment supports the claim that p .10. Let X denote the number among the 20 sampled that need repair, so X ~ Bin(20, p). Consider the decision rule Reject the claim that p .10 in favor of the conclusion that p > .10 if x 5 (where x is the observed value of X), and consider the claim plausible if x 4 The probability that the claim is rejected when p ¼ .10 (an incorrect conclusion) is PðX 5 when p ¼ :10Þ ¼ 1 Bð4; 20; :1Þ ¼ 1 :957 ¼ :043 The probability that the claim is not rejected when p ¼ .20 (a different type of incorrect conclusion) is PðX 4 when p ¼ :2Þ ¼ Bð4; 20; :2Þ ¼ :630 The first probability is rather small, but the second is intolerably large. When p ¼ .20, so that the manufacturer has grossly understated the percentage of units that need service, and the stated decision

2.4

The Binomial Distribution

101

rule is used, 63% of all samples of size 20 will result in the manufacturer’s claim being judged plausible! One might recognize that the probability of this second type of erroneous conclusion could be made smaller by changing the cutoff value 5 in the decision rule to something else. However, although replacing 5 by a smaller number would indeed yield a probability smaller than .630, the other probability would then increase. The only way to make both “error probabilities” small is to base the decision rule on an experiment involving many more units (i.e., to increase n). ■

2.4.3

The Mean and Variance of a Binomial Random Variable

For n ¼ 1, the binomial distribution becomes the Bernoulli distribution. From Example 2.17, the mean value of a Bernoulli variable is μ ¼ p, so the expected number of S’s on any single trial is p. Since a binomial experiment consists of n trials, intuition suggests that for X ~ Bin(n, p), E(X) ¼ np, the product of the number of trials and the probability of success on a single trial. The expression for Var(X) is not so obvious. PROPOSITION

If X ~ Bin(n, p), then E(X) ¼ np, Var(X) ¼ np(1 p) ¼ npq, and SDðXÞ ¼ q ¼ 1 p).

pﬃﬃﬃﬃﬃﬃﬃﬃ npq (where

Thus, calculating the mean and variance of a binomial rv does not necessitate evaluating summations of the sort we employed in Sect. 2.3. The proof of the result for E(X) is sketched in Exercise 74. Example 2.34 If 75% of all purchases at a store are made with a credit card and X is the number among ten randomly selected purchases made with a credit card, then X ~ Bin(10, .75). Thus E(X) ¼ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ np ¼ (10)(.75) ¼ 7.5, Var(X) ¼ np(1 p) ¼ 10(.75)(.25) ¼ 1.875, and σ ¼ 1:875 ¼ 1:37. Again, even though X can take on only integer values, E(X) need not be an integer. If we perform a large number of independent binomial experiments, each with n ¼ 10 trials and p ¼ .75, then the average number of S’s per experiment will be close to 7.5. ■ An important application of the binomial distribution is to estimating the precision of simulated probabilities, as in Sect. 1.6. The relative frequency definition of probability justified defining an ^ ðAÞ ¼ X=n, where n is the number of runs of the simulation estimate of a probability P(A) by P program and X equals the number of runs in which event A occurred. Assuming the runs of our simulation are independent (and they usually are), the rv X has a binomial distribution with parameters n and p ¼ P(A). From the preceding proposition and the rescaling properties of mean and standard deviation, we have ^ ðAÞ ¼ E 1X ¼ 1 EðXÞ ¼ 1 ðnpÞ ¼ p ¼ PðAÞ E P n n n Thus we expect the value of our estimate to coincide with the probability being estimated, in the ^ ðAÞ to be systematically higher or lower than P(A). Also, sense that there is no reason for P

102

2 Discrete Random Variables and Probability Distributions

^ ðAÞ ¼ SD 1X SD P n

rﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ rﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 1 1 pð 1 pÞ PðAÞ½1 PðAÞ ¼ SDðXÞ ¼ npð1 pÞ ¼ ¼ ð2:14Þ n n n n

^ ðAÞ (essentially a synonym for standard Expression (2.14) is called the standard error of P ^ ðAÞ “typically” varies from the true deviation) and indicates the amount by which an estimate P probability P(A). However, this expression isn’t of much use in practice: we most often simulate a probability when P(A) is unknown, which prevents us from using Eq. (2.14). As a solution, we simply ^ ¼P ^ ðAÞ into this expression and get substitute the estimate P sﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ ﬃ ^ 1P ^ P ^ ð AÞ SD P n This is the estimated standard error formula (1.8) given in Sect. 1.6. Very importantly, this estimated standard error gets closer to 0 as the number of runs, n, in the simulation increases.

2.4.4

Binomial Calculations with Software

Many software packages, including Matlab and R, have built-in functions to evaluate both the pmf and cdf of the binomial distribution (and many other named distributions). Table 2.2 summarizes the relevant code in both packages. The use of these functions was illustrated in Example 2.32. Table 2.2 Binomial probability calculations in Matlab and R Function: Notation: Matlab: R:

2.4.5

pmf b(x; n, p) binopdf(x, n, p) dbinom(x, n, p)

cdf B(x; n, p) binocdf(x, n, p) pbinom(x, n, p)

Exercises: Section 2.4 (49–74)

49. Determine whether each of the following rvs has a binomial distribution. If it does, identify the values of the parameters n and p (if possible). (a) X ¼ the number of ⚃s in 10 rolls of a fair die (b) X ¼ the number of multiple-choice questions a student gets right on a 40-question test, when each question has four choices and the student is completely guessing (c) X ¼ the same as (b), but half the questions have four choices and the other half have three (d) X ¼ the number of women in a random sample of 8 students, from a class comprising 20 women and 15 men (e) X ¼ the total weight of 15 randomly selected apples (f) X ¼ the number of apples, out of a random sample of 15, that weigh more than 150 g 50. Compute the following binomial probabilities directly from the formula for b(x; n, p): (a) b(3; 8, .6) (b) b(5; 8, .6) (c) P(3 X 5) when n ¼ 8 and p ¼ .6 (d) P(1 X) when n ¼ 12 and p ¼ .1

2.4

The Binomial Distribution

103

51. Use Appendix Table A.1 or software to obtain the following probabilities: (a) B(4; 10, .3) (b) b(4; 10, .3) (c) b(6; 10, .7) (d) P(2 X 4) when X ~ Bin(10, .3) (e) P(2 X) when X ~ Bin(10, .3) (f) P(X 1) when X ~ Bin(10, .7) (g) P(2 < X < 6) when X ~ Bin(10, .3) 52. When circuit boards used in the manufacture of DVD players are tested, the long-run percentage of defectives is 5%. Let X ¼ the number of defective boards in a random sample of size n ¼ 25, so X ~ Bin(25, .05). (a) Determine P(X 2). (b) Determine P(X 5). (c) Determine P(1 X 4). (d) What is the probability that none of the 25 boards is defective? (e) Calculate the expected value and standard deviation of X. 53. A company that produces fine crystal knows from experience that 10% of its goblets have cosmetic flaws and must be classified as “seconds.” (a) Among six randomly selected goblets, how likely is it that only one is a second? (b) Among six randomly selected goblets, what is the probability that at least two are seconds? (c) If goblets are examined one by one, what is the probability that at most five must be selected to find four that are not seconds? 54. Suppose that only 25% of all drivers come to a complete stop at an intersection having flashing red lights in all directions when no other cars are visible. What is the probability that, of 20 randomly chosen drivers coming to an intersection under these conditions, (a) At most 6 will come to a complete stop? (b) Exactly 6 will come to a complete stop? (c) At least 6 will come to a complete stop? 55. Refer to the previous exercise. (a) What is the expected number of drivers among the 20 that come to a complete stop? (b) What is the standard deviation of the number of drivers among the 20 that come to a complete stop? (c) What is the probability that the number of drivers among these 20 that come to a complete stop differs from the expected number by more than 2 standard deviations? 56. Suppose that 30% of all students who have to buy a text for a particular course want a new copy (the successes!), whereas the other 70% want a used copy. Consider randomly selecting 25 purchasers. (a) What are the mean value and standard deviation of the number who want a new copy of the book? (b) What is the probability that the number who want new copies is more than two standard deviations away from the mean value? (c) The bookstore has 15 new copies and 15 used copies in stock. If 25 people come in one by one to purchase this text, what is the probability that all 25 will get the type of book they want from current stock? [Hint: Let X ¼ the number who want a new copy. For what values of X will all 25 get what they want?] (d) Suppose that new copies cost $100 and used copies cost $70. Assume the bookstore has 50 new copies and 50 used copies. What is the expected value of total revenue from the sale of the next 25 copies purchased? [Hint: Let h(X) ¼ the revenue when X of the 25 purchasers want new copies. Express this as a linear function.]

104

2 Discrete Random Variables and Probability Distributions

57. Exercise 30 (Sect. 2.3) gave the pmf of Y, the number of traffic citations for a randomly selected individual insured by a company. What is the probability that among 15 randomly chosen such individuals (a) At least 10 have no citations? (b) Fewer than half have at least one citation? (c) The number that have at least one citation is between 5 and 10, inclusive? 58. A particular type of tennis racket comes in a midsize version and an oversize version. Sixty percent of all customers at a store want the oversize version. (a) Among ten randomly selected customers who want this type of racket, what is the probability that at least six want the oversize version? (b) Among ten randomly selected customers, what is the probability that the number who want the oversize version is within 1 standard deviation of the mean value? (c) The store currently has seven rackets of each version. What is the probability that all of the next ten customers who want this racket can get the version they want from current stock? 59. Twenty percent of all telephones of a certain type are submitted for service while under warranty. Of these, 60% can be repaired, whereas the other 40% must be replaced with new units. If a company purchases ten of these telephones, what is the probability that exactly two will end up being replaced under warranty? 60. The College Board reports that 2% of the two million high school students who take the SAT each year receive special accommodations because of documented disabilities (Los Angeles Times, July 16, 2002). Consider a random sample of 25 students who have recently taken the test. (a) What is the probability that exactly 1 received a special accommodation? (b) What is the probability that at least 1 received a special accommodation? (c) What is the probability that at least 2 received a special accommodation? (d) What is the probability that the number among the 25 who received a special accommodation is within 2 standard deviations of the number you would expect to be accommodated? (e) Suppose that a student who does not receive a special accommodation is allowed 3 hours for the exam, whereas an accommodated student is allowed 4.5 hours. What would you expect the average time allowed the 25 selected students to be? 61. Suppose that 90% of all batteries from a supplier have acceptable voltages. A certain type of flashlight requires two type-D batteries, and the flashlight will work only if both its batteries have acceptable voltages. Among ten randomly selected flashlights, what is the probability that at least nine will work? What assumptions did you make in the course of answering the question posed? 62. A k-out-of-n system functions provided that at least k of the n components function. Consider independently operating components, each of which functions (for the needed duration) with probability .96. (a) In a 3-component system, what is the probability that exactly two components function? (b) What is the probability a 2-out-of-3 system works? (c) What is the probability a 3-out-of-5 system works? (d) What is the probability a 4-out-of-5 system works? (e) What does the component probability (previously .96) need to equal so that the 4-out-of-5 system will function with probability at least .9999? 63. Bit transmission errors between computers sometimes occur, where one computer sends a 0 but the other computer receives a 1 (or vice versa). Because of this, the computer sending a message repeats each bit three times, so a 0 is sent as 000 and a 1 as 111. The receiving computer “decodes” each triplet by majority rule: whichever number, 0 or 1, appears more often in a triplet is declared to be the intended bit. For example, both 000 and 100 are decoded as 0, while 101 and

2.4

64.

65.

66.

67.

68.

The Binomial Distribution

105

011 are decoded as 1. Suppose that 6% of bits are switched (0 to 1, or 1 to 0) during transmission between two particular computers, and that these errors occur independently during transmission. (a) Find the probability that a triplet is decoded incorrectly by the receiving computer. (b) Using your answer to part (a), explain how using triplets reduces communication errors. (c) How does your answer to part (a) change if each bit is repeated five times (instead of three)? (d) Imagine a 25 kilobit message (i.e., one requiring 25,000 bits to send). What is the expected number of errors if there is no bit repetition implemented? If each bit is repeated three times? A very large batch of components has arrived at a distributor. The batch can be characterized as acceptable only if the proportion of defective components is at most.10. The distributor decides to randomly select 10 components and to accept the batch only if the number of defective components in the sample is at most 2. (a) What is the probability that the batch will be accepted when the actual proportion of defectives is .01? .05? .10? .20? .25? (b) Let p denote the actual proportion of defectives in the batch. A graph of P(batch is accepted) as a function of p, with p on the horizontal axis and P(batch is accepted) on the vertical axis, is called the operating characteristic curve for the acceptance sampling plan. Use the results of part (a) to sketch this curve for 0 p 1. (c) Repeat parts (a) and (b) with “1” replacing “2” in the acceptance sampling plan. (d) Repeat parts (a) and (b) with “15” replacing “10” in the acceptance sampling plan. (e) Which of the three sampling plans, that of part (a), (c), or (d), appears most satisfactory, and why? An ordinance requiring that a smoke detector be installed in all previously constructed houses has been in effect in a city for 1 year. The fire department is concerned that many houses remain without detectors. Let p ¼ the true proportion of such houses having detectors, and suppose that a random sample of 25 homes is inspected. If the sample strongly indicates that fewer than 80% of all houses have a detector, the fire department will campaign for a mandatory inspection program. Because of the costliness of the program, the department prefers not to call for such inspections unless sample evidence strongly argues for their necessity. Let X denote the number of homes with detectors among the 25 sampled. Consider rejecting the claim that p .8 if X 15. (a) What is the probability that the claim is rejected when the actual value of p is .8? (b) What is the probability of not rejecting the claim when p ¼ .7? When p ¼ .6? (c) How do the “error probabilities” of parts (a) and (b) change if the value 15 in the decision rule is replaced by 14? A toll bridge charges $1.00 for passenger cars and $2.50 for other vehicles. Suppose that during daytime hours, 60% of all vehicles are passenger cars. If 25 vehicles cross the bridge during a particular daytime period, what is the resulting expected toll revenue? [Hint: Let X ¼ the number of passenger cars; then the toll revenue h(X) is a linear function of X.] A student who is trying to write a paper for a course has a choice of two topics, A and B. If topic A is chosen, the student will order two books through interlibrary loan, whereas if topic B is chosen, the student will order four books. The student believes that a good paper necessitates receiving and using at least half the books ordered for either topic chosen. If the probability that a book ordered through interlibrary loan actually arrives in time is .9 and books arrive independently of one another, which topic should the student choose to maximize the probability of writing a good paper? What if the arrival probability is only .5 instead of .9? Twelve jurors are randomly selected from a large population. Each juror arrives at her or his conclusion about the case before the jury independently of the other jurors.

106

2 Discrete Random Variables and Probability Distributions

(a) In a criminal case, all 12 jurors must agree on a verdict. Let p denote the probability that a randomly selected member of the population would reach a guilty verdict based on the evidence presented (so a proportion 1 p would reach “not guilty”). What is the probability, in terms of p, that the jury reaches a unanimous verdict one way or the other? (b) For what values of p is the probability in part (a) the highest? For what value of p is the probability in (a) the lowest? Explain why this makes sense. (c) In most civil cases, only a nine-person majority is required to decide a verdict. That is, if nine or more jurors favor the plaintiff, then the plaintiff wins; if at least nine jurors side with the defendant, then the defendant wins. Let p denote the probability that someone would side with the plaintiff based on the evidence. What is the probability, in terms of p, that the jury reaches a verdict one way or the other? How does this compare with your answer to part (a)? 69. Customers at a gas station pay with a credit card (A), debit card (B), or cash (C). Assume that successive customers make independent choices, with P(A) ¼ .5, P(B) ¼ .2, and P(C) ¼ .3. (a) Among the next 100 customers, what are the mean and variance of the number who pay with a debit card? Explain your reasoning. (b) Answer part (a) for the number among the 100 who don’t pay with cash. 70. An airport limousine can accommodate up to four passengers on any one trip. The company will accept a maximum of six reservations for a trip, and a passenger must have a reservation. From previous records, 20% of all those making reservations do not appear for the trip. In the following questions, assume independence, but explain why there could be dependence. (a) If six reservations are made, what is the probability that at least one individual with a reservation cannot be accommodated on the trip? (b) If six reservations are made, what is the expected number of available places when the limousine departs? (c) Suppose the probability distribution of the number of reservations made is given in the accompanying table. Number of reservations Probability

71.

72.

73.

74.

3 .1

4 .2

5 .3

6 .4

Let X denote the number of passengers on a randomly selected trip. Obtain the probability mass function of X. Let X be a binomial random variable with fixed n. (a) Are there values of p (0 p 1) for which Var(X) ¼ 0? Explain why this is so. (b) For what value of p is Var(X) maximized? [Hint: Either graph Var(X) as a function of p or else take a derivative.] (a) Show that b(x; n, 1 p) ¼ b(n x; n, p). (b) Show that B(x; n, 1 p) ¼ 1 B(n x 1; n, p). [Hint: At most x S’s is equivalent to at least (n x) F’s.] (c) What do parts (a) and (b) imply about the necessity of including values of p greater than .5 in Table A.1? Refer to Chebyshev’s inequality given in Sect. 2.3. Calculate P(|X μ| kσ) for k ¼ 2 and k ¼ 3 when X ~ Bin(20, .5), and compare to the corresponding upper bounds. Repeat this for X ~ Bin(20, .75). Show that E(X) ¼ np when X is a binomial random variable. [Hint: Express E(X) as a sum with lower limit x ¼ 1. Then factor out np, let y ¼ x 1 so that the sum is from y ¼ 0 to y ¼ n 1, and show that the sum equals 1.]

2.5

The Poisson Distribution

2.5

107

The Poisson Distribution

The binomial distribution was derived by starting with an experiment consisting of trials and applying the laws of probability to various outcomes of the experiment. There is no simple experiment on which the Poisson distribution is based, although we will shortly describe how it can be obtained from the binomial distribution by certain limiting operations. DEFINITION

A random variable X is said to have a Poisson distribution with parameter μ (μ > 0) if the pmf of X is pðx; μÞ ¼

eμ μx x!

x ¼ 0, 1, 2, . . .

We shall see shortly that μ is in fact the expected value of X, so the notation here is consistent with our previous use of the symbol μ. Because μ must be positive, p(x; μ) > 0 for all possible x values. The μ fact that ∑1 x ¼ 0 p(x; μ) ¼ 1 is a consequence of the Maclaurin infinite series expansion of e , which appears in most calculus texts: eμ ¼ 1 þ μ þ

1 X μ2 μ3 μx þ þ ¼ 2! 3! x! x¼0

ð2:15Þ

If the two extreme terms in Eq. (2.15) are multiplied by eμ and then eμ is placed inside the summation, the result is 1¼

1 X eμ μx x! x¼0

which shows that p(x; μ) fulfills the second condition necessary for specifying a pmf. Example 2.35 Let X denote the number of creatures of a particular type captured in a trap during a given time period. Suppose that X has a Poisson distribution with μ ¼ 4.5, so on average traps will contain 4.5 creatures. [The article “Dispersal Dynamics of the Bivalve Gemma gemma in a Patchy Environment” (Ecol. Monogr., 1995: 1–20) suggests this model; the bivalve Gemma gemma is a small clam.] The probability that a trap contains exactly five creatures is Pð X ¼ 5 Þ ¼

e4:5 ð4:5Þ5 ¼ :1708 5!

The probability that a trap has at most five creatures is Pð X 5 Þ ¼

2.5.1

5 X e4:5 ð4:5Þx 4:52 4:55 ¼ e4:5 1 þ 4:5 þ þ þ ¼ :7029 x! 2! 5! x¼0

■

The Poisson Distribution as a Limit

The rationale for using the Poisson distribution in many situations is provided by the following proposition.

108

2 Discrete Random Variables and Probability Distributions

PROPOSITION

Suppose that in the binomial pmf b(x; n, p) we let n ! 1 and p ! 0 in such a way that np approaches a value μ > 0. Then b(x; n, p) ! p(x; μ). Proof Begin with the binomial pmf: n! n x px ð1 pÞnx bðx; n; pÞ ¼ p ð1 pÞnx ¼ x x!ðn xÞ! ¼

n ð n 1Þ ð n x þ 1Þ x p ð1 pÞnx x!

Now multiply both the numerator and denominator by nx: bðx; n; pÞ ¼

n n 1 n x þ 1 ðnpÞx ð1 pÞn n n n x! ð1 pÞx

Taking the limit as n ! 1 and p ! 0 with np ! μ, μx ð1 np=nÞn lim bðx; n; pÞ ¼ 1 1 1 lim n!1 n!1 x! 1 The limit on the right can be obtained from the calculus theorem that says the limit of (1 an/n)n is ea if an ! a. Because np ! μ,

μx npn μx eμ ¼ pðx; μÞ ¼ lim bðx; n; pÞ ¼ lim 1 n!1 n x! n!1 x! ■ According to the proposition, in any binomial experiment for which the number of trials n is large and the success probability p is small, b(x; n, p) p(x; μ) where μ ¼ np. It is interesting to note that Sime´on Poisson discovered the distribution that bears his name by this approach in the 1830s. Table 2.3 shows the Poisson distribution for μ ¼ 3 along with three binomial distributions with np ¼ 3, and Fig. 2.8 (from R) plots the Poisson along with the first two binomial distributions. The approximation is of limited use for n ¼ 30, but of course the accuracy is better for n ¼ 100 and much better for n ¼ 300. Table 2.3 Comparing the Poisson and three binomial distributions x 0 1 2 3 4 5 6 7 8 9 10

n ¼ 30, p ¼ .1 0.042391 0.141304 0.227656 0.236088 0.177066 0.102305 0.047363 0.018043 0.005764 0.001565 0.000365

n ¼ 100, p ¼ .03 0.047553 0.147070 0.225153 0.227474 0.170606 0.101308 0.049610 0.020604 0.007408 0.002342 0.000659

n ¼ 300, p ¼ .01 0.049041 0.148609 0.224414 0.225170 0.168877 0.100985 0.050153 0.021277 0.007871 0.002580 0.000758

Poisson, μ ¼ 3 0.049787 0.149361 0.224042 0.224042 0.168031 0.100819 0.050409 0.021604 0.008102 0.002701 0.000810

2.5

The Poisson Distribution

109 p(x)

Fig. 2.8 Comparing a Poisson and two binomial distributions

.25 o x

o Bin(30, .1) x Bin(100,.03) | Poisson(3)

o x

.20 o x .15

x o o x

.10

.05

x o

x o

x o 0 0

2

4

6

x o 8

x o

x o

x

10

Example 2.36 Suppose you have a 4-megabit modem (4,000,000 bits/s) with bit error probability 108. Assume bit errors occur independently, and assume your bit rate stays constant at 4 Mbps. What is the probability of exactly 3 bit errors in the next minute? Of at most 3 bit errors in the next minute? Define a random variable X ¼ the number of bit errors in the next minute. From the description, X satisfies the conditions of a binomial distribution; specifically, since a constant bit rate of 4 Mbps equates to 240,000,000 bits transmitted per minute, X ~ Bin(240000000, 108). Hence, the probability of exactly three bit errors in the next minute is 239999997 240000000 8 3 PðX ¼ 3Þ ¼ b 3; 240000000; 108 ¼ 10 1 108 3 For a variety of reasons, some calculators will struggle with this computation. The expression for the chance of at most 3 bit errors, P(X 3), is even worse. (The inability to compute such expressions in the nineteenth century, even with modest values of n and p, was Poisson’s motive to derive an easily computed approximation.) We may approximate these binomial probabilities using the Poisson distribution with μ ¼ np ¼ 240000000(108) ¼ 2.4. Then PðX ¼ 3Þ pð3; 2:4Þ ¼

e2:4 2:43 ¼ :20901416 3!

Similarly, the probability of at most 3 bit errors in the next minute is approximated by Pð X 3 Þ

3 X x¼0

pðx; 2:4Þ ¼

3 X e2:4 2:4x ¼ :77872291 x! x¼0

Using modern software, the exact probabilities (i.e., using the binomial model) are .2090141655 and .7787229106, respectively. The Poisson approximations agree to eight decimal places and are clearly more computationally tractable. ■ Many software packages will compute both p(x; μ) and the corresponding cdf P(x; μ) for specified values of x and μ upon request; the relevant Matlab and R functions appear in Table 2.4 at the end of

110

2 Discrete Random Variables and Probability Distributions

this section. Appendix Table A.2 exhibits the cdf P(x; μ) for μ ¼ .1, .2, . . ., 1, 2, . . ., 10, 15, and 20. For example, if μ ¼ 2, then P(X 3) ¼ P(3; 2) ¼ .857, whereas P(X ¼ 3) ¼ P(3; 2) P(2; 2) ¼ .180.

2.5.2

The Mean and Variance of a Poisson Random Variable

Since b(x; n, p) ! p(x; μ) as n ! 1, p ! 0, np ! μ, one might guess that the mean and variance of a binomial variable approach those of a Poisson variable. These limits are np ! μ and np(1 p) ! μ. PROPOSITION

If X has a Poisson distribution with parameter μ, then E(X) ¼ Var(X) ¼ μ. These results can also be derived directly from the definitions of mean and variance (see Exercise 88 for the mean). Example 2.37 (Example 2.35 continued) Both the expected number of creatures trapped and the pﬃﬃﬃ pﬃﬃﬃﬃﬃﬃﬃ variance of the number trapped equal 4.5, and σ X ¼ μ ¼ 4:5 ¼ 2:12. ■

2.5.3

The Poisson Process

A very important application of the Poisson distribution arises in connection with the occurrence of events of a particular type over time. As an example, suppose that starting from a time point that we label t ¼ 0, we are interested in counting the number of radioactive pulses recorded by a Geiger counter. If we make certain assumptions2 about the way in which pulses occur—chiefly, that the number of pulses grows roughly linearly with time—then it can be shown that the number of pulses in any time interval of length t can be modeled by a Poisson distribution with mean μ ¼ λt for an appropriate positive constant λ. Since the expected number of pulses in an interval of length t is λt, the expected number in an interval of length 1 is λ. Thus λ is the long run number of pulses per unit of time. If we replace “pulse” by “event,” then the number of events occurring during a fixed time interval of length t has a Poisson distribution with parameter λt. Any process that has this distribution is called a Poisson process, and λ is called the rate of the process. Other examples of situations giving rise to a Poisson process include monitoring the status of a computer system over time, with breakdowns constituting the events of interest; recording the number of accidents in an industrial facility over time; answering 911 calls at a particular location; and observing the number of cosmic-ray showers from an observatory. Example 2.36 hints at why this might be reasonable: if we “digitize” time—that is, divide time into discrete pieces, such as transmitted bits—and look at the number of the resulting time pieces that include an event, a binomial model is often applicable. If the number of time pieces is very large and the success probability close to zero, which would occur if we divided a fixed time frame into eversmaller pieces, then we may invoke the Poisson approximation from earlier in this section.

2 In Sect. 7.5, we present the formal assumptions required in this situation and derive the Poisson distribution that results from these assumptions.

2.5

The Poisson Distribution

111

Example 2.38 Suppose pulses arrive at the Geiger counter at an average rate of 6 per minute, so that λ ¼ 6. To find the probability that in a 30-s interval at least one pulse is received, note that the number of pulses in such an interval has a Poisson distribution with parameter λt ¼ 6(.5) ¼ 3 (.5 min is used because λ is expressed as a rate per minute). Then with X ¼ the number of pulses received in the 30-s interval, Pð X 1 Þ ¼ 1 Pð X ¼ 0 Þ ¼ 1

e3 30 ¼ :950 0!

In a 1-h interval (t ¼ 60), the expected number of pulses is μ ¼ λt ¼ 6(60) ¼ 360, with a standard pﬃﬃﬃ pﬃﬃﬃﬃﬃﬃﬃﬃ deviation of σ ¼ μ ¼ 360 ¼ 18:97. According to this model, in a typical hour we will observe 360 19 pulses arrive at the Geiger counter. ■ Instead of observing events over time, consider observing events of some type that occur in a twoor three-dimensional region. For example, we might select on a map a certain region R of a forest, go to that region, and count the number of trees. Each tree would represent an event occurring at a particular point in space. Under appropriate assumptions (see Sect. 7.5), it can be shown that the number of events occurring in a region R has a Poisson distribution with parameter λ a(R), where a(R) is the area of R. The quantity λ is the expected number of events per unit area or volume.

2.5.4

Poisson Calculations with Software

Table 2.4 gives the Matlab and R commands for calculating Poisson probabilities. Table 2.4 Poisson probability calculations

2.5.5

Function: Notation: Matlab: R:

pmf p(x; μ) poisspdf(x, μ) dpois(x, μ)

cdf P(x; μ) poisscdf(x, μ) ppois(x, μ)

Exercises: Section 2.5 (75–89)

75. Let X, the number of flaws on the surface of a randomly selected carpet of a particular type, have a Poisson distribution with parameter μ ¼ 5. Use software or Appendix Table A.2 to compute the following probabilities: (a) P(X 8) (b) P(X ¼ 8) (c) P(9 X) (d) P(5 X 8) (e) P(5 < X < 8) 76. Let X be the number of material anomalies occurring in a particular region of an aircraft gas-turbine disk. The article “Methodology for Probabilistic Life Prediction of MultipleAnomaly Materials” (Amer. Inst. of Aeronautics and Astronautics J., 2006: 787–793) proposes a Poisson distribution for X. Suppose μ ¼ 4. (a) Compute both P(X 4) and P(X < 4). (b) Compute P(4 X 8).

112

77.

78.

79.

80.

81.

82.

83.

2 Discrete Random Variables and Probability Distributions

(c) Compute P(8 X). (d) What is the probability that the observed number of anomalies exceeds the expected number by no more than one standard deviation? Suppose that the number of drivers who travel between a particular origin and destination during a designated time period has a Poisson distribution with parameter μ ¼ 20 (suggested in the article “Dynamic Ride Sharing: Theory and Practice,” J. of Transp. Engr., 1997: 308–312). What is the probability that the number of drivers will (a) Be at most 10? (b) Exceed 20? (c) Be between 10 and 20, inclusive? Be strictly between 10 and 20? (d) Be within 2 standard deviations of the mean value? Consider writing onto a computer disk and then sending it through a certifier that counts the number of missing pulses. Suppose this number X has a Poisson distribution with parameter μ ¼ .2. (Suggested in “Average Sample Number for Semi-Curtailed Sampling Using the Poisson Distribution,” J. Qual. Tech., 1983: 126–129.) (a) What is the probability that a disk has exactly one missing pulse? (b) What is the probability that a disk has at least two missing pulses? (c) If two disks are independently selected, what is the probability that neither contains a missing pulse? An article in the Los Angeles Times (Dec. 3, 1993) reports that 1 in 200 people carry the defective gene that causes inherited colon cancer. In a sample of 1000 individuals, what is the approximate distribution of the number who carry this gene? Use this distribution to calculate the approximate probability that (a) Between 5 and 8 (inclusive) carry the gene. (b) At least 8 carry the gene. Suppose that only .10% of all computers of a certain type experience CPU failure during the warranty period. Consider a sample of 10,000 computers. (a) What are the expected value and standard deviation of the number of computers in the sample that have the defect? (b) What is the (approximate) probability that more than 10 sampled computers have the defect? (c) What is the (approximate) probability that no sampled computers have the defect? If a publisher of nontechnical books takes great pains to ensure that its books are free of typographical errors, so that the probability of any given page containing at least one such error is .005 and errors are independent from page to page, what is the probability that one of its 400-page novels will contain exactly one page with errors? At most three pages with errors? In proof testing of circuit boards, the probability that any particular diode will fail is .01. Suppose a circuit board contains 200 diodes. (a) How many diodes would you expect to fail, and what is the standard deviation of the number that are expected to fail? (b) What is the (approximate) probability that at least four diodes will fail on a randomly selected board? (c) If five boards are shipped to a particular customer, how likely is it that at least four of them will work properly? (A board works properly only if all its diodes work.) The article “Expectation Analysis of the Probability of Failure for Water Supply Pipes” (J. Pipeline Syst. Eng. Pract. 2012.3:36–46) recommends using a Poisson process to model the number of failures in commercial water pipes. The article also gives estimates of the failure

2.5

84.

85.

86.

87.

88.

89.

The Poisson Distribution

113

rate λ, in units of failures per 100 miles of pipe per day, for four different types of pipe and for many different years. (a) For PVC pipe in 2008, the authors estimate a failure rate of 0.0081 failures per 100 miles of pipe per day. Consider a 100-mile-long segment of such pipe. What is the expected number of failures in 1 year (365 days)? Based on this expectation, what is the probability of at least one failure along such a pipe in 1 year? (b) For cast iron pipe in 2005, the authors’ estimate is λ ¼ 0.0864 failures per 100 miles per day. Suppose a town had 1500 miles of cast iron pipe underground in 2005. What is the probability of at least one failure somewhere along this pipe system on any given day? Organisms are present in ballast water discharged from a ship according to a Poisson process with a concentration of 10 organisms/m3 (the article “Counting at Low Concentrations: The Statistical Challenges of Verifying Ballast Water Discharge Standards” (Ecological Applications, 2013: 339–351) considers using the Poisson process for this purpose). (a) What is the probability that one cubic meter of discharge contains at least 8 organisms? (b) What is the probability that the number of organisms in 1.5 m3 of discharge exceeds its mean value by more than one standard deviation? (c) For what amount of discharge would the probability of containing at least one organism be .999? Suppose small aircraft arrive at an airport according to a Poisson process with rate λ ¼ 8 per hour, so that the number of arrivals during a time period of t hours is a Poisson rv with parameter μ ¼ 8t. (a) What is the probability that exactly 6 small aircraft arrive during a 1-h period? At least 6? At least 10? (b) What are the expected value and standard deviation of the number of small aircraft that arrive during a 90-min period? (c) What is the probability that at least 20 small aircraft arrive during a 2.5-h period? That at most 10 arrive during this period? The number of people arriving for treatment at an emergency room can be modeled by a Poisson process with a rate parameter of five per hour. (a) What is the probability that exactly four arrivals occur during a particular hour? (b) What is the probability that at least four people arrive during a particular hour? (c) How many people do you expect to arrive during a 45-min period? Suppose that trees are distributed in a forest according to a two-dimensional Poisson process with rate λ, the expected number of trees per acre, equal to 80. (a) What is the probability that in a certain quarter-acre plot, there will be at most 16 trees? (b) If the forest covers 85,000 acres, what is the expected number of trees in the forest? (c) Suppose you select a point in the forest and construct a circle of radius.1 mile. Let X ¼ the number of trees within that circular region. What is the pmf of X? [Hint: 1 sq mile ¼ 640 acres.] Let X have a Poisson distribution with parameter μ. Show that E(X) ¼ μ directly from the definition of expected value. [Hint: The first term in the sum equals 0, and then x can be canceled. Now factor out μ and show that what is left sums to 1.] In some applications the distribution of a discrete rv X resembles the Poisson distribution except that zero is not a possible value of X. For example, let X ¼ the number of tattoos that an individual wants removed when s/he arrives at a tattoo removal facility. Suppose the pmf of X is

114

2 Discrete Random Variables and Probability Distributions

pð x Þ ¼ k

eθ θx x!

x ¼ 1, 2, 3, . . .

(a) Determine the value of k. [Hint: The sum of all probabilities in the Poisson pmf is 1, and this pmf must also sum to 1.] (b) If the mean value of X is 2.313035, what is the probability that an individual wants at most 5 tattoos removed? (c) Determine the standard deviation of X when the mean value is as given in (b). [Note: The article “An Exploratory Investigation of Identity Negotiation and Tattoo Removal” (Academy of Marketing Science Review, vol. 12, #6, 2008) gave a sample of 22 observations on the number of tattoos people wanted removed; estimates of μ and σ calculated from the data were 2.318182 and 1.249242, respectively.]

2.6

Other Discrete Distributions

This section introduces discrete distributions that are closely related to the binomial distribution. Whereas the binomial distribution is the approximate probability model for sampling without replacement from a finite dichotomous (S-F) population, the hypergeometric distribution is the exact probability model for the number of S’s in the sample. The binomial rv X is the number of S’s when the number n of trials is fixed, whereas the negative binomial distribution arises from fixing the number of S’s desired and letting the number of trials be random.

2.6.1

The Hypergeometric Distribution

The assumptions leading to the hypergeometric distribution are as follows: 1. The population or set to be sampled consists of N individuals, objects, or elements (a finite population). 2. Each individual can be characterized as a success (S) or a failure (F), and there are M successes in the population. 3. A sample of n individuals is selected without replacement in such a way that each subset of size n is equally likely to be chosen. The random variable of interest is X ¼ the number of S’s in the sample. The probability distribution of X depends on the parameters n, M, and N, so we wish to obtain the pmf P(X ¼ x) ¼ h(x; n, M, N). Example 2.39 During a particular period a university’s information technology office received 20 service orders for problems with laptops, of which 8 were Macs and 12 were PCs. A sample of five of these service orders is to be selected for inclusion in a customer satisfaction survey. Suppose that the five are selected in a completely random fashion, so that any particular subset of size 5 has the same chance of being selected as does any other subset (think of putting the numbers 1, 2, . . ., 20 on 20 identical slips of paper, mixing up the slips, and choosing five of them). What then is the probability that exactly 2 of the selected service orders were for PC laptops?

2.6

Other Discrete Distributions

115

In this example, the population size is N ¼ 20, the sample size is n ¼ 5, and the number of S’s (PC ¼ S) and F’s (Mac ¼ F) in the population are M ¼ 12 and N M ¼ 8, respectively. Let X ¼ the number of PCs among the five sampled service orders. Because all outcomes (each consisting of five particular orders) are equally likely, PðX ¼ 2Þ ¼ hð2; 5; 12; 20Þ ¼

number of outcomes having X ¼ 2 number of possible outcomes

The number of possible outcomes in the experiment is the number of ways of selecting 5 from 20 the 20 objects without regard to order—that is, . To count the number of outcomes having 5 12 X ¼ 2, note that there are ways of selecting two of the PC orders, and for each such way there 2 8 are ways of selecting the three Mac orders to fill out the sample. The Fundamental Counting 3 12 8 Principle from Sect. 1.3 then gives as the number of outcomes with X ¼ 2, so 2 3 8 12 3 2 77 hð2; 5; 12; 20Þ ¼ ¼ ¼ :238 323 20 5 ■ In general, if the sample size n is smaller than the number of successes in the population (M ), then the largest possible X value is n. However, if M < n (e.g., a sample size of 25 and only 15 successes in the population), then X can be at most M. Similarly, whenever the number of population failures (N M ) exceeds the sample size, the smallest possible X value is 0 (since all sampled individuals might then be failures). However, if N M < n, the smallest possible X value is n (N M ). Summarizing, the possible values of X satisfy the restriction max(0, n N + M) x min(n, M ). An argument parallel to that of the previous example gives the pmf of X. PROPOSITION

If X is the number of S’s in a random sample of size n drawn from a population consisting of M S’s and (N M ) F’s, then the probability distribution of X, called the hypergeometric distribution, is given by M NM x nx ð2:16Þ PðX ¼ xÞ ¼ hðx; n; M; N Þ ¼ N n for x an integer satisfying max(0, n N + M) x min(n, M ).3

3

If we define

a ¼ 0 for a < b, then h(x; n, M, N) may be applied for all integers 0 x n. b

116

2 Discrete Random Variables and Probability Distributions

In Example 2.39, n ¼ 5, M ¼ 12, and N ¼ 20, so h(x; 5, 12, 20) for x ¼ 0, 1, 2, 3, 4, 5 can be obtained by substituting these numbers into Eq. (2.16). Example 2.40 Capture–recapture. Five individuals from an animal population thought to be near extinction in a region have been caught, tagged, and released to mix into the population. After they have had an opportunity to mix, a random sample of 10 of these animals is selected. Let X ¼ the number of tagged animals in the second sample. If there are actually 25 animals of this type in the region, what is the probability that (a) X ¼ 2? (b) X 2? Application of the hypergeometric distribution here requires assuming that every subset of ten animals has the same chance of being captured. This in turn implies that released animals are no easier or harder to catch than are those not initially captured. Then the parameter values are n ¼ 10, M ¼ 5 (five tagged animals in the population), and N ¼ 25, so 5 20 x 10 x hðx; 10; 5; 25Þ ¼ x ¼ 0, 1, 2, 3, 4, 5 25 10 For part (a), 20 5 8 2 PðX ¼ 2Þ ¼ hð2; 10; 5; 25Þ ¼ ¼ :385 25 10 For part (b), PðX 2Þ ¼ PðX ¼ 0, 1, or 2Þ ¼

2 X

hðx; 10; 5; 25Þ

x¼0

¼ :057 þ :257 þ :385 ¼ :699

■

Matlab, R, and other software packages will easily generate hypergeometric probabilities; see Table 2.5 at the end of this section. Comprehensive tables of the hypergeometric distribution are available, but because the distribution has three parameters, these tables require much more space than tables for the binomial distribution. As in the binomial case, there are simple expressions for E(X) and Var(X) for hypergeometric rvs. PROPOSITION

The mean and variance of the hypergeometric rv X having pmf h(x; n, M, N ) are M Nn M M VarðXÞ ¼ 1 EðXÞ ¼ n n N N1 N N The ratio M/N is the proportion of S’s in the population. Replacing M/N by p in E(X) and Var(X) gives

2.6

Other Discrete Distributions

117

EðXÞ ¼ np Nn npð1 pÞ VarðXÞ ¼ N1

ð2:17Þ

Expression (2.17) shows that the means of the binomial and hypergeometric rvs are equal, whereas the variances of the two rvs differ by the factor (N n)/(N 1), often called the finite population correction factor. This factor is less than 1, so the hypergeometric variable has smaller variance than does the binomial rv. The correction factor can be written (1 n/N )/(1 1/N ), which is approximately 1 when n is small relative to N. Example 2.41 (Example 2.40 continued) In the animal-tagging example, n ¼ 10, M ¼ 5, and N ¼ 5 25, so p ¼ 25 ¼ :2 and EðXÞ ¼ 10ð:2Þ ¼ 2 VarðXÞ ¼

25 10 ð10Þð:2Þð:8Þ ¼ ð:625Þð1:6Þ ¼ 1 25 1

If the sampling were carried out with replacement, Var(X) ¼ 1.6. Suppose the population size N is not actually known, so the value x is observed and we wish to estimate N. It is reasonable to equate the observed sample proportion of S’s, x/n, with the population proportion, M/N, giving the estimate ^ ¼Mn N x ^ ¼ 250. For example, if M ¼ 100, n ¼ 40, and x ¼ 16, then N

■

Our rule in Sect. 2.4 stated that if sampling is without replacement but n/N is at most .05, then the binomial distribution can be used to compute approximate probabilities involving the number of S’s in the sample. A more precise statement is as follows: Let the population size, N, and number of population S’s, M, get large with the ratio M/N approaching p. Then h(x; n, M, N ) approaches the binomial pmf b(x; n, p); so for n/N small, the two are approximately equal provided that p is not too near either 0 or 1. This is the rationale for our rule.

2.6.2

The Negative Binomial and Geometric Distributions

The negative binomial distribution is based on an experiment satisfying the following conditions: 1. 2. 3. 4.

The experiment consists of a sequence of independent trials. Each trial can result in either a success (S) or a failure (F). The probability of success is constant from trial to trial, so P(S on trial i) ¼ p for i ¼ 1, 2, 3 . . .. The experiment continues (trials are performed) until a total of r successes has been observed, where r is a specified positive integer.

The random variable of interest is X ¼ the number of trials required to achieve the rth success, and X is called a negative binomial random variable. In contrast to the binomial rv, the number of

118

2 Discrete Random Variables and Probability Distributions

successes is fixed and the number of trials is random. Possible values of X are r, r + 1, r + 2, . . ., since it takes at least r trials to achieve r successes. Let nb(x; r, p) denote the pmf of X. The event {X ¼ x} is equivalent to {r 1 S’s in the first (x 1) trials and an S on the xth trial}, e.g., if r ¼ 5 and x ¼ 15, then there must be four S’s in the first 14 trials and trial 15 must be an S. Since trials are independent, nbðx; r; pÞ ¼ PðX ¼ xÞ ¼ Pðr 1 S’s on the first x 1 trialsÞ PðSÞ

ð2:18Þ

The first probability on the far right of Eq. (2.18) is the binomial probability x 1 r1 p ð1 pÞðx1Þðr1Þ where PðSÞ ¼ p r1 Simplifying and then multiplying by the extra factor of p at the end of Eq. (2.18) yields the following. PROPOSITION

The pmf of the negative binomial rv X with parameters r ¼ desired number of S’s and p ¼ P(S) is x1 r nbðx; r; pÞ ¼ p ð1 pÞxr x ¼ r, r þ 1, r þ 2, . . . r1 Example 2.42 A pediatrician wishes to recruit four couples, each of whom is expecting their first child, to participate in a new natural childbirth regimen. Let p ¼ P(a randomly selected couple agrees to participate). If p ¼ .2, what is the probability that exactly 15 couples must be asked before 4 are found who agree to participate? Substituting r ¼ 4, p ¼ .2, and x ¼ 15 into nb(x; r, p) gives 15 1 nbð15; 4; 2Þ ¼ :24 :811 ¼ :050 41 The probability that at most 15 couples need to be asked is PðX 15Þ ¼

15 X

nbðx; 4; :2Þ ¼

x¼4

15 X x1 :24 :8x4 ¼ :352 3 x¼4

■

In the special case r ¼ 1, the pmf is nbðx; 1; pÞ ¼ ð1 pÞx1 p

x ¼ 1, 2, . . .

ð2:19Þ

In Example 2.10, we derived the pmf for the number of trials necessary to obtain the first S, and the pmf there is identical to Eq. (2.19). The random variable X ¼ number of trials required to achieve one success is referred to as a geometric random variable, and the pmf in Eq. (2.19) is called the geometric distribution. The name is appropriate because the probabilities constitute a geometric series: p, (1 p)p, (1 p)2p, . . .. To see that the sum of the probabilities is 1, recall that the sum of a geometric series is a + ar + ar2 + . . . ¼ a/(1 r) if |r| < 1, so for p > 0,

2.6

Other Discrete Distributions

119

p þ ð1 pÞp þ ð1 pÞ2 p þ ¼

p ¼1 1 ð1 pÞ

In Example 2.19, the expected number of trials until the first S was shown to be 1/p. Intuitively, we would then expect to need r 1/p trials to achieve the rth S, and this is indeed E(X). There is also a simple formula for Var(X). PROPOSITION

If X is a negative binomial rv with parameters r and p, then Eð X Þ ¼

r p

VarðXÞ ¼

r ð 1 pÞ p2

Example 2.43 (Example 2.42 continued) With p ¼ .2, the expected number of couples the doctor must speak to in order to find 4 that will agree to participate is r/p ¼ 4/.2 ¼ 20. This makes sense, since with p ¼ .2 ¼ 1/5 it will take five attempts, on average, to achieve one success. The corresponding variance is 4(1 .2)/(.2)2 ¼ 80, for a standard deviation of about 8.9. ■ Since they are based on similar experiments, some caution must be taken to distinguish the binomial and negative binomial models, as seen in the next example. Example 2.44 In many communication systems, a receiver will send a short signal back to the transmitter to indicate whether a message has been received correctly or with errors. (These signals are often called an acknowledgement and a non-acknowledgement, respectively. Bit sum checks and other tools are used by the receiver to determine the absence or presence of errors.) Assume we are using such a system in a noisy channel, so that each message is sent error-free with probability .86, independent of all other messages. What is the probability that in 10 transmissions, exactly 8 will succeed? What is the probability the system will require exactly 10 attempts to successfully transmit 8 messages? While these two questions may sound similar, they require two different models for solution. To answer the first question, let X represent the number of successful transmissions out of 10. Then X ~ Bin(10, .86), and the answer is 10 PðX ¼ 8Þ ¼ bð8; 10; :86Þ ¼ ð:86Þ8 ð:14Þ2 ¼ :2639 8 However, the event {exactly 10 attempts required to successfully transmit 8 messages} is more restrictive: not only must we observe 8 S’s and 2 F’s in 10 trials, but the last trial must be a success. Otherwise, it took fewer than 10 tries to send 8 messages successfully. Define a variable Y ¼ the number of transmissions (trials) required to successfully transmit 8 messages. Then Y is negative binomial, with r ¼ 8 and p ¼ .86, and the answer to the second question is 10 1 PðY ¼ 10Þ ¼ nbð10; 8; :86Þ ¼ ð:86Þ8 ð:14Þ2 ¼ :2111 81 Notice this is smaller than the answer to the first question, which makes sense because (as we noted) the second question imposes an additional constraint. In fact, you can think of the “1” terms in the negative binomial pmf as accounting for this loss of flexibility in the placement of S’s and F’s.

120

2 Discrete Random Variables and Probability Distributions

Similarly, the expected number of successful transmissions in 10 attempts is E(X) ¼ np ¼ 10(.86) ¼ 8.6, while the expected number of attempts required to successfully transmit 8 messages is E(Y ) ¼ r/p ¼ 8/.86 ¼ 9.3. In the first case, the number of trials (n ¼ 10) is fixed, while in the second case the desired number of successes (r ¼ 8) is fixed. ■ By expanding the binomial coefficient in front of pr(1 p)xr and doing some cancellation, it can be seen that nb(x; r, p) is well-defined even when r is not an integer. This generalized negative binomial distribution has been found to fit observed data quite well in a wide variety of applications.

2.6.3

Alternative Definition of the Negative Binomial Distribution

There is not universal agreement on the definition of a negative binomial random variable (or, by extension, a geometric rv). It is not uncommon in the literature, as well as in some textbooks, to see the number of failures preceding the rth success called “negative binomial”; in our notation, this simply equals X r. Possible values of this “number of failures” variable are 0, 1, 2, . . .. Similarly, the geometric distribution is sometimes defined in terms of the number of failures preceding the first success in a sequence of independent and identical trials. If one uses these alternative definitions, then the pmf and mean formula must be adjusted accordingly. (The variance, however, will stay the same.) The developers of Matlab and R are among those who have adopted this alternative definition; as a result, we must be careful with our inputs to the relevant software functions. The pmf syntax for the distributions in this section are cataloged in Table 2.5; cdfs may be invoked by changing pdf to cdf in Matlab or the initial letter d to p in R. Notice the input argument x r for the negative binomial functions: both software packages request the number of failures, rather than the number of trials. Table 2.5 Matlab and R code for hypergeometric and negative binomial calculations Function: Notation: Matlab: R:

Hypergeometric pmf h(x; n, M, N) hygepdf(x, N, M, n) dhyper(x, M, N M, n)

Negative Binomial pmf nb(x; r, p) nbinpdf(x r, r, p) dnbinom(x r, r, p)

For example, suppose X has a hypergeometric distribution with n ¼ 10, M ¼ 5, N ¼ 25 as in Example 2.40. Using Matlab, we may calculate P(X ¼ 2) ¼ hygepdf(2,25,5,10) and P(X 2) ¼ hygecdf(2,25,5,10). The corresponding R function calls are dhyper(2,5,20,10) and phyper(2,5,20,10), respectively. If X is the negative binomial variable of Example 2.42 with parameters r ¼ 4 and p ¼ .2, then the chance of requiring 15 trials to achieve 4 successes (i.e., 11 total failures) can be found in Matlab with nbinpdf(11,4, .2) and in R using the command dnbinom(11,4, .2).

2.6.4

Exercises: Section 2.6 (90–106)

90. An electronics store has received a shipment of 20 table radios that have connections for an iPod or iPhone. Twelve of these have two slots (so they can accommodate both devices), and the other eight have a single slot. Suppose that six of the 20 radios are randomly selected to be stored under a shelf where radios are displayed, and the remaining ones are placed in a

2.6

91.

92.

93.

94.

95.

Other Discrete Distributions

121

storeroom. Let X ¼ the number among the radios stored under the display shelf that have two slots. (a) What kind of a distribution does X have (name and values of all parameters)? (b) Compute P(X ¼ 2), P(X 2), and P(X 2). (c) Calculate the mean value and standard deviation of X. Each of 12 refrigerators has been returned to a distributor because of an audible, high-pitched, oscillating noise when the refrigerator is running. Suppose that 7 of these refrigerators have a defective compressor and the other 5 have less serious problems. If the refrigerators are examined in random order, let X be the number among the first 6 examined that have a defective compressor. Compute the following: (a) P(X ¼ 5) (b) P(X 4) (c) The probability that X exceeds its mean value by more than 1 standard deviation. (d) Consider a large shipment of 400 refrigerators, of which 40 have defective compressors. If X is the number among 15 randomly selected refrigerators that have defective compressors, describe a less tedious way to calculate (at least approximately) P(X 5) than to use the hypergeometric pmf. An instructor who taught two sections of statistics last term, the first with 20 students and the second with 30, decided to assign a term project. After all projects had been turned in, the instructor randomly ordered them before grading. Consider the first 15 graded projects. (a) What is the probability that exactly 10 of these are from the second section? (b) What is the probability that at least 10 of these are from the second section? (c) What is the probability that at least 10 of these are from the same section? (d) What are the mean and standard deviation of the number among these 15 that are from the second section? (e) What are the mean and standard deviation of the number of projects not among these first 15 that are from the second section? A geologist has collected 10 specimens of basaltic rock and 10 specimens of granite. The geologist instructs a laboratory assistant to randomly select 15 of the specimens for analysis. (a) What is the pmf of the number of granite specimens selected for analysis? (b) What is the probability that all specimens of one of the two types of rock are selected for analysis? (c) What is the probability that the number of granite specimens selected for analysis is within 1 standard deviation of its mean value? A personnel director interviewing 11 senior engineers for four job openings has scheduled six interviews for the first day and five for the second day of interviewing. Assume the candidates are interviewed in random order. (a) What is the probability that x of the top four candidates are interviewed on the first day? (b) How many of the top four candidates can be expected to be interviewed on the first day? Twenty pairs of individuals playing in a bridge tournament have been seeded 1, . . ., 20. In the first part of the tournament, the 20 are randomly divided into 10 east–west pairs and 10 north– south pairs. (a) What is the probability that x of the top 10 pairs end up playing east–west? (b) What is the probability that all of the top five pairs end up playing the same direction? (c) If there are 2n pairs, what is the pmf of X ¼ the number among the top n pairs who end up playing east–west? What are E(X) and Var(X)?

122

2 Discrete Random Variables and Probability Distributions

96. A second-stage smog alert has been called in an area of Los Angeles County in which there are 50 industrial firms. An inspector will visit 10 randomly selected firms to check for violations of regulations. (a) If 15 of the firms are actually violating at least one regulation, what is the pmf of the number of firms visited by the inspector that are in violation of at least one regulation? (b) If there are 500 firms in the area, of which 150 are in violation, approximate the pmf of part (a) by a simpler pmf. (c) For X ¼ the number among the 10 visited that are in violation, compute E(X) and Var(X) both for the exact pmf and the approximating pmf in part (b). 97. A shipment of 20 integrated circuits (ICs) arrives at an electronics manufacturing site. The site manager will randomly select 4 ICs and test them to see whether they are faulty. Unknown to the site manager, 5 of these 20 ICs are faulty. (a) Suppose the shipment will be accepted if and only if none of the inspected ICs is faulty. What is the probability this shipment of 20 ICs will be accepted? (b) Now suppose the shipment will be accepted if and only if at most one of the inspected ICs is faulty. What is the probability this shipment of 20 ICs will be accepted? (c) How do your answers to (a) and (b) change if the number of faculty ICs in the shipment is 3 instead of 5? Recalculate (a) and (b) to verify your claim. 98. Suppose that 20% of all individuals have an adverse reaction to a particular drug. A medical researcher will administer the drug to one individual after another until the first adverse reaction occurs. Define an appropriate random variable and use its distribution to answer the following questions. (a) What is the probability that when the experiment terminates, four individuals have not had adverse reactions? (b) What is the probability that the drug is administered to exactly five individuals? (c) What is the probability that at most four individuals do not have an adverse reaction? (d) How many individuals would you expect to not have an adverse reaction, and how many individuals would you expect to be given the drug? (e) What is the probability that the number of individuals given the drug is within one standard deviation of what you expect? 99. Suppose that p ¼ P(female birth) ¼ .5. A couple wishes to have exactly two female children in their family. They will have children until this condition is fulfilled. (a) What is the probability that the family has x male children? (b) What is the probability that the family has four children? (c) What is the probability that the family has at most four children? (d) How many children would you expect this family to have? How many male children would you expect this family to have? 100. A family decides to have children until it has three children of the same gender. Assuming P(B) ¼ P(G) ¼ .5, what is the pmf of X ¼ the number of children in the family? 101. Three brothers and their wives decide to have children until each family has two female children. Let X ¼ the total number of male children born to the brothers. What is E(X), and how does it compare to the expected number of male children born to each brother? 102. According to the article “Characterizing the Severity and Risk of Drought in the Poudre River, Colorado” (J. of Water Res. Planning and Mgmnt., 2005: 383–393), the drought length Y is the number of consecutive time intervals in which the water supply remains below a critical value y0 (a deficit), preceded and followed by periods in which the supply exceeds this value (a surplus). The cited paper proposes a geometric distribution with p ¼ .409 for this random variable.

2.7

Moments and Moment Generating Functions

103.

104.

105.

106.

2.7

123

(a) What is the probability that a drought lasts exactly 3 intervals? At least 3 intervals? (b) What is the probability that the length of a drought exceeds its mean value by at least one standard deviation? Individual A has a red die and B has a green die (both fair). If they each roll until they obtain five “doubles” (⚀⚀, . . ., ⚅⚅), what is the pmf of X ¼ the total number of times a die is rolled? What are E(X) and SD(X)? A carnival game consists of spinning a wheel with 10 slots, nine red and one blue. If you land on the blue slot, you win a prize. Suppose your significant other really wants that prize, so you will play until you win. (a) What is the probability you’ll win on the first spin? (b) What is the probability you’ll require exactly 5 spins? At least 5 spins? At most five spins? (c) What is the expected number of spins required for you to win the prize, and what is the corresponding standard deviation? A kinesiology professor, requiring volunteers for her study, approaches students one by one at a campus hub. She will continue until she acquires 40 volunteers. Suppose that 25% of students are willing to volunteer for the study, that the professor’s selections are random, and that the student population is large enough that individual “trials” (asking a student to participate) may be treated as independent. (a) What is the expected number of students the kinesiology professor will need to ask in order to get 40 volunteers? What is the standard deviation? (b) Determine the probability that the number of students the kinesiology professor will need to ask is within one standard deviation of the mean. Refer back to the communication system of Example 2.44. Suppose a voice packet can be transmitted a maximum of 10 times, i.e., if the 10th attempt fails, no 11th attempt is made to retransmit the voice packet. Let X ¼ the number of times a message is transmitted. Assuming each transmission succeeds with probability p, determine the pmf of X. Then obtain an expression for the expected number of times a packet is transmitted.

Moments and Moment Generating Functions

The expected values of integer powers of X and X μ are often referred to as moments, terminology borrowed from physics. In this section, we’ll discuss the general topic of moments and develop a shortcut for computing them. DEFINITION

The kth moment of a random variable X is E(Xk), while the kth moment about the mean (or kth central moment) of X is E[(X μ)k], where μ ¼ E(X). For example, μ ¼ E(X) is the “first moment” of X and corresponds to the center of mass of the distribution of X. Similarly, Var(X) ¼ E[(X μ)2] is the second moment of X about the mean, which is known in physics as the moment of inertia.

124

2 Discrete Random Variables and Probability Distributions

Example 2.45 A popular brand of dog food is sold in 5, 10, 15, and 20 lb bags. Let X be the weight of the next bag purchased, and suppose the pmf of X is x p(x)

5 .1

10 .2

15 .3

20 .4

The first moment of X is its mean: X μ ¼ E ðX Þ ¼ xpðxÞ ¼ 5ð:1Þ þ 10ð:2Þ þ 15ð:3Þ þ 20ð:4Þ ¼ 15 lbs x2 D

The second moment about the mean is the variance: h i X σ 2 ¼ E ðX μ Þ2 ¼ ðx μÞ2 pðxÞ x2 D 2

¼ ð5 15Þ ð:1Þ þ ð10 15Þ2 ð:2Þ þ ð15 15Þ2 ð:3Þ þ ð20 15Þ2 ð:4Þ ¼ 25, for a standard deviation of 5 lb. The third central moment of X is X

E ðX μÞ3 ¼ ðx μÞ3 pðxÞ x2 D

¼ ð5 15Þ3 :1 þ 10 15 3 :2 þ 15 15 3 :3 þ 20 15 3 :4 ¼ 75 We’ll discuss an interpretation of this last number next.

■

It is not difficult to verify that the third moment about the mean is 0 if the pmf of X is symmetric. So, we would like to use E[(X μ)3] as a measure of lack of symmetry, but it depends on the scale of measurement. If we switch the unit of weight in Example 2.45 from pounds to ounces or kilograms, the value of the third moment about the mean (as well as the values of all the other moments) will change. But we can achieve scale independence by dividing the third moment about the mean by σ 3: h i " # E ðX μ Þ3 Xμ 3 ¼E ð2:20Þ σ σ3 Expression (2.20) is our measure of departure from symmetry, called the skewness coefficient. The skewness coefficient for a symmetric distribution is 0 because its third moment about the mean is 0. However, in the foregoing example the skewness coefficient is E[(X μ)3]/σ 3 ¼ 75/53 ¼ 0.6. When the skewness coefficient is negative, as it is here, we say that the distribution is negatively skewed or that it is skewed to the left. Generally speaking, it means that the distribution stretches farther to the left of the mean than to the right. If the skewness were positive, then we would say that the distribution is positively skewed or that it is skewed to the right. For example, reverse the order of the probabilities in the p(x) table above, so the probabilities of the values 5, 10, 15, 20 are now .4, .3, .2, and .1, (customers now favor much smaller bags of dog food). Exercise 119 shows that this changes the sign but not the magnitude of the skewness coefficient, so it becomes +0.6 and the distribution is skewed right. Both distributions are illustrated in Fig. 2.9.

2.7

Moments and Moment Generating Functions

125

a

b p(x)

p(x) 0.4

0.4

0.3

0.3

0.2

0.2

0.1 0

0.1 5

10

15

20

x

5

10

15

20

x

Fig. 2.9 Departures from symmetry: (a) skewness coefficient < 0 (skewed left); (b) skewness coefficient > 0 (skewed right)

2.7.1

The Moment Generating Function

Calculation of the mean, variance, skewness coefficient, etc. for a particular discrete rv requires extensive, sometimes tedious, summation. Mathematicians have developed a tool, the moment generating function, that will allow us to determine the moments of a distribution with less effort. Moreover, this function will allow us to derive properties of several of our major probability distributions here and in subsequent sections of the book. DEFINITION

The moment generating function (mgf) of a discrete random variable X is defined to be X tx e pð x Þ MX ðtÞ ¼ E etX ¼ x2 D

where D is the set of possible X values. The moment generating function exists iff MX(t) is defined for an interval that includes zero as well as positive and negative values of t. For any random variable X, the mgf evaluated at t ¼ 0 is X X 0x MX ð0Þ ¼ E e0X ¼ e pðxÞ ¼ 1pðxÞ ¼ 1 x2 D

x2 D

That is, MX(0) is the sum of all the probabilities, so it must always be 1. However, in order for the mgf to be useful in generating moments, it will need to be defined for an interval of values of t including 0 in its interior. The moment generating function fails to exist in cases when moments themselves fail to exist (see Example 2.49 below). Example 2.46 The simplest example of an mgf is for a Bernoulli distribution, where only the X values 0 and 1 receive positive probability. Let X be a Bernoulli random variable with p(0) ¼ 1/3 and p(1) ¼ 2/3. Then X tx MX ðtÞ ¼ E etX ¼ e pðxÞ ¼ et0 ð1=3Þ þ et1 ð2=3Þ ¼ ð1=3Þ þ ð2=3Þet x2 D

A Bernoulli random variable will always have an mgf of the form p(0) + p(1)et, a well-defined function for all values of t. ■

126

2 Discrete Random Variables and Probability Distributions

A key property of the mgf is its “uniqueness,” the fact that it completely characterizes the underlying distribution. MGF UNIQUENESS THEOREM

If the mgf exists and is the same for two distributions, then the two distributions are identical. That is, the moment generating function uniquely specifies the probability distribution; there is a one-to-one correspondence between distributions and mgfs. The proof of this theorem, originally due to Laplace, requires some sophisticated mathematics and is beyond the scope of this textbook. Example 2.47 Let X, the number of claims submitted on a renter’s insurance policy on a given year, have mgf MX(t) ¼ .7 + .2et + .1e2t. It follows that X must have the pmf p(0) ¼ .7, p(1) ¼ .2, and p(2) ¼ .1—because if we use this pmf to obtain the mgf, we get MX(t), and the distribution is uniquely determined by its mgf. ■ Example 2.48 Consider testing individuals’ blood samples one by one in order to find someone whose blood type is Rh+. Suppose X, the number of tested samples, has a geometric distribution with p ¼ .85: pðxÞ ¼ :85ð:15Þx1 for x ¼ 1, 2, 3, :::: Determining the moment generating function here requires using the formula for the sum of a geometric series: 1 + r + r2 + ¼ 1/(1 r) for |r| < 1. The moment generating function is MX ðtÞ ¼ EðetX Þ ¼ ¼ :85et

1 X

X

etx pðxÞ ¼

x2 D

1 1 X X etx :85ð:15Þx1 ¼ :85et etðx1Þ ð:15Þx1 x¼1

t x1

ð:15e Þ

x¼1

¼ :85et 1 þ :15et þ ð:15et Þ2 þ ¼

x¼1

:85et 1 :15et

The condition on r requires |.15et| < 1. Dividing by.15 and taking logs, this gives t < ln(.15) 1.90, i.e., this function is defined in the interval (1, 1.90). The result is an interval of values that includes 0 in its interior, so the mgf exists. As a check, MX(0) ¼ .85/(1 .15) ¼ 1, as required. ■ Example 2.49 Reconsider Example 2.20, where p(x) ¼ k/x2, x ¼ 1, 2, 3, . . .. Recall that E(X) does not exist for this distribution, portending a problem for the existence of the mgf: 1 X k MX ðtÞ ¼ E etX ¼ etx 2 x x¼1

With the help of tests for convergence such as the ratio test, we find that the series converges if and only if et 1, which means that t 0, i.e., the mgf is only defined on the interval (1, 0]. Because zero is on the boundary of this interval, not the interior of the interval (the interval must include both positive and negative values), the mgf of this distribution does not exist. In any case, it could not be useful for finding moments, because X does not have even a first moment (mean). ■

2.7

Moments and Moment Generating Functions

2.7.2

127

Obtaining Moments from the MGF

We now turn to the computation of moments from the mgf. For any positive integer r, let MX(r)(t) denote the rth derivative of MX(t). By computing this and then setting t ¼ 0, we get the rth moment about 0. THEOREM

If the mgf of X exists, then E(Xr) is finite for all positive integers r, and ðr Þ

Eð X r Þ ¼ M X ð 0 Þ

ð2:21Þ

Proof The proof of the existence of all moments is beyond the scope of this book. We will show that Eq. (2.21) is true for r ¼ 1 and r ¼ 2. A proof by mathematical induction can be used for general r. Differentiate: Xd X d d X xt MX ðtÞ ¼ ext pðxÞ ¼ e pðxÞ ¼ xext pðxÞ dt dt x 2 D dt x2 D x2 D where we have interchanged the order of summation and differentiation. (This is justified inside the interval of convergence, which includes 0 in its interior.) Next set t ¼ 0 to obtain the first moment: X X 0 ð1Þ M X ð 0Þ ¼ M X ð 0Þ ¼ xexð0Þ pðxÞ ¼ xpðxÞ ¼ EðXÞ x2 D

x2 D

Differentiating a second time gives X d X d2 d X xt xt ð Þ ð Þ ð Þ e M t ¼ xe p x ¼ x p x ¼ x2 ext pðxÞ X dt x 2 D dt dt2 x2 D x2 D Set t ¼ 0 to get the second moment: 00

ð2Þ

MX ð0Þ ¼ MX ð0Þ ¼

X

x 2 pð x Þ ¼ E X 2

x2 D

■

For the pmfs in Examples 2.45 and 2.46, this may seem like needless work—after all, for simple distributions with just a few values, we can quickly determine the mean, variance, etc. The real utility of the mgf arises for more complicated distributions. Example 2.50 (Example 2.48 continued) Recall that p ¼ .85 is the probability of a person having Rh + blood and we keep checking people until we find one with this blood type. If X is the number of people we need to check, then p(x) ¼ .85(.15)x1, x ¼ 1, 2, 3, . . ., and the mgf is MX ðtÞ ¼ E etX ¼

:85et 1 :15et

Differentiating with the help of the quotient rule, 0

M X ðt Þ ¼

:85et ð1 :15et Þ2

128

2 Discrete Random Variables and Probability Distributions 0

Setting t ¼ 0 then gives μ ¼ E(X) ¼ MX (0) ¼ 1/.85 ¼ 1.176. This corresponds to the formula 1/p for a geometric distribution. To get the second moment, differentiate again: 00

M X ðt Þ ¼

:85et ð1 þ :15et Þ ð1 :15et Þ3

1:15 00 Setting t ¼ 0, E X2 ¼ MX ð0Þ ¼ . Now use the variance shortcut formula: :852 2 1:15 1 :15 VarðXÞ ¼ σ 2 ¼ E X2 μ2 ¼ ¼ ¼ :2076 2 :85 :85 :852 This matches the variance formula (1 p)/p2 given without proof toward the end of Sect. 2.6. ■ As mentioned in Sect. 2.3, it is common to transform a rv X using a linear function Y ¼ aX + b. What happens to the mgf when we do this? PROPOSITION

Let X have the mgf MX(t) and let Y ¼ aX + b. Then MY(t) ¼ ebtMX(at). Example 2.51 Let X be a Bernoulli random variable with p(0) ¼ 20/38 and p(1) ¼ 18/38. Think of X as the number of wins, 0 or 1, in a single play of roulette. If you play roulette at an American casino and bet on red, then your chances of winning are 18/38 because 18 of the 38 possible outcomes are red. From Example 2.46, MX(t) ¼ 20/38 + et(18/38). Suppose you bet $5 on red, and let Y be your winnings. If X ¼ 0 then Y ¼ 5, and if X ¼ 1 then Y ¼ 5. The linear equation Y ¼ 10X 5 gives the appropriate relationship. This equation is of the form Y ¼ aX + b with a ¼ 10 and b ¼ 5, so by the foregoing proposition MY ðtÞ ¼ ebt MX ðatÞ ¼ e5t MX 10t 20 18 20 18 þ e10t ¼ e5t þ e5t ¼ e5t 38 38 38 38 This implies that the pmf of Y is p(5) ¼ 20/38 and p(5) ¼ 18/38; moreover, we can compute the mean (and other moments) of Y directly from this mgf. ■

2.7.3

MGFs of Common Distributions

Several of the distributions presented in this chapter (binomial, Poisson, negative binomial) have fairly simple expressions for their moment generating functions. These mgfs, in turn, allow us to determine the means and variances of the distributions without some rather unpleasant summation. (Additionally, we will use these mgfs to prove some more advanced distributional properties in Chap. 4.) To start, determining the moment generating function of a binomial rv requires use of the binomial P n n x nx theorem: ða þ bÞn ¼ x¼0 a b . Then x

2.7

Moments and Moment Generating Functions

129

n X tx n MX ðtÞ ¼ Eðe Þ ¼ e bðx; n; pÞ ¼ e px ð1 pÞnx x x2 D x¼0 n X n nx t x ¼ ðpe Þ ð1 pÞ ¼ ðpet þ 1 pÞn ½a ¼ pet ; b ¼ 1 p x x¼0 X

tX

tx

The mean and variance can be obtained by differentiating MX(t): 0 0 MX ðtÞ ¼ nðpet þ 1 pÞn1 pet ) μ ¼ MX 0 ¼ np; 00 MX ðtÞ ¼ nðn 1Þ pet þ 1 p n2 pet pet þ n pet þ 1 p n1 pet ) 00 E X2 ¼ MX ð0Þ ¼ n n 1 p2 þ np ) σ 2 ¼ VarðXÞ ¼ E X2 μ2 ¼ nðn 1Þp2 þ np n2 p2 ¼ np np2 ¼ np 1 p , in accord with the proposition in Sect. 2.4. x u Derivation of the Poisson mgf utilizes the series expansion ∑1 x ¼ 0 u /x! ¼ e : MX ðtÞ ¼ Eðetx Þ ¼

1 X

etx eμ

x¼0

1 X μx ðμet Þx t t ¼ eμ ¼ eμ eμe ¼ eμðe 1Þ x! x! x¼0

Successive differentiation then gives the mean and variance identified in Sect. 2.5 (see Exercise 127). Finally, derivation of the negative binomial mgf is based on Newton’s generalization of the binomial theorem. The result (see Exercise 124) is r pet MX ðtÞ ¼ 1 ð1 pÞet The geometric mgf is just the special case r ¼ 1 (cf. Example 2.48 above). There is unfortunately no simple expression for the mgf of a hypergeometric rv.

2.7.4

Exercises: Section 2.7 (107–128)

107. For the entry-level employees of a certain fast food chain, the pmf of X ¼ highest grade level completed is specified by p(9) ¼ .01, p(10) ¼ .05, p(11) ¼ .16, and p(12) ¼ .78. (a) Determine the moment generating function of this distribution. (b) Use (a) to find E(X) and SD(X). 108. For a new car the number of defects X has the distribution given by the accompanying table. Find MX(t) and use it to find E(X) and SD(X). x p(x)

0 .04

1 .20

2 .34

3 .20

4 .15

5 .04

6 .03

109. In flipping a fair coin let X be the number of tosses to get the first head. Then p(x) ¼ .5x for x ¼ 1, 2, 3, . . .. Find MX(t) and use it to get E(X) and SD(X). 110. If you toss a fair die with outcome X, p(x) ¼ 1/6 for x ¼ 1, 2, 3, 4, 5, 6. Determine MX(t). 111. Find the skewness coefficients of the distributions in the previous four exercises. Do these agree with the “shape” of each distribution?

130

2 Discrete Random Variables and Probability Distributions

112. 113. 114. 115.

Given MX(t) ¼ .2 + .3et + .5e3t, find p(x), E(X), Var(X). If MX(t) ¼ 1/(1 t2), find E(X) and Var(X). Show that g(t) ¼ tet cannot be a moment generating function. Using a calculation similar to the one in Example 2.48 show that, if X has a geometric distribution with parameter p, then its mgf is M X ðt Þ ¼

116.

117. 118.

119.

120.

pet 1 ð1 pÞet

Assuming that Y has mgf MY(t) ¼ .75et/(1 .25et), determine the probability mass function p( y) with the help of the uniqueness property. (a) Prove the result in the second proposition: MaX+b(t) ¼ ebtMX(at). (b) Let Y ¼ aX + b. Use (a) to establish the relationships between the means and variances of X and Y. 2 Let MX ðtÞ ¼ e5tþ2t and let Y ¼ (X 5)/2. Find MY(t) and use it to find E(Y ) and Var(Y). Let X have the moment generating function of Example 2.48 and let Y ¼ X 1. Recall that X is the number of people who need to be checked to get someone who is Rh+, so Y is the number of people checked before the first Rh+ person is found. Find MY(t). Let X be the number of points earned by a randomly selected student on a 10 point quiz, with possible values 0, 1, 2, . . ., 10 and pmf p(x), and suppose the distribution has a skewness coefficient of c. Now consider reversing the probabilities in the distribution, so that p(0) is interchanged with p(10), p(1) is interchanged with p(9), and so on. Show that the skewness coefficient of the resulting distribution is c. [Hint: Let Y ¼ 10 X and show that Y has the reversed distribution. Use this fact to determine μY and then the value of skewness coefficient for the Y distribution.] Let MX(t) be the moment generating function of a rv X, and define a new function by LX ðtÞ ¼ ln½MX ðtÞ 0

121.

122.

123.

124.

00

Show that (a) LX(0) ¼ 0, (b) LX(0) ¼ μ, and (c) LX (0) ¼ σ 2. 2 Refer back to Exercise 120. If MX ðtÞ ¼ e5tþ2t then find E(X) and Var(X) by differentiating (a) MX(t) (b) LX(t) t Refer back to Exercise 120. If MX ðtÞ ¼ e5ðe 1Þ then find E(X) and Var(X) by differentiating (a) MX(t) (b) LX(t) Obtain the moment generating function of the number of failures, n X, in a binomial experiment, and use it to determine the expected number of failures and the variance of the number of failures. Are the expected value and variance intuitively consistent with the expressions for E(X) and Var(X)? Explain. Newton’s generalization of the binomial theorem can be used to show that, for any positive integer r, 1 X rþk1 k r ð1 uÞ ¼ u r1 k¼0 Use this to derive the negative binomial mgf presented in this section. Then obtain the mean and variance of a binomial rv using this mgf.

2.8

Simulation of Discrete Random Variables

131

125. If X is a negative binomial rv, then Y ¼ X r is the number of failures preceding the rth success. Obtain the mgf of Y and then its mean value and variance. 126. Refer back to Exercise 120. Obtain the negative binomial mean and variance from LX(t) ¼ ln[MX(t)]. 127. (a) Use derivatives of MX(t) to obtain the mean and variance for the Poisson distribution. (b) Obtain the Poisson mean and variance from LX(t) ¼ ln[MX(t)]. In terms of effort, how does this method compare with the one in part (a)? 128. Show that the binomial moment generating function converges to the Poisson moment generating function if we let n ! 1 and p ! 0 in such a way that np approaches a value μ > 0. [Hint: Use the calculus theorem that was used in showing that the binomial pmf converges to the Poisson pmf.] There is, in fact, a theorem saying that convergence of the mgf implies convergence of the probability distribution. In particular, convergence of the binomial mgf to the Poisson mgf implies b(x; n, p) ! p(x; μ).

2.8

Simulation of Discrete Random Variables

Probability calculations for complex systems often depend on the behavior of various random variables. When such calculations are difficult or impossible, simulation is the fallback strategy. In this section, we give a general method for simulating an arbitrary discrete random variable and consider implementations in existing software for simulating common discrete distributions. Example 2.52 Refer back to the distribution of Example 2.11 for the random variable X ¼ the amount of memory (GB) in a purchased flash drive, and suppose we wish to simulate X. Recall from Sect. 1.6 that we begin with a “standard uniform” random number generator, i.e., a software function that generates evenly distributed numbers in the interval [0, 1). Our goal is to convert these decimals into the values of X with the probabilities specified by its pmf: 5% 1s, 10% 2s, 35% 4s, and so on. To that end, we partition the interval [0, 1) according to these percentages: [0, .05) has probability .05; [.05, .15) has probability .1, since the length of the interval is .1; [.15, .50) has probability .50 .15 ¼ .35; etc. Proceed as follows: given a value u from the RNG, – – – – –

If 0 u < .05, assign the value 1 to the variable x. If .05 u < .15, assign x ¼ 2. If .15 u < .50, assign x ¼ 4. If .50 u < .90, assign x ¼ 8. If .90 u < 1, assign x ¼ 16.

Repeating this algorithm n times gives n simulated values of X. Programs in Matlab and R that implement this algorithm appear in Fig. 2.10; both return a vector, x, containing n ¼ 10,000 simulated values of the specified distribution. Figure 2.11 shows a graph of the results of executing the code, in the form of a histogram: the height of each rectangle corresponds to the relative frequency of each x value in the simulation (i.e., the number of times that value occurred, divided by 10,000). The exact pmf of X is superimposed for comparison; as expected, simulation results are similar, but not identical, to the theoretical distribution.

132

2 Discrete Random Variables and Probability Distributions

a

b x=zeros(10000,1); for i=1:10000 u=rand; if u > > > : 5 25 0 y < 0 or y > 10 (a) (b) (c) (d) (e)

(a) (b) (c) (d) (e) (f)

Sketch the pdf of Y. Ð1 Verify that 1 f( y)dy ¼ 1. What is the probability that total waiting time is at most 3 min? What is the probability that total waiting time is at most 8 min? What is the probability that total waiting time is between 3 and 8 min? What is the probability that total waiting time is either less than 2 min or more than 6 min?

160

3 Continuous Random Variables and Probability Distributions

9. Consider again the pdf of X ¼ time headway given in Example 3.5. What is the probability that time headway is (a) At most 6 s? (b) More than 6 s? At least 6 s? (c) Between 5 and 6 s? 10. A family of pdfs that has been used to approximate the distribution of income, city population size, and size of firms is the Pareto family. The family has two parameters, k and θ, both > 0, and the pdf is 8 k

:4 1 2x Use this to compute the following: (a) P(X 1) (b) P(.5 X 1) (c) P(X > 1.5) (d) The median checkout duration η [Hint: Solve F(η) ¼ .5.] (e) F0 (x) to obtain the density function f(x) 12. The cdf for X ¼ measurement error of Exercise 3 is 8 0 x < 2 > > >

2 32 3 > > : 1 2x (a) Compute P(X < 0). (b) Compute P(1 < X < 1). (c) Compute P(X > .5). (d) Verify that f(x) is as given in Exercise 3 by obtaining F0 (x). (e) Verify that η ¼ 0. 13. Example 3.5 introduced the concept of time headway in traffic flow and proposed a particular distribution for X ¼ the headway between two randomly selected consecutive car. Suppose that in a different traffic environment, the distribution of time headway has the form

3.1

Probability Density Functions and Cumulative Distribution Functions

8 1 x1

(a) Determine the value of k for which f(x) is a legitimate pdf. (b) Obtain the cumulative distribution function. (c) Use the cdf from (b) to determine the probability that headway exceeds 2 s and also the probability that headway is between 2 and 3 s. 14. Let X denote the amount of space occupied by an article placed in a 1-ft3 packing container. The pdf of X is ( 90x8 ð1 xÞ 0 < x < 1 f ðxÞ ¼ 0 otherwise (a) Graph the pdf. Then obtain the cdf of X and graph it. (b) What is P(X .5) [i.e., F(.5)]? (c) Using part (a), what is P(.25 < X .5)? What is P(.25 X .5)? (d) What is the 75th percentile of the distribution? 15. Answer parts (a)–(d) of Exercise 14 for the random variable X, lecture time past the hour, given in Exercise 5. 16. The article “A Model of Pedestrians’ Waiting Times for Street Crossings at Signalized Intersections” (Transportation Research, 2013: 17–28) suggested that under some circumstances the distribution of waiting time X could be modeled with the following pdf: 8 < θ ð1 x=τÞθ1 0 x < τ f ðx; θ, τÞ ¼ τ : 0 otherwise where θ, τ > 0. (a) Graph f(x; θ, 80) for the three cases θ ¼ 4, 1, and .5 (these graphs appear in the cited article) and comment on their shapes. (b) Obtain the cumulative distribution function of X. (c) Obtain an expression for the median of the waiting time distribution. (d) For the case θ ¼ 4 and τ ¼ 80, calculate P(50 X 70) without doing any additional integration. 17. Let X be a continuous rv with cdf 8 0 x0 > > >

> : 1 x>4 [This type of cdf is suggested in the article “Variability in Measured Bedload-Transport Rates” (Water Resources Bull., 1985: 39–48) as a model for a hydrologic variable.] What is (a) P(X 1)? (b) P(1 X 3)? (c) The pdf of X?

162

3 Continuous Random Variables and Probability Distributions

18. Let X be the temperature in C at which a chemical reaction takes place, and let Y be the temperature in F (so Y ¼ 1.8X + 32). (a) If the median of the X distribution is η, show that 1.8η + 32 is the median of the Y distribution. (b) How is the 90th percentile of the Y distribution related to the 90th percentile of the X distribution? Verify your conjecture. (c) More generally, if Y ¼ aX + b, how is any particular percentile of the Y distribution related to the corresponding percentile of the X distribution?

3.2

Expected Values and Moment Generating Functions

In Sect. 3.1 we saw that the transition from a discrete cdf to a continuous cdf entails replacing summation by integration. The same thing is true in moving from expected values of discrete variables to those of continuous variables.

3.2.1

Expected Values

For a discrete random variable X, the mean μX or E(X) was defined as a weighted average and obtained by summing x p(x) over possible X values. Here we replace summation by integration and the pmf by the pdf to get a continuous weighted average. DEFINITION

The expected value or mean value of a continuous rv X with pdf f(x) is ð1 μ ¼ μX ¼ EðXÞ ¼ x f ðxÞ dx 1

Example 3.10 (Example 3.9 continued) The pdf of weekly gravel sales X was 8 < 3 1 x2 0 x 1 f ðxÞ ¼ 2 : 0 otherwise so EðXÞ ¼

ð1 1

x f ðxÞdx ¼

ð1 0

x

3 3 1 x2 dx ¼ 2 2

ð1 0

x¼1 3 x2 x4 3 x x3 dx ¼ ¼ 2 2 4 x¼0 8

If gravel sales are determined week after week according to the given pdf, then the long-run average value of sales per week will be .375 ton. ■ Similar to the interpretation in the discrete case, the mean value μ can be regarded as the balance point (or fulcrum or center of mass) of a continuous distribution. In Example 3.10, if a piece of cardboard were cut out in the shape of the region under the density curve f(x), then it would balance if supported at μ ¼ 3/8 along the bottom edge. When a pdf f(x) is symmetric, then it will balance at its

3.2

Expected Values and Moment Generating Functions

163

point of symmetry, which must be the mean μ. Recall from Sect. 3.1 that the median is also the point of symmetry; in general, if a distribution is symmetric and the mean exists, then it is equal to the median. Often we wish to compute the expected value of some function h(X) of the rv X. If we think of h(X) as a new rv Y, methods from Sect. 3.7 can be used to derive the pdf of Y, and E(Y ) can be computed from the definition. Fortunately, as in the discrete case, there is an easier way to compute E[h(X)]. PROPOSITION

If X is a continuous rv with pdf f(x) and h(X) is any function of X, then ð1 μhðXÞ ¼ E½hðXÞ ¼ hðxÞ f ðxÞ dx 1

This is sometimes called the Law of the Unconscious Statistician. Importantly, except in the case where h(x) is a linear function (see later in this section), E[h(X)] is not equal to h(μX), the function h evaluated at the mean of X. Example 3.11 The variation in a certain electrical current source X (in milliamps) can be modeled by the pdf ( 1:25 :25x 2 x 4 f ðxÞ ¼ 0 otherwise The average current from this source is ð4 17 ¼ 2:833mA EðXÞ ¼ xð1:25 :25xÞdx ¼ 6 2 If this current passes through a 220-Ω resistor, the resulting power (in microwatts) is given by the expression h(X) ¼ (current)2(resistance) ¼ 220X2. The expected power is given by ð4 5500 2 ¼ 1833:3μW EðhðXÞÞ ¼ E 220X ¼ 220x2 ð1:25 :25xÞdx ¼ 3 2 Notice that the expected power is not equal to 220(2.833)2, a common error that results from substituting the mean current μX into the power formula. ■ Example 3.12 Two species are competing in a region for control of a limited amount of a resource. Let X ¼ the proportion of the resource controlled by species 1 and suppose X has pdf ( 1 0x1 f ðxÞ ¼ 0 otherwise which is a uniform distribution on [0, 1]. (In her book Ecological Diversity, E. C. Pielou calls this the “broken-stick” model for resource allocation, since it is analogous to breaking a stick at a randomly chosen point.) Then the species that controls the majority of this resource controls the amount

164

3 Continuous Random Variables and Probability Distributions

hðXÞ ¼ maxðX, 1 XÞ ¼

8 >

:

if

X

1 0X< 2 1 X1 2

The expected amount controlled by the species having majority control is then ð1 ð1 E½hðXÞ ¼ maxðx, 1 xÞ f ðxÞdx ¼ maxðx, 1 xÞ 1 dx 1

¼

ð 1=2

ð1 xÞ 1 dx þ

ð1

x 1 dx ¼

1=2

3 4

■

In the discrete case, the variance of X was defined as the expected squared deviation from μ and was calculated by summation. Here again integration replaces summation. DEFINITION

The variance of a continuous random variable X with pdf f(x) and mean value μ is ð1 h i σ 2X ¼ VarðXÞ ¼ ðx μÞ2 f ðxÞ dx ¼ E ðX μÞ2 1

The standard deviation of X is σ X ¼ SDðXÞ ¼

pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ VarðXÞ:

As in the discrete case, σ 2X is the expected or average squared deviation about the mean μ, and σ X can be interpreted roughly as the size of a representative deviation from the mean value μ. Note that σ X has the same units as X itself. Example 3.13 Let X Unif[A, B]. Since a uniform distribution is symmetric, the mean of X is at the density curve’s point of symmetry, which is clearly the midpoint (A + B)/2. This can be verified by integration: ðB

1 1 x2 μ¼ x dx ¼ BA BA 2 A

j

B A

¼

1 B2 A 2 A þ B ¼ BA 2 2

The variance of X is then given by ðB 1 1 AþB 2 dx ¼ σ ¼ ðx μ Þ x dx BA BA A 2 A ð ðBAÞ=2 1 AþB u2 du substitute u ¼ x ¼ B A ðBAÞ=2 2 ð ðBAÞ=2 2 ¼ u2 du symmetry BA 0 ðB

2

¼

2 u3 BA 3

2

ðBAÞ=2

j0

¼

2 ð B AÞ 3 ð B AÞ 2 ¼ B A 23 3 12

3.2

Expected Values and Moment Generating Functions

165

pﬃﬃﬃﬃﬃ The standard deviation of X is the square root of the variance: σ ¼ ðBAÞ= 12. Notice that the standard deviation of a Unif[A, B] distribution is proportional to the length of the interval, B A, which matches our intuitive notion that a larger standard deviation corresponds to greater “spread” in a distribution. ■ Section 2.3 presented several properties of expected value, variance, and standard deviation for discrete random variables. Those same properties hold for the continuous case; proofs of these results are obtained by replacing summation with integration in the proofs presented in Chap. 2. PROPOSITION

Let X be a continuous rv with pdf f(x), mean μ, and standard deviation σ. Then the following properties hold. 1. (variance shortcut) Var(X) ¼ E(X2) μ2 ¼

ð1 1

ð 1 2 x2 f(x)dx x f ðxÞdx 1

2. (Chebyshev’s inequality) For any constant k 1, PðjX μj kσ Þ

1 k2

3. (linearity of expectation) For any functions h1(X) and h2(X) and any constants a1, a2, and b, E½a1 h1 ðXÞ þ a2 h2 ðXÞ þ b ¼ a1 E½h1 ðXÞ þ a2 E½h2 ðXÞ þ b 4. (rescaling) For any constants a and b, EðaX þ bÞ ¼ aμ þ b

VarðaX þ bÞ ¼ a2 σ 2

σ aXþb ¼ jajσ

Example 3.14 (Example 3.10 continued) For X ¼ weekly gravel sales, we computed E(X) ¼ 3/8. Since ð ð1 ð1 3 3 1 2 1 E X2 ¼ x2 f ðxÞdx ¼ x2 1 x2 dx ¼ x x4 dx ¼ , 2 2 5 1 0 0 VarðXÞ ¼

2 1 3 19 ¼ :059 ¼ 5 8 320

and

σX ¼

pﬃﬃﬃﬃﬃﬃﬃﬃﬃ :059 ¼ :244

Suppose the amount of gravel actually received by customers in a week is h(X) ¼ X .02X2; the second term accounts for the small amount that is lost in transport. Then the average weekly amount received by customers is 3 1 E X :02X2 ¼ EðXÞ :02E X2 ¼ :02 ¼ :371 tons 8 5

■

Example 3.15 When a dart is thrown at a circular target, consider the location of the landing point relative to the bull’s eye. Let X be the angle in degrees measured from the horizontal, and assume that pﬃﬃﬃﬃﬃ X Unif[0, 360). By Example 3.13, E(X) ¼ 180 and SDðXÞ ¼ 360= 12. Define Y to be the angle

166

3 Continuous Random Variables and Probability Distributions

measured in radians between π and π, so Y ¼ (2π/360)X π. Then, applying the rescaling properties with a ¼ 2π/360 and b ¼ π, EðYÞ ¼

2π 2π EðXÞ π ¼ 180 π ¼ 0 360 360

and 2π 360 2π σ X ¼ 2π p ﬃﬃﬃﬃﬃ ¼ pﬃﬃﬃﬃﬃ σ Y ¼ 360 360 12 12

3.2.2

■

Moment Generating Functions

Moments and moment generating functions for discrete random variables were introduced in Sect. 2.7. These concepts carry over to the continuous case. DEFINITION

The moment generating function (mgf) of a continuous random variable X is ð1 MX ðtÞ ¼ E etX ¼ etx f ðxÞdx: 1

As in the discrete case, the moment generating function exists iff MX(t) is defined for an interval that includes zero as well as positive and negative values of t. Just as before, when t ¼ 0 the value of the mgf is always 1: ð1 ð1 0X 0x ¼ MX ð0Þ ¼ E e e f ðxÞdx ¼ f ðxÞdx ¼ 1: 1

1

Example 3.16 At a store, the checkout time X in minutes has the pdf f(x) ¼ 2e2x, x 0; f(x) ¼ 0 otherwise. Then ð1 ð1 ð1 MX ðtÞ ¼ etx f ðxÞdx ¼ etx 2e2x dx ¼ 2eð2tÞx dx 1

¼

2 ð2tÞx e 2t

j

0 1 0

¼

2 2 lim eð2tÞx 2 t 2 t x!1

The limit above exists (in fact, it equals zero) provided the coefficient on x is negative, i.e., (2 t) < 0. This is equivalent to t < 2. The mgf exists because it is defined for an interval of values including 0 in its interior, specifically (1, 2). For t in that interval, the mgf of X is MX(t) ¼ 2/(2 t). Notice that MX(0) ¼ 2/(2 0) ¼ 1. Of course, from the calculation preceding this example we know that MX(0) ¼ 1 must always be the case, but it is useful as a check to set t ¼ 0 and see if the result is 1. ■ Recall that in Sect. 2.7 we had a uniqueness property for the mgfs of discrete distributions. This proposition is equally valid in the continuous case: two distributions have the same pdf if and only if they have the same moment generating function, assuming that the mgf exists. For example, if a

3.2

Expected Values and Moment Generating Functions

167

random variable X is known to have mgf MX(t) ¼ 2/(2 t) for t < 2, then from Example 3.16 it must necessarily be the case that the pdf of X is f(x) ¼ 2e2x for x 0 and f(x) ¼ 0 otherwise. In the discrete case we also had a theorem on how to get moments from the mgf, and this theorem applies also in the continuous case: the rth moment of a continuous rv with mgf MX(t) is given by ðrÞ

EðXr Þ ¼ MX ð0Þ, the rth derivative of the mgf with respect to t evaluated at t ¼ 0, if the mgf exists. Example 3.17 (Example 3.16 continued) The mgf of the rv X ¼ checkout time at the store was found to be MX(t) ¼ 2/(2 t) ¼ 2(2 t)1 for t < 2. To find the mean and standard deviation, first compute the derivatives: MX ðtÞ ¼ 2ð2 tÞ2 ð1Þ ¼

2

00

MX ðtÞ ¼

ð2 tÞ2

i dh 4 2ð2 tÞ2 ¼ 4ð2 tÞ3 ð1Þ ¼ dt ð2 tÞ3

Setting t to 0 in the first derivative gives the expected checkout time as ð1Þ

EðXÞ ¼ MX ð0Þ ¼ MX ð0Þ ¼ :5 min: Setting t to 0 in the second derivative gives the second moment 00 ð2Þ E X2 ¼ MX ð0Þ ¼ MX ð0Þ ¼ :5, from which the variance of the checkout time is Var(X) ¼ σ 2 ¼ E(X2) [E(X)]2¼ .5.52¼.25 and the pﬃﬃﬃﬃﬃﬃﬃ standard deviation is σ ¼ :25 ¼ :5 min: ■ We will sometimes need to transform X using a linear function Y ¼ aX + b. As discussed in the discrete case, if X has the mgf MX(t) and Y ¼ aX + b, then MY(t) ¼ ebtMX(at). Example 3.18 Let X Unif[A, B]. As verified in Exercise 32, the moment generating function of X is 8 < eBt eAt MX ðtÞ ¼ ðB AÞt t 6¼ 0 : 1 t¼0 In particular, consider the situation in Example 3.15. Let X, the angle measured in degrees, be uniform on [0, 360], so A ¼ 0 and B ¼ 360. Then MX ðtÞ ¼

e360t 1 360t

t 6¼ 0,

MX ð0Þ ¼ 1

Now let Y ¼ (2π/360)X π, so Y is the angle measured in radians between π and π. Using the mgf rule for linear transformations with a ¼ 2π/360 and b ¼ π, we get

168

3 Continuous Random Variables and Probability Distributions

MY ðtÞ ¼ e MX ðatÞ ¼ e bt

¼ eπt

¼

πt

MX

2πt 360

e360ð2π=360Þt 1 2πt 360 360

eπt eπt 2πt

t 6¼ 0,

MY ð0Þ ¼ 1

This matches the general form of the moment generating function for a uniform random variable with A ¼ π and B ¼ π. Thus, by the mgf uniqueness property, Y Unif[π, π]. ■

3.2.3

Exercises: Section 3.2 (19–38)

19. Reconsider the distribution of checkout duration X described in Exercise 11. Compute the following: (a) E(X) (b) Var(X) and SD(X) (c) If the borrower is charged an amount h(X) ¼ X2 when checkout duration is X, compute the expected charge E[h(X)]. 20. The article “Modeling Sediment and Water Column Interactions for Hydrophobic Pollutants” (Water Res., 1984: 1169–1174) suggests the uniform distribution on the interval [7.5, 20] as a model for depth (cm) of the bioturbation layer in sediment in a certain region. (a) What are the mean and variance of depth? (b) What is the cdf of depth? (c) What is the probability that observed depth is at most 10? Between 10 and 15? (d) What is the probability that the observed depth is within 1 standard deviation of the mean value? Within 2 standard deviations? 21. For the distribution of Exercise 14, (a) Compute E(X) and SD(X). (b) What is the probability that X is more than 1 standard deviation from its mean value? 22. Consider the pdf given in Exercise 6. (a) Obtain and graph the cdf of X. (b) From the graph of f(x), what is the median, η? (c) Compute E(X) and Var(X). 23. Let X Unif[A, B]. (a) Obtain an expression for the (100p)th percentile. (b) Obtain an expression for the median, η. How does this compare to the mean μ, and why does that make sense for this distribution? (c) For n a positive integer, compute E(Xn). 24. Consider the pdf for total waiting time Y for two buses

3.2

Expected Values and Moment Generating Functions

8 > > > >

> > > : 5 25 0

169

0y 0, ð1 x f ðxÞdx t PðX > tÞ ¼ t ½1 FðtÞ t

(b) Assume the mean of X is finite (i.e., the integral defining μ converges). Use part (a) to show that lim t ½1 FðtÞ ¼ 0

t!1

[Hint: Write the integral for μ as the sum of two other integrals, one from 0 to t and another from t to 1.] 38. Let X be a nonnegative, continuous rv with cdf F(x). (a) Assuming the mean μ of X is finite, show that ð1 μ¼ ½1 FðxÞ dx 0

[Hint: Apply integration by parts to the integral above, and use the result of the previous exercise.] This is the continuous analog of the result established in Exercise 48 of Chap. 2. (b) A similar argument can be used to show that the kth moment of X is given by ð1 E Xk ¼ k xk1 ½1 FðxÞ dx 0

and that E(Xk) exists iff tk[1 F(t)] ! 0 as t ! 1. (This was the topic of a 2012 article in The American Statistician.) Suppose the lifetime X, in weeks, of a low-grade transistor under continuous use has cdf F(x) ¼ 1 (x + 1)3 for x > 0. Without finding the pdf of X, determine its mean and its standard deviation.

172

3.3

3 Continuous Random Variables and Probability Distributions

The Normal (Gaussian) Distribution

The normal distribution, often called the Gaussian distribution by engineers, is the most important one in all of probability and statistics. Many numerical populations have distributions that can be fit very closely by an appropriate normal curve. Examples include heights, weights, and other physical characteristics, measurement errors in scientific experiments, measurements on fossils, reaction times in psychological experiments, measurements of intelligence and aptitude, scores on various tests, and numerous economic measures and indicators. Even when the underlying distribution is discrete, the normal curve often gives an excellent approximation. In addition, even when individual variables themselves are not normally distributed, sums and averages of the variables will, under suitable conditions, have approximately a normal distribution; this is the content of the Central Limit Theorem discussed in Chap. 4. DEFINITION

A continuous rv X is said to have a normal distribution (or Gaussian distribution) with parameters μ and σ, where 1 < μ < 1 and σ > 0, if the pdf of X is 2 2 1 f ðx; μ, σ Þ ¼ pﬃﬃﬃﬃﬃ eðxμÞ =ð2σ Þ σ 2π

1 < x < 1

ð3:3Þ

The statement that X is normally distributed with parameters μ and σ is often abbreviated X N(μ, σ). Figure 3.13 presents graphs of f(x;μ,σ) for several different (μ, σ) pairs. Each resulting density curve is symmetric about μ and bell-shaped, so the center of the bell (point of symmetry) is both the mean of the distribution and the median. The value of σ is the distance from μ to the inflection points of the curve (the points at which the curve changes between turning downward to turning upward). Large values of σ yield density curves that are quite spread out about μ, whereas small values of σ yield density curves with a high peak above μ and most of the area under the density curve quite close to μ. Thus a large σ implies that a value of X far from μ may well be observed, whereas such a value is quite unlikely when σ is small.

m

m+s

mm+s

m m+s

Fig. 3.13 Normal density curves

Clearly f(x; μ, σ) 0, but a somewhat complicated calculus argument is required to prove that Ð1 1 f(x; μ, σ)dx ¼ 1 (see Exercise 66). It can be shown using calculus (Exercise 67) or moment generating functions (Exercise 68) that E(X) ¼ μ and Var(X) ¼ σ 2, so the parameters μ and σ are the mean and the standard deviation, respectively, of X.

3.3

The Normal (Gaussian) Distribution

3.3.1

173

The Standard Normal Distribution

To compute P(a X b) when X N(μ, σ), we must evaluate ðb 2 2 1 pﬃﬃﬃﬃﬃ eðxμÞ =ð2σ Þ dx a σ 2π

ð3:4Þ

None of the standard integration techniques can be used here, and there is no closed-form expression for the integral. Table 3.1 at the end of this section provides the code for performing such normal distribution calculations in both Matlab and R. For the purpose of hand calculation of normal distribution probabilities, we now introduce a special normal distribution. DEFINITION

The normal distribution with parameter values μ ¼ 0 and σ ¼ 1 is called the standard normal distribution. A random variable that has a standard normal distribution is called a standard normal random variable and will be denoted by Z. The pdf of Z is 1 2 f ðz; 0, 1Þ ¼ pﬃﬃﬃﬃﬃ ez =2 1 1.25) ¼ .1056. Since Z is a continuous rv, P(Z 1.25) also equals .1056. See Fig. 3.15b.

174

3 Continuous Random Variables and Probability Distributions

a

b

Shaded area = Φ(1.25)

z curve

z curve P(Z > 1.25)

1.25

1.25

Fig. 3.15 Normal curve areas (probabilities) for Example 3.19

(c) P(Z 1.25) ¼ Φ(1.25), a lower-tail area. Directly from the z table, Φ(1.25) ¼ .1056. By symmetry of the normal curve, this is identical to the probability in (b). (d) P(.38 Z 1.25) is the area under the standard normal curve above the interval [.38, 1.25]. From Sect. 3.1, if Z is a continuous rv with cdf F(z), then P(a Z b) ¼ F(b) F(a). This gives P(.38 Z 1.25) ¼ Φ(1.25) Φ(.38) ¼ .8944 .3520 ¼ .5424. (See Fig. 3.16.) To evaluate this probability in Matlab, type normcdf(1.25,0,1)-normcdf(.38,0,1); in R, type pnorm(1.25,0,1)-pnorm(-.38,0,1) or just pnorm(1.25)-pnorm(-.38). z curve −

=

−.38 0

1.25

−.38 0

1.25

Fig. 3.16 P(.38 Z 1.25) as the difference between two cumulative areas

■

From Sect. 3.1, we have that the (100p)th percentile of the standard normal distribution, for any p between 0 and 1, is the solution to the equation Φ(z) ¼ p. So, we may write the (100p)th percentile of the standard normal distribution as ηp ¼ Φ1( p). Matlab, R, or the z table can be used to obtain this percentile. Example 3.20 The 99th percentile of the standard normal distribution, Φ1(.99), is the value on the horizontal axis such that the area under the curve to the left of the value is .9900, as illustrated in Fig. 3.17. To solve the “inverse” problem Φ(z) ¼ p, the standard normal table is used in an inverse fashion: Find in the middle of the table .9900; the row and column in which it lies identify the 99th z percentile. Here .9901 lies in the row marked 2.3 and column marked .03, so Φ(2.33) ¼ .9901 .99 and the 99th percentile is approximately z ¼ 2.33. By symmetry, the first percentile is the negative of the 99th percentile, so it equals 2.33 (1% lies below the first and above the 99th). See Fig. 3.18. Fig. 3.17 Finding the 99th percentile

Shaded area = .9900 z curve

0 99th percentile

3.3

The Normal (Gaussian) Distribution

175 z curve

Fig. 3.18 The relationship between the 1st and 99th percentiles

Shaded area = .01

0 −2.33 = 1st percentile

2.33 = 99th percentile

To find the 99th percentile of the standard normal distribution in Matlab, use the command norminv(.99,0,1); in R, qnorm(.99,0,1) or just qnorm(.99) produces that same value of roughly z ¼ 2.33. ■

3.3.2

Non-standardized Normal Distributions

When X N(μ, σ), probabilities involving X may be computed by “standardizing.” A standardized variable has the form (X μ)/σ. Subtracting μ shifts the mean from μ to zero, and then dividing by σ scales the variable so that the standard deviation is 1 rather than σ. Standardizing amounts to nothing more than calculating a distance from the mean and then reexpressing the distance as some number of standard deviations. For example, if μ ¼ 100 and σ ¼ 15, then x ¼ 130 corresponds to z ¼ (130 100)/15 ¼ 30/15 ¼ 2.00. That is, 130 is 2 standard deviations above (to the right of) the mean value. Similarly, standardizing 85 gives (85 100)/15 ¼ 1.00, so 85 is 1 standard deviation below the mean. According to the next proposition, the z table applies to any normal distribution provided that we think in terms of number of standard deviations away from the mean value. PROPOSITION

If X N(μ, σ), then the “standardized” rv Z defined by Z¼

Xμ σ

has a standard normal distribution. Thus

a μ aμ bμ bμ Pð a X bÞ ¼ P Z ¼Φ Φ , σ σ σ σ

a μ bμ , Pð X b Þ ¼ 1 Φ , Pð X a Þ ¼ Φ σ σ and the (100p)th percentile of the N(μ, σ) distribution is given by ηp ¼ μ þ Φ1 ðpÞ σ: Conversely, if Z N(0, 1) and μ and σ are constants (with σ > 0), then the “un-standardized” rv X ¼ μ + σZ has a normal distribution with mean μ and standard deviation σ. Proof Let X N(μ, σ) and define Z ¼ (X μ)/σ as in the statement of the proposition. Then the cdf of Z is given by

176

3 Continuous Random Variables and Probability Distributions

Fz ðzÞ ¼ P ðZ zÞ Xμ z ¼P σ ¼ PðX μ þ zσ Þ ¼

ð μþzσ 1

f ðx; μ, σ Þdx ¼

ð μþzσ 1

2 2 1 pﬃﬃﬃﬃﬃ eðxμÞ =ð2σ Þ dx σ 2π

Now make the substitution u ¼ (x μ)/σ. The new limits of integration become 1 to z, and the differential dx is replaced by σ du, resulting in ðz ðz 1 1 2 2 pﬃﬃﬃﬃﬃ eu =2 σdu ¼ pﬃﬃﬃﬃﬃ eu =2 du ¼ ΦðzÞ Fz ðzÞ ¼ σ 2π 2π 1 1 Thus, the cdf of (X μ)/σ is the standard normal cdf, which establishes that (X μ)/σ N(0, 1). The probability formulas in the statement of the proposition follow directly from this main result, as does the formula for the (100p)th percentile:

η μ ηp μ X μ ηp μ p p ¼ P X ηp ¼ P ¼ Φ1 ðpÞ ) ¼Φ ) σ σ σ σ ηp ¼ μ þ Φ1 ðpÞ σ The converse statement Z N(0, 1) ) μ + σZ N(μ, σ) is derived similarly.

■

The key idea of this proposition is that by standardizing, any probability involving X can be expressed as a probability involving a standard normal rv Z, so that the z table can be used. This is illustrated in Fig. 3.19. Fig. 3.19 Equality of nonstandard and standard normal curve areas

N(0,1)

N(m, s)

= m

x

0 (x− m)/s

Software eliminates the need for standardizing X, although the standard normal distribution is still important in its own right. Table 3.1 at the end of this section details the relevant R and Matlab commands, which are also illustrated in the following examples. Example 3.21 The time that it takes a driver to react to the brake lights on a decelerating vehicle is critical in avoiding rear-end collisions. The article “Fast-Rise Brake Lamp as a Collision-Prevention Device” (Ergonomics, 1993: 391–395) suggests that reaction time for an in-traffic response to a brake signal from standard brake lights can be modeled with a normal distribution having mean value 1.25 s and standard deviation of .46 s. What is the probability that reaction time is between 1.00 s and 1.75 s? If we let X denote reaction time, then standardizing gives 1.00 X 1.75 if and only if 1:00 1:25 X 1:25 1:75 1:25 :46 :46 :46 The middle expression, by the previous proposition, is a standard normal rv. Thus

3.3

The Normal (Gaussian) Distribution

177

1:00 1:25 1:75 1:25 Z Pð1:00 X 1:75Þ ¼ P :46 :46 ¼ Pð:54 Z 1:09Þ ¼ Φð1:09Þ Φð:54Þ ¼ :8621 :2946 ¼ :5675 This is illustrated in Fig. 3.20. The same answer may be produced in Matlab with the command normcdf(1.75,1.25,.46)-normcdf(1.00, 1.25,.46); Matlab gives the answer .5681, which is more accurate than the value .5675 above (due to rounding the z-values to two decimal places). The analogous R command is pnorm(1.75,1.25,.46)-pnorm(1.00,1.25,.46). Fig. 3.20 Normal curves for Example 3.21

Normal, m = 1.25, s = .46

P(1.00 ≤ X ≤ 1.75) z curve

1.25 1.00

−.54

1.75

1.09

Similarly, if we view 2 s as a critically long reaction time, the probability that actual reaction time will exceed this value is 2 1:25 PðX > 2Þ ¼ P Z > ¼ PðZ > 1:63Þ ¼ 1 Φð1:63Þ ¼ :0516 :46 This probability is determined in Matlab and R by executing 1-normcdf(2,1.25,.46) and 1-pnorm(2,1.25,.46), respectively.

the

commands ■

Example 3.22 The amount of distilled water dispensed by a machine is normally distributed with mean value 64 oz and standard deviation .78 oz. What container size c will ensure that overflow occurs only .5% of the time? If X denotes the amount dispensed, the desired condition is that P(X > c) ¼ .005, or, equivalently, that P(X c) ¼ .995. Thus c is the 99.5th percentile of the normal distribution with μ ¼ 64 and σ ¼ .78. The 99.5th percentile of the standard normal distribution is Φ1(.995) 2.58, so c ¼ η:995 ¼ 64 þ ð2:58Þð:78Þ ¼ 64 þ 2:0 ¼ 66:0 oz This is illustrated in Fig. 3.21.

Fig. 3.21 Distribution of amount dispensed for Example 3.22

Shaded area = .995

m = 64 c = 99.5th percentile = 66.0

178

3 Continuous Random Variables and Probability Distributions

The Matlab and R commands to calculate this percentile are norminv(.995,64,.78) and qnorm(.995,64,.78), respectively. ■

Example 3.23 The return on a diversified investment portfolio is normally distributed. What is the probability that the return is within 1 standard deviation of its mean value? This question can be answered without knowing either μ or σ, as long as the distribution is known to be normal; in other words, the answer is the same for any normal distribution. Going one standard deviation below μ lands us at μ σ, while μ + σ is one standard deviation above the mean. Thus X is within one standard P ¼ P ðμ σ X μ þ σ Þ deviation of its mean μσμ μþσμ ¼P Z σ σ ¼ Pð1 Z 1Þ ¼ Φð1Þ Φð1 ¼ :6826 The probability that X is within 2 standard deviations of the mean is P(2 Z 2) ¼ .9544 and the probability that X is within 3 standard deviations of the mean is P(3 Z 3) ¼ .9973. ■ The results of Example 3.23 are often reported in percentage form and referred to as the empirical rule (because empirical evidence has shown that histograms of real data can very frequently be approximated by normal curves). EMPIRICAL RULE

If the population distribution of a variable is (approximately) normal, then 1. Roughly 68% of the values are within 1 SD of the mean. 2. Roughly 95% of the values are within 2 SDs of the mean. 3. Roughly 99.7% of the values are within 3 SDs of the mean.

3.3.3

The Normal MGF

The moment generating function provides a straightforward way to establish several important results concerning the normal distribution. PROPOSITION

The moment generating function of a normally distributed random variable X is MX ðtÞ ¼ eμtþσ

t =2

2 2

Proof Consider first the special case of a standard normal rv Z. Then ð1 ð1 2 1 1 2 pﬃﬃﬃﬃﬃ eðz 2tzÞ=2 dz MZ ðtÞ ¼ E etZ ¼ etz pﬃﬃﬃﬃﬃ ez =2 dz ¼ 2π 2π 1 1 Completing the square in the exponent, we have

3.3

The Normal (Gaussian) Distribution

MZ ðtÞ ¼ e

t2 =2

ð1 1

179

2 2 1 2 pﬃﬃﬃﬃﬃ eðz 2tzþt Þ=2 dz ¼ et =2 2π

ð1 1

2 1 pﬃﬃﬃﬃﬃ eðztÞ =2 dz 2π

The last integral is the area under a normal density curve with mean t and standard deviation 1, so 2 the value of the integral is 1. Therefore, MZ ðtÞ ¼ et =2 . Now let X be any normal rv with mean μ and standard deviation σ. Then, by the proposition earlier in this section, (X μ)/σ ¼ Z, where Z is standard normal. Rewrite this relationship as X ¼ μ + σZ, and use the property MaY+b(t) ¼ ebtMY(at): MX ðtÞ ¼ MμþσZ ðtÞ ¼ eμt MZ ðσtÞ ¼ eμt eσ

t =2

2 2

¼ eμtþσ

t =2

2 2

■

The normal mgf can be used to establish that μ and σ are indeed the mean and standard deviation of X, as claimed earlier (Exercise 68). Also, by the mgf uniqueness property, any rv X whose moment generating function has the form specified above is necessarily normally distributed. For example, 2 if it is known that the mgf of X is MX ðtÞ ¼ e8t , then X must be a normal rv with mean μ ¼ 0 and 2 standard deviation σ ¼ 4 (since the N(0, 4) distribution has e8t as its mgf). It was established earlier in this section that if X N(μ, σ) and Z ¼ (X μ)/σ, then Z N(0, 1), and vice versa. This standardizing transformation is actually a special case of a much more general property. PROPOSITION

Let X N(μ, σ). Then for any constants a and b with a 6¼ 0, aX + b is also normally distributed. That is, any linear rescaling of a normal rv is normal. The proof of this proposition uses mgfs and is left as an exercise (Exercise 70). This proposition provides a much easier proof of the earlier relationship between X and Z. The rescaling formulas and this proposition combine to give the following statement: if X is normally distributed and Y ¼ aX + b (with a 6¼ 0), then Y is also normal, with mean μY ¼ aμX + b and standard deviation σ Y ¼ |a|σ X.

3.3.4

The Normal Distribution and Discrete Populations

The normal distribution is often used as an approximation to the distribution of values in a discrete population. In such situations, extra care must be taken to ensure that probabilities are computed in an accurate manner. Example 3.24 IQ (as measured by a standard test) is known to be approximately normally distributed with μ ¼ 100 and σ ¼ 15. What is the probability that a randomly selected individual has an IQ of at least 125? Letting X ¼ the IQ of a randomly chosen person, we wish P(X 125). The temptation here is to standardize X 125 immediately as in previous examples. However, the IQ population is actually discrete, since IQs are integer-valued, so the normal curve is an approximation to a discrete probability histogram, as pictured in Fig. 3.22. The rectangles of the histogram are centered at integers, so IQs of at least 125 correspond to rectangles beginning at 124.5, as shaded in Fig. 3.22. Thus we really want the area under the approximating normal curve to the right of 124.5. Standardizing this value gives P(Z 1.63) ¼ .0516. If we had standardized X 125, we would have obtained P(Z 1.67) ¼ .0475. The difference is not great, but the answer .0516 is more accurate. Similarly, P(X ¼ 125) would be approximated by the area between 124.5 and 125.5, since the area under the normal curve above the single value 125 is zero.

180

3 Continuous Random Variables and Probability Distributions

125

■

Fig. 3.22 A normal approximation to a discrete distribution

The correction for discreteness of the underlying distribution in Example 3.24 is often called a continuity correction; it adjusts for the use of a continuous distribution in approximating a probability involving a discrete rv. It is useful in the following application of the normal distribution to the computation of binomial probabilities. The normal distribution was actually created as an approximation to the binomial distribution (by Abraham de Moivre in the 1730s).

3.3.5

Approximating the Binomial Distribution

Recall that the mean value and standard deviation of a binomial random variable X are μ ¼ np and pﬃﬃﬃﬃﬃﬃﬃﬃ σ ¼ npq, respectively. Figure 3.23a displays a probability histogram for the binomial distribution pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ with n ¼ 20, p ¼ .6 [so μ ¼ 20(.6) ¼ 12 and σ ¼ 20ð:6Þð:4Þ ¼ 2:19]. A normal curve with mean value and standard deviation equal to the corresponding values for the binomial distribution has been superimposed on the probability histogram. Although the probability histogram is a bit skewed (because p 6¼ .5), the normal curve gives a very good approximation, especially in the middle part of the picture. The area of any rectangle (probability of any particular X value) except those in the extreme tails can be accurately approximated by the corresponding normal curve area. For example, 20 PðX ¼ 10Þ ¼ ð:6Þ10 ð:4Þ10 ¼ :117, whereas the area under the normal curve between 9.5 and 10 10.5 is P(1.14 Z .68) ¼ .120. On the other hand, a normal distribution is a poor approximation to a discrete distribution that is heavily skewed. For example, Figure 3.23b shows a probability histogram for the Bin(20, .1)

a

b

0.30

0.30

0.25

0.25

0.20

0.20

normal curve, µ = 12, s = 2.19

0.15

normal curve, µ = 2, s = 1.34

0.15

0.10

0.10

0.05

0.05 0.00

0.00 0

2

4

6

8

10 12 14 16 18 20

2

4

6

8

10 12 14 16 18 20

Fig. 3.23 Binomial probability histograms with normal approximation curves superimposed: (a) n ¼ 20 and p ¼ .6 (a good fit); (b) n ¼ 20 and p ¼ .1 (a poor fit)

3.3

The Normal (Gaussian) Distribution

181

distribution and the normal pdf with the same mean and standard deviation (μ ¼ 2 and σ ¼ 1.34). Clearly, we would not want to use this normal curve to approximate binomial probabilities, even with a continuity correction. PROPOSITION

Let X be a binomial rv based on n trials with success probability p. Then if the binomial probability histogram is not too skewed, X has approximately a normal distribution with μ ¼ np pﬃﬃﬃﬃﬃﬃﬃﬃ and σ ¼ npq. In particular, for x ¼ a possible value of X, P(X x) ¼ B(x; n, p) (area under the normal curve to the left of x + .5) x þ :5 np ¼Φ pﬃﬃﬃﬃﬃﬃﬃﬃ npq In practice, the approximation is adequate provided that both np 10 and nq 10. If either np < 10 or nq < 10, the binomial distribution may be too skewed for the (symmetric) normal curve to give accurate approximations. Example 3.25 Suppose that 25% of all licensed drivers in a state do not have insurance. Let X be the number of uninsured drivers in a random sample of size 50 (somewhat perversely, a success is an uninsured driver), so that p ¼ .25. Then μ ¼ 12.5 and σ ¼ 3.062. Since np ¼ 50(.25) ¼ 12.5 10 and nq ¼ 37.5 10, the approximation can safely be applied: 10 þ :5 12:5 PðX 10Þ ¼ Bð10; 50, :25Þ Φ 3:062 ¼ Φð:6532Þ ¼ :2568 Similarly, the probability that between 5 and 15 (inclusive) of the selected drivers are uninsured is Pð5 X 15Þ ¼ Bð15; 50, :25Þ Bð4; 50, :25Þ 15:5 12:5 4:5 12:5 Φ Φ ¼ :8319 3:062 3:062 The exact probabilities are .2622 and .8348, respectively, so the approximations are quite good. In the last calculation, the probability P(5 X 15) is being approximated by the area under the normal curve between 4.5 and 15.5—the continuity correction is used for both the upper and lower limits. ■ The wide availability of software for doing binomial probability calculations, even for large values of n, has considerably diminished the importance of the normal approximation. However, it is important for another reason. When the objective of an investigation is to make an inference about b ¼ X=n rather a population proportion p, interest will focus on the sample proportion of successes P than on X itself. Because this proportion is just X multiplied by the constant 1/n, the earlier rescaling b will also have approximately a normal distribution (with mean μ ¼ p and proposition tells us that P pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ standard deviation σ ¼ pq=n) provided that both np 10 and nq 10. This normal approximation is the basis for several inferential procedures to be discussed in Chap. 5.

182

3 Continuous Random Variables and Probability Distributions

It is quite difficult to give a direct proof of the validity of this normal approximation (the first one goes back about 270 years to de Moivre). In Chap. 4, we’ll see that it is a consequence of an important general result called the Central Limit Theorem.

3.3.6

Normal Distribution Calculations with Software

Many software packages, including Matlab and R, have built-in functions to determine both probabilities under a normal curve and quantiles (aka percentiles) of any given normal distribution. Table 3.1 summarizes the relevant code in both packages. Table 3.1 Normal probability and quantile calculations in Matlab and R Function: Notation: Matlab: R:

cdf Φ xμ σ normcdf(x, μ, σ) pnorm(x, μ, σ)

quantile, i.e., the (100p)th percentile ηp ¼ μ + Φ 1( p) σ norminv(p, μ, σ) qnorm(p, μ, σ)

In the special case of a standard normal distribution, R (but not Matlab) will allow the user to drop the last two arguments, μ and σ. That is, the R commands pnorm(x) and pnorm(x,0,1) yield the same result for any number x, and a similar comment applies to qnorm. Both software packages also have built-in function calls for the normal pdf: normpdf(x,μ,σ) and dnorm(x,μ,σ), respectively. However, these two commands are generally only used when one desires to graph a normal density curve (x vs. f(x; μ, σ)), since the pdf evaluated at particular x does not represent a probability, as discussed in Sect. 3.1.

3.3.7

Exercises: Section 3.3 (39–70)

39. Let Z be a standard normal random variable and obtain each of the following probabilities, drawing pictures wherever appropriate. (a) P(0 Z 2.17) (b) P(0 Z 1) (c) P(2.50 Z 0) (d) P(2.50 Z 2.50) (e) P(Z 1.37) (f) P(1.75 Z ) (g) P(1.50 Z 2.00) (h) P(1.37 Z 2.50) (i) P(1.50 Z ) (j) P(|Z| 2.50) 40. In each case, determine the value of the constant c that makes the probability statement correct. (a) Φ(c) ¼ .9838 (b) P(0 Z c) ¼ .291 (c) P(c Z) ¼ .121 (d) P(c Z c) ¼ .668 (e) P(c |Z|) ¼ .016

3.3

The Normal (Gaussian) Distribution

183

41. Find the following percentiles for the standard normal distribution. Interpolate where appropriate. (a) 91st (b) 9th (c) 75th (d) 25th (e) 6th 42. Suppose the force acting on a column that helps to support a building is a normally distributed random variable X with mean value 15.0 kips and standard deviation 1.25 kips. Compute the following probabilities. (a) P(X 15) (b) P(X 17.5) (c) P(X 10) (d) P(14 X 18) (e) P(|X 15| 3) 43. Mopeds (small motorcycles with an engine capacity below 50 cc) are very popular in Europe because of their mobility, ease of operation, and low cost. The article “Procedure to Verify the Maximum Speed of Automatic Transmission Mopeds in Periodic Motor Vehicle Inspections” (J. of Automobile Engr., 2008: 1615-1623) described a rolling bench test for determining maximum vehicle speed. A normal distribution with mean value 46.8 km/h and standard deviation 1.75 km/h is postulated. Consider randomly selecting a single such moped. (a) What is the probability that maximum speed is at most 50 km/h? (b) What is the probability that maximum speed is at least 48 km/h? (c) What is the probability that maximum speed differs from the mean value by at most 1.5 standard deviations? 44. Let X be the birth weight, in grams, of a randomly selected full-term baby. The article “Fetal Growth Parameters and Birth Weight: Their Relationship to Neonatal Body Composition” (Ultrasound in Obstetrics and Gynecology, 2009: 441–446) suggests that X is normally distributed with mean 3500 and standard deviation 600. (a) Sketch the relevant density curve, including tick marks on the horizontal scale. (b) What is P(3000 < X < 4500), and how does this compare to P(3000 X 4500)? (c) What is the probability that the weight of such a newborn is less than 2500 g? (d) What is the probability that the weight of such a newborn exceeds 6000 g (roughly 13.2 lb)? (e) How would you characterize the most extreme .1% of all birth weights? (f) Use the rescaling proposition from this section to determine the distribution of birth weight expressed in pounds (shape, mean, and standard deviation), and then recalculate the probability from part (c). How does this compare to your previous answer? 45. Based on extensive data from an urban freeway near Toronto, Canada, “it is assumed that free speeds can best be represented by a normal distribution” (“Impact of Driver Compliance on the Safety and Operational Impacts of Freeway Variable Speed Limit Systems,” J. of Transp. Engr., 2011: 260–268). The mean and standard deviation reported in the article were 119 km/h and 13.1 km/h, respectively. (a) What is the probability that the speed of a randomly selected vehicle is between 100 and 120 km/h? (b) What speed characterizes the fastest 10% of all speeds?

184

3 Continuous Random Variables and Probability Distributions

(c) The posted speed limit was 100 km/h. What percentage of vehicles was traveling at speeds exceeding this posted limit? (d) If five vehicles are randomly and independently selected, what is the probability that at least one is not exceeding the posted speed limit? (e) What is the probability that the speed of a randomly selected vehicle exceeds 70 miles/h? 46. The defect length of a corrosion defect in a pressurized steel pipe is normally distributed with mean value 30 mm and standard deviation 7.8 mm (suggested in the article “Reliability Evaluation of Corroding Pipelines Considering Multiple Failure Modes and Time-Dependent Internal Pressure,” J. of Infrastructure Systems, 2011: 216–224). (a) What is the probability that defect length is at most 20 mm? Less than 20 mm? (b) What is the 75th percentile of the defect length distribution, i.e., the value that separates the smallest 75% of all lengths from the largest 25%? (c) What is the 15th percentile of the defect length distribution? (d) What values separate the middle 80% of the defect length distribution from the smallest 10% and the largest 10%? 47. The plasma cholesterol level (mg/dL) for patients with no prior evidence of heart disease who experience chest pain is normally distributed with mean 200 and standard deviation 35. Consider randomly selecting an individual of this type. What is the probability that the plasma cholesterol level (a) Is at most 250? (b) Is between 300 and 400? (c) Differs from the mean by at least 1.5 standard deviations? 48. Suppose the diameter at breast height (in.) of trees of a certain type is normally distributed with μ ¼ 8.8 and σ ¼ 2.8, as suggested in the article “Simulating a Harvester-Forwarder Softwood Thinning” (Forest Products J., May 1997: 36–41). (a) What is the probability that the diameter of a randomly selected tree will be at least 10 in.? Will exceed 10 in.? (b) What is the probability that the diameter of a randomly selected tree will exceed 20 in.? (c) What is the probability that the diameter of a randomly selected tree will be between 5 and 10 in.? (d) What value c is such that the interval (8.8 c, 8.8 + c) includes 98% of all diameter values? (e) If four trees are independently selected, what is the probability that at least one has a diameter exceeding 10 in.? 49. There are two machines available for cutting corks intended for use in wine bottles. The first produces corks with diameters that are normally distributed with mean 3 cm and standard deviation .1 cm. The second machine produces corks with diameters that have a normal distribution with mean 3.04 cm and standard deviation .02 cm. Acceptable corks have diameters between 2.9 and 3.1 cm. Which machine is more likely to produce an acceptable cork? 50. Human body temperatures for healthy individuals have approximately a normal distribution with mean 98.25 F and standard deviation .75 F. (The past accepted value of 98.6 F was obtained by converting the Celsius value of 37 , which is correct to the nearest integer.) (a) Find the 90th percentile of the distribution. (b) Find the 5th percentile of the distribution. (c) What temperature separates the coolest 25% from the others? 51. The article “Monte Carlo Simulation—Tool for Better Understanding of LRFD” (J. Struct. Engr., 1993: 1586–1599) suggests that yield strength (ksi) for A36 grade steel is normally distributed with μ ¼ 43 and σ ¼ 4.5.

3.3

52.

53.

54.

55.

56.

57.

58.

The Normal (Gaussian) Distribution

185

(a) What is the probability that yield strength is at most 40? Greater than 60? (b) What yield strength value separates the strongest 75% from the others? The automatic opening device of a military cargo parachute has been designed to open when the parachute is 200 m above the ground. Suppose opening altitude actually has a normal distribution with mean value 200 m and standard deviation 30 m. Equipment damage will occur if the parachute opens at an altitude of less than 100 m. What is the probability that there is equipment damage to the payload of at least one of five independently dropped parachutes? The temperature reading from a thermocouple placed in a constant-temperature medium is normally distributed with mean μ, the actual temperature of the medium, and standard deviation σ. What would the value of σ have to be to ensure that 95% of all readings are within .1 of μ? Vehicle speed on a particular bridge in China can be modeled as normally distributed (“Fatigue Reliability Assessment for Long-Span Bridges under Combined Dynamic Loads from Winds and Vehicles,” J. of Bridge Engr., 2013: 735–747). (a) If 5% of all vehicles travel less than 39.12 mph and 10% travel more than 73.24 mph, what are the mean and standard deviation of vehicle speed? [Note: The resulting values should agree with those given in the cited article.] (b) What is the probability that a randomly selected vehicle’s speed is between 50 and 65 mph? (c) What is the probability that a randomly selected vehicle’s speed exceeds the speed limit of 70 mph? If adult female heights are normally distributed, what is the probability that the height of a randomly selected woman is (a) Within 1.5 SDs of its mean value? (b) Farther than 2.5 SDs from its mean value? (c) Between 1 and 2 SDs from its mean value? A machine that produces ball bearings has initially been set so that the true average diameter of the bearings it produces is .500 in. A bearing is acceptable if its diameter is within .004 in. of this target value. Suppose, however, that the setting has changed during the course of production, so that the bearings have normally distributed diameters with mean value .499 in. and standard deviation .002 in. What percentage of the bearings produced will not be acceptable? The Rockwell hardness of a metal is determined by impressing a hardened point into the surface of the metal and then measuring the depth of penetration of the point. Suppose the Rockwell hardness of an alloy is normally distributed with mean 70 and standard deviation 3. (Rockwell hardness is measured on a continuous scale.) (a) If a specimen is acceptable only if its hardness is between 67 and 75, what is the probability that a randomly chosen specimen has an acceptable hardness? (b) If the acceptable range of hardness is (70 c, 70 + c), for what value of c would 95% of all specimens have acceptable hardness? (c) If the acceptable range is as in part (a) and the hardness of each of ten randomly selected specimens is independently determined, what is the expected number of acceptable specimens among the ten? (d) What is the probability that at most eight of ten independently selected specimens have a hardness of less than 73.84? [Hint: Y ¼ the number among the ten specimens with hardness less than 73.84 is a binomial variable; what is p?] The weight distribution of parcels sent in a certain manner is normal with mean value 12 lb and standard deviation 3.5 lb. The parcel service wishes to establish a weight value c beyond which there will be a surcharge. What value of c is such that 99% of all parcels are at least 1 lb under the surcharge weight?

186

3 Continuous Random Variables and Probability Distributions

59. Suppose Appendix Table A.3 contained Φ(z) only for z 0. Explain how you could still compute (a) P(1.72 Z .55) (b) P(1.72 Z .55) Is it necessary to tabulate Φ(z) for z negative? What property of the standard normal curve justifies your answer? 60. Chebyshev’s inequality (Sect. 3.2) states that for any number k satisfying k 1, P(|X μ| kσ) is no more than 1/k2. Obtain this probability in the case of a normal distribution for k ¼ 1, 2, and 3, and compare to Chebyshev’s upper bound. 61. Let X denote the number of flaws along a 100-m reel of magnetic tape (an integer-valued variable). Suppose X has approximately a normal distribution with μ ¼ 25 and σ ¼ 5. Use the continuity correction to calculate the probability that the number of flaws is (a) Between 20 and 30, inclusive. (b) At most 30. Less than 30. 62. Let X have a binomial distribution with parameters n ¼ 25 and p. Calculate each of the following probabilities using the normal approximation (with the continuity correction) for the cases p ¼ .5, .6, and .8 and compare to the exact probabilities calculated from Appendix Table A.1. (a) P(15 X 20) (b) P(X 15) (c) P(20 X) 63. Suppose that 10% of all steel shafts produced by a process are nonconforming but can be reworked (rather than having to be scrapped). Consider a random sample of 200 shafts, and let X denote the number among these that are nonconforming and can be reworked. What is the (approximate) probability that X is (a) At most 30? (b) Less than 30? (c) Between 15 and 25 (inclusive)? 64. Suppose only 70% of all drivers in a state regularly wear a seat belt. A random sample of 500 drivers is selected. What is the probability that (a) Between 320 and 370 (inclusive) of the drivers in the sample regularly wear a seat belt? (b) Fewer than 325 of those in the sample regularly wear a seat belt? Fewer than 315? 65. In response to concerns about nutritional contents of fast foods, McDonald’s announced that it would use a new cooking oil for its french fries that would decrease substantially trans fatty acid levels and increase the amount of more beneficial polyunsaturated fat. The company claimed that 97 out of 100 people cannot detect a difference in taste between the new and old oils. Assuming that this figure is correct (as a long-run proportion), what is the approximate probability that in a random sample of 1000 individuals who have purchased fries at McDonald’s, (a) At least 40 can taste the difference between the two oils? (b) At most 5% can taste the difference between the two oils? 66. The following proof that the normal pdf integrates to 1 comes courtesy of Professor Robert Young, Oberlin College. Let f(z) denote the standard normal pdf, and consider the function of two variables 2 2 1 1 1 2 2 gðx, yÞ ¼ f ðxÞ f ðyÞ ¼ pﬃﬃﬃﬃﬃ ex =2 pﬃﬃﬃﬃﬃ ey =2 ¼ eðx þy Þ=2 2π 2π 2π

Let V denote the volume under g(x, y) above the xy-plane. (a) Let A denote the area under the standard normal curve. By setting up the double integral for the volume underneath g(x, y), show that V ¼ A2.

3.4

The Exponential and Gamma Distributions

187

(b) Using the rotational symmetry of g(x, y), V can be determined by adding up the volumes of shells from rotation about the y-axis: ð1 1 2 V¼ 2πr er =2 dr 2π 0 Show this integral equals 1, then use (a) to establish that the area under the standard normal curve is 1. Ð1 (c) Show that 1 f(x; μ, σ)dx ¼ 1. [Hint: Write out the integral, and then make a substitution to reduce it to the standard normal case. Then invoke (b).] 67. Suppose X N(μ, σ). (a) Show via integration that E(X) ¼ μ. [Hint: Make the substitution u ¼ (x μ)/σ, which will create two integrals. For one, use the symmetry of the pdf; for the other, use the fact that the standard normal pdf integrates to 1.] (b) Show via integration that Var(X) ¼ σ 2. [Hint: Evaluate the integral for E[(Xμ)2] rather than using the variance shortcut formula. Use the same substitution as in part (a).] 68. The moment generating function can be used to find the mean and variance of the normal distribution. (a) Use derivatives of MX(t) to verify that E(X) ¼ μ and Var(X) ¼ σ 2. (b) Repeat (a) using LX(t) ¼ ln[MX(t)], and compare with part (a) in terms of effort. (Refer back to Exercise 36 for properties of the function LX(t).) 69. There is no nice formula for the standard normal cdf Φ(z), but several good approximations have been published in articles. The following is from “Approximations for Hand Calculators Using Small Integer Coefficients” (Math. Comput., 1977: 214–222). For 0 < z 5.5, ð83z þ 351Þz þ 562 PðZ zÞ ¼ 1 ΦðzÞ :5exp ð703=zÞ þ 165 The relative error of this approximation is less than .042%. Use this to calculate approximations to the following probabilities, and compare whenever possible to the probabilities obtained from Appendix Table A.3. (a) P(Z 1) (b) P(Z < 3) (c) P(4 < Z < 4) (d) P(Z > 5) 70. (a) Use mgfs to show that if X has a normal distribution with parameters μ and σ, then Y ¼ aX + b (a linear function of X) also has a normal distribution. What are the parameters of the distribution of Y [i.e., E(Y ) and SD(Y)]? (b) If when measured in C, temperature is normally distributed with mean 115 and standard deviation 2, what can be said about the distribution of temperature measured in F?

3.4

The Exponential and Gamma Distributions

The graph of any normal pdf is bell-shaped and thus symmetric. In many practical situations, the variable of interest to the experimenter might have a skewed distribution. A family of pdfs that yields a wide variety of skewed distributional shapes is the gamma family. We first consider a special case, the exponential distribution, and then generalize later in the section.

188

3.4.1

3 Continuous Random Variables and Probability Distributions

The Exponential Distribution

The family of exponential distributions provides probability models that are widely used in engineering and science disciplines. DEFINITION

X is said to have an exponential distribution with parameter λ (λ > 0) if the pdf of X is ( λeλx x>0 f ðx; λÞ ¼ 0 otherwise

Some sources write the exponential pdf in the form (1/β)ex/β, so that β ¼ 1/λ. Graphs of several exponential pdfs appear in Fig. 3.24. Fig. 3.24 Exponential density curves

f(x;λ) 2

1.5 λ= 2 1 λ = .5

λ= 1 .5

x 0

1

2

3

4

5

6

7

8

The expected value of an exponentially distributed random variable X is ð1 EðXÞ ¼ x λeλx dx 0

Obtaining this expected value requires integration by parts. The variance of X can be computed using the shortcut formula Var(X) ¼ E(X2) [E(X)]2; evaluating E(X2) uses integration by parts twice in succession. In contrast, the exponential cdf is easily obtained by integrating the pdf. The results of these integrations are as follows. PROPOSITION

Let X be an exponential variable with parameter λ. Then the cdf of X is

3.4

The Exponential and Gamma Distributions

189

( Fðx; λÞ ¼

x0

1 eλx

x>0

The mean and standard deviation of X are both equal to 1/λ. Under the alternative parameterization, the exponential cdf becomes 1 ex/β for x > 0, and the mean and standard deviation are both equal to β. Example 3.23 The response time X at an on-line computer terminal (the elapsed time between the end of a user’s inquiry and the beginning of the system’s response to that inquiry) has an exponential distribution with expected response time equal to 5 s. Then E(X) ¼ 1/λ ¼ 5, so λ ¼ .2. The probability that the response time is at most 10 s is PðX 10Þ ¼ Fð10; 2Þ ¼ 1 eð:2Þð10Þ ¼ 1 e2 ¼ 1 :135 ¼ :865 The probability that response time is between 5 and 10 s is Pð5 X 10Þ ¼ Fð10; 2Þ Fð5; 2Þ ¼ 1 e2 1 e1 ¼ :233

■

The exponential distribution is frequently used as a model for the distribution of times between the occurrence of successive events, such as customers arriving at a service facility or calls coming in to a call center. The reason for this is that the exponential distribution is closely related to the Poisson distribution introduced in Chap. 2. We will explore this relationship fully in Sect. 7.5 (Poisson Processes). Another important application of the exponential distribution is to model the distribution of component lifetimes. A partial reason for the popularity of such applications is the “memoryless” property of the exponential distribution. Suppose component lifetime is exponentially distributed with parameter λ. After putting the component into service, we leave for a period of t0 hours and then return to find the component still working; what now is the probability that it lasts at least an additional t hours? In symbols, we wish P(X t + t0 | X t0). By the definition of conditional probability, PðX t þ t0 jX t0 Þ ¼

P½ ð X t þ t 0 Þ \ ð X t 0 Þ PðX t0 Þ

But the event X t0 in the numerator is redundant, since both events can occur if and only if X t + t0. Therefore, PðX t þ t0 jX t0 Þ ¼

PðX t þ t0 Þ 1 Fðt þ t0 ; λÞ eλðtþt0 Þ ¼ ¼ λt ¼ eλt PðX t0 Þ 1 Fðt0 ; λÞ e 0

This conditional probability is identical to the original probability P(X t) that the component lasted t hours. Thus the distribution of additional lifetime is exactly the same as the original distribution of lifetime, so at each point in time the component shows no effect of wear. In other words, the distribution of remaining lifetime is independent of current age (we wish that were true of us!). Although the memoryless property can be justified at least approximately in many applied problems, in other situations components deteriorate with age or occasionally improve with age (at least up to a certain point). More general lifetime models are then furnished by the gamma,

190

3 Continuous Random Variables and Probability Distributions

Weibull, and lognormal distributions (the latter two are discussed in the next section). Lifetime distributions are at the heart of reliability models, which we’ll consider in depth in Sect. 4.8.

3.4.2

The Gamma Distribution

To define the family of gamma distributions, which generalizes the exponential distribution, we first need to introduce a function that plays an important role in many branches of mathematics. DEFINITION

For α > 0, the gamma function Γ(α) is defined by ð1 ΓðαÞ ¼ xα1 ex dx 0

The most important properties of the gamma function are the following: 1. For any α > 1, Γ(α) ¼ (α 1) Γ(α 1) (via integration by parts) 2. For any positive integer n, Γ(n) ¼ (n 1)! pﬃﬃﬃ 3. Γ 12 ¼ π The following proposition will prove useful for several computations that follow. PROPOSITION

For any α, β > 0,

ð1

xα1 ex=β dx ¼ βα ΓðαÞ

ð3:5Þ

Proof Make the substitution u ¼ x/β, so that x ¼ βu and dx ¼ β du: ð1 ð1 ð1 xα1 ex=β dx ¼ ðβuÞα1 eu βdu ¼ βα uα1 eu du ¼ βα ΓðαÞ 0

The last equality comes from the definition of the gamma function. With the preceding proposition in mind, we make the following definition. DEFINITION

A continuous random variable X is said to have a gamma distribution if the pdf of X is 8 < 1 xα1 ex=β x > 0 α f ðx; α, βÞ ¼ β ΓðαÞ ð3:6Þ : 0 otherwise where the parameters α and β satisfy α > 0, β > 0. When β ¼ 1, X is said to have a standard gamma distribution, and its pdf may be denoted f(x; α).

■

3.4

The Exponential and Gamma Distributions

191

The exponential distribution results from taking α ¼ 1 and β ¼ 1/λ. It’s clear that f(x; α, β) 0 for all x; the previous proposition guarantees that this function integrates to 1, as required. Figure 3.25a illustrates the graphs of the gamma pdf for several (α, β) pairs, whereas Fig. 3.25b presents graphs of the standard gamma pdf. For the standard pdf, when α 1, f(x; α) is strictly decreasing as x increases; when α > 1, f(x; α) rises to a maximum and then decreases. Because of this difference, α is referred to as a shape parameter. The parameter β in Eq. (3.6) is called the scale parameter because values other than 1 either stretch or compress the pdf in the x direction.

a

b

f (x; a, b)

f(x; a) a = 2, b = 1 3

1.0

a= 1

1.0 a = 1, b = 1

0.5

a = .6

0.5

a = 2, b = 2

a= 2

a= 5

a = 2, b = 1

0 1

2

3

4

5

6

7

x

0 1

2

3

4

5

x

Fig. 3.25 (a) Gamma density curves; (b) standard gamma density curves

The mean and variance of a gamma random variable are EðXÞ ¼ μ ¼ αβ

VarðXÞ ¼ σ 2 ¼ αβ2

These can be calculated directly from the gamma pdf using integration by parts, or by employing properties of the gamma function along with Expression (3.5); see Exercise 83. Notice these are consistent with the aforementioned mean and variance of the exponential distribution: with α ¼ 1 and β ¼ 1/λ we obtain E(X) ¼ 1(1/λ) ¼ 1/λ and Var(X) ¼ 1(1/λ)2 ¼ 1/λ2. In the special case where the shape parameter α is a positive integer, n, the gamma distribution is sometimes rewritten with the substitution λ ¼ 1/β, and the resulting pdf is f ðx; n, 1=λÞ ¼

λn xn1 eλx , ðn 1Þ!

x>0

This is often called an Erlang distribution, and it plays a central role in the study of Poisson processes (again, see Sect. 7.5; notice that the n ¼ 1 case of the Erlang distribution is actually the exponential pdf). In Chap. 4, it will be shown that the sum of n independent exponential rvs follows this Erlang distribution. When X is a standard gamma rv, the cdf of X, which for x > 0 is ðx 1 α1 y Gðx; αÞ ¼ PðX xÞ ¼ y e dy ð3:7Þ 0 ΓðαÞ is called the incomplete gamma function. (In mathematics literature, the incomplete gamma function sometimes refers to Eq. (3.7) without the denominator Γ(α) in the integrand.) In Appendix Table A.4, we present a small tabulation of G(x; α) for α ¼ 1, 2, . . . , 10 and x ¼ 1, 2, . . . , 15.

192

3 Continuous Random Variables and Probability Distributions

Table 3.2 at the end of this section provides the Matlab and R commands related to the gamma cdf, which are illustrated in the following examples. Example 3.27 Suppose the reaction time X (in seconds) of a randomly selected individual to a certain stimulus has a standard gamma distribution with α ¼ 2. Since X is continuous, Pð3 X 5Þ ¼ PðX 5ÞPðX 3Þ ¼ Gð5; 2ÞGð3; 2Þ ¼ :960:801 ¼ :159 This probability can be obtained in Matlab with gamcdf(5,2,1)-gamcdf(3,2,1) and in R with pgamma(5,2)-pgamma(3,2). The probability that the reaction time is more than 4 s is PðX > 4Þ ¼ 1PðX 4Þ ¼ 1Gð4; 2Þ ¼ 1:908 ¼ :092

■

The incomplete gamma function can also be used to compute probabilities involving gamma distributions for any β > 0. PROPOSITION

Let X have a gamma distribution with parameters α and β. Then for any x > 0, the cdf of X is given by x PðX xÞ ¼ G ; α , β the incomplete gamma function evaluated at x/β. The proof is similar to that of Eq. (3.5). Example 3.28 Suppose the survival time X in weeks of a randomly selected male mouse exposed to 240 rads of gamma radiation has, rather fittingly, a gamma distribution with α ¼ 8 and β ¼ 15. (Data in Survival Distributions: Reliability Applications in the Biomedical Services, by A. J. Gross and V. Clark, suggest α 8.5 and β 13.3.) The expected survival time is E(X) ¼ (8)(15) ¼ 120 weeks, qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ whereas SDðXÞ ¼ ð8Þð15Þ2 ¼ 1800 ¼ 42:43 weeks. The probability that a mouse survives between 60 and 120 weeks is Pð60 X 120Þ ¼ PðX 120ÞPðX 60Þ ¼ Gð120=15; 8ÞGð60=15; 8Þ ¼ Gð8; 8ÞGð4; 8Þ ¼ :547:051 ¼ :496 In Matlab, the command gamcdf(120,8,15)-gamcdf(60,8,15) yields the desired probability; the corresponding R code is pgamma(120,8,1/15)-pgamma(60,8,1/15). The probability that a mouse survives at least 30 weeks is PðX 30Þ ¼ 1PðX < 30Þ ¼ 1PðX 30Þ ¼ 1Gð30=15; 8Þ ¼ :999

■

3.4

The Exponential and Gamma Distributions

3.4.3

193

The Gamma MGF

The integral proposition earlier in this section makes it easy to determine the mean and variance of a gamma rv. However, the moment generating function of the gamma distribution — and, as a special case, of the exponential model — will prove critical in establishing some of the more advanced properties of these distributions in Chap. 4. Proposition

The moment generating function of a gamma random variable is MX ðtÞ ¼

1 ð1 βtÞα

t < 1=β

Proof By definition, the mgf is ð1 ð1 α1 tX 1 tx x x=β MX ðtÞ ¼ E e ¼ e e dx ¼ xα1 eðtþ1=βÞx dx ΓðαÞβα 0 ΓðαÞβα 0 Now use Expression (3.5): provided t + 1/β > 0, i.e., t < 1/β, α ð1 1 1 1 1 α1 ðtþ1=βÞx x e dx ¼ ΓðαÞ ¼ ΓðαÞβα 0 ΓðαÞβα t þ 1=β ð1 βtÞα

■

The exponential mgf can then be determined with the substitution α ¼ 1, β ¼ 1/λ: MX ðtÞ ¼

3.4.4

1 1

ð1 ð1=λÞtÞ

¼

λ λt

t 8) (d) P(3 X 8) (e) P(3 < X < 8) (f) P(X < 4 or X > 6) 77. Suppose that when a type of transistor is subjected to an accelerated life test, the lifetime X (in weeks) has a gamma distribution with mean 24 weeks and standard deviation 12 weeks. (a) What is the probability that a transistor will last between 12 and 24 weeks? (b) What is the probability that a transistor will last at most 24 weeks? Is the median of the lifetime distribution less than 24? Why or why not? (c) What is the 99th percentile of the lifetime distribution? (d) Suppose the test will actually be terminated after t weeks. What value of t is such that only .5% of all transistors would still be operating at termination? 78. The two-parameter gamma distribution can be generalized by introducing a third parameter γ, called a threshold or location parameter: replace x in Eq. (3.6) by x γ and x 0 by x γ. This amounts to shifting the density curves in Fig. 3.25 so that they begin their ascent or descent at γ rather than 0. The article “Bivariate Flood Frequency Analysis with Historical Information Based on Copulas” (J. of Hydrologic Engr., 2013: 1018–1030) employs this distribution to model X ¼ 3-day flood volume (108 m3). Suppose that values of the parameters are α ¼ 12, β ¼ 7, γ ¼ 40 (very close to estimates in the cited article based on past data). (a) What are the mean value and standard deviation of X? (b) What is the probability that flood volume is between 100 and 150? (c) What is the probability that flood volume exceeds its mean value by more than one standard deviation? (d) What is the 95th percentile of the flood volume distribution? 79. If X has an exponential distribution with parameter λ, derive an expression for the (100p)th percentile of the distribution. Then specialize to obtain the median. 80. A system consists of five identical components connected in series as shown: 1

2

3

4

5

As soon as one component fails, the entire system will fail. Suppose each component has a lifetime that is exponentially distributed with λ ¼ .01 and that components fail independently of one another. Define events Ai ¼ {ith component lasts at least t hours}, i ¼ 1, . . ., 5, so that the Ais are independent events. Let X ¼ the time at which the system fails—that is, the shortest (minimum) lifetime among the five components. (a) The event {X t} is equivalent to what event involving A1, . . ., A5? (b) Using the independence of the five Ais, compute P(X t). Then obtain F(t) ¼ P(X t) and the pdf of X. What type of distribution does X have? (c) Suppose there are n components, each having exponential lifetime with parameter λ. What type of distribution does X have? 81. Based on an analysis of sample data, the article “Pedestrians’ Crossing Behaviors and Safety at Unmarked Roadways in China” (Accident Analysis and Prevention, 2011: 1927–1936) proposed the pdf f(x) ¼ .15e.15(x 1) when x 1 as a model for the distribution of X ¼ time (sec) spent at the median line. This is an example of a shifted exponential distribution, i.e., an exponential model beginning at an x-value other than 0.

196

3 Continuous Random Variables and Probability Distributions

(a) (b) (c) (d)

What is the probability that waiting time is at most 5 s? More than 5 s? What is the probability that waiting time is between 2 and 5 s? What is the mean waiting time? What is the standard deviation of waiting times? [Hint: For (c) and (d), you can either use integration or write X ¼ Y + 1, where Y has an exponential distribution with parameter λ ¼ .15. Then, apply rescaling properties of mean and standard deviation.] 82. The double exponential distribution has pdf f ðxÞ ¼ :5λeλjxj

for 1 < x < 1

The article “Microwave Observations of Daily Antarctic Sea-Ice Edge Expansion and Contribution Rates” (IEEE Geosci. and Remote Sensing Letters, 2006: 54-58) states that “the distribution of the daily sea-ice advance/retreat from each sensor is similar and is approximately double exponential.” The standard deviation is given as 40.9 km. (a) What is the mean of a random variable with pdf f(x)? [Hint: Draw a picture of the density curve.] (b) What is the value of the parameter λ when σ X ¼ 40.9? (c) What is the probability that the extent of daily sea-ice change is within 1 standard deviation of the mean value? 83. (a) Find the mean and variance of the gamma distribution using integration and Expression (3.5) to obtain E(X) and E(X2). (b) Use the gamma mgf to find the mean and variance.

3.5

Other Continuous Distributions

The normal, gamma (including exponential), and uniform families of distributions provide a wide variety of probability models for continuous variables, but there are many practical situations in which no member of these families fits a set of observed data very well. Statisticians and other investigators have developed other families of distributions that are often appropriate in practice.

3.5.1

The Weibull Distribution

The family of Weibull distributions was introduced by the Swedish physicist Waloddi Weibull in 1939; his 1951 article “A Statistical Distribution Function of Wide Applicability” (J. Appl. Mech., 18: 293–297) discusses a number of applications. DEFINITION

A random variable X is said to have a Weibull distribution with parameters α and β (α > 0, β > 0) if the pdf of X is 8 < α xα1 eðx=βÞα x 0 α f ðx; α, βÞ ¼ β ð3:8Þ : 0 x 5). (d) Compute P(5 X 8). Let X have a Weibull distribution. Verify that μ ¼ βΓ(1 + 1/α). [Hint: In the integral for E(X), make the change of variable y ¼ (x/β)α, so that x ¼ βy1/α.] (a) In Exercise 84, what is the median lifetime of such tubes? [Hint: Use Expression (3.9).] (b) In Exercise 86, what is the median return time? (c) If X has a Weibull distribution with the cdf from Expression (3.9), obtain a general expression for the (100p)th percentile of the distribution. (d) In Exercise 86, the company wants to refuse to accept returns after t weeks. For what value of t will only 10% of all returns be refused? Let X denote the ultimate tensile strength (ksi) at 200 of a randomly selected steel specimen of a certain type that exhibits “cold brittleness” at low temperatures. Suppose that X has a Weibull distribution with α ¼ 20 and β ¼ 100. (a) What is the probability that X is at most 105 ksi? (b) If specimen after specimen is selected, what is the long-run proportion having strength values between 100 and 105 ksi? (c) What is the median of the strength distribution? The article “On Assessing the Accuracy of Offshore Wind Turbine Reliability-Based Design Loads from the Environmental Contour Method” (Intl. J. of Offshore and Polar Engr., 2005: 132–140) proposes the Weibull distribution with α ¼ 1.817 and β ¼ .863 as a model for 1-h significant wave height (m) at a certain site. (a) What is the probability that wave height is at most .5 m? (b) What is the probability that wave height exceeds its mean value by more than one standard deviation? (c) What is the median of the wave-height distribution? (d) For 0 < p < 1, give a general expression for the 100pth percentile of the wave-height distribution. Nonpoint source loads are chemical masses that travel to the main stem of a river and its tributaries in flows that are distributed over relatively long stream reaches, in contrast to those that enter at well-defined and regulated points. The article “Assessing Uncertainty in Mass Balance Calculation of River Nonpoint Source Loads” (J. of Envir. Engr., 2008: 247–258) suggested that for a certain time period and location, nonpoint source load of total dissolved solids could be modeled with a lognormal distribution having mean value 10,281 kg/day/km and a coefficient of variation CV ¼ .40 (CV ¼ σ X/μX). (a) What are the mean value and standard deviation of ln(X)? (b) What is the probability that X is at most 15,000 kg/day/km?

204

3 Continuous Random Variables and Probability Distributions

(c) What is the probability that X exceeds its mean value, and why is this probability not .5? (d) Is 17,000 the 95th percentile of the distribution? 92. The authors of the article “Study on the Life Distribution of Microdrills” (J. of Engr. Manufacture, 2002: 301-305) suggested that a reasonable probability model for drill lifetime was a lognormal distribution with μ ¼ 4.5 and σ ¼ .8. (a) What are the mean value and standard deviation of lifetime? (b) What is the probability that lifetime is at most 100? (c) What is the probability that lifetime is at least 200? Greater than 200? 93. Use Equation (3.10) to write a formula for the median η of the lognormal distribution. What is the median for the load distribution of Exercise 91? 94. As in the case of the Weibull distribution, the lognormal distribution can be modified by the introduction of a third parameter γ such that the pdf is shifted to be positive only for x > γ. The article cited in Exercise 46 suggested that a shifted lognormal distribution with shift ¼ 1.0, mean value ¼ 2.16, and standard deviation ¼ 1.03 would be an appropriate model for the rv X ¼ maximum-to-average depth ratio of a corrosion defect in pressurized steel. (a) What are the values of μ and σ for the proposed distribution? (b) What is the probability that depth ratio exceeds 2? (c) What is the median of the depth ratio distribution? (d) What is the 99th percentile of the depth ratio distribution? 95. Sales delay is the elapsed time between the manufacture of a product and its sale. According to the article “Warranty Claims Data Analysis Considering Sales Delay” (Quality and Reliability Engr. Intl., 2013: 113–123), it is quite common for investigators to model sales delay using a lognormal distribution. For a particular product, the cited article proposes this distribution with parameter values μ ¼ 2.05 and σ 2 ¼ .06 (here the unit for delay is months). (a) What are the variance and standard deviation of delay time? (b) What is the probability that delay time exceeds 12 months? (c) What is the probability that delay time is within one standard deviation of its mean value? (d) What is the median of the delay time distribution? (e) What is the 99th percentile of the delay time distribution? (f) Among 10 randomly selected such items, how many would you expect to have a delay time exceeding 8 months? 96. The article “The Statistics of Phytotoxic Air Pollutants” (J. Roy. Statist Soc., 1989: 183–198) suggests the lognormal distribution as a model for SO2 concentration above a forest. Suppose the parameter values are μ ¼ 1.9 and σ ¼ .9. (a) What are the mean value and standard deviation of concentration? (b) What is the probability that concentration is at most 10? Between 5 and 10? 97. What condition on α and β is necessary for the standard beta pdf to be symmetric? 98. Suppose the proportion X of surface area in a randomly selected quadrat that is covered by a certain plant has a standard beta distribution with α ¼ 5 and β ¼ 2. (a) Compute E(X) and Var(X). (b) Compute P(X .2). (c) Compute P(.2 X .4). (d) What is the expected proportion of the sampling region not covered by the plant? 99. Let X have a standard beta density with parameters α and β. (a) Verify the formula for E(X) given in the section. (b) Compute E[(1 X)m]. If X represents the proportion of a substance consisting of a particular ingredient, what is the expected proportion that does not consist of this ingredient?

3.6

Probability Plots

205

100. Stress is applied to a 20-in. steel bar that is clamped in a fixed position at each end. Let Y ¼ the distance from the left end at which the bar snaps. Suppose Y/20 has a standard beta distribution with E(Y ) ¼ 10 and VarðYÞ ¼ 100=7. (a) What are the parameters of the relevant standard beta distribution? (b) Compute P(8 Y 12). (c) Compute the probability that the bar snaps more than 2 in. from where you expect it to snap.

3.6

Probability Plots

An investigator will often have obtained a numerical sample consisting of n observations and wish to know whether it is plausible that this sample came from a population distribution of some particular type (e.g., from a normal distribution). For one thing, many formal procedures from statistical inference (Chap. 5) are based on the assumption that the population distribution is of a specified type. The use of such a procedure is inappropriate if the actual underlying probability distribution differs greatly from the assumed type. Additionally, understanding the underlying distribution can sometimes give insight into the physical mechanisms involved in generating the data. An effective way to check a distributional assumption is to construct what is called a probability plot. The basis for our construction is a comparison between percentiles of the sample data and the corresponding percentiles of the assumed underlying distribution.

3.6.1

Sample Percentiles

The details involved in constructing probability plots differ a bit from source to source. Roughly speaking, sample percentiles are defined in the same way that percentiles of a population distribution are defined. The sample 50th percentile (i.e., the sample median) should separate the smallest 50% of the sample from the largest 50%, the sample 90th percentile should be such that 90% of the sample lies below that value and 10% lies above, and so on. Unfortunately, we run into problems when we actually try to compute the sample percentiles for a particular sample of n observations. If, for example, n ¼ 10, then we can split off 20% or 30% of the data, but there is no value that will split off exactly 23% of these ten observations. To proceed further, we need an operational definition of sample percentiles (this is one place where different people and different software packages do slightly different things). Statistical convention states that when n is odd, the sample median is the middle value in the ordered list of sample observations, for example, the sixth-largest value when n ¼ 11. This amounts to regarding the middle observation as being half in the lower half of the data and half in the upper half. Similarly, suppose n ¼ 10. Then if we call the third-smallest value the 25th percentile, we are regarding that value as being half in the lower group (consisting of the two smallest observations) and half in the upper group (the seven largest observations). This leads to the following general definition of sample percentiles.

206

3 Continuous Random Variables and Probability Distributions

DEFINITION

Order the n sample observations from smallest to largest. Then the ith-smallest observation in the list is taken to be the sample [100(i .5)/n]th percentile. For example, if n ¼ 10, the percentages corresponding to the ordered sample observations are 100 (1 .5)/10 ¼ 5%, 100(2 .5)/10 ¼ 15%, 25%, . . ., and 100(10 .5)/10 ¼ 95%. That is, the smallest observation is designated the sample 5th percentile, the next-smallest value the sample 15th percentile, and so on. All other percentiles could then be determined by interpolation, e.g., the sample 10th percentile would then be halfway between the 5th percentile (smallest sample observation) and the 15th percentile (second smallest observation) of the n ¼ 10 values. For the purposes of a probability plot, such interpolation will not be necessary, because a probability plot will be based only on the percentages 100(i .5)/n corresponding to the n sample observations.

3.6.2

A Probability Plot

We now wish to determine whether our sample data could plausibly have come from some particular population distribution (e.g., a normal distribution with μ ¼ 10 and σ ¼ 3). If the sample was actually selected from the specified distribution, the sample percentiles (ordered sample observations) should be reasonably close to the corresponding population distribution percentiles. That is, for i ¼ 1, 2, . . ., n there should be reasonable agreement between the ith-smallest sample observation and the theoretical [100(i .5)/n]th percentile for the specified distribution. Consider the (sample percentile, population percentile) pairs—that is, the pairs ith smallest sample 100ði :5Þ=n th percentile , observation of the population distribution for i ¼ 1, . . ., n. Each such pair can be plotted as a point on a two-dimensional coordinate system. If the sample percentiles are close to the corresponding population distribution percentiles, the first number in each pair will be roughly equal to the second number, and the plotted points will then fall close to a 45 line. Substantial deviations of the plotted points from a 45 line suggest that the assumed distribution might be wrong. Example 3.33 The value of a physical constant is known to an experimenter. The experimenter makes n = 10 independent measurements of this value using a measurement device and records the resulting measurement errors (error = observed value true value). These observations appear in the accompanying table. Percentage Sample observation z percentile Percentage Sample observation z percentile

5 1.91 1.645

15 1.25 1.037

25 .75 .675

35 .53 .385

45 .20 .126

55 .35 .126

65 .72 .385

75 .87 .675

85 1.40 1.037

95 1.56 1.645

Is it plausible that the random variable measurement error has a standard normal distribution? The needed standard normal (z) percentiles are also displayed in the table and were determined as follows:

3.6

Probability Plots

207

z percentile 2

45° line

1.5 1 0.5 0 −0.5 −1 −1.5 −2 −2

−1.5

−1

−0.5

0.5

1

1.5

2

Observed value

Fig. 3.31 Plots of pairs (observed value, z percentile) for the data of Example 3.33

■

the 5th percentile of the distribution under consideration, N(0,1), is given by Φ(z) = .05. From software or Appendix Table A.3, the solution is roughly z = 1.645. The other nine population (z) percentiles were found in a similar fashion. Thus the points in the probability plot are (1.91, 1.645), (1.25, 1.037), . . ., and (1.56,1.645). Figure 3.31 shows the resulting plot. Although the points deviate a bit from the 45 line, the predominant impression is that this line fits the points reasonably well. The plot suggests that the standard normal distribution is a realistic probability model for measurement error. An investigator is typically not interested in knowing whether a completely specified probability distribution, such as the normal distribution with μ ¼ 0 and σ ¼ 1 or the exponential distribution with λ ¼ .1, is a plausible model for the population distribution from which the sample was selected. Instead, the investigator will want to know whether some member of a family of probability distributions specifies a plausible model—the family of normal distributions, the family of exponential distributions, the family of Weibull distributions, and so on. The values of the parameters of a distribution are usually not specified at the outset. If the family of Weibull distributions is under consideration as a model for lifetime data, the issue is whether there are any values of the parameters α and β for which the corresponding Weibull distribution gives a good fit to the data. Fortunately, it is almost always the case that just one probability plot will suffice for assessing the plausibility of an entire family. If the plot deviates substantially from a straight line, but not necessarily the 45 line, no member of the family is plausible. To see why, let’s focus on a plot for checking normality. As mentioned earlier, such a plot can be very useful in applied work because many formal statistical procedures are appropriate (i.e., give accurate inferences) only when the population distribution is at least approximately normal. These procedures should generally not be used if a normal probability plot shows a very pronounced departure from linearity. The key to constructing an omnibus normal probability plot is the relationship between standard normal (z) percentiles and those for any other normal distribution, which was presented in Sect. 3.3: percentile for a N ðμ; σ Þ distribution

¼

μ þ σ ðcorresponding z percentileÞ

208

3 Continuous Random Variables and Probability Distributions

If each sample observation were exactly equal to the corresponding N(μ, σ) percentile, then the pairs (observation, μ + σ [z percentile]) would fall on the 45 line, y = x. But since μ + σz is itself a linear function, the pairs (observation, z percentile) would also fall on a straight line, just not the line with slope 1 and y-intercept 0. (The latter pairs would pass through the line z = x/σ μ/σ, but the equation itself isn’t important.) DEFINITION

A plot of the n pairs (ith-smallest observation, [100(i .5)/n]th z percentile) on a two-dimensional coordinate system is called a normal probability plot. If the sample observations are in fact drawn from a normal distribution then the points should fall close to a straight line (although not necessarily a 45 line). Thus a plot for which the points fall close to some straight line suggests that the assumption of a normal population distribution is plausible. Example 3.34 The accompanying sample consisting of n ¼ 20 observations on dielectric breakdown voltage of a piece of epoxy resin appeared in the article “Maximum Likelihood Estimation in the 3-Parameter Weibull Distribution” (IEEE Trans. Dielectrics Electr. Insul., 1996: 43–55). Values of (i .5)/n for which z percentiles are needed are (1 .5)/20 ¼ .025, (2 .5)/20 ¼ .075, . . ., and .975. Observation z percentile

24.46 1.96

25.61 1.44

26.25 1.15

26.42 .93

26.66 .76

27.15 .60

27.31 .45

27.54 .32

27.74 .19

27.94 .06

Observation z percentile

27.98 .06

28.04 .19

28.28 .32

28.49 .45

28.50 .60

28.87 .76

29.11 .93

29.13 1.15

29.50 1.44

30.88 1.96

Figure 3.32 shows the resulting normal probability plot. The pattern in the plot is quite straight, indicating it is plausible that the population distribution of dielectric breakdown voltage is normal. z percentile 2

1

−1

−2 24

25

26

27

28

29

30

Fig. 3.32 Normal probability plot for the dielectric breakdown voltage sample

31

Voltage

■

3.6

Probability Plots

209

There is an alternative version of a normal probability plot in which the z percentile axis is replaced by a nonlinear probability axis. The scaling on this axis is constructed so that plotted points should again fall close to a line when the sampled distribution is normal. Figure 3.33 shows such a plot from Matlab, obtained using the normplot command, for the breakdown voltage data of Example 3.34. The plot remains essentially the same, and it is just the labeling of the axis that changes.

Fig. 3.33 Normal probability plot of the breakdown voltage data from Matlab

Normal Probability Plot 0.98 0.95 0.90

Probability

0.75

0.50

0.25

0.10 0.05 0.02 25

26

27

28

29

30

31

Data

3.6.3

Departures from Normality

A nonnormal population distribution can often be placed in one of the following three categories: 1. It is symmetric and has “lighter tails” than does a normal distribution; that is, the density curve declines more rapidly out in the tails than does a normal curve. 2. It is symmetric and heavy-tailed compared to a normal distribution. 3. It is skewed; that is, the distribution is not symmetric, but rather tapers off more in one direction than the other. A uniform distribution is light-tailed, since its density function drops to zero outside a finite interval. The density function f(x) ¼ 1/[π(1 + x2)], for 1 < x < 1, is one example of a heavy-tailed 2 distribution, since 1/(1 + x2) declines much less rapidly than does ex =2 . Lognormal and Weibull distributions are among those that are skewed. When the points in a normal probability plot do not adhere to a straight line, the pattern will frequently suggest that the population distribution is in a particular one of these three categories. Figure 3.34 illustrates typical normal probability plots corresponding to three situations above. If the sample was selected from a light-tailed distribution, the largest and smallest observations are

210

3 Continuous Random Variables and Probability Distributions

b

z percentile

z percentile

a

Observation

Observation

z percentile

c

Observation

Fig. 3.34 Probability plots that suggest a non-normal distribution: (a) a plot consistent with a light-tailed distribution; (b) a plot consistent with a heavy-tailed distribution; (c) a plot consistent with a (positively) skewed distribution

usually not as extreme as would be expected from a normal random sample. Visualize a straight line drawn through the middle part of the plot; points on the far right tend to be above the line (z percentile > observed value), whereas points on the left end of the plot tend to fall below the straight line (z percentile < observed value). The result is an S-shaped pattern of the type pictured in Fig. 3.34a. For sample observations from a heavy-tailed distribution, the opposite effect will occur, and a normal probability plot will have an S shape with the opposite orientation, as in Fig. 3.34b. If the underlying distribution is positively skewed (a short left tail and a long right tail), the smallest sample observations will be larger than expected from a normal sample and so will the largest observations. In this case, points on both ends of the plot will fall below a straight line through the middle part, yielding a curved pattern, as illustrated in Fig. 3.34c. For example, a sample from a lognormal distribution will usually produce such a pattern; a plot of (ln(observation), z percentile) pairs should then resemble a straight line. Even when the population distribution is normal, the sample percentiles will not coincide exactly with the theoretical percentiles because of sampling variability. How much can the points in the probability plot deviate from a straight-line pattern before the assumption of population normality is no longer plausible? This is not an easy question to answer. Generally speaking, a small sample from a normal distribution is more likely to yield a plot with a nonlinear pattern than is a large sample.

3.6

Probability Plots

211

The book Fitting Equations to Data by Daniel Cuthbert and Fred Wood presents the results of a simulation study in which numerous samples of different sizes were selected from normal distributions. The authors concluded that there is typically greater variation in the appearance of the probability plot for sample sizes smaller than 30, and only for much larger sample sizes does a linear pattern generally predominate. When a plot is based on a small sample size, only a very substantial departure from linearity should be taken as conclusive evidence of nonnormality. A similar comment applies to probability plots for checking the plausibility of other types of distributions.

3.6.4

Beyond Normality

Consider a generic family of probability distributions involving two parameters, θ1 and θ2, and let F(x; θ1, θ2) denote the corresponding cdf. The family of normal distributions is one such family, with θ1 ¼ μ, θ2 ¼ σ, and F(x; μ, σ) ¼ Φ[(x μ)/σ]. Another example is the Weibull family, with θ1 ¼ α, θ2 ¼ β, and Fðx; α, βÞ ¼ 1 eðx=βÞ

α

Still another family of this type is the gamma family, for which the cdf is an integral involving the incomplete gamma function that cannot be expressed in any simpler form. The parameters θ1 and θ2 are said to be location and scale parameters, respectively, if F(x; θ1, θ2) is a function of (x θ1)/θ2. The parameters μ and σ of the normal family are location and scale parameters, respectively. Changing μ shifts the location of the bell-shaped density curve to the right or left, and changing σ amounts to stretching or compressing the measurement scale (the scale on the horizontal axis when the density function is graphed). Another example is given by the cdf Fðx; θ1 , θ2 Þ ¼ 1 ee

ðxθ1 Þ=θ2

1 γ and zero otherwise. When the family under consideration has only location and scale parameters, the issue of whether any member of the family is a plausible population distribution can be addressed by a single probability plot. This is exactly what we did to obtain an omnibus normal probability plot. One first obtains the percentiles of the standardized distribution, i.e. the one with θ1 ¼ 0 and θ2 ¼ 1, for percentages 100(i .5)/n (i ¼ 1, . . ., n). The n (observation, standardized percentile) pairs give the points in the plot. Somewhat surprisingly, this methodology can be applied to yield an omnibus Weibull probability plot. The key result is that if X has a Weibull distribution with shape parameter α and scale parameter β, then the transformed variable ln(X) has an extreme value distribution with location parameter θ1 ¼ ln(β) and scale parameter θ2 ¼ 1/α (see Exercise 169). Thus a plot of the

212

3 Continuous Random Variables and Probability Distributions

ðlnðobservationÞ, extreme value standardized percentileÞ pairs that shows a strong linear pattern provides support for choosing the Weibull distribution as a population model. Example 3.35 The accompanying observations are on lifetime (in hours) of power apparatus insulation when thermal and electrical stress acceleration were fixed at particular values (“On the Estimation of Life of Power Apparatus Insulation Under Combined Electrical and Thermal Stress,” IEEE Trans. Electr. Insul., 1985: 70–78). A Weibull probability plot necessitates first computing the 5th, 15th, . . ., and 95th percentiles of the standard extreme value distribution. The (100p)th percentile ηp satisfies ηp p ¼ F ηp ; 0, 1 ¼ 1 ee from which ηp ¼ ln(ln(1 p)). Observation ln(Obs.) Percentile

282 5.64 2.97

501 6.22 1.82

741 6.61 1.25

851 6.75 .84

1072 6.98 .51

1122 7.02 .23

1202 7.09 .05

1585 7.37 .33

1905 7.55 .64

2138 7.67 1.10

The pairs (5.64, 2.97), (6.22, 1.82), . . ., (7.67, 1.10) are plotted as points in Fig. 3.35. The straightness of the plot argues strongly for using the Weibull distribution as a model for insulation life, a conclusion also reached by the author of the cited article. Percentile 1 0 −1 −2 −3

ln(x) 5.5

6.0

6.5

7.0

Fig. 3.35 A Weibull probability plot of the insulation lifetime data

7.5

■

The gamma distribution is an example of a family involving a shape parameter for which there is no transformation into a distribution that depends only on location and scale parameters. Construction of a probability plot necessitates first estimating the shape parameter from sample data (some general methods for doing this are described in Chap. 5). Sometimes an investigator wishes to know whether the transformed variable Xθ has a normal distribution for some value of θ (by convention, θ ¼ 0 is identified with the logarithmic transformation, in which case X has a lognormal distribution). The book Graphical Methods for Data Analysis by John Chambers et al. discusses this type of problem as well as other refinements of probability plotting.

3.6

Probability Plots

3.6.5

213

Probability Plots in Matlab and R

Matlab, along with many statistical software packages (including R), have built-in probability plotting commands that vitiate the need for manual calculation of percentiles from the assumed population distribution. In Matlab, the normplot(x) command will produce a graph like the one seen in Fig. 3.33, assuming the vector x contains the observed data. The R command qqnorm(x) creates a similar graph, except that the axes are transposed (ordered observations on the vertical axis, theoretical quantiles on the horizontal). Both Matlab and R have a package called probplot that, with appropriate specifications of the inputs, can create probability plots for distributions besides normal (e.g., Weibull, exponential, extreme value). Refer to the help documentation in those languages for more information.

3.6.6

Exercises: Section 3.6 (101–111)

101. The accompanying normal probability plot was constructed from a sample of 30 readings on tension for mesh screens behind the surface of video display tubes. Does it appear plausible that the tension distribution is normal? z percentile 2 1 0 −1 −2 200

250

300

350

Tension

102. A sample of 15 female collegiate golfers was selected and the clubhead velocity (km/h) while swinging a driver was determined for each one, resulting in the following data (“Hip Rotational Velocities during the Full Golf Swing,” J. of Sports Science and Medicine, 2009: 296-299): 69.0 85.0 89.3

69.7 86.0 90.7

72.7 86.3 91.0

80.3 86.7 92.5

81.0 87.7 93.0

0.97 0.0 0.97

0.73 0.17 1.28

0.52 0.34 1.83

The corresponding z percentiles are 1.83 0.34 0.52

1.28 0.17 0.73

Construct a normal probability plot. Is it plausible that the population distribution is normal? 103. Construct a normal probability plot for the following sample of observations on coating thickness for low-viscosity paint (“Achieving a Target Value for a Manufacturing Process: A Case Study,” J. Qual. Tech., 1992: 22–26). Would you feel comfortable estimating population mean thickness using a method that assumed a normal population distribution?

214

3 Continuous Random Variables and Probability Distributions .83 1.48

.88 1.49

.88 1.59

1.04 1.62

1.09 1.65

1.12 1.71

1.29 1.76

1.31 1.83

104. The article “A Probabilistic Model of Fracture in Concrete and Size Effects on Fracture Toughness” (Mag. Concrete Res., 1996: 311–320) gives arguments for why fracture toughness in concrete specimens should have a Weibull distribution and presents several histograms of data that appear well fit by superimposed Weibull curves. Consider the following sample of size n ¼ 18 observations on toughness for high-strength concrete (consistent with one of the histograms); values of pi ¼ (i .5)/18 are also given. Observation pi Observation pi Observation pi

.47 .0278 .77 .3611 .86 .6944

.58 .0833 .79 .4167 .89 .7500

.65 .1389 .80 .4722 .91 .8056

.69 .1944 .81 .5278 .95 .8611

.72 .2500 .82 .5833 1.01 .9167

.74 .3056 .84 .6389 1.04 .9722

Construct a Weibull probability plot and comment. 105. The propagation of fatigue cracks in various aircraft parts has been the subject of extensive study. The accompanying data consists of propagation lives (flight hours/104) to reach a given crack size in fastener holes for use in military aircraft (“Statistical Crack Propagation in Fastener Holes Under Spectrum Loading,” J. Aircraft, 1983: 1028-1032): .736 1.011

.863 1.064

.865 1.109

.913 1.132

.915 1.140

.937 1.153

.983 1.253

1.007 1.394

Construct a normal probability plot for this data. Does it appear plausible that propagation life has a normal distribution? Explain. 106. The article “The Load-Life Relationship for M50 Bearings with Silicon Nitride Ceramic Balls” (Lubricat. Engrg., 1984: 153–159) reports the accompanying data on bearing load life (million revs.) for bearings tested at a 6.45 kN load. 47.1 126.0 289.0

68.1 146.6 289.0

68.1 229.0 367.0

90.8 240.0 385.9

103.6 240.0 392.0

106.0 278.0 505.0

115.0 278.0

(a) Construct a normal probability plot. Is normality plausible? (b) Construct a Weibull probability plot. Is the Weibull distribution family plausible? 107. The accompanying data on rainfall (acre-feet) from 26 seed clouds is taken from the article “A Bayesian Analysis of a Multiplicative Treatment Effect in Weather Modification” (Technometrics, 1975: 161-166). Construct a probability plot that will allow you to assess the plausibility of the lognormal distribution as a model for the rainfall data, and comment on what you find. 4.1 115.3 255.0 703.4

7.7 118.3 274.7 978.0

17.5 119.0 274.7 1656.0

31.4 129.6 302.8 1697.8

32.7 198.6 334.1 2745.6

40.6 200.7 430.0

92.4 242.5 489.1

3.6

Probability Plots

215

108. The accompanying observations are precipitation values during March over a 30-year period in Minneapolis–St. Paul. .77 1.74 .81 1.20 1.95

1.20 .47 1.43 3.37 2.20

3.00 3.09 1.51 2.10 .52

1.62 1.31 .32 .59 .81

2.81 1.87 1.18 1.35 4.75

2.48 .96 1.89 .90 2.05

(a) Construct and interpret a normal probability plot for this data set. (b) Calculate the square root of each value and then construct a normal probability plot based on this transformed data. Does it seem plausible that the square root of precipitation is normally distributed? (c) Repeat part (b) after transforming by cube roots. 109. Allowable mechanical properties for structural design of metallic aerospace vehicles requires an approval method for statistically analyzing empirical test data. The article “Establishing Mechanical Property Allowables for Metals” (J. of Testing and Evaluation, 1998: 293-299) used the accompanying data on tensile ultimate strength (ksi) as a basis for addressing the difficulties in developing such a method. 122.2 127.5 130.4 131.8 132.7 133.2 134.0 134.7 135.2 135.7 135.9 136.6 137.8 138.4 139.1 140.9 143.6

124.2 127.9 130.8 132.3 132.9 133.3 134.0 134.7 135.2 135.8 136.0 136.8 137.8 138.4 139.5 140.9 143.8

124.3 128.6 131.3 132.4 133.0 133.3 134.0 134.7 135.3 135.8 136.0 136.9 137.8 138.4 139.6 141.2 143.8

125.6 128.8 131.4 132.4 133.1 133.5 134.1 134.8 135.3 135.8 136.1 136.9 137.9 138.5 139.8 141.4 143.9

126.3 129.0 131.4 132.5 133.1 133.5 134.2 134.8 135.4 135.8 136.2 137.0 137.9 138.5 139.8 141.5 144.1

126.5 129.2 131.5 132.5 133.1 133.5 134.3 134.8 135.5 135.8 136.2 137.1 138.2 138.6 140.0 141.6 144.5

126.5 129.4 131.6 132.5 133.1 133.8 134.4 134.9 135.5 135.9 136.3 137.2 138.2 138.7 140.0 142.9 144.5

127.2 129.6 131.6 132.5 133.2 133.9 134.4 134.9 135.6 135.9 136.4 137.6 138.3 138.7 140.7 143.4 147.7

127.3 130.2 131.8 132.6 133.2 134.0 134.6 135.2 135.6 135.9 136.4 137.6 138.3 139.0 140.7 143.5 147.7

Use software to construct a normal probability plot of this data, and comment. 110. Let the ordered sample observations be denoted by y1, y2, . . ., yn (y1 being the smallest and yn the largest). Our suggested check for normality is to plot the (yi, Φ1[(i .5)/n]) pairs. Suppose we believe that the observations come from a distribution with mean 0, and let w1, . . ., wn be the ordered absolute values of the observed data. A half-normal plot is a probability plot of the wis. More specifically, since P(|Z| w) ¼ P(w Z w) ¼ 2Φ(w) 1, a half-normal plot is a plot of the (wi,Φ1[( pi + 1)/2]) pairs, where pi ¼ (i .5)/n. The virtue of this plot is that small or large outliers in the original sample will now appear only at the upper end of the plot rather than at both ends. Construct a half-normal plot for the following sample of measurement errors, and comment: 3.78, 1.27, 1.44, .39, 12.38, 43.40, 1.15, 3.96, 2.34, 30.84.

216

3 Continuous Random Variables and Probability Distributions

111. The following failure time observations (1000s of hours) resulted from accelerated life testing of 16 integrated circuit chips of a certain type: 82.8 242.0 229.9

11.6 26.5 558.9

359.5 244.8 366.7

502.5 304.3 203.6

307.8 379.1

179.7 212.6

Use the corresponding percentiles of the exponential distribution with λ ¼ 1 to construct a probability plot. Then explain why the plot assesses the plausibility of the sample having been generated from any exponential distribution.

3.7

Transformations of a Random Variable

Often we need to deal with a transformation Y ¼ g(X) of the random variable X. Here g(X) could be a simple change of time scale. If X is the time to complete a task in minutes, then Y ¼ 60X is the completion time expressed in seconds. How can we get the pdf of Y from the pdf of X? Consider first a simple example. Example 3.36 The interval X in minutes between calls to a 911 center is exponentially distributed with mean 2 min, so its pdf is fX(x) ¼ .5e.5x for x > 0. In order to get the pdf of Y ¼ 60X, we first obtain its cdf: FY ðyÞ ¼ PðY yÞ ¼ Pð60X yÞ ¼ PðX y=60Þ ¼ FX ðy=60Þ ð y=60 ¼ :5e:5x dx ¼ 1 ey=120 0

Differentiating this with respect to y gives fY( y) ¼ (1/120)ey/120 for y > 0. We see that the distribution of Y is exponential with mean 120 s (2 min). There is nothing special here about the mean 2 and the multiplier 60. It should be clear that if we multiply an exponential random variable with mean μ by a positive constant c we get another exponential random variable with mean cμ. ■ Sometimes it isn’t possible to evaluate the cdf in closed form. Could we still find the pdf of Y without evaluating the integral? Yes, thanks to the following theorem. TRANSFORMATION THEOREM

Let X have pdf fX(x) and let Y ¼ g(X), where g is monotonic (either strictly increasing or strictly decreasing) on the set of all possible values of X, so it has an inverse function X ¼ h(Y ). Assume that h has a derivative h0 ( y). Then 0 ð3:11Þ f Y ðyÞ ¼ f X ðhðyÞÞ h ðyÞ Proof Here is the proof assuming that g is monotonically increasing. The proof for g monotonically decreasing is similar. First find the cdf of Y:

3.7

Transformations of a Random Variable

217

FY ðyÞ ¼ PðY yÞ ¼ PðgðXÞ yÞ ¼ PðX hðyÞÞ ¼ FX ðhðyÞÞ The third equality above, wherein g(X) y is true iff X g1( y) ¼ h( y), relies on g being a monotonically increasing function. Now differentiate the cdf with respect to y, using the Chain Rule: f Y ðyÞ ¼

d d 0 0 0 FY ðyÞ ¼ FX ðhðyÞÞ ¼ FX ðhðyÞÞ h ðyÞ ¼ f X ðhðyÞÞ h ðyÞ dy dy

The absolute value on the derivative in Eq. (3.11) is needed only in the other case where g is decreasing. The set of possible values for Y is obtained by applying g to the set of possible values for X. ■ Example 3.37 Let’s apply the Transformation Theorem to the situation introduced in Example 3.36. There Y ¼ g(X) ¼ 60X and X ¼ h(Y ) ¼ Y/60. 0 1 y=120 :5x 1 f Y ðyÞ ¼ f X ðhðyÞÞ h ðyÞ ¼ :5e ¼ e y>0 60 120 ■

This matches the pdf of Y derived through the cdf in Example 3.36.

pﬃﬃﬃﬃ Example 3.38 Let X Unif[0, 1], so fX(x) ¼ 1 for 0 x 1, and define a new variable Y ¼ 2 X. pﬃﬃﬃ The function g(x) ¼ 2 x is monotone on [0, 1], with inverse x ¼ h( y) ¼ y2/4. Apply the Transformation Theorem: 2y y 0 0y2 f Y ðyÞ ¼ f X ðhðyÞÞ h ðyÞ ¼ ð1Þ ¼ 4 2 pﬃﬃﬃ The range 0 y 2 comes from the fact that y ¼ 2 x maps [0, 1] to [0, 2]. A graphical pﬃﬃﬃﬃ representation may help in understanding why the transformation Y ¼ 2 X yields fY( y) ¼ y/2 if X Unif[0, 1]. Figure 3.36a shows the uniform distribution with [0, 1] partitioned into ten subintervals. In Fig. 3.36b the endpoints of these intervals are shown after transforming according pﬃﬃﬃ to y ¼ 2 x. The heights of the rectangles are arranged so each rectangle still has area .1, and therefore the probability in each interval is preserved. Notice the close fit of the dashed line, which has the equation fY( y) ¼ y/2.

a

b

fX (x)

fY (y)

1.0

1.0

.8

.8

.6

.6

.4

.4

.2

.2

.5

1.0

1.5

2.0

x

pﬃﬃﬃﬃ Fig. 3.36 The effect on the pdf if X is uniform on [0, 1] and Y ¼ 2 X

.5

1.0

1.5

2.0

y

■

218

3 Continuous Random Variables and Probability Distributions

Example 3.39 The variation in a certain electrical current source X (in milliamps) can be modeled by the pdf ( 1:25 :25x 2 x 4 f X ðxÞ ¼ 0 otherwise If this current passes through a 220-Ω resistor, the resulting power Y (in microwatts) is given by the expression Y ¼ 220X2. The function y ¼ g(x) ¼ 220x2 is monotonically increasing on the range of X, pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ the interval [2, 4], and has inverse function x ¼ hðyÞ ¼ g1 ðyÞ ¼ y=220. (Notice that g(x) is a parabola and thus not monotone on the entire real number line, but for the purposes of the theorem g(x) only needs to be monotone on the range of the rv X.) Apply Eq. (3.11): 0 f Y ðyÞ ¼ f X ðhðyÞÞ h ðyÞ

pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ d pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ y=220 ¼ fX y=220 dy

pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 1 5 1 ¼ 1:25 :25 y=220 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ ¼ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 1760 2 220y 8 220y The set of possible Y-values is determined by substituting x ¼ 2 and x ¼ 4 into g(x) ¼ 220x2; the resulting range for Y is [880, 3520]. Therefore, the pdf of Y ¼ 220X2 is 8 5 1 < pﬃﬃﬃﬃﬃﬃﬃﬃﬃ ﬃ 880 y 3520 f Y ðyÞ ¼ 8 220y 1760 : 0 otherwise The pdfs of X and Y appear in Fig. 3.37.

a

b

0.8

0.0008

0.6

0.0006

0.4

0.0004

0.2

0.0002

fX (x)

fY( y)

x

0 2

3

y

4

Fig. 3.37 pdfs from Example 3.39: (a) pdf of X; (b) pdf of Y

880

1760

2640

3520

■

The Transformation Theorem requires a monotonic transformation, but there are important applications in which the transformation is not monotone. Nevertheless, it may be possible to use the theorem anyway with a little trickery.

3.7

Transformations of a Random Variable

219

Example 3.40 In this example, we start with a standard normal random variable Z, and we transform to Y ¼ Z2. Of course, this is not monotonic over the interval for Z, (1, 1). However, consider the transformation U ¼ |Z|. Because Z has a symmetric distribution, the pdf of U is fU(u) ¼ fZ(u) + fZ(u) ¼ 2 fZ(u). (Don’t despair if this is not intuitively clear, because we’ll verify it shortly. For the time being, assume it to be true.) Then Y ¼ Z2 ¼ |Z|2 ¼ U2, and the transformation in terms of U is monotonic because its set of possible values is [0, 1). Thus we can use the Transformation Theorem with h( y) ¼ y1/2: 0 0 f Y ðyÞ ¼ f U ½hðyÞ h ðyÞ ¼ 2f X ½hðyÞ h ðyÞ 1=2 2 1 2 1 ¼ pﬃﬃﬃﬃﬃ e:5ðy Þ y1=2 ¼ pﬃﬃﬃﬃﬃﬃﬃ ey=2 y > 0 2 2πy 2π

This distribution is known as the chi-squared distribution with one degree of freedom. Chi-squared distributions arise frequently in statistical inference procedures, such as those in Chap. 5. You were asked to believe intuitively that fU(u) ¼ 2fZ(u). Here is a little derivation that works as long as the distribution of Z is symmetric about 0. If u > 0, FU ðuÞ ¼ PðU uÞ ¼ PðjZ j uÞ ¼ Pðu Z uÞ ¼ 2Pð0 Z uÞ ¼ 2½FZ ðuÞFZ ð0Þ : Differentiating this with respect to u gives fU(u) ¼ 2 fZ(u).

■

Example 3.41 Sometimes the Transformation Theorem cannot be used at all, and you need to use the cdf. Let fX(x) ¼ (x + 1)/8, 1 x 3, and Y ¼ X2. The transformation is not monotonic on [1, 3]; and, since fX(x) is not an even function, we can’t employ the symmetry trick of the previous example. Possible values of Y are {y: 0 y 9}. Considering first 0 y 1, ð pyﬃﬃ pﬃﬃﬃ 2 pﬃﬃﬃ y uþ1 pﬃﬃﬃ du ¼ FY ðyÞ ¼ PðY yÞ ¼ P X y ¼ P y X y ¼ pﬃﬃ 8 4 y Then, on the other subinterval, 1 < y 9, pﬃﬃﬃ pﬃﬃﬃ pﬃﬃﬃ FY ðyÞ ¼ PðY yÞ ¼ P X2 y ¼ P y X y ¼ P 1 X y ð pyﬃﬃ uþ1 pﬃﬃﬃ ¼ du ¼ 1 þ y þ 2 y =16 8 1 Differentiating, we get 8 1 > > 0 > >

1 > 16y > > : 0 otherwise Figure 3.38 shows the pdfs of both X and Y.

220

3 Continuous Random Variables and Probability Distributions

a

−1

b

fX (x)

fY ( y)

1/2

0.2

3/8

0.15

1/4

0.1

1/8

0.05 x 0

1

2

Fig. 3.38 pdfs from Example 3.41: (a) pdf of X; (b) pdf of Y

3.7.1

y

3

1

5

9

■

Exercises: Section 3.7 (112–128)

112. Relative to the winning time, the time X of another runner in a ten kilometer race has pdf fX(x) ¼ 2/x3, x > 1. The reciprocal Y ¼ 1/X represents the ratio of the time for the winner divided by the time of the other runner. Find the pdf of Y. Explain why Y also represents the speed of the other runner relative to the winner. 113. Let X be the fuel efficiency in miles per gallon of an extremely inefficient vehicle (a military tank, perhaps?), and suppose X has the pdf fX(x) ¼ 2x, 0 < x < 1. Determine the pdf of Y ¼ 1/X, which is fuel efficiency in gallons per mile. [Note: The distribution of Y is a special case of the Pareto distribution (see Exercise 10).] pﬃﬃﬃﬃ 114. Let X have the pdf fX(x) ¼ 2/x3, x > 1. Find the pdf of Y ¼ X. 115. Let X have an exponential distribution with mean 2, so f X ðxÞ ¼ 12 ex=2 , x > 0. Find the pdf of pﬃﬃﬃﬃ Y ¼ X. [Note: Suppose you choose a point in two dimensions randomly, with the horizontal and vertical coordinates chosen independently from the standard normal distribution. Then X has the distribution of the squared distance from the origin and Y has the distribution of the distance from the origin. Y has a Rayleigh distribution (see Exercise 4).] 116. If X is distributed as N(μ, σ), find the pdf of Y ¼ eX. Verify that the distribution of Y matches the lognormal pdf provided in Sect. 3.5. 117. If the side of a square X is random with the pdf fX(x) ¼ x/8, 0 < x < 4, and Y is the area of the square, find the pdf of Y. 118. Let X Unif[0, 1]. Find the pdf of Y ¼ ln(X). 119. Let X Unif[0, 1]. Find the pdf of Y ¼ tan[π(X .5)]. [Note: The random variable Y has the Cauchy distribution, named after the famous mathematician.] 120. If X Unif[0, 1], find a linear transformation Y ¼ cX + d such that Y is uniformly distributed on [A, B], where A and B are any two numbers such that A < B. Is there any other solution? Explain. 121. If X has the pdf fX(x) ¼ x/8, 0 < x < 4, find a transformation Y ¼ g(X) such that Y Unif[0, 1]. [Hint: The target is to achieve fY( y) ¼ 1 for 0 y 1. The Transformation Theorem will allow you to find h( y), from which g(x) can be obtained.] 122. If a measurement error X is uniformly distributed on [1, 1], find the pdf of Y ¼ |X|, which is the magnitude of the measurement error. 123. If X Unif[1, 1], find the pdf of Y ¼ X2.

3.8

Simulation of Continuous Random Variables

221

124. Ann is expected at 7:00 pm after an all-day drive. She may be as much as 1 h early or as much as 3 h late. Assuming that her arrival time X is uniformly distributed over that interval, find the pdf of |X 7|, the unsigned difference between her actual and predicted arrival times. 125. If X Unif[1, 3], find the pdf of Y ¼ X2. 126. If a measurement error X is distributed as N(0, 1), find the pdf of |X|, which is the magnitude of the measurement error. 127. A circular target has radius 1 foot. Assume that you hit the target (we shall ignore misses) and that the probability of hitting any region of the target is proportional to the region’s area. If you hit the target at a distance Y from the center, then let X ¼ πY2 be the corresponding circular area. Show that (a) X is uniformly distributed on [0, π]. [Hint: Show that FX(x) ¼ P(X x) ¼ x/π.] (b) Y has pdf fY( y) ¼ 2y, 0 < y < 1. 128. In Exercise 127 suppose instead that Y is uniformly distributed on [0, 1]. Find the pdf of X ¼ πY2. Geometrically speaking, why should X have a pdf that is unbounded near 0?

3.8

Simulation of Continuous Random Variables

In Sects. 1.6 and 2.8, we discussed the need for simulation of random events and discrete random variables in situations where an “analytic” solution is very difficult or simply not possible. This section presents methods for simulating continuous random variables, including some of the built-in simulation tools of Matlab and R.

3.8.1

The Inverse CDF Method

Section 2.8 introduced the inverse cdf method for simulating discrete random variables. The basic idea was this: generate a Unif[0, 1) random number and align it with the cdf of the random variable X we want to simulate. Then, determine which X value corresponds to that cdf value. We now extend this methodology to the simulation of values from a continuous distribution; the heart of the algorithm relies on the following theorem, often called the probability integral transform. THEOREM

Consider any continuous distribution with pdf f and cdf F. Let U Unif[0, 1), and define a random variable X by X ¼ F1 ðUÞ

ð3:12Þ

Then the pdf of X is f. Before proving this theorem, let’s consider its practical usage: Suppose we want to simulate a continuous rv whose pdf is f(x), i.e., obtain successive values of X having pdf f(x). If we can compute the corresponding cdf F(x) and apply its inverse F1 to standard uniform variates u1, . . ., un, the theorem states that the resulting values x1 ¼ F1(u1), . . ., xn ¼ F1(un) will follow the desired distribution f. (We’ll discuss the practical difficulties of implementing this method a little later.) A graphical description of the algorithm appears in Fig. 3.39.

222

3 Continuous Random Variables and Probability Distributions F(x)

Fig. 3.39 The inverse cdf method, illustrated

1 u1 u2

0 F −1(u2)

F −1(u1)

x

Proof Apply the Transformation Theorem (Sect. 3.7) with fU(u) ¼ 1 for 0 u < 1, X ¼ g(U ) ¼ F1(U ), and thus U ¼ h(X) ¼ g1(X) ¼ F(X). The pdf of the transformed variable X is 0 0 f X ðxÞ ¼ f U ðhðxÞÞ h ðxÞ ¼ f U ðFðxÞÞ F ðxÞ ¼ 1 jf ðxÞj ¼ f ðxÞ In the last step, the absolute values may be removed because a pdf is always nonnegative.

■

The following box explains the implementation of the inverse cdf method justified by the preceding theorem. INVERSE CDF METHOD

It is desired to simulate n values from a distribution with pdf f(x). Let F(x) be the corresponding cdf. Repeat n times: 1. Use a random-number generator (RNG) to produce a value, u, from [0, 1). 2. Assign x ¼ F1(u). The resulting values x1, . . ., xn form a simulation of a random variable with the original pdf, f(x). Example 3.42 Consider the electrical current distribution model of Example 3.11, where the pdf of X is given by f(x) ¼ 1.25 .25x for 2 x 4. Suppose a simulation of X is required as part of some larger system analysis. To implement the above method, the inverse of the cdf of X is required. First, compute the cdf: ðx FðxÞ ¼ PðX xÞ ¼ f ðyÞdy 2 ðx ¼ ð1:25 :25yÞdy ¼ 0:125x2 þ 1:25x 2, 2 x 4 2

To find the probability integral transform Eq. (3.12), set u ¼ F(x) and solve for x: pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ u ¼ FðxÞ ¼ 0:125x2 þ 1:25x 2 ) x ¼ F1 ðuÞ ¼ 5 9 8u The equation above has been solved using the quadratic formula; care must be taken to select the pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ solution whose values lie in the interval [2, 4] (the other solution, x ¼ 5 þ 9 8u, does not have that feature). Beginning with the usual Unif[0, 1) RNG, the algorithm for simulating X is the pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ following: given a value u from the RNG, assign x ¼ 5 9 8u. Repeating this algorithm n times gives n simulated values of X. Programs in Matlab and R that implement this algorithm appear in Fig. 3.40; both return a vector, x, containing n ¼ 10,000 simulated values of the specified distribution.

3.8

Simulation of Continuous Random Variables

a

223

x=zeros(10000,1); for i=1:10000 u=rand; x(i)=5-sqrt(9-8*u); end

b

x > > > > 7 : 1 x 3 (a) Obtain the pdf f(x) and sketch its graph. (b) Compute P(.5 X 2). (c) Compute E(X). 145. The breakdown voltage of a randomly chosen diode of a certain type is known to be normally distributed with mean value 40 V and standard deviation 1.5 V.

232

3 Continuous Random Variables and Probability Distributions

(a) What is the probability that the voltage of a single diode is between 39 and 42? (b) What value is such that only 15% of all diodes have voltages exceeding that value? (c) If four diodes are independently selected, what is the probability that at least one has a voltage exceeding 42? 146. The article “Computer Assisted Net Weight Control” (Qual. Prog., 1983: 22–25) suggests a normal distribution with mean 137.2 oz and standard deviation 1.6 oz, for the actual contents of jars of a certain type. The stated contents was 135 oz. (a) What is the probability that a single jar contains more than the stated contents? (b) Among ten randomly selected jars, what is the probability that at least eight contain more than the stated contents? (c) Assuming that the mean remains at 137.2, to what value would the standard deviation have to be changed so that 95% of all jars contain more than the stated contents? 147. When circuit boards used in the manufacture of compact disk players are tested, the long-run percentage of defectives is 5%. Suppose that a batch of 250 boards has been received and that the condition of any particular board is independent of that of any other board. (a) What is the approximate probability that at least 10% of the boards in the batch are defective? (b) What is the approximate probability that there are exactly 10 defectives in the batch? 148. The article “Reliability of Domestic-Waste Biofilm Reactors” (J. Envir. Engr., 1995: 785–790) suggests that substrate concentration (mg/cm3) of influent to a reactor is normally distributed with μ ¼ .30 and σ ¼ .06. (a) What is the probability that the concentration exceeds .25? (b) What is the probability that the concentration is at most .10? (c) How would you characterize the largest 5% of all concentration values? 149. Let X ¼ the hourly median power (in decibels) of received radio signals transmitted between two cities. The authors of the article “Families of Distributions for Hourly Median Power and Instantaneous Power of Received Radio Signals” (J. Res. Nat. Bureau Standards, vol. 67D, 1963: 753–762) argue that the lognormal distribution provides a reasonable probability model for X. If the parameter values are μ ¼ 3.5 and σ ¼ 1.2, calculate the following: (a) The mean value and standard deviation of received power. (b) The probability that received power is between 50 and 250 dB. (c) The probability that X is less than its mean value. Why is this probability not .5? 150. Let X be a nonnegative continuous random variable with cdf F(x) and mean E(X). Ð1 (a) The definition of expected value is E(X) ¼ 0 xf(x)dx. Replace the first x inside the integral Ðx with 0 1 dy to create a double integral expression for E(X). [The “order of integration” should be dy dx.] (b) Rearrange the order of integration, keeping track of the revised limits of integration, to show that ð1 ð1 EðXÞ ¼ f ðxÞdxdy 0

y

Ð1 (c) Evaluate the dx integral in (b) to show that E(X) ¼ 0 [1 F( y)]dy. (This provides an alternate derivation of the formula established in Exercise 38.) (d) Use the result of (c) to verify that the expected value of an exponentially distributed rv with parameter λ is 1/λ.

3.9

Supplementary Exercises (140–172)

233

151. The reaction time (in seconds) to a stimulus is a continuous random variable with pdf 8 < 3 1x3 f ðxÞ ¼ 2x2 : 0 otherwise (a) (b) (c) (d) (e)

Obtain the cdf. What is the probability that reaction time is at most 2.5 s? Between 1.5 and 2.5 s? Compute the expected reaction time. Compute the standard deviation of reaction time. If an individual takes more than 1.5 s to react, a light comes on and stays on either until one further second has elapsed or until the person reacts (whichever happens first). Determine the expected amount of time that the light remains lit. [Hint: Let h(X) ¼ the time that the light is on as a function of reaction time X.] 152. The article “Characterization of Room Temperature Damping in Aluminum-Indium Alloys” (Metallurgical Trans., 1993: 1611-1619) suggests that aluminum matrix grain size (μm) for an alloy consisting of 2% indium could be modeled with a normal distribution with mean 96 and standard deviation 14. (a) What is the probability that grain size exceeds 100 μm? (b) What is the probability that grain size is between 50 and 80 μm? (c) What interval (a, b) includes the central 90% of all grain sizes (so that 5% are below a and 5% are above b)? 153. The article “Determination of the MTF of Positive Photoresists Using the Monte Carlo Method” (Photographic Sci. Engrg., 1983: 254–260) proposes the exponential distribution with parameter λ ¼ .93 as a model for the distribution of a photon’s free path length (mm) under certain circumstances. Suppose this is the correct model. (a) What is the expected path length, and what is the standard deviation of path length? (b) What is the probability that path length exceeds 3.0? What is the probability that path length is between 1.0 and 3.0? (c) What value is exceeded by only 10% of all path lengths? 154. The article “The Prediction of Corrosion by Statistical Analysis of Corrosion Profiles” (Corrosion Sci., 1985: 305–315) suggests the following cdf for the depth X of the deepest pit in an experiment involving the exposure of carbon manganese steel to acidified seawater: Fðx; θ1 , θ2 Þ ¼ ee

ðxθ1 Þ=θ2

1 t. We can express this in terms of a loss function, a function that shows zero loss if t ¼ a but increases as the gap between t and a increases. The proposed loss function is L(a, t) ¼ t a if t > a and ¼ k(a t) if t a (k > 1 is suggested to incorporate the idea that over-assessment is more serious than under-assessment). (a) Show that a * ¼ μ + σΦ 1(1/(k + 1)) is the value of a that minimizes the expected loss, where Φ 1 is the inverse function of the standard normal cdf. (b) If k ¼ 2 (suggested in the article), μ ¼ $100,000, and σ ¼ $10,000, what is the optimal value of a, and what is the resulting probability of over-assessment? 156. A mode of a continuous distribution is a value x* that maximizes f(x). (a) What is the mode of a normal distribution with parameters μ and σ? (b) Does the uniform distribution with parameters A and B have a single mode? Why or why not? (c) What is the mode of an exponential distribution with parameter λ? (Draw a picture.) (d) If X has a gamma distribution with parameters α and β, and α > 1, determine the mode. [Hint: ln[f(x)] will be maximized if and only if f(x) is, and it may be simpler to take the derivative of ln[f(x)].] 157. The article “Error Distribution in Navigation” (J. Institut. Navigation, 1971: 429–442) suggests that the frequency distribution of positive errors (magnitudes of errors) is well approximated by an exponential distribution. Let X ¼ the lateral position error (nautical miles), which can be either negative or positive. Suppose the pdf of X is f ðxÞ ¼ :1e:2jxj

10

(a) This pdf is a member of what family introduced in this chapter? (b) If σ ¼ 20 mm (close to the value suggested in the paper), what is the probability that a dart will land within 25 mm (roughly 1 in.) of the target? 164. The article “Three Sisters Give Birth on the Same Day” (Chance, Spring 2001: 23–25) used the fact that three Utah sisters had all given birth on March 11, 1998, as a basis for posing some interesting questions regarding birth coincidences. (a) Disregarding leap year and assuming that the other 365 days are equally likely, what is the probability that three randomly selected births all occur on March 11? Be sure to indicate what, if any, extra assumptions you are making. (b) With the assumptions used in part (a), what is the probability that three randomly selected births all occur on the same day? (c) The author suggested that, based on extensive data, the length of gestation (time between conception and birth) could be modeled as having a normal distribution with mean value 280 days and standard deviation 19.88 days. The due dates for the three Utah sisters were March 15, April 1, and April 4, respectively. Assuming that all three due dates are at the mean of the distribution, what is the probability that all births occurred on March 11? [Hint: The deviation of birth date from due date is normally distributed with mean 0.] (d) Explain how you would use the information in part (c) to calculate the probability of a common birth date. 165. Exercise 49 introduced two machines that produce wine corks, the first one having a normal diameter distribution with mean value 3 cm and standard deviation .1 cm and the second having a normal diameter distribution with mean value 3.04 cm and standard deviation .02 cm. Acceptable corks have diameters between 2.9 and 3.1 cm. If 60% of all corks used come from the first machine and a randomly selected cork is found to be acceptable, what is the probability that it was produced by the first machine? 166. A function g(x) is convex if the chord connecting any two points on the function’s graph lies above the graph. When g(x) is differentiable, an equivalent condition is that for every x, the tangent line at x lies entirely on or below the graph. (See the accompanying figure.) How does g(μ) ¼ g[E(X)] compare to the expected value E[g(X)]? [Hint: The equation of the tangent line at x ¼ μ is y ¼ g(μ) + g0 (μ) (x μ). Use the condition of convexity, substitute X for x, and take expected values. Note: Unless g(x) is linear, the resulting inequality (usually called Jensen’s inequality) is strict (< rather than ); it is valid for both continuous and discrete rvs.] Chord

Tangent line x

167. Let X have a Weibull distribution with parameters α ¼ 2 and β. Show that Y ¼ 2X2/β2 has an exponential distribution with λ ¼ 1/2.

3.9

Supplementary Exercises (140–172)

237

168. Let X have the pdf f(x) ¼ 1/[π(1 + x2)] for 1 < x < 1 (a central Cauchy distribution), and show that Y ¼ 1/X has the same distribution. [Hint: Consider P(|Y| y), the cdf of |Y|, then obtain its pdf and show it is identical to the pdf of |X|.] 169. Let X have a Weibull distribution with shape parameter α and scale parameter β. Show that the transformed variable Y ¼ ln(X) has an extreme value distribution as defined in Section 3.6, with θ1 ¼ ln(β) and θ2 ¼ 1/α. 170. A store will order q gallons of a liquid product to meet demand during a particular time period. This product can be dispensed to customers in any amount desired, so demand during the period is a continuous random variable X with cdf F(x). There is a fixed cost c0 for ordering the product plus a cost of c1 per gallon purchased. The per-gallon sale price of the product is d. Liquid left unsold at the end of the time period has a salvage value of e per gallon. Finally, if demand exceeds q, there will be a shortage cost for loss of goodwill and future business; this cost is f per gallon of unfulfilled demand. Show that the value of q that maximizes expected profit, denoted by q*, satisfies Pðsatisfying demandÞ ¼ Fðq*Þ ¼

d c1 þ f deþf

Then determine the value of F(q*) if d ¼ $35, c0 ¼ $25, c1 ¼ $15, e ¼ $5, and f ¼ $25. [Hint: Let x denote a particular value of X. Develop an expression for profit when x q and another expression for profit when x > q. Now write an integral expression for expected profit (as a function of q) and differentiate.] 171. An individual’s credit score is a number calculated based on that person’s credit history that helps a lender determine how much s/he should be loaned or what credit limit should be established for a credit card. An article in the Los Angeles Times gave data which suggested that a beta distribution with parameters A ¼ 150, B ¼ 850, α ¼ 8, β ¼ 2 would provide a reasonable approximation to the distribution of American credit scores. [Note: credit scores are integer-valued.] (a) Let X represent a randomly selected American credit score. What are the mean and standard deviation of this random variable? What is the probability that X is within 1 standard deviation of its mean? (b) What is the approximate probability that a randomly selected score will exceed 750 (which lenders consider a very good score)? 172. Let V denote rainfall volume and W denote runoff volume (both in mm). According to the article “Runoff Quality Analysis of Urban Catchments with Analytical Probability Models” (J. of Water Resource Planning and Management, 2006: 4–14), the runoff volume will be 0 if V vd and will be k(V vd) if V > vd. Here vd is the volume of depression storage (a constant), and k (also a constant) is the runoff coefficient. The cited article proposes an exponential distribution with parameter λ for V. (a) Obtain an expression for the cdf of W. [Note: W is neither purely continuous nor purely discrete; instead it has a “mixed” distribution with a discrete component at 0 and is continuous for values w > 0.] (b) What is the pdf of W for w > 0? Use this to obtain an expression for the expected value of runoff volume.

4

Joint Probability Distributions and Their Applications

In Chaps. 2 and 3, we studied probability models for a single random variable. Many problems in probability and statistics lead to models involving several random variables simultaneously. For example, we might consider randomly selecting a college student and defining X ¼ the student’s high school GPA and Y ¼ the student’s college GPA. In this chapter, we first discuss probability models for the joint behavior of several random variables, putting special emphasis on the case in which the variables are independent of each other. We then study expected values of functions of several random variables, including covariance and correlation as measures of the degree of association between two variables. Many problem scenarios involve linear combinations of random variables. For example, suppose an investor owns 100 shares of one stock and 200 shares of another. If X1 and X2 are the prices per share of the two stocks, then the value of investor’s portfolio is 100X1 + 200X2. Sections 4.3 and 4.5 enumerate the properties of linear combinations of random variables, including the celebrated Central Limit Theorem (CLT), which characterizes the behavior of a sum X1 + X2 + . . . + Xn as n increases. The fifth section considers conditional distributions, the distributions of some random variables given the values of other random variables, e.g., the distribution of fuel efficiency conditional on the weight of a vehicle. In Sect. 3.7, we developed methods for obtaining the distribution of some function g(X) of a random variable. Section 4.6 extends these ideas to transformations of two or more rvs. For example, if X and Y are the scores on a two-part exam, we might be interested in the total score X + Y and also X/(X + Y ), the proportion of total points achieved on the first part. The chapter ends with sections on the bivariate normal distribution (Sect. 4.7), the reliability of devices and systems (Sect. 4.8), “order statistics” such as the median and range obtained by ordering sample observations from smallest to largest (Sect. 4.9), and simulation techniques for jointly distributed random variables (Sect. 4.10).

4.1

Jointly Distributed Random Variables

There are many experimental situations in which more than one random variable (rv) will be of interest to an investigator. For example X might be the number of books checked out from a public library on a particular day and Y the number of videos checked out on the same day. Or X and Y might # Springer International Publishing AG 2017 M.A. Carlton, J.L. Devore, Probability with Applications in Engineering, Science, and Technology, Springer Texts in Statistics, DOI 10.1007/978-3-319-52401-6_4

239

240

4

Joint Probability Distributions and Their Applications

be the height and weight, respectively, of a randomly selected adult. In general, the two rvs of interest could both be discrete, both be continuous, or one could be discrete and the other continuous. In practice, the two “pure” cases—both of the same type—predominate. We shall first consider joint probability distributions for two discrete rvs, then for two continuous variables, and finally for more than two variables.

4.1.1

The Joint Probability Mass Function for Two Discrete Random Variables

The probability mass function (pmf) of a single discrete rv X specifies how much probability mass is placed on each possible X value. The joint pmf of two discrete rvs X and Y describes how much probability mass is placed on each possible pair of values (x, y). DEFINITION

Let X and Y be two discrete rvs defined on the sample space S of an experiment. The joint probability mass function p(x, y) is defined for each pair of numbers (x, y) by pðx; yÞ ¼ PðX ¼ x and Y ¼ yÞ A function p(x, y) can be used as a joint pmf provided that p(x, y) 0 for all x and y and ∑x ∑y p(x, y) ¼ 1. Let A be any set consisting of pairs of (x, y) values, such as {(x, y): x + y < 10}. Then the probability that the random pair (X, Y ) lies in A is obtained by summing the joint pmf over pairs in A: XX PððX; Y Þ 2 AÞ ¼ pðx; yÞ ðx;yÞ2 A

Example 4.1 A large insurance agency services a number of customers who have purchased both a homeowner’s policy and an automobile policy from the agency. For each type of policy, a deductible amount must be specified. For an automobile policy, the choices are $100 and $250, whereas for a homeowner’s policy, the choices are 0, $100, and $200. Suppose an individual with both types of policy is selected at random from the agency’s files. Let X ¼ the deductible amount on the auto policy and Y ¼ the deductible amount on the homeowner’s policy. Possible (X, Y) pairs are then (100, 0), (100, 100), (100, 200), (250, 0), (250, 100), and (250, 200); the joint pmf specifies the probability associated with each one of these pairs, with any other pair having probability zero. Suppose the joint pmf is as given in the accompanying joint probability table:

x

p(x, y)

y 100

100 250

.20 .05

.10 .15

200 .20 .30

Then p(100, 100) ¼ P(X ¼ 100 and Y ¼ 100) ¼ P($100 deductible on both policies) ¼ .10. The probability P(Y 100) is computed by summing probabilities of all (x, y) pairs for which y 100: PðY 100Þ ¼ pð100; 100Þ þ pð250; 100Þ þ pð100; 200Þ þ pð250; 200Þ ¼ :75 ■

4.1

Jointly Distributed Random Variables

241

Looking at the joint probability table in Example 4.1, we see that P(X ¼ 100), i.e. pX(100), equals .20 þ .10 þ .20 ¼ .50, and similarly pX(250) ¼ .05 þ .15 þ .30 ¼ .50 as well. That is, the pmf of X at a specified number is calculated by fixing an x value (say, 100 or 250) and summing across all possible y values; e.g., pX(250) ¼ p(250,0) þ p(250,100) þ p(250,200). The pmf of Y can be obtained by analogous summation (adding “down” the table instead of “across”). In fact, by adding across rows and down columns, we could imagine writing these probabilities in the margins of the joint probability table; for this reason, pX and pY are called the marginal distributions of X and Y. DEFINITION

The marginal probability mass functions of X and of Y, denoted by pX(x) and pY( y), respectively, are given by X X pX ð x Þ ¼ pðx; yÞ pY ðyÞ ¼ pðx; yÞ y

x

Thus to obtain the marginal pmf of X evaluated at, say, x ¼ 100, the probabilities p(100, y) are added over all possible y values. Doing this for each possible X value gives the marginal pmf of X alone (i.e., without reference to Y ). From the marginal pmfs, probabilities of events involving only X or only Y can be computed. Example 4.2 (Example 4.1 continued) The possible X values are x ¼ 100 and x ¼ 250, so computing row totals in the joint probability table yields pX ð100Þ ¼ pð100; 0Þ þ pð100; 100Þ þ pð100; 200Þ ¼ :50 and pX ð250Þ ¼ pð250; 0Þ þ pð250; 100Þ þ pð250; 200Þ ¼ :50 The marginal pmf of X is then pX ðxÞ ¼

:5 0

x ¼ 100, 250 otherwise

Similarly, the marginal pmf of Y is obtained from column totals as 8 y ¼ 0, 100 < :25 pY ðyÞ ¼ :50 y ¼ 200 : 0 otherwise so P(Y 100) ¼ pY(100) + pY(200) ¼ .75 as before.

4.1.2

■

The Joint Probability Density Function for Two Continuous Random Variables

The probability that the observed value of a continuous rv X lies in a one-dimensional set A (such as an interval) is obtained by integrating the pdf f(x) over the set A. Similarly, the probability that the pair (X, Y ) of continuous rvs falls in a two-dimensional set A (such as a rectangle) is obtained by integrating a function called the joint density function.

242

4

Joint Probability Distributions and Their Applications

DEFINITION

Let X and Y be continuous rvs. Then f(x, y) is the joint probability density function for X and Y if for any two-dimensional set A, ðð PððX; Y Þ 2 AÞ ¼ f ðx; yÞdxdy A

In particular, if A is the two-dimensional rectangle {(x, y): a x b, c y d}, then ðb ðd PððX; Y Þ 2 AÞ ¼ Pða X b, c Y dÞ ¼ f ðx; yÞdydx a

c

Ð1 Ð1 For f(x, y) to be a joint pdf, it must satisfy f(x, y) 0 and 1 1 f(x, y)dxdy ¼ 1. We can think of f(x, y) as specifying a surface at height f(x, y) above the point (x, y) in a three-dimensional coordinate system. Then P((X, Y ) 2 A) is the volume underneath this surface and above the region A, analogous to the area under a curve in the one-dimensional case. This is illustrated in Fig. 4.1.

Fig. 4.1 P((X,Y ) 2 A) ¼ volume under density surface above A

f(x, y)

y Surface f(x, y)

A = Shaded rectangle x

Example 4.3 A bank operates both a drive-up facility and a walk-up window. On a randomly selected day, let X ¼ the proportion of time that the drive-up facility is in use (at least one customer is being served or waiting to be served) and Y ¼ the proportion of time that the walk-up window is in use. Then the set of possible values for (X, Y ) is the rectangle {(x, y): 0 x 1, 0 y 1}. Suppose the joint pdf of (X, Y ) is given by 8 < 6 x þ y2 0 x 1, 0 y 1 f ðx; yÞ ¼ 5 : 0 otherwise To verify that this is a legitimate pdf, note that f(x, y) 0 and ð1 ð1 ð1 ð1 ð1 ð1 ð1 ð1 6 6 6 2 2 x þ y dxdy ¼ xdxdyþ y dxdy f ðx; yÞdxdy ¼ 5 5 1 1 0 0 0 0 0 05 ð1 ð1 6 6 2 6 6 xdx þ y dy ¼ þ ¼1 ¼ 5 5 10 15 0 0 The probability that neither facility is busy more than one-quarter of the time is

4.1

Jointly Distributed Random Variables

243

ð 1=4 ð 1=4 ð ð ð ð 1 1 6 6 1=4 1=4 6 1=4 1=4 2 x þ y2 dxdy ¼ P 0 X ,0 Y xdxdy þ y dxdy ¼ 4 4 5 0 0 5 0 0 0 0 5 x¼1=4 y¼1=4 6 x2 6 y3 7 ¼ :0109 ¼ þ ¼ 20 2 20 3 640 x¼0

y¼0

■ The marginal pmf of one discrete variable results from summing the joint pmf over all values of the other variable. Similarly, the marginal pdf of one continuous variable is obtained by integrating the joint pdf over all values of the other variable. DEFINITION

The marginal probability density functions of X and Y, denoted by fX(x) and fY( y), respectively, are given by ð1 f X ðxÞ ¼ f ðx; yÞdy for 1 < x < 1 ð1 1 f Y ðyÞ ¼ f ðx; yÞdx for 1 < y < 1 1

Example 4.4 (Example 4.3 continued) The marginal pdf of X, which gives the probability distribution of busy time for the drive-up facility without reference to the walk-up window, is ð1 ð1 6 6 2 f X ðxÞ ¼ x þ y2 dy ¼ x þ f ðx; yÞdy ¼ 5 5 5 1 0 for 0 x 1 and 0 otherwise. Similarly, the marginal pdf of Y is 8 0, x2 > 0 ¼ 0 otherwise Let λ1 ¼ 1/1000 and λ2 ¼ 1/1200, so that the expected lifetimes are 1000 h and 1200 h, respectively. The probability that both component lifetimes are at least 1500 h is PðX1 1500, X2 1500Þ ¼ P X1 1500 P X2 1500 ð1 ð1 ¼ λ1 eλ1 x1 dx1 λ2 eλ2 x2 dx2 1500 1500 ¼ eλ1 ð1500Þ eλ2 ð1500Þ ¼ ð:2231Þ :2865 ¼ :0639 The probability that the sum of their lifetimes, X1 + X2, is at most 3000 h requires a double integral of the joint pdf: ð 3000 ð 3000x2 PðX1 þ X2 3000Þ ¼ PðX1 3000 X2 Þ ¼ f ðx1 ; x2 Þdx1 dx2 0 0 ð 3000 ð 3000x2 ð 3000

3000x2 ¼ λ1 λ2 eλ1 x1 λ2 x2 dx1 dx2 ¼ λ2 eλ2 x2 eλ1 x1 0 dx2 0 0 0 ð 3000 ð 3000

λ x

¼ λ2 eλ2 x2 1 eλ1 ð3000x2 Þ dx2 ¼ λ2 e 2 2 e3000λ1 eðλ1 λ2 Þx2 dx2 ¼ :7564 ■ 0

4.1.4

More Than Two Random Variables

To model the joint behavior of more than two random variables, we extend the concept of a joint distribution of two variables. DEFINITION

If X1, X2, . . ., Xn are all discrete random variables, the joint pmf of the variables is the function pðx1 ; x2 ; . . . ; xn Þ ¼ PðX1 ¼ x1 \ X2 ¼ x2 \ . . . \ Xn ¼ xn Þ If the variables are continuous, the joint pdf of X1, X2, . . ., Xn is the function f(x1, x2, . . ., xn) such that for any n intervals [a1, b1], . . ., [an, bn], ð b1 ð bn Pða1 X1 b1 , . . . , an Xn bn Þ ¼ ... f ðx1 ; . . . ; xn Þdxn . . . dx1 a1

an

4.1

Jointly Distributed Random Variables

247

Example 4.9 A binomial experiment consists of n dichotomous (success-failure), homogenous (constant success probability) independent trials. Now consider a trinomial experiment in which each of the n trials can result in one of three possible outcomes. For example, each successive customer at a store might pay with cash, a credit card, or a debit card. The trials are assumed independent. Let p1 ¼ P(trial results in a type 1 outcome) and define p2 and p3 analogously for type 2 and type 3 outcomes. The random variables of interest here are Xi ¼ the number of trials that result in a type i outcome for i ¼ 1, 2, 3. In n ¼ 10 trials, the probability that the first five are type 1 outcomes, the next three are type 2, and the last two are type 3—i.e., the probability of the experimental outcome 1111122233—is p15 p23 p32. This is also the probability of the outcome 1122311123, and in fact the probability of any outcome that has exactly five 1s, three 2s, and two 3s. Now to determine the probability P(X1 ¼ 5, X2 ¼ 3, and X3 ¼ 2), we have to count the number of outcomes that have exactly five 10 1s, three 2s, and two 3s. First, there are ways to choose five of the trials to be the type 5 1 outcomes. Now from the remaining five trials, we choose three to be the type 2 outcomes, which can 5 be done in ways. This determines the remaining two trials which consist of type 3 outcomes. So 3 the total number of ways of choosing five 1s, three 2s, and two 3s is 10! 5! 10! 10 5 ¼ ¼ 2520 ¼ 5 3 5!5! 3!2! 5!3!2! Thus we see that P(X1 ¼ 5, X2 ¼ 3, X3 ¼ 2) ¼ 2520p15 p23 p23. Generalizing this to n trials gives pð x 1 ; x 2 ; x 3 Þ ¼ Pð X 1 ¼ x 1 , x 2 , X 2 ¼ x 2 , X 3 ¼ x 3 Þ ¼

n! p x 1 p x 2 p x3 x1 !x2 !x3 ! 1 2 3

for x1 ¼ 0, 1, 2, . . .; x2 ¼ 0, 1, 2, . . .; x3 ¼ 0, 1, 2, . . . such that x1 + x2 + x3 ¼ n. Notice that whereas there are three random variables here, the third variable X3 is actually redundant, because for example in the case n ¼ 10, having X1 ¼ 5 and X2 ¼ 3 implies that X3 ¼ 2 (just as in a binomial experiment there are actually two rvs—the number of successes and number of failures—but the latter is redundant). As an example, the genotype of a pea section can be either AA, Aa, or aa. A simple genetic model specifies P(AA) ¼ .25, P(Aa) ¼ .50, and P(aa) ¼ .25. If the alleles of ten independently obtained sections are determined, the probability that exactly five of these are Aa and two are AA is pð2; 5; 3Þ ¼

10! ð:25Þ2 ð:50Þ5 ð:25Þ3 ¼ :0769 2!5!3!

■

The trinomial scenario of Example 4.9 can be generalized by considering a multinomial experiment consisting of n independent and identical trials, in which each trial can result in any one of r possible outcomes. Let pi ¼ P(outcome i on any particular trial), and define random variables by Xi ¼ the number of trials resulting in outcome i (i ¼ 1, . . ., r). The joint pmf of X1, . . ., Xr is called the multinomial distribution. An argument analogous to what was done in Example 4.9 gives the joint pmf of X1, . . ., Xr :

248

4

pðx1 ; . . . ; xr Þ ¼

8

0, x2 > 0, . . . , xn > 0 λ e ¼ 0 otherwise

4.1

Jointly Distributed Random Variables

249

If these n components are connected in series, so that the system will fail as soon as a single component fails, then the probability that the system lasts past time t is ð1 ð1 PðX1 > t, . . . , Xn > tÞ ¼ ... f ðx1 ; . . . ; xn Þdx1 . . . dxn t ð 1 t ð 1 n λx1 λxn ¼ λe dx1 λe dxn ¼ eλt ¼ enλt t

t

Therefore, Pðsystem lifetime tÞ ¼ 1 enλt for t 0 which shows that system lifetime has an exponential distribution with parameter nλ; the expected value of system lifetime is 1/(nλ). A variation on the foregoing scenario appeared in the article “A Method for Correlating Field Life Degradation with Reliability Prediction for Electronic Modules” (Quality and Reliability Engr. Intl., 2005: 715–726). The investigators considered a circuit card with n soldered chip resistors. The failure time of a card is the minimum of the individual solder connection failure times (mileages here). It was assumed that the solder connection failure mileages were independent, that failure mileage would exceed t if and only if the shear strength of a connection exceeded a threshold d, and that each shear strength was normally distributed with a mean value and standard deviation that depended on the value of mileage t: μ(t) ¼ a1 a2t and σ(t) ¼ a3 + a4t (a weld’s shear strength typically deteriorates and becomes more variable as mileage increases). Then the probability that the failure mileage of a card exceeds t is d ða1 a2 tÞ n P ðT > t Þ ¼ 1 Φ a3 þ a4 t The cited article suggested values for d and the ais based on data. In contrast to the exponential scenario, normality of individual lifetimes does not imply normality of system lifetime. ■ Example 4.11 gives you a taste of the sub-field of probability called reliability, the study of how long devices and/or systems operate; see Exercises 16 and 17 as well. We will explore reliability in great depth in Sect. 4.8.

4.1.5

Exercises: Section 4.1 (1–22)

1. A service station has both self-service and full-service islands. On each island, there is a single regular unleaded pump with two hoses. Let X denote the number of hoses being used on the selfservice island at a particular time, and let Y denote the number of hoses on the full-service island in use at that time. The joint pmf of X and Y appears in the accompanying table.

x

p(x, y)

y 1

2

0 1 2

.10 .08 .06

.04 .20 .14

.02 .06 .30

(a) What is P(X ¼ 1 and Y ¼ 1)? (b) Compute P(X 1 and Y 1). (c) Give a word description of the event {X 6¼ 0 and Y 6¼ 0}, and compute the probability of this event.

250

4

Joint Probability Distributions and Their Applications

(d) Compute the marginal pmf of X and of Y. Using pX(x), what is P(X 1)? (e) Are X and Y independent rvs? Explain. 2. A large but sparsely populated county has two small hospitals, one at the south end of the county and the other at the north end. The south hospital’s emergency room has 4 beds, whereas the north hospital’s emergency room has only 3 beds. Let X denote the number of south beds occupied at a particular time on a given day, and let Y denote the number of north beds occupied at the same time on the same day. Suppose that these two rvs are independent, that the pmf of X puts probability masses .1, .2, .3, .2, and .2 on the x values 0, 1, 2, 3, and 4, respectively, and that the pmf of Y distributes probabilities .1, .3, .4, and .2 on the y values 0, 1, 2, and 3, respectively. (a) Display the joint pmf of X and Y in a joint probability table. (b) Compute P(X 1 and Y 1) by adding probabilities from the joint pmf, and verify that this equals the product of P(X 1) and P(Y 1). (c) Express the event that the total number of beds occupied at the two hospitals combined is at most 1 in terms of X and Y, and then calculate this probability. (d) What is the probability that at least one of the two hospitals has no beds occupied? 3. A market has both an express checkout line and a superexpress checkout line. Let X1 denote the number of customers in line at the express checkout at a particular time of day, and let X2 denote the number of customers in line at the superexpress checkout at the same time. Suppose the joint pmf of X1 and X2 is as given in the accompanying table. x2

x1

0 1 2 3 4

1

2

3

.08 .06 .05 .00 .00

.07 .15 .04 .03 .01

.04 .05 .10 .04 .05

.00 .04 .06 .07 .06

(a) What is P(X1 ¼ 1, X2 ¼ 1), that is, the probability that there is exactly one customer in each line? (b) What is P(X1 ¼ X2), that is, the probability that the numbers of customers in the two lines are identical? (c) Let A denote the event that there are at least two more customers in one line than in the other line. Express A in terms of X1 and X2, and calculate the probability of this event. (d) What is the probability that the total number of customers in the two lines is exactly four? At least four? (e) Determine the marginal pmf of X1, and then calculate the expected number of customers in line at the express checkout. (f) Determine the marginal pmf of X2. (g) By inspection of the probabilities P(X1 ¼ 4), P(X2 ¼ 0), and P(X1 ¼ 4, X2 ¼ 0), are X1 and X2 independent random variables? Explain. 4. Suppose 51% of the individuals in a certain population have brown eyes, 32% have blue eyes, and the remainder have green eyes. Consider a random sample of 10 people from this population. (a) What is the probability that 5 of the 10 people have brown eyes, 3 of 10 have blue eyes, and the other 2 have green eyes? (b) What is the probability that exactly one person in the sample has blue eyes and exactly one has green eyes?

4.1

5.

6.

7.

8.

Jointly Distributed Random Variables

251

(c) What is the probability that at least 7 of the 10 people have brown eyes? [Hint: Think of brown as a success and all other eye colors as failures.] At a certain university, 20% of all students are freshmen, 18% are sophomores, 21% are juniors, and 41% are seniors. As part of a promotion, the university bookstore is running a raffle for which all students are eligible. Ten students will be randomly selected to receive prizes (in the form of textbooks for the term). (a) What is the probability the winners consist of two freshmen, two sophomores, two juniors, and four seniors? (b) What is the probability the winners are split equally among underclassmen (freshmen and sophomores) and upperclassmen (juniors and seniors)? (c) The raffle resulted in no freshmen being selected. The freshman class president complained that something must be amiss for this to occur. Do you agree? Explain. According to the Mars Candy Company, the long-run percentages of various colors of M&M’s milk chocolate candies are as follows: Blue: 24% Orange: 20% Green: 16% Yellow: 14% Red: 13% Brown: 13% (a) In a random sample of 12 candies, what is the probability that there are exactly two of each color? (b) In a random sample of 6 candies, what is the probability that at least one color is not included? (c) In a random sample of 10 candies, what is the probability that there are exactly 3 blue candies and exactly 2 orange candies? (d) In a random sample of 10 candies, what is the probability that there are at most 3 orange candies? [Hint: Think of an orange candy as a success and any other color as a failure.] (e) In a random sample of 10 candies, what is the probability that at least 7 are either blue, orange, or green? The number of customers waiting for gift-wrap service at a department store is an rv X with possible values 0, 1, 2, 3, 4 and corresponding probabilities .1, .2, .3, .25, .15. A randomly selected customer will have 1, 2, or 3 packages for wrapping with probabilities .6, .3, and .1, respectively. Let Y ¼ the total number of packages to be wrapped for the customers waiting in line (assume that the number of packages submitted by one customer is independent of the number submitted by any other customer). (a) Determine P(X ¼ 3, Y ¼ 3), that is, p(3, 3). (b) Determine p(4, 11). Let X denote the number of Canon digital cameras sold during a particular week by a certain store. The pmf of X is x pX(x)

0 .1

1 .2

2 .3

3 .25

4 .15

Sixty percent of all customers who purchase these cameras also buy an extended warranty. Let Y denote the number of purchasers during this week who buy an extended warranty. (a) What is P(X ¼ 4, Y ¼ 2)? [Hint: This probability equals P(Y ¼ 2jX ¼ 4) P(X ¼ 4); now think of the four purchases as four trials of a binomial experiment, with success on a trial corresponding to buying an extended warranty.] (b) Calculate P(X ¼ Y ). (c) Determine the joint pmf of X and Y and then the marginal pmf of Y. 9. The joint probability distribution of the number X of cars and the number Y of buses per signal cycle at a proposed left-turn lane is displayed in the accompanying joint probability table.

252

4

Joint Probability Distributions and Their Applications

y

x

p(x, y) 0 1 2 3 4 5

1

2

.025 .050 .125 .150 .100 .050

.015 .030 .075 .090 .060 .030

.010 .020 .050 .060 .040 .020

(a) (b) (c) (d)

What is the probability that there is exactly one car and exactly one bus during a cycle? What is the probability that there is at most one car and at most one bus during a cycle? What is the probability that there is exactly one car during a cycle? Exactly one bus? Suppose the left-turn lane is to have a capacity of five cars, and one bus is equivalent to three cars. What is the probability of an overflow during a cycle? (e) Are X and Y independent rvs? Explain. 10. A stockroom currently has 30 components of a certain type, of which 8 were provided by supplier 1, 10 by supplier 2, and 12 by supplier 3. Six of these are to be randomly selected for a particular assembly. Let X ¼ the number of supplier 1’s components selected, Y ¼ the number of supplier 2’s components selected, and p(x, y) denote the joint pmf of X and Y. (a) What is p(3, 2)? [Hint: Each sample of size 6 is equally likely to be selected. Therefore, p(3, 2) ¼ (number of outcomes with X ¼ 3 and Y ¼ 2)/(total number of outcomes). Now use the product rule for counting to obtain the numerator and denominator.] (b) Using the logic of part (a), obtain p(x, y). (This can be thought of as a multivariate hypergeometric distribution—sampling without replacement from a finite population consisting of more than two categories.) 11. Each front tire of a vehicle is supposed to be filled to a pressure of 26 psi. Suppose the actual air pressure in each tire is a random variable—X for the right tire and Y for the left tire, with joint pdf 2 kðx þ y2 Þ 20 x 30, 20 y 30 f ðx; yÞ ¼ 0 otherwise (a) What is the value of k? (b) What is the probability that both tires are underfilled? (c) What is the probability that the difference in air pressure between the two tires is at most 2 psi? (d) Determine the (marginal) distribution of air pressure in the right tire alone. (e) Are X and Y independent rvs? 12. Annie and Alvie have agreed to meet between 5:00 and 6:00 p.m. for dinner at a local health-food restaurant. Let X ¼ Annie’s arrival time and Y ¼ Alvie’s arrival time. Suppose X and Y are independent with each uniformly distributed on the interval [5, 6]. (a) What is the joint pdf of X and Y? (b) What is the probability that they both arrive between 5:15 and 5:45? (c) If the first one to arrive will wait only 10 min before leaving to eat elsewhere, what is the probability that they have dinner at the health-food restaurant? [Hint: The event of interest is

A ¼ ðx; yÞ :j x y j 16 :] 13. Two different professors have just submitted final exams for duplication. Let X denote the number of typographical errors on the first professor’s exam and Y denote the number of such errors on the second exam. Suppose X has a Poisson distribution with parameter μ1, Y has a Poisson distribution with parameter μ2, and X and Y are independent.

4.1

Jointly Distributed Random Variables

253

(a) What is the joint pmf of X and Y? (b) What is the probability that at most one error is made on both exams combined? (c) Obtain a general expression for the probability that the total number of errors in the two exams is m (where m is a nonnegative integer). [Hint: A ¼ {(x, y): x + y ¼ m} ¼ {(m, 0), (m 1, 1), . . ., (1, m 1), (0, m)}. Now sum the joint pmf over (x, y) 2 A and use the binomial theorem, which says that m X m k mk ¼ ð a þ bÞ m ab k k¼0 for any a, b.] 14. Two components of a computer have the following joint pdf for their useful lifetimes X and Y: xexð1þyÞ x 0 and y 0 f ðx; yÞ ¼ 0 otherwise (a) What is the probability that the lifetime X of the first component exceeds 3? (b) What are the marginal pdfs of X and Y? Are the two lifetimes independent? Explain. (c) What is the probability that the lifetime of at least one component exceeds 3? 15. You have two lightbulbs for a particular lamp. Let X ¼ the lifetime of the first bulb and Y ¼ the lifetime of the second bulb (both in thousands of hours). Suppose that X and Y are independent and that each has an exponential distribution with parameter λ ¼ 1. (a) What is the joint pdf of X and Y? (b) What is the probability that each bulb lasts at most 1000 h (i.e., X 1 and Y 1)? (c) What is the probability that the total lifetime of the two bulbs is at most 2? [Hint: Draw a picture of the region A ¼ {(x, y): x 0, y 0, x + y 2} before integrating.] (d) What is the probability that the total lifetime is between 1 and 2? 16. Suppose that you have ten lightbulbs, that the lifetime of each is independent of all the other lifetimes, and that each lifetime has an exponential distribution with parameter λ. (a) What is the probability that all ten bulbs fail before time t? (b) What is the probability that exactly k of the ten bulbs fail before time t? (c) Suppose that nine of the bulbs have lifetimes that are exponentially distributed with parameter λ and that the remaining bulb has a lifetime that is exponentially distributed with parameter θ (it is made by another manufacturer). What is the probability that exactly five of the ten bulbs fail before time t? 17. Consider a system consisting of three components as pictured. The system will continue to function as long as the first component functions and either component 2 or component 3 functions. Let X1, X2, and X3 denote the lifetimes of components 1, 2, and 3, respectively. Suppose the Xis are independent of each other and each Xi has an exponential distribution with parameter λ. 2 1 3

(a) Let Y denote the system lifetime. Obtain the cumulative distribution function of Y and differentiate to obtain the pdf. [Hint: F( y) ¼ P(Y y); express the event {Y y} in terms of unions and/or intersections of the three events {X1 y}, {X2 y}, and {X3 y}.] (b) Compute the expected system lifetime.

254

4

Joint Probability Distributions and Their Applications

18. (a) For f(x1, x2, x3) as given in Example 4.10, compute the joint marginal density function of X1 and X3 alone (by integrating over x2). (b) What is the probability that rocks of types 1 and 3 together make up at most 50% of the sample? [Hint: Use the result of part (a).] (c) Compute the marginal pdf of X1 alone. [Hint: Use the result of part (a).] 19. An ecologist selects a point inside a circular sampling region according to a uniform distribution. Let X ¼ the x coordinate of the point selected and Y ¼ the y coordinate of the point selected. If the circle is centered at (0, 0) and has radius r, then the joint pdf of X and Y is 8 < 1 x2 þ y2 r 2 f ðx; yÞ ¼ πr 2 : 0 otherwise (a) What is the probability that the selected point is within r/2 of the center of the circular region? [Hint: Draw a picture of the region of positive density D. Because f(x, y) is constant on D, computing a probability reduces to computing an area.] (b) What is the probability that both X and Y differ from 0 by at most r/2? pﬃﬃﬃ (c) Answer part (b) for r= 2 replacing r/2. (d) What is the marginal pdf of X? Of Y? Are X and Y independent? 20. Each customer making a particular Internet purchase must pay with one of three types of credit cards (think Visa, MasterCard, AmEx). Let Ai (i ¼ 1, 2, 3) be the event that a type i credit card is used, with P(A1) ¼ .5, P(A2) ¼ .3, P(A3) ¼ .2. Suppose that the number of customers who make a purchase on a given day, N, is a Poisson rv with parameter μ. Define rvs X1, X2, X3 by Xi ¼ the number among the N customers who use a type i card (i ¼ 1, 2, 3). Show that these three rvs are independent with Poisson distributions having parameters .5μ, .3μ, and .2μ, respectively. [Hint: For non-negative integers x1, x2, x3, let n ¼ x1 + x2 + x3. Then P(X1 ¼ x1, X2 ¼ x2, X3 ¼ x3) ¼ P(X1 ¼ x1, X2 ¼ x2, X3 ¼ x3, N ¼ n). Now condition on N ¼ n, in which case the three Xis have a trinomial distribution (multinomial with 3 categories) with category probabilities .5, .3, and .2.] 21. Consider randomly selecting two points A and B on the circumference of a circle by selecting their angles of rotation, in degrees, independently from a uniform distribution on the interval [0, 360]. Connect points A and B with a straight line segment. What is the probability that this random chord is longer than the side of an equilateral triangle inscribed inside the circle? (This is called Bertrand’s Chord Problem in the probability literature. There are other ways of randomly selecting a chord that give different answers from the one appropriate here.) [Hint: Place one of the vertices of the inscribed triangle at A. You should then be able to intuit the answer visually without having to do any integration.] 22. Section 3.8 introduced the accept–reject method for simulating continuous rvs. Refer back to that algorithm in order to answer the questions below. (a) Show that the probability a candidate value is “accepted” equals 1/c. [Hint: According to the algorithm, this occurs iff U f(Y )/cg(Y ), where U ~ Unif[0, 1) and Y ~ g. Compute the relevant double integral.] (b) Argue that the average number of candidates required to generate a single accepted value is c. (c) Show that the accept–reject method does result in an observation from the pdf f by showing that P(accepted value x) ¼ F(x), where F is the cdf corresponding to f. [Hint: Let X denote the accepted value. Then P(X x) ¼ P(Y x | Y accepted) ¼ P(Y x \ Y accepted)/P(Y accepted).]

4.2

Expected Values, Covariance, and Correlation

4.2

255

Expected Values, Covariance, and Correlation

We previously saw that any function h(X) of a single rv X is itself a random variable. However, to compute E[h(X)], it was not necessary to obtain the probability distribution of h(X); instead, E[h(X)] was computed as a weighted average of h(X) values, where the weight function was the pmf p(x) or pdf f(x) of X. A similar result holds for a function h(X, Y ) of two jointly distributed random variables. PROPOSITION

Let X and Y be jointly distributed rvs with pmf p(x, y) or pdf f(x, y) according to whether the variables are discrete or continuous. Then the expected value of a function h(X, Y ), denoted by E[h(X, Y )] or μh(X,Y ), is given by 8XX > hðx; yÞ pðx; yÞ if X and Y are discrete > < x y ð4:2Þ E½hðX; Y Þ ¼ ð 1 ð 1 > > hðx; yÞ f ðx; yÞdxdy if X and Y are continuous : 1 1

This is sometimes referred to as the Law of the Unconscious Statistician. The method of computing the expected value of a function h(X1, . . ., Xn) of n random variables is similar to Eq. (4.2). If the Xis are discrete, E[h(X1, . . ., Xn)] is an n-dimensional sum; if the Xis are continuous, it is an n-dimensional integral. Example 4.12 Five friends have purchased tickets to a concert. If the tickets are for seats 1–5 in a particular row and the tickets are randomly distributed among the five, what is the expected number of seats separating any particular two of the five friends? Let X and Y denote the seat numbers of the first and second individuals, respectively. Possible (X, Y) pairs are {(1, 2), (1, 3), . . ., (5, 4)}, and the joint pmf of (X, Y) is 8 < 1 x ¼ 1, . . . , 5; y ¼ 1, . . . , 5; x 6¼ y pðx; yÞ ¼ 20 : 0 otherwise The number of seats separating the two individuals is h(X, Y ) ¼ jX Yj 1. The accompanying table gives h(x, y) for each possible (x, y) pair.

y

h(x, y)

1

2

x 3

1 2 3 4 5

– 0 1 2 3

0 – 0 1 2

1 0 – 0 1

4

5

2 1 0 – 0

3 2 1 0 –

256

4

Joint Probability Distributions and Their Applications

Thus E½hðX; Y Þ ¼

XX

hðx; yÞ pðx; yÞ ¼

5 X 5 X

x ¼ 1y ¼ 1 x 6¼ y

ðx;yÞ

ðj x y j 1Þ

1 ¼1 20 ■

Example 4.13 In Example 4.5, the joint pdf of the amount X of almonds and amount Y of cashews in a 1-lb can of nuts was 24xy 0 x 1, 0 y 1, x þ y 1 f ðx; yÞ ¼ 0 otherwise If 1 lb of almonds costs the company $6.00, 1 lb of cashews costs $10.00, and 1 lb of peanuts costs $3.50, then the total cost of the contents of a can is hðX; Y Þ ¼ 6X þ 10Y þ 3:5ð1 X Y Þ ¼ 3:5 þ 2:5X þ 6:5Y (since 1 X Y of the weight consists of peanuts). The expected total cost is ð1 ð1 E½hðX; Y Þ ¼ hðx; yÞ f ðx; yÞdxdy 1 1 ð 1 ð 1x ð3:5 þ 2:5x þ 6:5yÞ 24xy dydx ¼ $7:10 ¼ 0

4.2.1

■

Properties of Expected Value

In Chaps. 2 and 3, we saw that expected values can be distributed across addition, subtraction, and multiplication by constants. In the language of mathematics, expected value is a linear operator. This was a simple consequence of expectation being a sum or an integral, both of which are linear. This obvious but important property, linearity of expectation, extends to more than one variable. LINEARITY OF EXPECTATION

Let X and Y be random variables. Then, for any functions h1, h2 and any constants a1, a2, b, E½a1 h1 ðX; Y Þ þ a2 h2 ðX; Y Þ þ b ¼ a1 E½h1 ðX; Y Þ þ a2 E½h2 ðX; Y Þ þ b In the previous example, E(3.5 + 2.5X + 6.5Y ) can be rewritten as 3.5 + 2.5E(X) + 6.5E(Y ); the means of X and Y can be computed either by using Eq. (4.2) or by first finding the marginal pdfs of X and Y and then computing the appropriate single integrals. As another illustration, linearity of expectation tells us that for any two rvs X and Y, E 5XY 2 4XY þ eX þ 12 ¼ 5E XY 2 4EðXY Þ þ E eX þ 12 ð4:3Þ In general, we cannot distribute the expected value operation any further. But when h(X, Y ) is a product of a function of X and a function of Y, the expected value simplifies in the case of independence.

4.2

Expected Values, Covariance, and Correlation

257

THEOREM

Let X and Y be independent random variables. If h(X, Y) ¼ g1(X) g2(Y), then E½hðX; Y Þ ¼ E½g1 ðXÞ g2 ðY Þ ¼ E½g1 ðXÞ E½g2 ðY Þ Proof We present the proof here for two continuous rvs; the discrete case is similar. Apply Eq. (4.2): ð1 ð1

g1 ðxÞ g2 ðyÞ f x, y dx dy by 4:2 E hðX; Y Þ ¼ E g1 X g2 Y ¼ 1 1 ð1 ð1 g1 ðxÞ g2 ðyÞ f X ðxÞ f Y y dx dy because X and Y are independent ¼ 1 ð 1 ð 1 1

¼ g1 ðxÞ f X ðxÞdx g2 ðyÞ f Y ðyÞdy ¼ E g1 ðXÞ E g2 Y ■ 1

1

So, if X and Y are independent, Eq. (4.3) simplifies further, to 5E(X)E(Y2) 4E(X)E(Y) + E(eX) + 12. Not surprisingly, both linearity of expectation and the foregoing corollary can be extended to more than two random variables.

4.2.2

Covariance

When two random variables X and Y are not independent, it is frequently of interest to assess how strongly they are related to each other. DEFINITION

The covariance between two rvs X and Y is

CovðX; Y Þ ¼ E X μX Y μY 8XX ðx μX Þðy μY Þpðx; yÞ > > < x y ¼ ð1 ð1 > > : ðx μX Þðy μY Þf ðx; yÞdxdy

if X and Y are discrete if X and Y are continuous

1 1

The rationale for the definition is as follows. Suppose X and Y have a strong positive relationship to each other, by which we mean that large values of X tend to occur with large values of Y and small values of X with small values of Y (e.g., X ¼ height and Y ¼ weight). Then most of the probability mass or density will be associated with (x μX) and (y μY) either both positive (both X and Y above their respective means) or both negative (X and Y simultaneously below average). So, the product (x μX) (y μY) will tend to be positive. Thus for a strong positive relationship, Cov(X, Y) should be quite positive, because it’s the expectation of a generally positive quantity. For a strong negative relationship, the signs of (x μX) and (y μY) will tend to be opposite, resulting in a negative product. Thus for a strong negative relationship, Cov(X, Y) should be quite negative. If X and Y are not strongly related, positive and negative products will tend to cancel each other, yielding a covariance near 0. Figure 4.4 illustrates the different possibilities. The covariance depends on both the set of possible pairs and the probabilities. In Fig. 4.4, the probabilities could be changed without altering the set of possible pairs, and this could drastically change the value of Cov(X, Y ).

258

4

Joint Probability Distributions and Their Applications

a

b

c

mY

mY

mY

y

y

y

x

mX

mX

x

mX

x

Fig. 4.4 p(x, y) ¼ .10 for each of ten pairs corresponding to indicated points; (a) positive covariance; (b) negative covariance; (c) covariance near zero

Example 4.14 The joint and marginal pmfs for X ¼ automobile policy deductible amount and Y ¼ homeowner policy deductible amount in Example 4.1 were

x

x pX(x)

p(x, y)

y 100

100 250

.20 .05

.10 .15

100

250

.5

.5

y pY( y)

200 .20 .30

100

200

.25

.25

.50

from which μX ¼ ∑x pX(x) ¼ 175 and μY ¼ 125. Therefore, XX ðx 175Þðy 125Þpðx; yÞ CovðX; Y Þ ¼ ðx; yÞ ¼ ð100 175Þ 0 125 :20 þ þ 250 175 200 125 :30 ¼ 1875

■

The following proposition summarizes some important properties of covariance. PROPOSITION

For any two random variables X and Y, 1. 2. 3. 4.

Cov(X, Y) ¼ Cov(Y, X) Cov(X, X) ¼ Var(X) (Covariance shortcut formula) Cov(X, Y) ¼ E(XY) μX μY (Distributive property of covariance) For any rv Z and any constants, a, b, c, CovðaX þ bY þ c, Z Þ ¼ aCovðX; ZÞ þ bCovðY; Z Þ

Proof Property 1 is obvious from the definition of covariance. To establish property 2, replace Y with X in the definition: h i CovðX; XÞ ¼ E½ðX μX ÞðX μX Þ ¼ E ðX μX Þ2 ¼ VarðXÞ

4.2

Expected Values, Covariance, and Correlation

259

To prove property 3, apply linearity of expectation:

CovðX; Y Þ ¼ E ðX μX Þ Y μY ¼ EðXY μX Y μY X þ μXμYÞ ¼ EðXY Þ μX E Y μY E X þ μX μY ¼ EðXY Þ μX μY μX μY þ μX μY ¼ E XY μX μY Property 4 also follows from linearity of expectation (Exercise 39).

■

According to property 3, the covariance shortcut, no intermediate subtractions are necessary to calculate covariance; only at the end of the computation is μX μY subtracted from E(XY). Example 4.15 (Example 4.5 continued) The joint and marginal pdfs of X ¼ amount of almonds and Y ¼ amount of cashews were 24xy 0 x 1, 0 y 1, x þ y 1 f ðx; yÞ ¼ 0 otherwise 12xð1 xÞ2 0x1 f X ðxÞ ¼ 0 otherwise 2 with fY( y) obtained by replacing x by y in fX(x). It is easily verified that μX ¼ μY ¼ , and 5 ð1 ð1 ð 1 ð 1x ð1 2 EðXY Þ ¼ xyf ðx; yÞdxdy ¼ xy 24xy dydx ¼ 8 x2 ð1 xÞ3 dx ¼ 15 1 1 0 0 0 2 2 2 2 4 2 ¼ . A negative covariance is reasonable here Thus CovðX; Y Þ ¼ ¼ 15 5 5 15 25 75 because more almonds in the can implies fewer cashews. ■

4.2.3

Correlation

It would appear that the relationship in the insurance example is quite strong since Cov(X, Y ) ¼ 1875, whereas in the nut example CovðX; Y Þ ¼ 2=75 would seem to imply quite a weak relationship. Unfortunately, the covariance has a serious defect that makes it impossible to interpret a computed value of the covariance. In the insurance example, suppose we had expressed the deductible amount in cents rather than in dollars. Then 100X would replace X, 100Y would replace Y, and the resulting covariance would be Cov(100X, 100Y ) ¼ (100)(100)Cov(X, Y) ¼ 18,750,000. [To see why, apply properties 1 and 4 of the previous proposition.] If, on the other hand, the deductible amounts had been expressed in hundreds of dollars, the computed covariance would have changed to (.01)(.01)(1875) ¼ .1875. The defect of covariance is that its computed value depends critically on the units of measurement. Ideally, the choice of units should have no effect on a measure of strength of relationship. This is achieved by scaling the covariance.

260

4

Joint Probability Distributions and Their Applications

DEFINITION

The correlation coefficient of X and Y, denoted by Corr(X, Y ), or ρX,Y, or just ρ, is defined by ρX , Y ¼

CovðX; Y Þ σX σY

Example 4.16 It is easily verified that in the insurance scenario of Example 4.14, E(X2) ¼ 36,250, σ X2 ¼ 36,250 (175)2 ¼ 5625, σ X ¼ 75, E(Y2) ¼ 22,500, σ Y2 ¼ 6875, and σ Y ¼ 82.92. This gives ρ¼

1875 ¼ :301 ð75Þð82:92Þ

■

The following proposition shows that ρ remedies the defect of Cov(X, Y) and also suggests how to recognize the existence of a strong (linear) relationship. PROPOSITION

For any two rvs X and Y, 1. Corr(X, Y) ¼ Corr(Y, X) 2. Corr(X, X) ¼ 1 3. (Scale invariance property) If a, b, c, d are constants and ac > 0, CorrðaX þ b, cY þ d Þ ¼ CorrðX; Y Þ 4. –1 Corr(X, Y ) 1

Proof Property 1 is clear from the definition of correlation and the corresponding property of covariance. For Property 2, write Corr(X, X) ¼ Cov(X, X)/[σ X σ X] ¼ Var(X)/σ X2 ¼ 1. The secondto-last step uses Property 2 of covariance. The proofs of Properties 3 and 4 appear as exercises. ■ Property 3 (scale invariance) says precisely that the correlation coefficient is not affected by a linear change in the units of measurement. If, say, Y ¼ completion time for a chemical reaction in seconds and X ¼ temperature in C, then Y/60 ¼ time in minutes and 1.8X + 32 ¼ temperature in F, but Corr(X, Y) will be exactly the same as Corr(1.8X + 32, Y/60). According to Properties 2 and 4, the strongest possible positive relationship is evidenced by ρ ¼ +1, whereas the strongest possible negative relationship corresponds to ρ ¼ –1. Therefore, the correlation coefficient provides information about both the nature and strength of the relationship between X and Y: the sign of ρ indicates whether X and Y are positively or negatively related, and the magnitude of ρ describes the strength of that relationship on an absolute 0–1 scale. While superior to covariance, the correlation coefficient ρ is actually not a completely general measure of the strength of a relationship.

4.2

Expected Values, Covariance, and Correlation

261

PROPOSITION

1. If X and Y are independent, then ρ ¼ 0, but ρ ¼ 0 does not imply independence. 2. ρ ¼ 1 or –1 iff Y ¼ aX + b for some numbers a and b with a 6¼ 0. Exercise 38 and Example 4.17 relate to Statement 1, and Statement 2 is investigated in Exercises 41 and 42(d). This proposition says that ρ is a measure of the degree of linear relationship between X and Y, and only when the two variables are perfectly related in a linear manner will ρ be as positive or negative as it can be. A ρ less than 1 in absolute value indicates only that the relationship is not completely linear, but there may still be a very strong nonlinear relation. Also, ρ ¼ 0 does not imply that X and Y are independent, but only that there is complete absence of a linear relationship. When ρ ¼ 0, X and Y are said to be uncorrelated. Two variables could be uncorrelated yet highly dependent because of a strong nonlinear relationship, so be careful not to conclude too much from knowing that ρ ¼ 0. Example 4.17 Let X and Y be discrete rvs with joint pmf :25 ðx; yÞ ¼ 4, 1 , 4, 1 , 2, 2 , 2, 2 pðx; yÞ ¼ 0 otherwise The points that receive positive probability mass are identified on the (x, y) coordinate system in Fig. 4.5. It is evident from the figure that the value of X is completely determined by the value of Y and vice versa, so the two variables are completely dependent. However, by symmetry μX ¼ μY ¼ 0 and E(XY) ¼ (4)(.25) + (4)(.25) + (4)(.25) + (4)(.25) ¼ 0, so Cov(X, Y) ¼ E(XY) μX μY ¼ 0 and thus ρX,Y ¼ 0. Although there is perfect dependence, there is also complete absence of any linear relationship! 2 1

−4

−3

−2

−1

1

2

3

4

−1 −2

Fig. 4.5 The population of pairs for Example 4.17

■

The next result provides an alternative view of zero correlation. PROPOSITION

Two rvs X and Y are uncorrelated if, and only if, E[XY] ¼ μX μY. Proof By its definition, Corr(X, Y) ¼ 0 iff Cov(X, Y) ¼ 0. Apply the covariance shortcut formula: ρ ¼ 0 , CovðX; Y Þ ¼ 0 , E½XY μX μY ¼ 0 , E½XY ¼ μX μY

■

262

4

Joint Probability Distributions and Their Applications

Contrast this with an earlier proposition from this section: if X and Y are independent rvs, then E[g1(X)g2(Y )] ¼ E[g1(X)] E[g2(Y )] for all functions g1 and g2. Thus, independence is stronger than zero correlation, the latter being the special case corresponding to g1(X) ¼ X and g2(Y ) ¼ Y.

4.2.4

Correlation Versus Causation

A value of ρ near 1 does not necessarily imply that increasing the value of X causes Y to increase. It implies only that large X values are associated with large Y values. For example, in the population of children, vocabulary size and number of cavities are quite positively correlated, but it is certainly not true that cavities cause vocabulary to grow. Instead, the values of both these variables tend to increase as the value of age, a third variable, increases. For children of a fixed age, there is probably a very low correlation between number of cavities and vocabulary size. In summary, association (a high correlation) is not the same as causation.

4.2.5

Exercises: Section 4.2 (23–42)

23. The two most common types of errors made by programmers are syntax errors and logic errors. Let X denote the number of syntax errors and Y the number of logic errors on the first run of a program. Suppose X and Y have the following joint pmf for a particular programming assignment: x p(x,y) y

0 1 2

1

2

3

.71 .04 .03

.03 .06 .03

.02 .03 .02

.01 .01 .01

(a) (b) (c) (d)

What is the probability a program has more syntax errors than logic errors on the first run? Find the marginal pmfs of X and Y. Are X and Y independent? How can you tell? What is the average number of syntax errors in the first run of a program? What is the average number of logic errors? (e) Suppose an evaluator assigns points to each program with the formula 100 4X 9Y. What is the expected point score for a randomly selected program? 24. An instructor has given a short quiz consisting of two parts. For a randomly selected student, let X ¼ the number of points earned on the first part and Y ¼ the number of points earned on the second part. Suppose that the joint pmf of X and Y is given in the accompanying table. y p(x, y) x

0 5 10

5

10

15

.02 .04 .01

.06 .15 .15

.02 .20 .14

.10 .10 .01

(a) If the score recorded in the grade book is the total number of points earned on the two parts, what is the expected recorded score E(X + Y)? (b) If the maximum of the two scores is recorded, what is the expected recorded score?

4.2

Expected Values, Covariance, and Correlation

263

25. The difference between the number of customers in line at the express checkout and the number in line at the superexpress checkout in Exercise 3 is X1 X2. Calculate the expected difference. 26. Six individuals, including A and B, take seats around a circular table in a completely random fashion. Suppose the seats are numbered 1, . . ., 6. Let X ¼ A’s seat number and Y ¼ B’s seat number. If A sends a written message around the table to B in the direction in which they are closest, how many individuals (including A and B) would you expect to handle the message? 27. A surveyor wishes to lay out a square region with each side having length L. However, because of measurement error, he instead lays out a rectangle in which the north–south sides both have length X and the east–west sides both have length Y. Suppose that X and Y are independent and that each is uniformly distributed on the interval [L A, L + A] (where 0 < A < L ). What is the expected area of the resulting rectangle? 28. Consider a small ferry that can accommodate cars and buses. The toll for cars is $3, and the toll for buses is $10. Let X and Y denote the number of cars and buses, respectively, carried on a single trip. Suppose the joint distribution of X and Y is as given in the table of Exercise 9. Compute the expected revenue from a single trip. 29. Annie and Alvie have agreed to meet for lunch between noon (0:00 p.m.) and 1:00 p.m. Denote Annie’s arrival time by X, Alvie’s by Y, and suppose X and Y are independent with pdfs 2 3x 0x1 f X ðxÞ ¼ 0 otherwise 2y 0y1 f Y ðyÞ ¼ 0 otherwise

30.

31. 32. 33. 34. 35.

36.

What is the expected amount of time that the one who arrives first must wait for the other person? [Hint: h(X, Y ) ¼ jX Yj.] Suppose that X and Y are independent rvs with moment generating functions MX(t) and MY(t), respectively. If Z ¼ X + Y, show that MZ(t) ¼ MX(t) MY(t). [Hint: Use the proposition on the expected value of a product.] Compute the correlation coefficient ρ for X and Y of Example 4.15 (the covariance has already been computed). (a) Compute the covariance for X and Y in Exercise 24. (b) Compute ρ for X and Y in the same exercise. (a) Compute the covariance between X and Y in Exercise 11. (b) Compute the correlation coefficient ρ for this X and Y. Reconsider the computer component lifetimes X and Y as described in Exercise 14. Determine E (XY). What can be said about Cov(X, Y) and ρ? Refer back to Exercise 23. (a) Calculate the covariance of X and Y. (b) Calculate the correlation coefficient of X and Y. Interpret this value. In practice, it is often desired to predict the value of a variable Y from the known value of some other variable, X. For example, a doctor might wish to predict the lifespan Y of someone who smokes X cigarettes a day, or an engineer may require predictions of the tensile strength Y of steel made with concentration X of a certain additive. A linear predictor of Y is anything of the form ^ ¼ a þ bX; the “hat” ^ on Y indicates prediction. Y A common measure of the quality of a predictor is given by the mean square prediction error: h i ^ 2 E YY

264

4

Joint Probability Distributions and Their Applications

(a) Show that the choices of a and b that minimize mean square prediction error are b¼ρ

σY σX

a ¼ μY b μX

^ is often called the best linear predictor where ρ ¼ Corr(X, Y). The resulting expression for Y of Y, given X. [Hint: Expand the expression for mean square prediction error, apply linearity of expectation, and then use calculus.] (b) Determine the mean square prediction error for the best linear predictor. How does the value of ρ affect this quantity? 37. (a) Recalling the definition of σ 2 for a single rv X, write a formula that would be appropriate for computing the variance of a function h(X, Y) of two random variables. [Hint: Remember that variance is just a special expected value.] (b) Use this formula to compute the variance of the recorded score h(X, Y) [¼max(X, Y )] in part (b) of Exercise 24. 38. Show that when X and Y are independent, Cov(X, Y ) ¼ Corr(X, Y) ¼ 0. 39. Use linearity of expectation to establish the covariance property CovðaX þ bY þ c, Z Þ ¼ aCovðX; ZÞ þ bCovðY; Z Þ 40. (a) Use the properties of covariance to show that Cov(aX + b, cY + d) ¼ acCov(X, Y ). (b) Use part (a) along with the rescaling property of standard deviation to show that Corr(aX + b, cY + d) ¼ Corr(X, Y ) when ac > 0 (this is the scale invariance property of correlation). (c) What happens if a and c have opposite signs, so ac < 0? 41. Show that if Y ¼ aX + b (a 6¼ 0), then Corr(X, Y ) ¼ +1 or –1. Under what conditions will ρ ¼ +1? 42. Let ZX be the standardized X, ZX ¼ (X μX)/σ X, let ZY be the standardized Y, ZY ¼ (Y μY)/σ Y, and let ρ ¼ Corr(X, Y). (a) Show that Corr(X, Y) ¼ Cov(ZX, ZY) ¼ E(ZXZY). (b) Use the linearity of expectation along with part (a), to show that E[(ZY ρZX)2] ¼ 1 ρ2. [Hint: If Z is a standardized rv, what are its mean and variance, and how can you use those to determine E(Z2)?] (c) Use part (b) to show that –1 ρ 1. (d) Use part (b) to show that ρ ¼ 1 implies that Y ¼ aX + b where a > 0, and ρ ¼ –1 implies that Y ¼ aX + b where a < 0.

4.3

Properties of Linear Combinations

A linear combination of random variables refers to anything of the form a1X1 + + anXn + b, where the Xis are random variables and the ais and b are numerical constants. (Some sources do not include the constant b in the definition.) For example, suppose your investment portfolio with a particular financial institution includes 100 shares of stock #1, 200 shares of stock #2, and 500 shares of stock #3. Let X1, X2, and X3 denote the share prices of these three stocks at the end of the current fiscal year. Suppose also that the financial institution will levy a management fee of $150. Then the value of your investments with this institution at the end of the year is 100X1 + 200X2 + 500X3 150, which is a particular linear combination. Important special cases include the total X1 + + Xn (take

4.3

Properties of Linear Combinations

265

a1 ¼ ¼ an ¼ 1, b ¼ 0), the difference of two rvs X1 X2 (n ¼ 2, a1 ¼ 1, a2 ¼ –1), and anything of the form aX + b (take n ¼ 1 or, equivalently, set a2 ¼ . . . ¼ an ¼ 0). Another very important just take a1 ¼ linear combination is the sample mean (X1 + + Xn)/n, conventionally denoted X; ¼ an ¼ 1/n and b ¼ 0. Notice that we are not requiring the Xis to be independent or to have the same probability distribution. All the Xis could have different distributions and therefore different mean values and standard deviations. In this section, we investigate the general properties of linear combinations. Section 4.5 will explore some special properties of the total and the sample mean under additional assumptions. We first consider the expected value and variance of a linear combination. THEOREM

Let the rvs X1, X2, . . ., Xn have mean values μ1, . . ., μn and standard deviations σ 1, . . ., σ n, respectively. 1. Whether or not the Xis are independent, Eða1 X1 þ þ an Xn þ bÞ ¼ a1 E X1 þ þ an E Xn þ b ¼ a1 μ 1 þ þ an μ n þ b

ð4:4Þ

and Varða1 X1 þ þ an Xn þ bÞ ¼

n X n X

ai aj Cov Xi , Xj

i¼1 j¼1

¼

n X

a2i σ 2i

i¼1

þ2

XX

ai aj Cov Xi ; Xj

ð4:5Þ

i 10) or P(W –2). In the case of independent rvs, a general method exists for determining the pdf of the sum X1 + + Xn from their marginal pdfs. We present first the result for two random variables. THEOREM

Suppose X and Y are independent, continuous rvs with marginal pdfs fX(x) and fY( y), respectively. Then the pdf of the rv W ¼ X + Y is given by ð1 f W ðwÞ ¼ f X ðxÞf Y ðw xÞdx 1

[In mathematics, this integral operation is known as the convolution of fX(x) and fY( y) and is sometimes denoted fW ¼ fX « fY.] The limits of integration are determined by which x values make both fX(x) > 0 and fY(w x) > 0. Proof Since X and Y are independent, their joint pdf is given by fX(x) fY( y). The cdf of W is then FW ðwÞ ¼ PðW wÞ ¼ PðX þ Y wÞ To calculate P(X + Y w), we must integrate over the set of numbers {(x, y): x + y w}, which is the shaded region indicated in Fig. 4.6. The resulting limits of integration are –1 < x < 1 and –1 < y w x, and so

4.3

Properties of Linear Combinations

269 y

x + y = w

x

Fig. 4.6 Region of integration for P(X + Y w)

FW ðwÞ ¼ P X þ Y w ð1 ð wx ð 1 ð wx f X ðxÞf Y ðyÞdydx ¼ f X ðxÞ f Y ðyÞdydx ¼ 1 1 1 ð1 1 ¼ f X ðxÞFY ðw xÞdx 1

The pdf of W is the derivative of this expression with respect to w; taking the derivative underneath the integral sign yields the desired result. ■ By a similar argument, the pdf of W ¼ X + Y can be determined even when X and Y are not independent. Assuming X and Y have joint pdf f(x, y), ð1 f W ðwÞ ¼ f ðx, w xÞdx 1

Example 4.21 In a standby system, a component is used until it wears out and is then immediately replaced by another, not necessarily identical, component. (The second component is said to be “in standby mode,” i.e., waiting to be used.) The overall lifetime of a standby system is just the sum of the lifetimes of its individual components. Let X and Y denote the lifetimes of the two components of a standby system, and suppose X and Y are independent exponentially distributed random variables with expected lifetimes 3 weeks and 4 weeks, respectively. Let W ¼ X + Y, the lifetime of the standby system. Using the first theorem of this section, the expected lifetime of the standby system is E(W ) ¼ E(X) + E(Y ) ¼ 3 + 4 ¼ 7 weeks. Since X and Y are exponential, the variance of each one is the square of its mean (9 and 16, respectively); since they are also independent, VarðW Þ ¼ VarðXÞ þ VarðY Þ ¼ 32 þ 42 ¼ 25 It follows that SD(W ) ¼ 5 weeks. Since μW 6¼ σ W, W cannot itself be exponentially distributed, but we can use the previous theorem to find its pdf. The marginal pdfs of X and Y are fX(x) ¼ (1/3)e–x/3 for x > 0 and fY( y) ¼ (1/4)e–y/4 for y > 0. Substituting y ¼ w x, the inequalities x > 0 and w x > 0 imply 0 < x < w, which are the limits of integration of the convolution integral: ð1 ðw f W ðwÞ ¼ f X ðxÞf Y ðw xÞdx ¼ ð1=3Þex=3 ð1=4ÞeðwxÞ=4 dx 1 0 ð 1 w=4 w x=12 ¼ e e dx 12 0 ¼ ew=4 1 ew=12 , w > 0

270

4

Joint Probability Distributions and Their Applications fW (w)

Fig. 4.7 The pdf of W ¼ X + Y for Example 4.21

0.10

0.08

0.06

0.04

0.02

w

0 0

10

20

30

The pdf of W appears in Fig. 4.7. As a check, the mean and variance of W can be verified directly from its pdf. The probability the standby system lasts more than its expected lifetime of 7 weeks is given by ð1 ð1 Pð W > 7Þ ¼ f W ðwÞdw ¼ ew=4 1 ew=12 dw ¼ :4042 ■ 7

7

As a generalization of the previous proposition, the pdf of the sum W ¼ X1 + + Xn of n independent, continuous rvs can be determined by successive convolution: fW ¼ f1 « « fn. In most situations, it isn’t practical to evaluate such a complicated object. Thankfully, as we’ll see next, such tedious computations can sometimes be avoided with the use of moment generating functions.

4.3.2

Moment Generating Functions for Linear Combinations

A corollary in Sect. 4.2 stated that the expected value of a product of functions of independent random variables is the product of the individual expected values. We now use this to formulate the moment generating function of a linear combination of independent random variables. PROPOSITION

Let X1, X2, . . ., Xn be independent random variables with moment generating functions MX1 ðtÞ, MX2 ðtÞ, . . . , MXn ðtÞ, respectively. Then the moment generating function of the linear combination Y ¼ a1X1 + a2X2 + + anXn + b is MY ðtÞ ¼ ebt MX1 ða1 tÞ MX2 ða2 tÞ MXn ðan tÞ In the special case that a1 ¼ a2 ¼ ¼ an ¼ 1 and b ¼ 0, so Y ¼ X1 + + Xn, MY ðtÞ ¼ MX1 ðtÞ MX2 ðtÞ MXn ðtÞ That is, the mgf of a sum of independent rvs is the product of the individual mgfs.

4.3

Properties of Linear Combinations

271

Proof First, we write the moment generating function of Y as the expected value of a product.

MY ðtÞ ¼ E etY ¼ E etða1 X1 þa2 X2 þþan Xn þbÞ

¼ E eta1 X1 þta2 X2 þþtan Xn þtb ¼ ebt E ea1 tX1 ea2 tX2 ean tXn The last expression inside brackets is the product of functions of X1, X2, . . ., Xn. Since the Xis are independent, the expected value can be distributed across this product:

ebt E½ea1 tX1 ea2 tX2 ean tXn ¼ ebt E ea1 tX1 E ea2 tX2 E ean tXn ■ ¼ ebt MX1 ða1 tÞ MX2 ða2 tÞ MXn ðan tÞ Now suppose we wish to determine the pdf of some linear combination of independent rvs. Provided we have their mgfs, the previous proposition makes it easy to determine the mgf of the linear combination. Then, if we can recognize this mgf as belonging to some known distributional family (binomial, exponential, etc.), the uniqueness property of mgfs guarantees that our linear combination has that particular distribution. The next several propositions illustrate this technique. PROPOSITION

If X1, X2, . . ., Xn are independent, normally distributed rvs (with possibly different means and/or sds), then any linear combination of the Xis also has a normal distribution. In particular, the sum of independent normally distributed rvs itself has a normal distribution, and the difference X1 X2 between two independent, normally distributed variables is itself normally distributed. Proof Let Y ¼ a1X1 + a2X2 + + anXn + b, where Xi is normally distributed with mean μi and 2 2 standard deviation σ i, and the Xis are independent. From Sect. 3.3, MXi ðtÞ ¼ eμi tþσ i t =2 : Therefore, MY ðtÞ ¼ ebt MX1 a1 t MX2 a2 t MXn an t ¼ ebt eμ1 a1 tþσ 1 a1 t =2 eμ2 a2 tþσ 2 a2 t =2 eμn an tþσ n an t =2 2 2 2 2 2 2 2 ¼ eðμ1 a1 þμ2 a2 þþμn an þbÞtþðσ1 a1 þσ 2 a2 þþσn an Þt =2 2 2 2

¼ eμtþσ

2 2 2

2 2 2

t =2

2 2

where μ ¼ a1μ1 + a2μ2 + + anμn + b and σ 2 ¼ a12σ 12 + a22σ 22 + + an2σ n2. We recognize this function as the mgf of a normal random variable, and it follows by the uniqueness property of mgfs that Y is normally distributed . Notice that the mean and variance are in agreement with the first proposition of this section. ■ Example 4.22 (Example 4.18 continued) The total revenue from the sale of the three grades of gasoline on a particular day was Y ¼ 3.5X1 + 3.65X2 + 3.8X3, and we calculated μY ¼ $6465 and (assuming independence) σ Y ¼ $493.83. If the Xis are normally distributed, the probability that revenue exceeds $5000 is 5000 6465 PðY > 5000Þ ¼ P Z > ¼ PðZ > 2:967Þ ¼ 1 Φð2:967Þ ¼ :9985 ■ 493:83 This same method may be applied to Poisson rvs, as the next proposition indicates.

272

4

Joint Probability Distributions and Their Applications

PROPOSITION

Suppose X1, . . ., Xn are independent Poisson random variables, where Xi has mean μi. Then Y ¼ X1 + + Xn also has a Poisson distribution, with mean μ1 + + μn. Proof From Sect. 2.7, the mgf of a Poisson rv with mean μ is eμðe 1Þ : Since Y is the sum of the Xis, and the Xis are independent, t

MY ðtÞ ¼ MX1 ðtÞ MXn ðtÞ ¼ eμ1 ðe 1Þ eμn ðe 1Þ ¼ eðμ1 þþμn Þðe 1Þ t

t

t

This is the mgf of a Poisson rv with mean μ1 + + μn. Therefore, by the uniqueness property of mgfs, Y has a Poisson distribution with mean μ1 + + μn. ■ Example 4.23 During the open enrollment period at a large university, the number of freshmen registering for classes through the online registration system in 1 h follows a Poisson distribution with mean 80 students; denote this rv by X1. Define X2, X3, and X4 similarly for sophomores, juniors, and seniors, and suppose the corresponding means are 125, 118, and 140, respectively. Assume these four counts are independent. The rv Y ¼ X1 + X2 + X3 + X4 represents the total number of undergraduate students registering in 1 h; by the preceding proposition, Y is also a Poisson rv, but with mean pﬃﬃﬃﬃﬃﬃﬃﬃ 80 + 125 + 118 + 140 ¼ 463 students and standard deviation 463 ¼ 21:5 students. The probability that more than 500 students enroll during 1 h, exceeding the registration system’s capacity, is then P(Y > 500) ¼1 P(Y 500) ¼ .042 (software was used to perform the calculation). ■ Because of the properties stated in the preceding two propositions, both the normal and Poisson models are sometimes called additive distributions, meaning that the sum of independent rvs from that family (normal or Poisson) will also belong to that family. The next proposition shows that not all of the major probability distributions are additive; its proof is left as an exercise (Exercise 65). PROPOSITION

Suppose X1, . . ., Xn are independent exponential random variables with common parameter λ. Then Y ¼ X1 + + Xn has a gamma distribution, with parameters α ¼ n and β ¼ 1/λ (aka the Erlang distribution). Notice this proposition requires the Xi to have the same “rate” parameter λ, i.e., the Xis must be independent and identically distributed. As we saw in Example 4.21, the sum of two independent exponential rvs with different parameters does not follow an exponential distribution.

4.3.3

Exercises: Section 4.3 (43–65)

43. A shipping company handles containers in three different sizes: (1) 27 ft3 (3 3 3), (2) 125 ft3, and (3) 512 ft3. Let Xi (i ¼ 1, 2, 3) denote the number of type i containers shipped during a given week. With μi ¼ E(Xi) and σ i ¼ SD(Xi), suppose the mean values and standard deviations are as follows:

4.3

Properties of Linear Combinations

μ1 ¼ 200 σ 1 ¼ 10

273

μ2 ¼ 250 σ 2 ¼ 12

μ3 ¼ 100 σ3 ¼ 8

(a) Assuming that X1, X2, X3 are independent, calculate the expected value and standard deviation of the total volume shipped. [Hint: Volume ¼ 27X1 + 125X2 + 512X3.] (b) Would your calculations necessarily be correct if the Xis were not independent? Explain. (c) Suppose that the Xis are independent with each one having a normal distribution. What is the probability that the total volume shipped is more than 100,000 ft3? 44. Let X1, X2, and X3 represent the times necessary to perform three successive repair tasks at a service facility. Suppose they are independent, normal rvs with expected values μ1, μ2, and μ3 and variances σ 12, σ 22, and σ 32, respectively. (a) If μ1 ¼ μ2 ¼ μ3 ¼ 60 and σ 12 ¼ σ 22 ¼ σ 32 ¼ 15, calculate P(X1 + X2 + X3 200). (b) Using the μis and σ is given in part (a), what is P(150 X1 + X2 + X3 200)? (c) Using the μis and σ is given in part (a), calculate Pð55 XÞ and Pð58 X 62Þ: [As noted at the beginning of this section, X denotes the sample mean, so here X ¼ ðX1 þ X2 þ X3 Þ=3:] (d) Using the μis and σ is given in part (a), calculate P(–10 X1 .5X2 .5X3 5). (e) If μ1 ¼ 40, μ2 ¼ 50, μ3 ¼ 60, σ 12 ¼ 10, σ 22 ¼ 12, and σ 32 ¼ 14, calculate both P(X1 + X2 + X3 160) and P(X1 + X2 2X3). 45. Five automobiles of the same type are to be driven on a 300-mile trip. The first two have six-cylinder engines, and the other three have four-cylinder engines. Let X1, X2, X3, X4, and X5 be the observed fuel efficiencies (mpg) for the five cars. Suppose these variables are independent and normally distributed with μ1 ¼ μ2 ¼ 20, μ3 ¼ μ4 ¼ μ5 ¼ 21, and σ 2 ¼ 4 for the smaller engines and 3.5 for the larger engines. Define an rv Y by Y¼

X 1 þ X2 X3 þ X4 þ X 5 2 3

so that Y is a measure of the difference in efficiency between the six-cylinder and four-cylinder engines. Compute P(0 Y) and P(–1 Y 1). [Hint: Y ¼ a1X1 + + a5X5, with a1 ¼ 12 , . . . , a5 ¼ 13 :] 46. Exercise 28 introduced random variables X and Y, the number of cars and buses, respectively, carried by a ferry on a single trip. The joint pmf of X and Y is given in the table in Exercise 9. It is readily verified that X and Y are independent. (a) Compute the expected value, variance, and standard deviation of the total number of vehicles on a single trip. (b) If each car is charged $3 and each bus $10, compute the expected value, variance, and standard deviation of the revenue resulting from a single trip. 47. A concert has three pieces of music to be played before intermission. The time taken to play each piece has a normal distribution. Assume that the three times are independent of each other. The mean times are 15, 30, and 20 min, respectively, and the standard deviations are 1, 2, and 1.5 min, respectively. What is the probability that this part of the concert takes at most 1 h? Are there reasons to question the independence assumption? Explain. 48. Refer to Exercise 3. (a) Calculate the covariance between X1 ¼ the number of customers in the express checkout and X2 ¼ the number of customers in the superexpress checkout. (b) Calculate Var(X1 + X2). How does this compare to Var(X1) + Var(X2)?

274

4

Joint Probability Distributions and Their Applications

49. Suppose your waiting time for a bus in the morning is uniformly distributed on [0, 8], whereas waiting time in the evening is uniformly distributed on [0, 10] independent of morning waiting time. (a) If you take the bus each morning and evening for a week, what is your total expected waiting time? [Hint: Define rvs X1, . . ., X10 and use a rule of expected value.] (b) What is the variance of your total waiting time? (c) What are the expected value and variance of the difference between morning and evening waiting times on a given day? (d) What are the expected value and variance of the difference between total morning waiting time and total evening waiting time for a particular week? 50. An insurance office buys paper by the ream (500 sheets) for use in the copier, fax, and printer. Each ream lasts an average of 4 days, with standard deviation 1 day. The distribution is normal, independent of previous reams. (a) Find the probability that the next ream outlasts the present one by more than 2 days. (b) How many reams must be purchased if they are to last at least 60 days with probability at least 80%? 51. If two loads are applied to a cantilever beam as shown in the accompanying drawing, the bending moment at 0 due to the loads is a1X1 + a2X2. X1

X2

a1

a2

(a) Suppose that X1 and X2 are independent rvs with means 2 and 4 kips, respectively, and standard deviations .5 and 1.0 kip, respectively. If a1 ¼ 5 ft and a2 ¼ 10 ft, what is the expected bending moment and what is the standard deviation of the bending moment? (b) If X1 and X2 are normally distributed, what is the probability that the bending moment will exceed 75 kip-ft? (c) Suppose the positions of the two loads are random variables. Denoting them by A1 and A2, assume that these variables have means of 5 and 10 ft, respectively, that each has a standard deviation of .5, and that all Ais and Xis are independent of each other. What is the expected moment now? (d) For the situation of part (c), what is the variance of the bending moment? (e) If the situation is as described in part (a) except that Corr(X1, X2) ¼ .5 (so that the two loads are not independent), what is the variance of the bending moment? 52. One piece of PVC pipe is to be inserted inside another piece. The length of the first piece is normally distributed with mean value 20 in. and standard deviation .5 in. The length of the second piece is a normal rv with mean and standard deviation 15 in. and .4 in., respectively. The amount of overlap is normally distributed with mean value 1 in. and standard deviation .1 in. Assuming that the lengths and amount of overlap are independent of each other, what is the probability that the total length after insertion is between 34.5 and 35 in.? 53. Two airplanes are flying in the same direction in adjacent parallel corridors. At time t ¼ 0, the first airplane is 10 km ahead of the second one. Suppose the speed of the first plane (km/h) is normally distributed with mean 520 and standard deviation 10 and the second plane’s speed, independent of the first, is also normally distributed with mean and standard deviation 500 and 10, respectively.

4.3

Properties of Linear Combinations

275

(a) What is the probability that after 2 h of flying, the second plane has not caught up to the first plane? (b) Determine the probability that the planes are separated by at most 10 km after 2 h. 54. Three different roads feed into a particular freeway entrance. Suppose that during a fixed time period, the number of cars coming from each road onto the freeway is a random variable, with expected value and standard deviation as given in the table. Expected value Standard deviation

Road 1 800 16

Road 2 1000 25

Road 3 600 18

(a) What is the expected total number of cars entering the freeway at this point during the period? [Hint: Let Xi ¼ the number from road i.] (b) What is the standard deviation of the total number of entering cars? Have you made any assumptions about the relationship between the numbers of cars on the different roads? (c) With Xi denoting the number of cars entering from road i during the period, suppose that Cov(X1, X2) ¼ 80, Cov(X1, X3) ¼ 90, and Cov(X2, X3) ¼ 100 (so that the three streams of traffic are not independent). Compute the expected total number of entering cars and the standard deviation of the total. 55. Suppose we take a random sample of size n from a continuous distribution having median 0 so that the probability of any one observation being positive is .5. We now disregard the signs of the observations, rank them from smallest to largest in absolute value, and then let W ¼ the sum of the ranks of the observations having positive signs. For example, if the observations are –.3, +.7, +2.1, and –2.5, then the ranks of positive observations are 2 and 3, so W ¼ 5. In statistics literature, W is called Wilcoxon’s signed-rank statistic. W can be represented as follows: W ¼ 1 Y1 þ 2 Y2 þ 3 Y3 þ þ n Yn ¼

n X

i Yi

i¼1

where the Yis are independent Bernoulli rvs, each with p ¼ .5 (Yi ¼ 1 corresponds to the observation with rank i being positive). Compute the following: (a) E(Yi) and then E(W ) using the equation for W [Hint: The first n positive integers sum to n(n + 1)/2.] (b) Var(Yi) and then Var(W ) [Hint: The sum of the squares of the first n positive integers is n(n + 1)(2n + 1)/6.] 56. In Exercise 51, the weight of the beam itself contributes to the bending moment. Assume that the beam is of uniform thickness and density so that the resulting load is uniformly distributed on the beam. If the weight of the beam is random, the resulting load from the weight is also random; denote this load by W (kip-ft). (a) If the beam is 12 ft long, W has mean 1.5 and standard deviation .25, and the fixed loads are as described in part (a) of Exercise 51, what are the expected value and variance of the bending moment? [Hint: If the load due to the beam were w kip-ft, the contribution to the Ð 12 bending moment would be w 0 xdx.] (b) If all three variables (X1, X2, and W ) are normally distributed, what is the probability that the bending moment will be at most 200 kip-ft? 57. A professor has three errands to take care of in the Administration Building. Let Xi ¼ the time that it takes for the ith errand (i ¼ 1, 2, 3), and let X4 ¼ the total time in minutes that she spends walking to and from the building and between each errand. Suppose the Xis are independent, normally distributed, with the following means and standard deviations: μ1 ¼ 15, σ 1 ¼ 4,

276

58.

59.

60.

61.

62.

4

Joint Probability Distributions and Their Applications

μ2 ¼ 5, σ 2 ¼ 1, μ3 ¼ 8, σ 3 ¼ 2, μ4 ¼ 12, σ 4 ¼ 3. She plans to leave her office at precisely 10:00 a.m. and wishes to post a note on her door that reads, “I will return by t a.m.” What time t should she write down if she wants the probability of her arriving after t to be .01? In an area having sandy soil, 50 small trees of a certain type were planted, and another 50 trees were planted in an area having clay soil. Let X ¼ the number of trees planted in sandy soil that survive 1 year and Y ¼ the number of trees planted in clay soil that survive 1 year. If the probability that a tree planted in sandy soil will survive 1 year is .7 and the probability of 1-year survival in clay soil is .6, compute an approximation to P(–5 X Y 5). [Hint: Use a normal approximation from Sect. 3.3. Do not bother with the continuity correction.] Let X and Y be independent rvs, with X ~ N(0, 1) and Y ~ N(0, 1). (a) Use convolution to show that X + Y is also normal, and identify its mean and standard deviation. (b) Use the additive property of the normal distribution presented in this section to verify your answer to part (a). Karen throws two darts at a board with radius 10 in.; let X and Y denote the distances of the two darts from the center of the board. Under the system Karen uses, the score she receives depends upon W ¼ X + Y, the sum of these two distances. Assume X and Y are independent. (a) Suppose X and Y are both uniform on the interval [0, 10]. Use convolution to determine the pdf of W ¼ X + Y. Be very careful with your limits of integration! (b) Based on the pdf in part (a), calculate P(X + Y 5). (c) If Karen’s darts are equally likely to land anywhere on the board, it can be shown that the pdfs of X and Y are fX(x) ¼ x/50 for 0 x 10 and fY( y) ¼ y/50 for 0 y 10. Use convolution to determine the pdf of W ¼ X + Y. Again, be very careful with your limits of integration. (d) Based on the pdf in part (c), calculate P(X + Y 5). Siblings Matt and Liz both enjoy playing roulette. One day, Matt brought $10 to the local casino and Liz brought $15. They sat at different tables, and each made $1 wagers on red on consecutive spins (10 spins for Matt, 15 for Liz). Let X ¼ the number of times Matt won and Y ¼ the number of times Liz won. (a) What is a reasonable probability model for X? [Hint: Successive spins of a roulette wheel are independent, and P(land on red) ¼ 18/38.] (b) What is a reasonable probability model for Y? (c) What is a reasonable probability model for X + Y, the total number of times Matt and Liz win that day? Explain. [Hint: Since the siblings sat at different table, their gambling results are independent.] (d) Use moment-generating functions, along with your answers to (a) and (b), to show that your answer to part (c) is correct. (e) Generalize part (d): If X1, . . ., Xk are independent binomial rvs, with Xi ~ Bin(ni, p), show that their sum is also binomially distributed. (f) Does the result of part (e) hold if the probability parameter p is different for each Xi (e.g., if Matt bets on red but Liz bets on the number 27)? The children attending Milena’s birthday party are enjoying taking swings at a pin˜ata. Let X ¼ the number of swings it takes Milena to hit the pin˜ata once (since she’s the birthday girl, she goes first), and let Y ¼ the number of swings it takes her brother Lucas to hit the pin˜ata once (he goes second). Assume the results of successive swings are independent (the children don’t improve, since they’re blindfolded), and that each child has a .2 probability of hitting the pin˜ata on any attempt.

4.4

Conditional Distributions and Conditional Expectation

277

(a) What is a reasonable probability model for X? (b) What is a reasonable probability model for Y? (c) What is a reasonable probability model for X + Y, the total number of swings taken by Milena and Lucas? Explain. (Assume Milena’s and Lucas’ results are independent.) (d) Use moment-generating functions, along with your answers to (a) and (b), to show that X + Y has a negative binomial distribution. (e) Generalize part (d): If X1, . . ., Xr are independent geometric rvs with common parameter p, show that their sum has a negative binomial distribution. (f) Does the result of part (e) hold if the probability parameter p is different for each Xi (e.g., if Milena has probability .4 on each attempt while Lucas’ success probability is only .1)? 63. Let X1, . . ., Xn be independent rvs, with Xi having a negative binomial distribution with parameters ri and p (i ¼ 1, . . ., n). Use moment generating functions to show that X1 + + Xn has a negative binomial distribution, and identify the parameters of this distribution. Explain why this answer makes sense, based on the negative binomial model. [Note: Each Xi may have a different parameter ri, but all have the same p parameter.] 64. Let X and Y be independent gamma random variables, both with the same scale parameter β. The value of the shape parameter is α1 for X and α2 for Y. Use moment generating functions to show that X + Y is also gamma distributed, with shape parameter α1 + α2 and scale parameter β. Is X + Y gamma distributed if the scale parameters are different? Explain. 65. Let X and Y be independent exponential random variables with common parameter λ. (a) Use convolution to show that X + Y has a gamma distribution, and identify the parameters of that gamma distribution. (b) Use the previous exercise to establish the same result. (c) Generalize part (b): If X1, . . ., Xn are independent exponential rvs with common parameter λ, what is the distribution of their sum?

4.4

Conditional Distributions and Conditional Expectation

The distribution of Y can depend strongly on the value of another variable X. For example, if X is height and Y is weight, the distribution of weight for men who are 6 ft tall is very different from the distribution of weight for short men. The conditional distribution of Y given X ¼ x describes for each possible x value how probability is distributed over the set of y values. We define below the conditional distribution of Y given X, but the conditional distribution of X given Y can be obtained by just reversing the roles of X and Y. Both definitions are analogous to that of the conditional probability, P(A|B), as the ratio P(A \ B)/P(B). DEFINITION

Let X and Y be two discrete random variables with joint pmf p(x,y) and marginal X pmf pX(x). Then for any x value such that pX(x) > 0, the conditional probability mass function of Y given X ¼ x is pYjX ðy j xÞ ¼

pðx; yÞ pX ðxÞ

278

4

Joint Probability Distributions and Their Applications

An analogous formula holds in the continuous case. Let X and Y be two continuous random variables with joint pdf f(x,y) and marginal X pdf fX(x). Then for any x value such that fX(x) > 0, the conditional probability density function of Y given X ¼ x is f YjX ðy j xÞ ¼

f ðx; yÞ f X ðxÞ

Example 4.24 For a discrete example, reconsider Example 4.1, where X represents the deductible amount on an automobile policy and Y represents the deductible amount on a homeowner’s policy. Here is the joint distribution again.

x

p(x, y)

y 100

100

.20

.10

.20

.50

250

.05

.15

.30

.50

.25

.25

.50

200

The distribution of Y depends on X. In particular, let’s find the conditional probability that Y is 200, given that X is 250, first using the definition of conditional probability from Sect. 1.4: PðY ¼ 200 j X ¼ 250Þ ¼

PðY ¼ 200 \ X ¼ 250Þ :30 ¼ ¼ :6 PðX ¼ 250Þ :05 þ :15 þ :30

With our new definition we obtain the same result: pYjX ð200 j 250Þ ¼

pð250; 200Þ :30 ¼ :6 ¼ pX ð250Þ :50

The conditional probabilities for the two other possible values of Y are pYjX ð0 j 250Þ ¼ pYjX ð100 j 250Þ ¼

pð250; 0Þ :05 ¼ :1 ¼ pX ð250Þ :50 pð250; 100Þ :15 ¼ :3 ¼ pX ð250Þ :50

Notice that pY|X(0j250) + pY|X(100j250) + pY|X(200j250) ¼ .1 + .3 + .6 ¼ 1. This is no coincidence: conditional probabilities satisfy the properties of ordinary probabilities (i.e., they are nonnegative and they sum to 1). Essentially, the denominator in the definition of conditional probability is designed to make the total be 1. Reversing the roles of X and Y, we find the conditional distribution for X, given that Y ¼ 0: pXjY ð100 j 0Þ ¼

pð100; 0Þ :20 ¼ :8 ¼ pY ð 0Þ :20 þ :05

pXjY ð250 j 0Þ ¼

pð250; 0Þ :05 ¼ :2 ¼ pY ð 0Þ :20 þ :05

Again, the conditional probabilities add to 1.

■

4.4

Conditional Distributions and Conditional Expectation

279

Example 4.25 For a continuous example, recall Example 4.5, where X is the weight of almonds and Y is the weight of cashews in a can of mixed nuts. The sum of X + Y is at most 1 lb, the total weight of the can of nuts. The joint pdf of X and Y is 24xy 0 x 1, 0 y 1, x þ y 1 f ðx; yÞ ¼ 0 otherwise and in Example 4.5 it was shown that f X ðxÞ ¼

12xð1 xÞ2 0

0x1 otherwise

Thus, the conditional pdf of Y given that X ¼ x is f YjX ðy j xÞ ¼

f ðx; yÞ 24xy 2y ¼ ¼ 2 f X ðxÞ 12xð1 xÞ ð1 x Þ2

0y1x

This can be used to get conditional probabilities for Y. For example, ð :25 ð :25 :25 2y PðY :25 j X ¼ :5Þ ¼ f YjX ðy j :5Þ dy ¼ dy ¼ 4y2 0 ¼ :25 2 1 0 ð1 :5Þ Given that the weight of almonds (X) is .5 lb, the probability is .25 for the weight of cashews (Y) to be less than .25 lb. Just as in the discrete case, the conditional distribution assigns a total probability of 1 to the set of all possible Y values. That is, integrating the conditional density over its set of possible values should yield 1: " #1x ð1 ð 1x 2y y2 f YjX ðy j xÞ dy ¼ dy ¼ ¼1 ð1 x Þ2 0 ð1 x Þ2 1 0 Whenever you calculate a conditional density, we recommend doing this integration as a validity check. ■

4.4.1

Conditional Distributions and Independence

Recall that in Sect. 4.1 two random variables were defined to be independent if their joint pmf or pdf factors into the product of the marginal pmfs or pdfs. We can understand this definition better with the help of conditional distributions. For example, suppose there is independence in the discrete case. Then pYjX ðy j xÞ ¼

pðx; yÞ pX ðxÞpY ðyÞ ¼ ¼ pY ð y Þ pX ðxÞ pX ð x Þ

That is, independence implies that the conditional distribution of Y is the same as the unconditional (i.e., marginal) distribution, and that this is true no matter the value of X. The implication works in the other direction, too. If pY|X(y|x) ¼ pY( y), then

280

4

Joint Probability Distributions and Their Applications

pðx; yÞ ¼ pY ð y Þ pX ðxÞ so p(x, y) ¼ pX(x) pY( y), and therefore X and Y are independent. In Example 4.7 we said that independence necessitates the region of positive density being a rectangle (possibly infinite in extent). In terms of conditional distributions, this region tells us the domain of Y for each possible x value. For independence we need to have the domain of Y (the interval of positive density) be the same for each x, implying a rectangular region.

4.4.2

Conditional Expectation and Variance

Because the conditional distribution is a valid probability distribution, it makes sense to define the conditional mean and variance. DEFINITION

Let X and Y be two discrete random variables with conditional probability mass function pY|X(y|x). Then the conditional expectation (or conditional mean) of Y given X ¼ x is X μYjX¼x ¼ EðY j X ¼ xÞ ¼ y pYjX ðy j xÞ y

Analogously, for two continuous rvs X and Y with conditional probability density function fY|X(y|x), ð1 μYjX¼x ¼ EðY j X ¼ xÞ ¼ y f YjX ðy j xÞ dy 1

More generally, the conditional mean of any function h(Y ) is given by 8 X > hðyÞ pYjX ðy j xÞ ðdiscrete caseÞ > < y EðhðY ÞjX ¼ xÞ ¼ ð 1 > > hðyÞ f YjX ðy j xÞdy ðcontinous caseÞ : 1

In particular, the conditional variance of Y given X ¼ x is σ 2Y j X¼x ¼ VarðY j X ¼ xÞ ¼ E½ðY μY j X¼x Þ2 jX ¼ x ¼ E Y 2 j X ¼ x μ2Y j X¼x Example 4.26 Having previously found the conditional distribution of Y given X ¼ 250 in Example 4.24, we now compute the conditional mean and variance. μYjX¼250 ¼ EðY j X ¼ 250Þ ¼ 0 pY jX ð0 j 250Þ þ 100 pY jX ð100 j 250Þ þ 200 pY jX ð200 j 250Þ ¼ 0ð:1Þ þ 100ð:3Þ þ 200ð:6Þ ¼ 150 The average homeowner’s policy deductible, among customers with a $250 auto deductible, is $150. Given that the possibilities for Y are 0, 100, and 200 and most of the probability is on the latter two values, it is reasonable that the conditional mean should be between 100 and 200.

4.4

Conditional Distributions and Conditional Expectation

281

Using the alternative (shortcut) formula for the conditional variance requires first obtaining the conditional expectation of Y2: E Y 2 j X ¼ 250 ¼ 02 pY jX ð0 j 250Þ þ 1002 pY jX ð100 j 250Þ þ 2002 pY jX ð200 j 250Þ ¼ 02 ð:1Þ þ 1002 ð:3Þ þ 2002 ð:6Þ ¼ 27, 000 Thus, σ 2YjX¼250 ¼ VarðY j X ¼ 250Þ ¼ E Y 2 j X ¼ 250 μ2YjX¼250 ¼ 27, 000 1502 ¼ 4500 Taking the square root gives σ Y|X ¼ 250 ¼ $67.08, which is in the right ballpark when we recall that the possible values of Y are 0, 100, and 200. ■ Example 4.27 (Example 4.25 continued) Suppose a 1-lb can of mixed nuts contains .1 lbs of almonds (i.e., we know that X ¼ .1). Given this information, the amount of cashews Y in the can is constrained by 0 y 1 x ¼ .9, and the expected amount of cashews in such a can is ð :9 ð :9 2y EðY j X ¼ :1Þ ¼ y f YjX ðy j :1Þdy ¼ y dy ¼ :6 ð 1 :1Þ2 0 0 The conditional variance of Y given that X ¼ .1 is ð :9 ð :9 2 VarðY j X ¼ :1Þ ¼ ðy :6Þ f YjX ðy j :1Þdy ¼ ðy :6Þ2 0

2y ð1 :1Þ2

dy ¼ :045

Using the aforementioned shortcut, this can also be calculated in two steps: ð :9 ð :9 2y E Y 2 j X ¼ :1 ¼ y2 f YjX ðy j :1Þdy ¼ y2 dy ¼ :405 ð1 :1Þ2 0 0 2 ) VarðY j X ¼ :1Þ ¼ :405 :6 ¼ :045 More generally, conditional on X ¼ x lbs (where 0 < x < 1), integrals similar to those above can be used to show that the conditional mean amount of cashews is 2(1 x)/3, and the corresponding conditional variance is (1 x)2/18. This formula implies that the variance gets smaller as the weight of almonds in a can approaches 1 lb. Does this make sense? When the weight of almonds is 1 lb, the weight of cashews is guaranteed to be 0, implying that the variance is 0. Indeed, Fig. 4.2 shows that the set of possible y-values narrows to 0 as x approaches 1. ■

4.4.3

The Laws of Total Expectation and Variance

By the definition of conditional expectation, the rv Y has a conditional mean for every possible value x of the variable X. In Example 4.26, we determined the mean of Y given that X ¼ 250, but a different mean would result if we conditioned on X ¼ 100. For the continuous rvs in Example 4.27, every value x between 0 and 1 yielded a different conditional mean of Y (and, in fact, we even found a general formula for this conditional expectation). As it turns out, these conditional means can be related back to the unconditional mean of Y, i.e., μY. Our next example illustrates the connection.

282

4

Joint Probability Distributions and Their Applications

Example 4.28 Apartments in a certain city have x ¼ 0, 1, 2, or 3 bedrooms (0 for a studio apartment), and y ¼ 1, 1.5, or 2 bathrooms. The accompanying table gives the proportions of apartments for the various number of bedroom/number of bathroom combinations.

1

y 1.5

2

.10

.00

.00

.1

1

.20

.08

.02

.3

2

.15

.10

.15

.4

3

.05

.05

.10

.2

.50

.23

.27

p(x, y)

x

Let X and Y denote the number of bedrooms and bathrooms, respectively, in a randomly selected apartment in this city. The marginal distribution of Y comes from the column totals in the joint probability table, from which it is easily verified that E(Y ) ¼ 1.385 and Var(Y ) ¼ .179275. The conditional distributions (pmfs) of Y given that X ¼ x for x ¼ 0, 1, 2, and 3 are as follows: x¼0:

pYjX¼0 ð1Þ ¼ 1ðall studio apartments have one bathroomÞ

x¼1:

pYjX¼1 ð1Þ ¼ :667,

pYjX¼1 ð1:5Þ ¼ :267,

pYjX¼1 ð2Þ ¼ :067

x¼2:

pYjX¼2 ð1Þ ¼ :375,

pYjX¼2 ð1:5Þ ¼ :25,

pYjX¼2 ð2Þ ¼ :375

x¼3:

pYjX¼3 ð1Þ ¼ :25,

pYjX¼3 ð1:5Þ ¼ :25,

pYjX¼3 ð2Þ ¼ :50

From these conditional pmfs, we obtain the expected value of Y given X ¼ x for each of the four possible x values: EðY j X ¼ 0Þ ¼ 1, EðY j X ¼ 1Þ ¼ 1:2, EðY j X ¼ 2Þ ¼ 1:5, EðY j X ¼ 3Þ ¼ 1:625 So, on the average, studio apartments have 1 bathroom, one-bedroom apartments have 1.2 bathrooms, 2-bedrooms have 1.5 baths, and luxurious 3-bedroom apartments have 1.625 baths. Now, instead of writing E(Y|X ¼ x) for some specific value x, let’s consider the expected number of bathrooms for an apartment of randomly selected size, X. This expectation, denoted E(Y|X), is itself a random variable, since it is a function of the random quantity X. Its smallest possible value is 1, which occurs when X ¼ 0, and that happens with probability .1 (the sum of probabilities in the first row of the joint probability table). Similarly, the random variable E(Y|X) takes on the value 1.2 with probability pX(1) ¼ .3. Continuing in this manner, the probability distribution of the rv E(Y|X) is as follows: Value of EðYjXÞ

1

1:2

1:5

1:625

Probability of value

:1

:3

:4

:2

ð4:7Þ

The expected value of this random variable, denoted E[E(Y|X)], is computed by taking the weighted average of the four values of E(Y|X ¼ x) against the probabilities specified by pX(x), as suggested by (4.7): E½EðY j XÞ ¼ 1ð:1Þ þ 1:2ð:3Þ þ 1:5ð:4Þ þ 1:625ð:2Þ ¼ 1:385 But this is exactly E(Y), the expected number of bathrooms.

■

4.4

Conditional Distributions and Conditional Expectation

283

LAW OF TOTAL EXPECTATION

For any two random variables X and Y, E½EðY j XÞ ¼ EðY Þ (This is sometimes referred to as computing E(Y ) by means of iterated expectation.) The Law of Total Expectation says that E(Y) is a weighted average of the conditional means E(Y|X ¼ x), where the weights are given by the pmf or pdf of X. It is analogous to the Law of Total Probability, which describes how to find P(B) as a weighted average of conditional probabilities P(B|Ai). Proof Here is the proof when both rvs are discrete; in the jointly continuous case, simply replace summation by integration and pmfs by pdfs. X X

X E Eð Y j X Þ ¼ EðY j X ¼ xÞpX ðxÞ ¼ ypYjX ðy j xÞpX ðxÞ x2DX

x2DX y2DY

X X X X pðx; yÞ pX ðxÞ ¼ y y pðx; yÞ ¼ pX ðxÞ x2DX y2DY y2DY x2DX X ypY ðyÞ ¼ EðY Þ ¼

■

y2DY

In Example 4.28, the use of iterated expectation to compute E(Y ) is unnecessarily cumbersome; working from the marginal pmf of Y is more straightforward. However, there are many situations in which the distribution of a variable Y is only expressed conditional on the value of another variable X. For these so-called hierarchical models, the Law of Total Expectation proves very useful. Example 4.29 A ferry goes from the left bank of a small river to the right bank once an hour. The ferry can accommodate at most two vehicles. The probability that no vehicles show up is .1, than exactly one shows up is .7, and that two or more show up is .2 (but only two can be transported). The fare paid for a vehicle depends upon its weight, and the average fare per vehicle is $25. What is the expected fare for a single trip made by this ferry? Let X represent the number of vehicles that show up, and let Y denote the total fare for a single trip. The conditional mean of Y, given X, is given by E(Y|X) ¼ 25X. So, by the Law of Total Expectation, 2

X EðY Þ ¼ E E Y j X ¼ E 25X ¼ ½25x pX ðxÞ x¼0 ¼ ð0Þ :1 þ 25 :7 þ 50 :2 ¼ $27:50

■

The next theorem provides a way to compute the variance of Y by conditioning on the value of X. There are two contributions to Var(Y ). The first part is the variance of the random variable E(Y|X). The second part involves the random variable Var(Y|X)—the variance of Y as a function of X—and in particular the expected value of this random variable. LAW OF TOTAL VARIANCE

For any two random variables X and Y, VarðY Þ ¼ Var½EðY j XÞ þ E½VarðY j XÞ

284

4

Joint Probability Distributions and Their Applications

Proving the Law of Total Variance requires some more sophisticated algebra; see Exercise 84. For those familiar with statistical methods, the Law of Total Variance is analogous to the famous ANOVA identity, wherein the total variability in a response variable Y can be decomposed into the differences between group means (here, the term Var[E(Y|X)]) and the variation of responses within groups (represented by E[Var(Y|X)] above). Example 4.30 Let’s verify the Law of Total Variance for the apartment scenario of Example 4.28. The pmf of the rv E(Y|X) appears in (4.7), from which its variance is given by Var½EðY j XÞ ¼ ð1 1:385Þ2 ð:1Þ þ 1:2 1:385 2 ð:3Þ þ 1:5 1:385 2 ð:4Þ þ 1:625 1:385 2 ð:2Þ ¼ 0:0419 (Recall that 1.385 is the mean of the rv E(Y|X), which, by the Law of Total Expectation, is also E(Y ).) The second term in the Law of Total Variance involves the variable Var(Y|X), which requires determining the conditional variance of Y given X ¼ x for x ¼ 0, 1, 2, 3. Using the four conditional distributions displayed in Example 4.28, these are VarðY j X ¼ 0Þ ¼ 0; VarðY j X ¼ 1Þ ¼ :0933 VarðY j X ¼ 2Þ ¼ :1875; VarðY j X ¼ 3Þ ¼ :171875 The rv Var(Y|X) takes on these four values with probabilities .1, .4, .3, and .2, respectively (again, these are inherited from the distribution of X). Thus, E½VarðY j XÞ ¼ 0ð:1Þ þ :0933ð:3Þ þ :1875ð:4Þ þ :171875ð:2Þ ¼ :137375 Combining, Var[E(Y|X)] + E[Var(Y|X)] ¼ .0419 + .137375 ¼ .179275 This is exactly Var(Y) computed using the marginal pmf of Y in Example 4.28, and the Law of Total Variance is verified for this example. ■ The computation of Var(Y ) in Example 4.30 is clearly not efficient; it is much easier, given the joint pmf of X and Y, to determine the variance of Y from its marginal pmf. As with the Law of Total Expectation, the real worth of the Law of Total Variance comes from its application to hierarchical models, where the distribution of one variable (Y, say) is only known conditional on the distribution of another rv. Example 4.31 In the manufacture of ceramic tiles used for heat shielding, the proportion of tiles that meet the required thermal specifications varies from day to day. Let P denote the proportion of tiles meeting specifications on a randomly selected day, and suppose P can be modeled by the following pdf: f ðpÞ ¼ 9p8

0 0, x + y < 10, where x and y are in months. (a) If the first component functions for exactly 3 months, what is the probability that the second functions for more than 2 months? (b) Suppose the system will continue to work only as long as both components function. Among 20 of these systems that operate independently of each other, what is the probability that at least half work for more than 3 months? 68. The joint pdf of pressures for right and left front tires is given in Exercise 11. (a) Determine the conditional pdf of Y given that X ¼ x and the conditional pdf of X given that Y ¼ y. (b) If the pressure in the right tire is found to be 22 psi, what is the probability that the left tire has a pressure of at least 25 psi? Compare this to P(Y 25). (c) If the pressure in the right tire is found to be 22 psi, what is the expected pressure in the left tire, and what is the standard deviation of pressure in this tire?

4.4

Conditional Distributions and Conditional Expectation

287

69. Suppose that X is uniformly distributed between 0 and 1. Given X ¼ x, Y is uniformly distributed between 0 and x2. (a) Determine E(Y|X ¼ x) and then Var(Y|X ¼ x). (b) Determine f(x,y) using fX(x) and fY|X(y|x). (c) Determine fY( y). 70. Consider three Ping-Pong balls numbered 1, 2, and 3. Two balls are randomly selected with replacement. If the sum of the two resulting numbers exceeds 4, two balls are again selected. This process continues until the sum is at most 4. Let X and Y denote the last two numbers selected. Possible (X, Y ) pairs are {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (3, 1)}. (a) Determine pX,Y(x,y). (b) Determine pY|X(y|x). (c) Determine E(Y|X ¼ x). (d) Determine E(X|Y ¼ y). What special property of p(x, y) allows us to get this from (c)? (e) Determine Var(Y|X ¼ x). 71. Let X be a random digit (0, 1, 2, . . ., 9 are equally likely) and let Y be a random digit not equal to X. That is, the nine digits other than X are equally likely for Y. (a) Determine pX(x), pY|X(y|x), pX,Y(x,y). (b) Determine a formula for E(Y|X ¼ x). 72. A pizza delivery business has two phones. On each phone the waiting time until the first call is exponentially distributed with mean 1 min. Each phone is not influenced by the other. Let X be the shorter of the two waiting times and let Y be the longer. Using techniques from Sect. 4.9, it can be shown that the joint pdf of X and Y is f(x, y) ¼ 2e–(x+y) for 0 < x < y < 1. (a) Determine the marginal density of X. (b) Determine the conditional density of Y given X ¼ x. (c) Determine the probability that Y is greater than 2, given that X ¼ 1. (d) Are X and Y independent? Explain. (e) Determine the conditional mean of Y given X ¼ x. (f) Determine the conditional variance of Y given X ¼ x. 73. Teresa and Allison each have arrival times uniformly distributed between 12:00 and 1:00. Their times do not influence each other. If Y is the first of the two times and X is the second, on a scale of 0 to 1, it can be shown that the joint pdf of X and Y is f(x, y) ¼ 2 for 0 < y < x < 1. (a) Determine the marginal density of X. (b) Determine the conditional density of Y given X ¼ x. (c) Determine the conditional probability that Y is between 0 and .3, given that X is .5. (d) Are X and Y independent? Explain. (e) Determine the conditional mean of Y given X ¼ x. (f) Determine the conditional variance of Y given X ¼ x. 74. Refer back to the previous exercise. (a) Determine the marginal density of Y. (b) Determine the conditional density of X given Y ¼ y. (c) Determine the conditional mean of X given Y ¼ y. (d) Determine the conditional variance of X given Y ¼ y. 75. According to an article in the August 30, 2002 issue of the Chronicle of Higher Education, 30% of first-year college students are liberals, 20% are conservatives, and 50% characterize themselves as middle-of-the-road. Choose two students at random, let X be the number of liberals among the two, and let Y be the number of conservatives among the two.

288

76.

77.

78.

79.

4

Joint Probability Distributions and Their Applications

(a) Using the multinomial distribution from Sect. 4.1, give the joint probability mass function p (x, y) of X and Y and the corresponding joint probability table. (b) Determine the marginal probability mass functions by summing p(x, y) numerically. How could these be obtained directly? [Hint: What are the univariate distributions of X and Y?] (c) Determine the conditional probability mass function of Y given X ¼ x for x ¼ 0, 1, 2. Compare this to the binomial distribution with n ¼ 2 x and p ¼ .2/(.2 + .5). Why should this work? (d) Are X and Y independent? Explain. (e) Find E(Y|X ¼ x) for x ¼ 0, 1, 2. Do this numerically and then compare with the use of the formula for the binomial mean, using the binomial distribution given in part (c). (f) Determine Var(Y|X ¼ x) for x ¼ 0, 1, 2. Do this numerically and then compare with the use of the formula for the binomial variance, using the binomial distribution given in part (c). A class has 10 mathematics majors, 6 computer science majors, and 4 statistics majors. Two of these students are randomly selected to make a presentation. Let X be the number of mathematics majors and let Y be the number of computer science majors chosen. (a) Determine the joint probability mass function p(x,y). This generalizes the hypergeometric distribution studied in Sect. 2.6. Give the joint probability table showing all nine values, of which three should be 0. (b) Determine the marginal probability mass functions by summing numerically. How could these be obtained directly? [Hint: What type of rv is X? Y?] (c) Determine the conditional probability mass function of Y given X ¼ x for x ¼ 0, 1, 2. Compare with the h(y; 2 x, 6, 10) distribution. Intuitively, why should this work? (d) Are X and Y independent? Explain. (e) Determine E(YjX ¼ x), x ¼ 0, 1, 2. Do this numerically and then compare with the use of the formula for the hypergeometric mean, using the hypergeometric distribution given in part (c). (f) Determine Var(YjX ¼ x), x ¼ 0, 1, 2. Do this numerically and then compare with the use of the formula for the hypergeometric variance, using the hypergeometric distribution given in part (c). A 1-ft-long stick is broken at a point X (measured from the left end) chosen randomly uniformly along its length. Then the left part is broken at a point Y chosen randomly uniformly along its length. In other words, X is uniformly distributed between 0 and 1 and, given X ¼ x, Y is uniformly distributed between 0 and x. (a) Determine E(YjX ¼ x) and then Var(YjX ¼ x). (b) Determine f(x,y) using fX(x) and fY|X(yjx). (c) Determine fY( y). (d) Use fY( y) from (c) to get E(Y) and Var(Y ). (e) Use (a) and the Laws of Total Expectation and Variance to get E(Y ) and Var(Y ). Consider the situation in Example 4.29, and suppose further that the standard deviation for fares per car is $4. (a) Find the variance of the rv E(Y|X). (b) Using Expression (4.6) from the previous section, the conditional variance of Y given X ¼ x is 42x ¼ 16x. Determine the mean of the rv Var(Y|X). (c) Use the Law of Total Variance to find σ Y, the unconditional standard deviation of Y. This week the number X of claims coming into an insurance office has a Poisson distribution with mean 100. The probability that any particular claim relates to automobile insurance is .6,

4.4

80.

81.

82.

83.

Conditional Distributions and Conditional Expectation

289

independent of any other claim. If Y is the number of automobile claims, then Y is binomial with X trials, each with “success” probability .6. (a) Determine E(Y|X ¼ x) and Var(Y|X ¼ x). (b) Use part (a) to find E(Y ). (c) Use part (a) to find Var(Y ). In the previous exercise, show that the distribution of Y is Poisson with mean 60. [You will need to recognize the Maclaurin series expansion for the exponential function.] Use the knowledge that Y is Poisson with mean 60 to find E(Y ) and Var(Y ). The heights of American men follow a normal distribution with mean 70 in. and standard deviation 3 in. Suppose that the weight distribution (lbs) for men that are x inches tall also has a normal distribution, but with mean 4x 104 and standard deviation .3x 17. Let Y denote the weight of a randomly selected American man. Find the (unconditional) mean and standard deviation of Y. A statistician is waiting behind one person to check out at a store. The check-out time for the first person, X, can be modeled by an exponential distribution with some parameter λ > 0. The statistician observes the first person’s check-out time, x; being a statistician, she surmises that her check-out time Y will follow an exponential distribution with mean x. (a) Determine E(Y|X ¼ x) and Var(Y|X ¼ x). (b) Use the Laws of Total Expectation and Variance to find E(Y ) and Var(Y). (c) Write out the joint pdf of X and Y. [Hint: You have fX(x) and fY|X(y|x).] Then write an integral expression for the marginal pdf of Y (from which, at least in theory, one could determine the mean and variance of Y ). What happens? In the game Plinko on the television game show The Price is Right, contestants have the opportunity to earn “chips” (flat, circular disks) that can be dropped down a peg board into slots labeled with cash amounts. Every contestant is given one chip automatically and can earn up to four more chips by correctly guessing the prices of certain small items. If we let p denote the probability a contestant correctly guesses the price of a prize, then the number of chips a contestant earns, X, can be modeled as X ¼ 1 + N, where N ~ Bin(4, p). (a) Determine E(X) and Var(X). (b) For each chip, the amount of money won on the Plinko board has the following distribution: Value Probability

$0 .39

$100 .03

$500 .11

$1000 .24

$10,000 .23

Determine the mean and variance of the winnings from a single chip. (c) Let Y denote the total winnings of a randomly selected contestant. Using results from the previous section, the conditional mean and variance of Y, given a player gets x chips, are μx and σ 2x, respectively, where μ and σ 2 are the mean and variance for a single chip computed in (b). Find expressions for the (unconditional) mean and standard deviation of Y. [Note: Your answers will be functions of p.] (d) Evaluate your answers to part (c) for p ¼ 0, .5, and 1. Do these answers make sense? Explain. 84. Let X and Y be any two random variables. (a) Show that E[Var(Y|X)] ¼ E[Y2] Eμ2YjX . [Hint: Use the variance shortcut formula and apply the Law of Total Expectation to the first term.] (b) Show that Var(E[Y|X]) ¼ Eμ2YjX (E[Y])2. [Hint: Use the variance shortcut formula again; this time, apply the Law of Total Expectation to the second term.] (c) Combine the previous two results to establish the Law of Total Variance.

290

4.5

4

Joint Probability Distributions and Their Applications

Limit Theorems (What Happens as n Gets Large)

Many problems in probability and statistics involve either a sum or an average of random variables. In this section we consider what happens as n, the number of variables in such sums and averages, gets large. The most important result of this type is the celebrated Central Limit Theorem, according to which the approximate distribution is normal when n is sufficiently large.

4.5.1

Random Samples

The random variables from which our sums and averages will be created must satisfy two general conditions. DEFINITION

The rvs X1, X2, . . ., Xn are said to be independent and identically distributed (iid) if 1. The Xis are independent rvs. 2. Every Xi has the same probability distribution. Such a collection of rvs is also called a (simple) random sample of size n. For example, X1, X2, . . . Xn might be a random sample from a normal distribution with mean 100 and standard deviation 15; then the Xis are independent and each one has the specified normal distribution. Similarly, for these variables to constitute a random sample from an exponential distribution, they must be independent and the value of the exponential parameter λ must be the same for each variable. The notion of iid rvs is meant to resemble (simple) random sampling from a population: X1 is the value of some variable for the first individual or object selected, X2 is the value of that same variable for the second selected individual or object, and so on. If sampling is either with replacement or from a (potentially) infinite population, Conditions 1 and 2 are satisfied exactly. These conditions will be approximately satisfied if sampling is without replacement, yet the sample size n is much smaller than the population size N. In practice, if n/N .05 (at most 5% of the population is sampled), we proceed as if the Xis form a random sample. Throughout this section, we will be primarily interested in the properties of two particular rvs derived from random samples: the sample total T and the sample mean X: T ¼ X1 þ þ Xn ¼

n X i¼1

Xi ,

X1 þ þ Xn T ¼ : X ¼ n n

Note that both T and X are linear combinations of the Xis.

4.5

Limit Theorems (What Happens as n Gets Large)

291

PROPOSITION

Suppose X1, X2, . . ., Xn are iid with common mean μ and common standard deviation σ. T and X have the following properties: 1. E(T ) ¼ nμ pﬃﬃﬃ nσ

1. EðXÞ ¼ μ

σ2 σ and SDðXÞ ¼ pﬃﬃﬃ n n 3. If the Xis are normally distributed, then T is 3. If the Xis are normally distributed, then X is also normally distributed. also normally distributed. 2. Var(T ) ¼ nσ 2 and SDðT Þ ¼

2. VarðXÞ ¼

Proof Recall from the main theorem of Sect. 4.3 that the expected value of a sum is the sum of individual expected values; moreover, when the variables in the sum are independent, the variance of the sum is the sum of the individual variances: EðT Þ ¼ E X1 þ þ Xn ¼ E X1 þ þ E Xn ¼ μ þ þ μ ¼ nμ VarðT Þ ¼ Var X1 þ þ Xn ¼ Var X1 þ þ Var Xn ¼ σ 2 þ þ σ 2 ¼ nσ 2 pﬃﬃﬃﬃﬃﬃﬃ pﬃﬃﬃ SDðT Þ ¼ nσ 2 ¼ nσ The corresponding results for X can be derived by writing X ¼ 1n T and using basic rescaling properties, such as E(cY) ¼ cE(Y ). Property 3 is a consequence of the more general result from Sect. 4.3 that any linear combination of independent normal rvs is normal. ■ According to Property 1, the distribution of X is centered precisely at the mean of the population from which the sample has been selected. If the sample mean is used to compute an estimate (educated guess) of the population mean μ, there will be no systematic tendency for the estimate to be too large or too small. Property 2 shows that the X distribution becomes more concentrated about μ as the sample size n increases, because its standard deviation decreases. In marked contrast, the distribution of T becomes more spread out as n increases. Averaging moves probability in toward the middle, pﬃﬃﬃ whereas totaling spreads probability out over a wider and wider range of values. The expression σ= n for the standard deviation of X is called the standard error of the mean, and it indicates the typical amount by which a value of X will deviate from the true mean, μ (in contrast, σ itself represents the typical difference between an individual Xi and μ). When σ is unknown, as is usually the case when μ is unknown and we are trying to estimate it, we may substitute the sample standard deviation, s, of our sample into the standard error formula and say pﬃﬃﬃ that an observed value of X will typically differ by about s= n from μ. This is the estimated standard error formula presented in Sects. 2.8 and 3.8. Finally, Property 3 says that we know everything there is to know about the X and T distributions when the population distribution is normal. In particular, probabilities such as Pða X bÞ and P(c T d) can be obtained simply by standardizing. Figure 4.8 illustrates the X part of the proposition.

292 Fig. 4.8 A normal population distribution and X sampling distributions

4

Joint Probability Distributions and Their Applications

X distribution when n = 10

X distribution when n = 4 Population distribution

Example 4.33 The amount of time that a patient undergoing a particular procedure spends in a certain outpatient surgery center is a random variable with a mean value of 4.5 h and a standard deviation of 1.4 h. Let X1, . . ., X25 be the times for a random sample of 25 patients. Then the expected total time for the 25 patients is E(T ) ¼ nμ ¼ 25(4.5) ¼ 112.5 h, whereas the expected sample mean amount of time is EðXÞ ¼ μ ¼ 4:5 hours: The standard deviations of T and X are pﬃﬃﬃﬃﬃ pﬃﬃﬃ σ T ¼ nσ ¼ 25ð1:4Þ ¼ 7 hours σ 1:4 σ X ¼ pﬃﬃﬃ ¼ pﬃﬃﬃﬃﬃ ¼ :28 hours n 25 Suppose further that such patient times follow a normal distribution, i.e., Xi ~ N(4.5, 1.4). Then the total time spent by 25 randomly selected patients in this center is also normal: T ~ N(112.5, 7). The probability their total time exceeds 5 days (120 h) is 120 112:5 PðT > 120Þ ¼ 1 PðT 120Þ ¼ 1 Φ ¼ 1 Φð1:07Þ ¼ :1423 7 for 25 patients, a total time of 120 h equates to This same probability can be reframed in terms of X: an average time of 120/25 ¼ 4.8 h, and since X N ð4:5; :28Þ, 4:8 4:5 PðX > 4:8Þ ¼ 1 Φ ¼ 1 Φð1:07Þ ¼ :1423 ■ :28 Example 4.34 Resistors used in electronics manufacturing are labeled with a “nominal” resistance as well as a percentage tolerance. For example, a 330-ohm resistor with a 5% tolerance is anticipated to have an actual resistance between 313.5 Ω and 346.5 Ω. Consider five such resistors, randomly selected from the population of all resistors with those specifications, and model the resistance of each by a uniform distribution on [313.5, 346.5]. If these are connected in series, the resistance R of the system is given by R ¼ X1 + + X5, where the Xi are the iid uniform resistances. A random variable uniformly distributed on [A, B] has mean (A + B)/2 and standard deviation pﬃﬃﬃﬃﬃ ðB AÞ= 12: For our uniform model, the mean resistance is E(Xi) ¼ (313.5 + 346.5)/2 ¼ 330 Ω, pﬃﬃﬃﬃﬃ the nominal resistance, with a standard deviation of ð346:5 313:5Þ= 12 ¼ 9:526 Ω: The system’s resistance has mean and standard deviation pﬃﬃﬃ pﬃﬃﬃ EðRÞ ¼ nμ ¼ 5ð330Þ ¼ 1650Ω, SDðRÞ ¼ nσ ¼ 5ð9:526Þ ¼ 21:3Ω But what is the probability distribution of R? Is R also uniformly distributed? Determining the exact pdf of R is difficult (it requires four convolutions). And the mgf of R, while easy to obtain, is not recognizable as coming from any particular family of known distributions. Instead, we resort to a simulation of R, the results of which appear in Fig. 4.9. For 10,000 iterations in R (appropriately), five

4.5

Limit Theorems (What Happens as n Gets Large)

293

Histogram of R

1500

Frequency

1000

500

0 1600

1650 R

1700

Fig. 4.9 Simulated distribution of the random variable R in Example 4.34

independent uniform variates on [313.5, 346.5] were created and summed; see Sect. 3.8 for information on simulating a uniform distribution. The histogram in Fig. 4.9 clearly indicates that R is not uniform; in fact, if anything, R appears (from the simulation, anyway) to be approximately normal! ■

4.5.2

The Central Limit Theorem

When iid Xis are normally distributed, so are T and X for every sample size n. The simulation results from Example 4.34 suggest that even when the population distribution is not normal, summing (or averaging) produces a distribution more bell-shaped than the one being sampled. Upon reflection, this is quite intuitive: in order for R to be near 5(346.5) ¼ 1732.5, its theoretical maximum, all five randomly selected resistors would have to exert resistances at the high end of their common range (i.e., every Xi would have to be near 346.5). Thus, R-values near 1732.5 are unlikely, and the same applies to R’s theoretical minimum of 5(313.5) ¼ 1567.5. On the other hand, there are many ways for R to be near the mean value of 1650: all five resistances in the middle, two low and one middle and two high, and so on. Thus, R is more likely to be “centrally” located than out at the extremes. (This is analogous to the well-known fact that rolling a pair of dice is far more likely to result in a sum of 7 than 2 or 12, because there are more ways to obtain 7.) This general pattern of behavior for sample totals and sample means is formalized by the most important theorem of probability, the Central Limit Theorem (CLT). A proof of this theorem is beyond the scope of this book, but interested readers may consult the text by Devore and Berk listed in the references.

294

4

Joint Probability Distributions and Their Applications

CENTRAL LIMIT THEOREM

Let X1, X2, . . ., Xn be a random sample from a distribution with mean μ and standard deviation σ. Then, in the limit as n ! 1, the standardized versions of T and X have the standard normal distribution. That is, T nμ lim P pﬃﬃﬃ z ¼ PðZ zÞ ¼ ΦðzÞ n!1 nσ and

X μ pﬃﬃﬃ z lim P n!1 σ= n

¼ PðZ zÞ ¼ ΦðzÞ

where Z is a standard normal rv. It is customary to say that T and X are asymptotically normal. Thus when n is sufficiently large, the sample total T has approximately a normal distribution pﬃﬃﬃ with mean μT ¼ nμ and standard deviation σ T ¼ nσ: Equivalently, for large n the sample mean X has approximately a normal distribution with mean μX ¼ μ and standard deviation pﬃﬃﬃ σ X ¼ σ= n: According to the CLT, when n is large and Figure 4.10 illustrates the Central Limit Theorem for X: we wish to calculate a probability such as Pða X bÞ or P(c T d), we need only “pretend” that X or T is normal, standardize it, and use software or the standard normal table. The resulting answer will be approximately correct. The exact answer could be obtained only by first finding the so the CLT provides a truly impressive shortcut. distribution of T or X, A practical difficulty in applying the CLT is in knowing when n is “sufficiently large.” The problem is that the accuracy of the approximation for a particular n depends on the shape of the original underlying distribution being sampled. If the underlying distribution is symmetric and there is not much probability far out in the tails, then the approximation will be good even for a small n, whereas if it is highly skewed or has “heavy” tails, then a large n will be required. For example, if the distribution is uniform on an interval, then it is symmetric with no probability in the tails, and the normal approximation is very good for n as small as 10 (in Example 4.34, even for n ¼ 5, the distribution of the sample total appeared rather bell-shaped). However, at the other extreme, a distribution can have such fat tails that its mean fails to exist and the Central Limit Theorem does not apply, so no n is big enough. A popular, although frequently somewhat conservative, convention is that the Central Limit Theorem may be safely applied when n > 30. Of course, there are exceptions, but this rule applies to most distributions of real data.

Fig. 4.10 The Central Limit Theorem for X illustrated

X distribution for small to moderate n

X distribution for large n (approximately normal)

Population distribution

m

4.5

Limit Theorems (What Happens as n Gets Large)

295

Example 4.35 When a batch of a certain chemical product is prepared, the amount of a particular impurity in the batch is a random variable with mean value 4.0 g and standard deviation 1.5 g. If 50 batches are independently prepared, what is the (approximate) probability that the total amount of impurity is between 175 and 190 g? According to the convention mentioned above, n ¼ 50 is large enough for the CLT to be applicable. The total T then has approximately a normal distribution with pﬃﬃﬃﬃﬃ mean value μT ¼ 50(4.0) ¼ 200 g and standard deviation σ T ¼ 50ð1:5Þ ¼ 10:6066 g: So, with Z denoting a standard normal rv, 175 200 190 200 Z Pð175 T 190Þ P ¼ Φð:94Þ Φð2:36Þ ¼ :1645 10:6066 10:6066 Notice that nothing was said initially about the shape of the underlying impurity distribution. It could be normally distributed, or uniform, or positively skewed—regardless, the CLT ensures that the distribution of their total, T, is approximately normal. ■ Example 4.36 Suppose the number of times a randomly selected customer of a large bank uses the bank’s ATM during a particular period is a random variable with a mean value of 3.2 and a standard deviation of 2.4. Among 100 randomly selected customers, how likely is it that the sample mean number of times the bank’s ATM is used exceeds 4? Let Xi denote the number of times the ith customer in the sample uses the bank’s ATM. Notice that Xi is a discrete rv, but the CLT is not limited to continuous random variables. Also, although the fact that the standard deviation of this nonnegative variable is quite large relative to the mean value suggests that its distribution is positively skewed, the large sample size implies that X does have approximately a normal distribution. Using pﬃﬃﬃﬃﬃﬃﬃﬃ pﬃﬃﬃ μX ¼ μ ¼ 3:2 and σ X ¼ σ= n ¼ 2:4= 100 ¼ :24, 4 3:2 PðX > 4Þ P Z > ¼ 1 Φð3:33Þ ¼ :0004 ■ :24 Example 4.37 Consider the distribution shown in Fig. 4.11 for the amount purchased (rounded to the nearest dollar) by a randomly selected customer at a particular gas station (a similar distribution for

0.16 0.14

Probability

0.12 0.10 0.08 0.06 0.04 0.02 0.00 5

10

15

20

25

30

35

40

45

50

Purchase amount (x) Fig. 4.11 Probability distribution of X ¼ amount of gasoline purchased ($) in Example 4.37

55

60

296

4

Joint Probability Distributions and Their Applications

Fig. 4.12 Approximate sampling distribution of the sample mean amount purchased when n ¼ 15 and the population distribution is as shown in Fig. 4.11

0.14 0.12

Density

0.10 0.08 0.06 0.04 0.02 0.00 18 21 24 27 30 33 36

Mean purchase amount (x)

Fig. 4.13 Normal probability plot from Matlab of the 1000 x values based on samples of size n ¼ 15

Normal Probability Plot

Probability

0.999 0.997 0.99 0.98 0.95 0.90 0.75 0.50 0.25 0.10 0.05 0.02 0.01 0.003 0.001

20

25

30

35

40

Data

purchases in Britain (in £) appeared in the article “Data Mining for Fun and Profit,” Statistical Science, 2000: 111 131; there were big spikes at the values 10, 15, 20, 25, and 30). The distribution is obviously quite non-normal. We asked Matlab to select 1000 different samples, each consisting of n ¼ 15 observations, and calculate the value of the sample mean for each one. Figure 4.12 is a histogram of the resulting 1000 values; this is the approximate distribution of X under the specified circumstances. This distribution is clearly approximately normal even though the sample size is not all that large. As further evidence for normality, Fig. 4.13 shows a normal probability plot of the 1000 x values; the linear pattern is very prominent. It is typically not non-normality in the central part of the population distribution that causes the CLT to fail, but instead very substantial skewness or heavy tails. ■

4.5

Limit Theorems (What Happens as n Gets Large)

297

The CLT can also be generalized so it applies to non-identically distributed independent random variables and certain linear combinations. Roughly speaking, if n is large and no individual term is likely to contribute too much to the overall value, then asymptotic normality prevails (see Exercise 190). It can also be generalized to sums of variables which are not independent provided the extent of dependence between most pairs of variables is not too strong.

4.5.3

Other Applications of the Central Limit Theorem

The CLT can be used to justify the normal approximation to the binomial distribution discussed in Sect. 3.3. Recall that a binomial variable X is the number of successes in a binomial experiment consisting of n independent success/failure trials with p ¼ P(success) for any particular trial. Define new rvs X1, X2, . . ., Xn by 1 if the ith trial results in a success Xi ¼ ði ¼ 1, . . . , nÞ 0 if the ith trial results in a failure Because the trials are independent and P(success) is constant from trial to trial, the Xis are iid (a random sample from a Bernoulli distribution). When the Xis are summed, a 1 is added for every success that occurs and a 0 for every failure, so X ¼ X1 + + Xn, their total. The sample mean of the Xis is X ¼ X=n, the sample proportion of successes, which in previous discussions we have ^ : The Central Limit Theorem then implies that if n is sufficiently large, both X and P ^ are denoted P ^ approximately normal when n is large. We summarize properties of the P distribution in the following corollary; Statements 1 and 2 were derived in Sect. 2.4. COROLLARY

Consider an event A in the sample space of some experiment with p ¼ P(A). Let X ¼ the number of times A occurs when the experiment is repeated n independent times, and define ^ ¼P ^ ð AÞ ¼ X P n Then ^ ¼p 1. μP^ ¼ E P ﬃ qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ ^ ¼ pð1pÞ 2. σ P^ ¼ SD P n ^ approaches a normal distribution. 3. As n increases, the distribution of P ^ is approximately normal, provided that np 10 In practice, Property 3 is taken to say that P and n(1 p) 10. The necessary sample size for this approximation depends on the value of p: when p is close to .5, the distribution of each Xi is reasonably symmetric (see Fig. 4.14), whereas the distribution is quite skewed when p is near 0 or 1. Using the approximation only if both np 10 and n(1 p) 10 ensures that n is large enough to overcome any skewness in the underlying Bernoulli distribution.

298

4

Joint Probability Distributions and Their Applications

a

Fig. 4.14 Two Bernoulli distributions: (a) p ¼ .4 (reasonably symmetric); (b) p ¼ .1 (very skewed)

b

1

1

Example 4.38 A computer simulation in the style of Sect. 1.6 is used to determine the probability that a complex system of components operates properly throughout the warranty period. Unknown to the investigator, the true probability is P(A) ¼ .18. If 10,000 simulations of the underlying process ^ ðAÞ will lie within .01 of the true probability are run, what is the chance the estimated probability P P(A)? Apply the preceding corollary, with n ¼ 10,000 and p ¼ P(A) ¼ .18. The expected value of the pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ ^ ðAÞ is p ¼ .18, and the standard deviation is σ ^ ¼ :18ð:82Þ=10, 000 ¼ :00384: Since estimator P P np ¼ 1800 10 and n(1 p) ¼ 8200 10, a normal distribution can safely be used to ^ ðAÞ. This sample proportion is within .01 of the true probability, approximate the distribution of P ^ ðAÞ < :19, so the desired likelihood is approximately .18, iff .17 < P ^ < :19 P :17 :18 < Z < :19 :18 ¼ Φð2:60Þ Φð2:60Þ ¼ :9906 ■ P :17 < P :00384 :00384 The normal distribution serves as a reasonable approximation to the binomial pmf when n is large because the binomial distribution is additive, i.e., a binomial rv can be expressed as the sum of other, iid rvs. Other additive distributions include the Poisson, negative binomial, gamma, and (of course) normal distributions; some of these were discussed at the end of Sect. 4.3. In particular, CLT justifies normal approximations to the following distributions: • Poisson, when μ is large • Negative binomial, when r is large • Gamma, when α is large As a final application of the CLT, first recall from Sect. 3.5 that X has a lognormal distribution if ln(X) has a normal distribution. PROPOSITION

Let X1, X2, . . ., Xn be a random sample from a distribution for which only positive values are possible [P(Xi > 0) ¼ 1]. Then if n is sufficiently large, the product Y ¼ X1 X2 Xn has approximately a lognormal distribution; that is, ln(Y ) has approximately a normal distribution. To verify this, note that lnðY Þ ¼ lnðX1 Þ þ lnðX2 Þ þ þ lnðXn Þ Since ln(Y) is a sum of independent and identically distributed rvs [the ln(Xi)s], it is approximately normal when n is large, so Y itself has approximately a lognormal distribution. As an example of the applicability of this result, it has been argued that the damage process in plastic flow and crack propagation is a multiplicative process, so that variables such as percentage elongation and rupture strength have approximately lognormal distributions.

4.5

Limit Theorems (What Happens as n Gets Large)

4.5.4

299

The Law of Large Numbers

^ could estimate a In the simulation sections of Chaps. 1–3, we described how a sample proportion P true probability p, and a sample mean X served to approximate a theoretical expected value μ. Moreover, in both cases the precision of the estimation improves as the number of simulation runs, n, increases. We would like to be able to say that our estimates “converge” to the correct values in some sense. Such a convergence statement is justified by another important theoretical result, called the Law of Large Numbers. To begin, recall the first proposition in this section: If X1, X2, . . ., Xn is a random sample from a distribution with mean μ and standard deviation σ, then EðXÞ ¼ μ and VarðXÞ ¼ σ 2 =n: As n increases, 2 the expected value of X remains at μ but the variance approaches zero; that is, E½ðX μÞ ¼ VarðXÞ ¼ σ 2 =n ! 0: We say that X converges in mean square to μ because the mean of the squared difference between X and μ goes to zero. This is one form of the Law of Large Numbers. Another form of convergence states that as the sample size n increases, X is increasingly unlikely to differ by any set amount from μ. More precisely, let ε be a positive number close to 0, such as .01 or .001, and consider Pðj X μ j εÞ, the probability that X differs from μ by at least ε (at least .01, at least .001, etc.). We will prove shortly with the help of Chebyshev’s inequality that, no matter how small the value of ε, this probability will approach zero as n ! 1. Because of this, statisticians say that X converges to μ in probability. The two forms of the Law of Large Numbers are summarized in the following theorem. LAW OF LARGE NUMBERS

If X1, X2, . . ., Xn is a random sample from a distribution with mean μ and finite variance, then X converges to μ h i 2 1. In mean square: E ðX μÞ ! 0 as n ! 1 2. In probability: Pðj X μ j εÞ ! 0 as n ! 1 for any ε > 0 Proof The proof of Statement 1 appears a few paragraphs above. For Statement 2, recall Chebyshev’s inequality, which states that for any rv Y, P(|Y μY| kσ Y) 1/k2 for any k 1 (i.e., the probability that Y is at least k standard deviations away from its mean is at most 1/k2). Let so μY ¼ EðXÞ ¼ μ and σ Y ¼ SDðXÞ ¼ σ=pﬃﬃnﬃ. Now, for any ε > 0, determine the value of Y ¼ X, pﬃﬃﬃ pﬃﬃﬃ k such that ε ¼ kσ Y ¼ kσ= n: Solving for k yields k ¼ ε n=σ, which for sufficiently large n will exceed 1. Apply Chebyshev’s inequality: pﬃﬃﬃ 1 ε n σ 1 pﬃﬃﬃ pﬃﬃﬃ 2 Pðj Y μY j kσ Y Þ 2 ) P j X μ j σ n k ðε n=σ Þ 2 σ ) Pðj X μ j εÞ 2 ! 0 as n ! 1 εn That is, Pðj X μ j εÞ ! 0 as n ! 1 for any ε > 0.

■

Convergence of X to μ in probability actually holds even if the variance σ 2 does not exist (a heavytailed distribution) as long as μ is finite. But then Chebyshev’s inequality cannot be used, and the proof is much more complicated.

300

4

Joint Probability Distributions and Their Applications

An analogous result holds for proportions. If the Xi are iid Bernoulli( p) rvs, then similar to the ^ , and μ ¼ E(Xi) ¼ p. It follows that the sample discussion earlier in this section we may write X as P ^ proportion P converges to the “true” proportion p h i ^ p 2 ! 0 as n ! 1, and 1. In mean square: E P ^ p j ε ! 0 as n ! 1 for any ε > 0. 2. In probability: P j P ^ In statistical language, the Law of Large Numbers states that X is a consistent estimator of μ, and P is a consistent estimator of p. This consistency property also applies to other estimators. For P 2 example, it can be shown that the sample variance S2 ¼ ðXi XÞ =ðn 1Þ converges in probabil2 ity to the population variance σ .

4.5.5

Exercises: Section 4.5 (85–102)

85. The inside diameter of a randomly selected piston ring is a random variable with mean value 12 cm and standard deviation .04 cm. (a) If X is the sample mean diameter for a random sample of n ¼ 16 rings, where is the sampling distribution of X centered, and what is the standard deviation of the X distribution? (b) Answer the questions posed in part (a) for a sample size of n ¼ 64 rings. (c) For which of the two random samples, the one of part (a) or the one of part (b), is X more likely to be within .01 cm of 12 cm? Explain your reasoning. 86. Refer to the previous exercise. Suppose the distribution of diameter is normal. (a) Calculate Pð11:99 X 12:01Þ when n ¼ 16. (b) How likely is it that the sample mean diameter exceeds 12.01 when n ¼ 25? 87. Suppose that the fracture angle under pure compression of a randomly selected specimen of fiber reinforced polymer-matrix composite material is normally distributed with mean value 53 and standard deviation 1 (suggested in the article “Stochastic Failure Modelling of Unidirectional Composite Ply Failure,” Reliability Engr. and System Safety, 2012: 1–9; this type of material is used extensively in the aerospace industry). (a) If a random sample of 4 specimens is selected, what is the probability that the sample mean fracture angle is at most 54? Between 53 and 54? (b) How many such specimens would be required to ensure that the first probability in (a) is at least .999? 88. The time taken by a randomly selected applicant for a mortgage to fill out a certain form has a normal distribution with mean value 10 min and standard deviation 2 min. If five individuals fill out a form on 1 day and six on another, what is the probability that the sample average amount of time taken on each day is at most 11 min? 89. The lifetime of a type of battery is normally distributed with mean value 10 h and standard deviation 1 h. There are four batteries in a package. What lifetime value is such that the total lifetime of all batteries in a package exceeds that value for only 5% of all packages? 90. The National Health Statistics Reports dated Oct. 22, 2008 stated that for a sample size of 277 18-year-old American males, the sample mean waist circumference was 86.3 cm. A somewhat complicated method was used to estimate various population percentiles, resulting in the following values:

4.5

Limit Theorems (What Happens as n Gets Large)

5th 69.6

91.

92.

93.

94.

95.

10th 70.9

25th 75.2

50th 81.3

301

75th 95.4

90th 107.1

95th 116.4

(a) Is it plausible that the waist size distribution is at least approximately normal? Explain your reasoning. If your answer is no, conjecture the shape of the population distribution. (b) Suppose that the population mean waist size is 85 cm and that the population standard deviation is 15 cm. How likely is it that a random sample of 277 individuals will result in a sample mean waist size of at least 86.3 cm? (c) Referring back to (b), suppose now that the population mean waist size is 82 cm (closer to the sample median than the sample mean). Now what is the (approximate) probability that the sample mean will be at least 86.3? In light of this calculation, do you think that 82 is a reasonable value for μ? A friend commutes by bus to and from work 6 days per week. Suppose that waiting time is uniformly distributed between 0 and 10 min, and that waiting times going and returning on various days are independent of each other. What is the approximate probability that total waiting time for an entire week is at most 75 min? There are 40 students in an elementary statistics class. On the basis of years of experience, the instructor knows that the time needed to grade a randomly chosen paper from the first exam is a random variable with an expected value of 6 min and a standard deviation of 6 min. (a) If grading times are independent and the instructor begins grading at 6:50 p.m. and grades continuously, what is the (approximate) probability that he is through grading before the 11:00 p.m. TV news begins? (b) If the sports report begins at 11:10, what is the probability that he misses part of the report if he waits until grading is done before turning on the TV? The tip percentage at a restaurant has a mean value of 18% and a standard deviation of 6%. (a) What is the approximate probability that the sample mean tip percentage for a random sample of 40 bills is between 16 and 19%? (b) If the sample size had been 15 rather than 40, could the probability requested in part (a) be calculated from the given information? A small high school holds its graduation ceremony in the gym. Because of seating constraints, students are limited to a maximum of four tickets to graduation for family and friends. The vice principal knows that historically 30% of students want four tickets, 25% want three, 25% want two, 15% want one, and 5% want none. (a) Let X ¼ the number of tickets requested by a randomly selected graduating student, and assume the historical distribution applies to this rv. Find the mean and standard deviation of X. (b) Let T ¼ the total number of tickets requested by the 150 students graduating this year. Assuming all 150 students’ requests are independent, determine the mean and standard deviation of T. (c) The gym can seat a maximum of 500 guests. Calculate the (approximate) probability that all students’ requests can be accommodated. [Hint: Express this probability in terms of T. What distribution does T have?] Let X represent the amount of gasoline (gallons) purchased by a randomly selected customer at a gas station. Suppose that the mean and standard deviation of X are 11.5 and 4.0, respectively. (a) In a sample of 50 randomly selected customers, what is the approximate probability that the sample mean amount purchased is at least 12 gallons? (b) In a sample of 50 randomly selected customers, what is the approximate probability that the total amount of gasoline purchased is at least 600 gallons?

302

96.

97.

98.

99.

100.

101.

102.

4.6

4

Joint Probability Distributions and Their Applications

(c) What is the approximate value of the 95th percentile for the total amount purchased by 50 randomly selected customers? For males the expected pulse rate is 70 per second and the standard deviation is 10 per second. For women the expected pulse rate is 77 per second and the standard deviation is 12 per second. Let X ¼ the sample average pulse rate for a random sample of 40 men and let Y ¼ the sample average pulse rate for a random sample of 36 women. Of Y? (a) What is the approximate distribution of X? (b) What is the approximate distribution of X Y? Justify your answer. (c) Calculate (approximately) the probability Pð2 X Y 1Þ. (d) Calculate (approximately) PðX Y 15Þ. If you actually observed X Y 15, would you doubt that μ1 μ2 ¼ –7? Explain. The first assignment in a statistical computing class involves running a short program. If past experience indicates that 40% of all students will make no programming errors, use an appropriate normal approximation to compute the probability that in a class of 50 students (a) At least 25 will make no errors. (b) Between 15 and 25 (inclusive) will make no errors. The number of parking tickets issued in a certain city on any given weekday has a Poisson distribution with parameter μ ¼ 50. What is the approximate probability that (a) Between 35 and 70 tickets are given out on a particular day? (b) The total number of tickets given out during a 5-day week is between 225 and 275? [For parts (a) and (b), use an appropriate CLT approximation.] (c) Use software to obtain the exact probabilities in (a) and (b), and compare to the approximations. Suppose the distribution of the time X (in hours) spent by students at a certain university on a particular project is gamma with parameters α ¼ 50 and β ¼ 2. Use CLT to compute the (approximate) probability that a randomly selected student spends at most 125 h on the project. The Central Limit Theorem says that X is approximately normal if the sample size is large. More specifically, the theorem states that the standardized X has a limiting standard normal distribupﬃﬃﬃ tion. That is, ðX μÞ=ðσ= nÞ has a distribution approaching the standard normal. Can you reconcile this with the Law of Large Numbers? It can be shown that if Yn converges in probability to a constant τ, then h(Yn) converges to h(τ) for any function h that is continuous at τ. Use this to obtain a consistent estimator for the rate parameter λ of an exponential distribution. [Hint: How does μ for an exponential distribution relate to the exponential parameter λ?] Let X1, . . ., Xn be a random sample from the uniform distribution on [0, θ]. Let Yn be the maximum of these observations: Yn ¼ max(X1, . . ., Xn). Show that Yn converges in probability to θ, that is, that P(|Yn θ| ε) ! 0 as n approaches 1. [Hint: We shall show in Sect. 4.9 that the pdf of Yn is f( y) ¼ nyn–1/θn for 0 y θ.]

Transformations of Jointly Distributed Random Variables

In the previous chapter we discussed the problem of starting with a single random variable X, forming some function of X, such as Y ¼ X2 or Y ¼ eX, and investigating the distribution of this new random variable Y. We now generalize this scenario by starting with more than a single random variable. Consider as an example a system having a component that can be replaced just once before the system

4.6

Transformations of Jointly Distributed Random Variables

303

itself expires. Let X1 denote the lifetime of the original component and X2 the lifetime of the replacement component. Then any of the following functions of X1 and X2 may be of interest to an investigator: 1. The total lifetime, X1 + X2. 2. The ratio of lifetimes X1/X2 (for example, if the value of this ratio is 2, the original component lasted twice as long as its replacement). 3. The ratio X1/(X1 + X2), which represents the proportion of system lifetime during which the original component operated.

4.6.1

The Joint Distribution of Two New Random Variables

Given two random variables X1 and X2, consider forming two new random variables Y1 ¼ u1(X1, X2) and Y2 ¼ u2(X1, X2). Our focus is on finding the joint distribution of these two new variables. Since most applications assume that the Xis are continuous, we restrict ourselves to that case. Some notation is needed before a general result can be given. Let f(x1, x2) ¼ the joint pdf of the two original variables g(y1, y2) ¼ the joint pdf of the two new variables The u1( ) and u2( ) functions express the new variables in terms of the original ones. The general result presumes that these functions can be inverted to solve for the original variables in terms of the new ones: X1 ¼ v1 ðY 1 ; Y 2 Þ,

X 2 ¼ v2 ðY 1 ; Y 2 Þ

For example, if y1 ¼ x1 þ x2 and y2 ¼

x1 x1 þ x2

then multiplying y2 by y1 gives an expression for x1, and then we can substitute this into the expression for y1 and solve for x2: x1 ¼ y1 y2 ¼ v1 ðy1 ; y2 Þ

x2 ¼ y1 ð1 y2 Þ ¼ v2 ðy1 ; y2 Þ

In a final burst of notation, let S ¼ fðx1 ; x2 Þ : f ðx1 ; x2 Þ > 0g

T ¼ fðy1 ; y2 Þ : gðy1 ; y2 Þ > 0g

That is, S is the region of positive density for the original variables and T is the region of positive density for the new variables; T is the “image” of S under the transformation. TRANSFORMATION THEOREM (bivariate case)

Suppose that the partial derivative of each vi(y1, y2) with respect to both y1 and y2 exists and is continuous for every (y1, y2) 2 T. Form the 2 2 matrix

304

4

∂v1 ðy1 ; y2 Þ B ∂y1 B M¼B @ ∂v2 ðy1 ; y2 Þ ∂y1

Joint Probability Distributions and Their Applications

1 ∂v1 ðy1 ; y2 Þ C ∂y2 C C ∂v2 ðy1 ; y2 Þ A ∂y2

The determinant of this matrix, called the Jacobian, is detðMÞ ¼

∂v1 ∂v2 ∂v1 ∂v2 ∂y1 ∂y2 ∂y2 ∂y1

The joint pdf for the new variables then results from taking the joint pdf f(x1, x2) for the original variables, replacing x1 and x2 by their expressions in terms of y1 and y2, and finally multiplying this by the absolute value of the Jacobian: gð y 1 ; y 2 Þ ¼

f ðv1 ðy1 ; y2 Þ, v2 ðy1 ; y2 ÞÞ j detðMÞ j

ðy1 ; y2 Þ 2 T

The theorem can be rewritten slightly by using the notation ∂ðx1 ; x2 Þ detðMÞ ¼ ∂ðy1 ; y2 Þ Then we have ∂ ðx1 ; x2 Þ : gðy1 ; y2 Þ ¼ f ðx1 ; x2 Þ ∂ ðy ; y Þ 1

2

which is the natural extension of the univariate transformation theorem f Y ðyÞ ¼ f X ðxÞ jdx=dyj discussed in Chap. 3. Example 4.39 Continuing with the component lifetime situation, suppose that X1 and X2 are independent, each having an exponential distribution with parameter λ. Let’s determine the joint pdf of Y 1 ¼ u1 ð X 1 ; X 2 Þ ¼ X 1 þ X 2

and

Y 2 ¼ u2 ð X 1 ; X 2 Þ ¼

X1 : X1 þ X2

We have already inverted this transformation: x1 ¼ v1 ðy 1 ; y 2 Þ ¼ y1 y 2

x2 ¼ v2 ðy1 ; y2 Þ ¼ y1 ð1 y2 Þ

The image of the transformation, i.e., the set of (y1, y2) pairs with positive density, is y1 > 0 and 0 < y2 < 1. The four relevant partial derivatives are ∂v1 ¼ y2 ∂y1

∂v1 ¼ y1 ∂y2

∂v2 ¼ 1 y2 ∂y1

∂v2 ¼ y1 ∂y2

from which the Jacobian is det(M) ¼ y1y2 y1(1 y2) ¼ y1. Since the joint pdf of X1 and X2 is f ðx1 ; x2 Þ ¼ λeλx1 λeλx2 ¼ λ2 eλðx1 þx2 Þ we have, by the Transformation Theorem,

x1 > 0, x2 > 0

4.6

Transformations of Jointly Distributed Random Variables

305

gðy1 ; y2 Þ ¼ λ2 eλðy1 y2 þy1 ð1y2 ÞÞ jy1 j ¼ λ2 y1 eλy1 ¼ λ2 y1 eλy1 1 y1 > 0, 0 < y2 < 1 In the last step, we’ve factored the joint pdf into two parts: the first part is a gamma pdf with parameters α ¼ 2 and β ¼ 1/λ, and the second part is a uniform pdf on (0, 1). Since the pdf factors and the region of positive density is rectangular, we have demonstrated that 1. The distribution of system lifetime X1 + X2 is gamma (with α ¼ 2, β ¼ 1/λ); 2. The distribution of the proportion of system lifetime during which the original component functions is uniform on (0, 1); and 3. Y1 ¼ X1 + X2 and Y2 ¼ X1/(X1 + X2) are independent of each other. ■ In the foregoing example, because the joint pdf factored into one pdf involving y1 alone and another pdf involving y2 alone, the individual (i.e., marginal) pdfs of the two new variables were obtained from the joint pdf without any further effort. Often this will not be the case—that is, Y1 and Y2 will not be independent. Then to obtain the marginal pdf of Y1, the joint pdf must be integrated over all values of the second variable. In fact, in many applications an investigator wishes to obtain the distribution of a single function u1(X1, X2) of the original variables. To accomplish this, a second function Y2 ¼ u2(X1, X2) is selected, the joint pdf is obtained, and then y2 integrated out. There are of course many ways to select the second function. The choice should be made so that the transformation can be easily inverted and the integration in the last step is straightforward. Example 4.40 Consider a rectangular coordinate system with a horizontal x1 axis and a vertical x2 axis as shown in Fig. 4.15a. First a point (X1, X2) is randomly selected, where the joint pdf of X1, X2 is 0 < x1 < 1, 0 < x2 < 1 x1 þ x2 f ðx1 ; x2 Þ ¼ 0 otherwise Then a rectangle with vertices (0, 0), (X1, 0), (0, X2), and (X1, X2) is formed as shown in Fig. 4.15a. What is the distribution of X1X2, the area of this rectangle? To answer this question, let Y 1 ¼ X1 X2

Y 2 ¼ X2

y 1 ¼ u1 ð x 1 ; x 2 Þ ¼ x 1 x 2

y 2 ¼ u2 ð x 1 ; x 2 Þ ¼ x 2

so

Fig. 4.15 Regions of positive density for Example 4.40

a

b

x2

y2

1

1 A possible rectangle (X1, X2)

x1

0 0

1

y1

0 0

1

306

4

Joint Probability Distributions and Their Applications

Then x1 ¼ v1 ðy1 ; y2 Þ ¼

y1 y2

x 2 ¼ v2 ðy 1 ; y2 Þ ¼ y2

Notice that because x2 (¼ y2) is between 0 and 1 and y1 is the product of the two xis, it must be the case that 0 < y1 < y2. The region of positive density for the new variables is then T ¼ fð y 1 ; y 2 Þ : 0 < y 1 < y 2 , 0 < y 2 < 1g which is the triangular region shown in Fig. 4.15b. Since ∂v2/∂y1 ¼ 0, the product of the two off-diagonal elements in the matrix M will be 0, so only the two diagonal elements contribute to the Jacobian: 0 1 1 y1 1 2A j detðMÞ j ¼ M ¼ @ y2 y2 , y 2 0 1 The joint pdf of the two new variables is now y gðy1 ; y2 Þ ¼ f 1 ; y2 jdetðMÞj y 8 2 > < y1 þ y 1 0 < y < y < 1 2 1 2 y2 y2 ¼ > : 0 otherwise To obtain the marginal pdf of Y1 alone, we must now fix y1 at some arbitrary value between 0 and 1, and integrate out y2. Figure 4.15b shows that for any value of y1, the values of y2 range from y1 to 1: ð1 y1 1 g1 ð y 1 Þ ¼ þ y2 dy2 ¼ 2ð1 y1 Þ 0 < y1 < 1 y y y1 2 2 This marginal pdf can now be integrated to obtain any desired probability involving the area. For example, integrating from 0 to .5 gives P(area < .5) ¼ .75. ■

4.6.2

The Joint Distribution of More Than Two New Variables

Consider now starting with three random variables X1, X2, and X3, and forming three new variables Y1, Y2, and Y3. Suppose again that the transformation can be inverted to express the original variables in terms of the new ones: x1 ¼ v1 ðy1 ; y2 ; y3 Þ, x2 ¼ v2 ðy1 ; y2 ; y3 Þ, x3 ¼ v3 ðy1 ; y2 ; y3 Þ Then the foregoing theorem can be extended to this new situation. The Jacobian matrix has dimension 3 3, with the entry in the ith row and jth column being ∂vi/∂yj. The joint pdf of the new variables results from replacing each xi in the original pdf f() by its expression in terms of the yjs and multiplying by the absolute value of the Jacobian. Example 4.41 Consider n ¼ 3 identical components with independent lifetimes X1, X2, X3, each having an exponential distribution with parameter λ. If the first component is used until it fails,

4.6

Transformations of Jointly Distributed Random Variables

307

replaced by the second one which remains in service until it fails, and finally the third component is used until failure, then the total lifetime of these components is Y3 ¼ X1 + X2 + X3. (This design structure, where one component is replaced by the next in succession, is called a standby system.) To find the distribution of total lifetime, let’s first define two other new variables: Y1 ¼ X1 and Y2 ¼ X1 + X2 (so that Y1 < Y2 < Y3). After finding the joint pdf of all three variables, we integrate out the first two variables to obtain the desired information. Solving for the old variables in terms of the new gives x1 ¼ y1

x2 ¼ y2 y1

x3 ¼ y3 y2

It is obvious by inspection of these expressions that the three diagonal elements of the Jacobian matrix are all 1s and that the elements above the diagonal are all 0s, so the determinant is 1, the product of the diagonal elements. Since f ðx1 ; x2 ; x3 Þ ¼ λ3 eλðx1 þx2 þx3 Þ

x1 > 0, x2 > 0, x3 > 0

by substitution, gðy1 ; y2 ; y3 Þ ¼ λ3 eλy3

0 < y1 < y2 < y3

Integrating this joint pdf first with respect to y1 between 0 and y2 and then with respect to y2 between 0 and y3 (try it!) gives g3 ð y 3 Þ ¼

λ3 2 λy y e 3 2 3

y3 > 0

which is the gamma pdf with α ¼ 3 and β ¼ 1/λ. This result and Example 3.39 are both special cases of a proposition from Sect. 4.3, stating that the sum of n iid exponential rvs has a gamma distribution with α ¼ n. ■

4.6.3

Exercises: Section 4.6 (103–110)

103. Let X1 and X2 be independent, standard normal rvs. (a) Define Y1 ¼ X1 + X2 and Y2 ¼ X1 X2. Determine the joint pdf of Y1 and Y2. (b) Determine the marginal pdf of Y1. [Note: We know the sum of two independent normal rvs is normal, so you can check your answer against the appropriate normal pdf.] (c) Are Y1 and Y2 independent? 104. Consider two components whose lifetimes X1 and X2 are independent and exponentially distributed with parameters λ1 and λ2, respectively. Obtain the joint pdf of total lifetime X1 + X2 and the proportion of total lifetime X1/(X1 + X2) during which the first component operates. 105. Let X1 denote the time (hr) it takes to perform a first task and X2 denote the time it takes to perform a second one. The second task always takes at least as long to perform as the first task. The joint pdf of these variables is 2ðx1 þ x2 Þ 0 x1 x2 1 f ðx1 ; x2 Þ ¼ 0 otherwise (a) Obtain the pdf of the total completion time for the two tasks. (b) Obtain the pdf of the difference X2 X1 between the longer completion time and the shorter time.

308

4

Joint Probability Distributions and Their Applications

106. An exam consists of a problem section and a short-answer section. Let X1 denote the amount of time (h) that a student spends on the problem section and X2 represent the amount of time the same student spends on the short-answer section. Suppose the joint pdf of these two times is ( x1 x1 < x2 < , 0 < x1 < 1 cx1 x2 3 2 f ðx 1 ; x 2 Þ ¼ 0 otherwise (a) What is the value of c? (b) If the student spends exactly .25 h on the short-answer section, what is the probability that at most .60 h was spent on the problem section? [Hint: First obtain the relevant conditional distribution.] (c) What is the probability that the amount of time spent on the problem part of the exam exceeds the amount of time spent on the short-answer part by at least .5 h? (d) Obtain the joint distribution of Y1 ¼ X2/X1, the ratio of the two times, and Y2 ¼ X2. Then obtain the marginal distribution of the ratio. 107. Consider randomly selecting a point (X1, X2, X3) in the unit cube {(x1, x2, x3): 0 < x1 < 1, 0 < x2 < 1, 0 < x3 < 1} according to the joint pdf 0 < x1 < 1, 0 < x2 < 1, 0 < x3 < 1 8x1 x2 x3 f ðx 1 ; x 2 ; x 3 Þ ¼ 0 otherwise (so the three variables are independent). Then form a rectangular solid whose vertices are (0, 0, 0), (X1, 0, 0), (0, X2, 0), (X1, X2, 0), (0, 0, X3), (X1, 0, X3), (0, X2, X3), and (X1, X2, X3). The volume of this cube is Y3 ¼ X1X2X3. Obtain the pdf of this volume. [Hint: Let Y1 ¼ X1 and Y2 ¼ X1X2.] 108. Let X1 and X2 be independent, each having a standard normal distribution. The pair (X1, X2) corresponds to a point in a two-dimensional coordinate system. Consider now changing to polar coordinates via the transformation, 2 2 Y1 ¼ X 81 þ X2 X2 > > > arctan > > X1 > > > > > X < arctan 2 þ 2π Y2 ¼ X1 > > > X2 > > > arctan þπ > > X1 > > : 0

X1 > 0, X2 0 X1 > 0, X2 < 0 X1 < 0 X1 ¼ 0

pﬃﬃﬃﬃﬃ pﬃﬃﬃﬃﬃ from which X1 ¼ Y 1 cos ðY 2 Þ, X2 ¼ Y 1 sin ðY 2 Þ: Obtain the joint pdf of the new variables and then the marginal distribution of each one. [Note: It would be nice if we could simply let Y2 ¼ arctan(X2/X1), but in order to insure invertibility of the arctan function, it is defined to take on values only between π/2 and π/2. Our specification of Y2 allows it to assume any value between 0 and 2π.] 109. The result of the previous exercise suggests how observed values of two independent standard normal variables can be generated by first generating their polar coordinates with an exponential rv with λ ¼ 12 and an independent Unif(0, 2π) rv: Let U1 and U2 be independent Unif(0, 1) rvs, and then let

4.7

The Bivariate Normal Distribution

Y 1 ¼ 2 ln ðU 1 Þ pﬃﬃﬃﬃﬃ Z1 ¼ Y 1 cos ðY 2 Þ

309

Y 2 ¼ 2πU 2 , pﬃﬃﬃﬃﬃ Z 2 ¼ Y 1 sin ðY 2 Þ

Show that the Zis are independent standard normal. [Note: This is called the Box-Muller transformation after the two individuals who discovered it. Now that statistical software packages will generate almost instantaneously observations from a normal distribution with any mean and variance, it is thankfully no longer necessary for people like you and us to carry out the transformations just described—let the software do it!] 110. Let X1 and X2 be independent random variables, each having a standard normal distribution. Show that the pdf of the ratio Y ¼ X1/X2 is given by f( y) ¼ 1/[π(1 + y2)] for 1 < y < 1. (This is called the standard Cauchy distribution; its density curve is bell-shaped, but the tails are so heavy that μ does not exist.)

4.7

The Bivariate Normal Distribution

Perhaps the most useful joint distribution is the bivariate normal. Although the formula may seem rather complicated, it is based on a simple quadratic expression in the standardized variables (subtract the mean and then divide by the standard deviation). The bivariate normal density is " #! 1 1 x μ1 2 x μ1 y μ2 y μ2 2 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ exp f ðx; yÞ ¼ 2ρ þ 2ð 1 ρ2 Þ σ1 σ1 σ2 σ2 2πσ 1 σ 2 1 ρ2 The notation used here for the five parameters reflects the roles they play. Some tedious integration shows that μ1 and σ 1 are the mean and standard deviation, respectively, of X, μ2 and σ 2 are the mean and standard deviation, respectively, of Y, and ρ is the correlation coefficient between the two variables. The integration required to do bivariate normal probability calculations is quite difficult. Computer code is available for calculating P(X x, Y y) approximately using numerical integration, and some software packages, including Matlab and R, incorporate this feature (see the end of this section). The density surface in three dimensions looks like a mountain with elliptical cross-sections, as shown in Fig. 4.16a. The vertical cross-sections are all proportional to normal densities. If we set f(x, y) ¼ c to investigate the contours (curves along which the density is constant), this amounts to

b y a f(x, y)

y

x

Fig. 4.16 (a) A graph of the bivariate normal pdf; (b) contours of the bivariate normal pdf

x

310

4

Joint Probability Distributions and Their Applications

equating the exponent of the joint pdf to a constant. The contours are then concentric ellipses centered at (x, y) ¼ (μ1 , μ2), as shown in Fig. 4.16b. If ρ ¼ 0, then f(x,y) ¼ fX(x) fY( y), where X N(μ1, σ 1) and Y N(μ2, σ 2). That is, X and Y have independent normal distributions. In this case the elliptical contours reduce to circles. Recall that in Sect. 4.2 we emphasized that independence of X and Y implies ρ ¼ 0 but, in general, ρ ¼ 0 does not imply independence. However, we have just seen that when X and Y are bivariate normal, ρ ¼ 0 does imply independence. Therefore, in the bivariate normal case ρ ¼ 0 if and only if the two rvs are independent. Regardless of whether or not ρ ¼ 0, the marginal distribution fX(x) is just a normal pdf with mean μ1 and standard deviation σ 1: f X ðxÞ ¼

2 2 1 pﬃﬃﬃﬃﬃ eðxμ1 Þ =ð2σ1 Þ σ 1 2π

The integration to show this [integrating f(x,y) on y from –1 to 1] is rather messy. Likewise, the marginal distribution of Y is N(μ2, σ 2). These two marginal pdfs are, in fact, just special cases of a much stronger result. PROPOSITION

If X and Y have a bivariate normal distribution, then any linear combination of X and Y is also normal. That is, for any constants a, b, c, the random variable aX + bY + c has a normal distribution. This proposition can be proved using the transformation techniques of Sect. 4.6 along with some extremely tedious algebra. Setting a ¼ 1 and b ¼ c ¼ 0, we have that X is normally distributed; a ¼ 0, b ¼ 1, c ¼ 0 yields the same result for Y. To find the mean and standard deviation of a general linear combination, one can use the rules for linear combinations established in Sect. 4.3. Example 4.42 Many students applying for college take the SAT, which until 2016 consisted of three components: Critical Reading, Mathematics, and Writing. While some colleges use all three components to determine admission, many only look at the first two (reading and math). Let X and Y denote the Critical Reading and Mathematics scores, respectively, for a randomly selected student. According to the College Board website, the population of students taking the exam in Fall 2012 had the following results: μ1 ¼ 496, σ 1 ¼ 114, μ2 ¼ 514, σ 2 ¼ 117 Suppose that X and Y have approximately (because both X and Y are discrete) a bivariate normal distribution with correlation coefficient ρ ¼ .25. Let’s determine the probability that a student’s total score across these two components exceeds 1250, the minimum admission score for a particular university. Our goal is to calculate P(X + Y > 1250). Using the bivariate normal pdf, the desired probability is a daunting double integral: ð1 ð1 1 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 2πð114Þð117Þ 1 :252 1 1250y ef½ðx496Þ=114

2

2ð:25Þðx496Þðy514Þ=ð114Þð117Þþ½ðy514Þ=1172 g=½2ð1:252 Þ

dxdy

4.7

The Bivariate Normal Distribution

311

This is not a practical way to solve this problem! Instead, recognize X + Y as a linear combination of X and Y; by the preceding proposition, X + Y has a normal distribution. The mean and variance of X + Y are calculated using the formulas from Sect. 4.3: EðX þ Y Þ ¼ E X þ E Y ¼ μ1 þ μ2 ¼ 496 þ 514 ¼ 1010 VarðX þ Y Þ ¼ Var X þ Var Y þ 2Cov X, Y ¼ σ 21 þ σ 22 þ 2ρσ 1 σ 2 ¼ 1142 þ 1172 þ 2ð:25Þ 114 117 ¼ 33, 354 Therefore,

1250 1010 ¼ 1 Φð1:31Þ ¼ :0951: PðX þ Y > 1250Þ ¼ 1 Φ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 33, 354

Suppose instead we wish to determine P(X < Y), the probability a student scores better on math than on reading. If we rewrite this probability as P(X Y < 0), then we may apply the preceding proposition to the linear combination X Y. With E(X Y ) ¼ –18 and Var(X Y ) ¼ 20,016, 0 ð18Þ PðX < Y Þ ¼ PðX Y < 0Þ ¼ Φ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ ¼ Φð0:13Þ ¼ :5517: ■ 20, 016

4.7.1

Conditional Distributions of X and Y

As in Sect. 4.4, the conditional density of Y given X ¼ x results from dividing the marginal density of X into f(x,y). The algebra is again a mess, but the result is fairly simple. PROPOSITION

Let X and Y have a bivariate normal distribution. Then the conditional distribution of Y, given X ¼ x, is normal with mean and variance x μ1 σ1 ¼ VarðY j X ¼ xÞ ¼ σ 22 1 ρ2

μY jX¼x ¼ EðY j X ¼ xÞ ¼ μ2 þ ρσ 2 σ 2YjX¼x

Notice that the conditional mean of Y is a linear function of x, and the conditional variance of Y doesn’t depend on x at all. When ρ ¼ 0, the conditional mean is the mean of Y, μ2, and the conditional variance is just the variance of Y, σ 22 . In other words, if ρ ¼ 0, then the conditional distribution of Y is the same as the unconditional distribution of Y. When ρ is close to 1 or –1 the conditional variance will be much smaller than Var(Y ), which says that knowledge of X will be very helpful in predicting Y. If ρ is near 0 then X and Y are nearly independent and knowledge of X is not very useful in predicting Y. Example 4.43 Let X and Y be the heights of a randomly selected mother and her daughter, respectively. A similar situation was one of the first applications of the bivariate normal distribution, by Francis Galton in 1886, and the data were found to fit the distribution very well. Suppose a bivariate normal distribution with mean μ1 ¼ 64 in. and standard deviation σ 1 ¼ 3 in. for X and mean μ2 ¼ 65 in. and standard deviation σ 2 ¼ 3 in. for Y. Here μ2 > μ1, which is in accord with the increase in height from one generation to the next. Assume ρ ¼ .4. Then

312

4

Joint Probability Distributions and Their Applications

x μ1 x 64 ¼ 65 þ :4 ðx 64Þ ¼ :4x þ 39:4 ¼ 65 þ :4ð3Þ 3 σ1 ¼ VarðY j X ¼ xÞ ¼ σ 22 1 ρ2 ¼ 9 1 :42 ¼ 7:56 and σ YjX¼x ¼ 2:75

μYjX¼x ¼ μ2 þ ρσ 2 σ 2YjX¼x

Notice that the conditional variance is 16% less than the variance of Y. Squaring the correlation gives the percentage by which the conditional variance is reduced relative to the variance of Y. ■

4.7.2

Regression to the Mean

The formula for the conditional mean can be reexpressed as μYjX¼x μ2 x μ1 ¼ρ σ2 σ1 In words, when the formula is expressed in terms of standardized quantities, the standardized conditional mean is just ρ times the standardized x. In particular, for the height scenario μYjX¼x 65 x 64 ¼ :4 3 3 If the mother is 5 in. above the mean of 64 in. for mothers, then the daughter’s conditional expected height is just 2 in. above the mean for daughters. In this example, with equal standard deviations for Y and X, the daughter’s conditional expected height is always closer to its mean than the mother’s height is to its mean. One can think of the conditional expectation as falling back toward the mean, and that is why Galton called this regression to the mean. Regression to the mean occurs in many contexts. For example, let X be a baseball player’s average for the first half of the season and let Y be the average for the second half. Most of the players with a high X (above .300) will not have such a high Y. The same kind of reasoning applies to the “sophomore jinx,” which says that if a player has a very good first season, then the player is unlikely to do as well in the second season.

4.7.3

The Multivariate Normal Distribution

The multivariate normal distribution extends the bivariate normal distribution to situations involving models for n random variables X1, X2, . . ., Xn with n > 2. The joint density function is quite complicated; the only way to express it compactly is to make use of matrix algebra notation, and probability calculations based on this distribution are extremely complex. Here are some of the most important properties of the distribution: • • • •

The distribution of any linear combination of X1, X2, . . ., Xn is normal The marginal distribution of any Xi is normal The joint distribution of any pair Xi, Xj is bivariate normal The conditional distribution of any Xi given values of the other n 1 variables is normal

Many procedures for the analysis of multivariate data (observations simultaneously on three or more variables) are based on assuming that the data were selected from a multivariate normal distribution. We recommend Methods of Multivariate Analysis, 3rd ed., by Rencher for more information on multivariate analysis and the multivariate normal distribution.

4.7

The Bivariate Normal Distribution

4.7.4

313

Bivariate Normal Calculations with Software

Matlab will compute probabilities under the bivariate normal pdf using the mvncdf command (“mvn” abbreviates multivariate normal). This function is illustrated in the next example. Example 4.44 Consider the SAT reading/math scenario of Example 4.42. What is the probability that a randomly selected student scored at most 650 on both components, i.e., what is P(X 650 \ Y 650)? The desired probability cannot be expressed in terms of a linear combination of X and Y, and so the technique of the earlier example does not apply. Figure 4.17 shows the required Matlab code. The first two inputs are the desired cdf values (x, y) ¼ (650, 650) and the means (μ1, μ2) ¼ (496, 514), respectively. The third input is called the covariance matrix of X and Y, defined by 2 VarðXÞ CovðX; Y Þ σ1 ρσ 1 σ 2 CðX; Y Þ ¼ ¼ CovðX; Y Þ VarðY Þ ρσ 1 σ 2 σ 22 Fig. 4.17 Matlab code for Example 4.44

mu=[496, 514]; C=[114^2, .25*114*117; .25*114*117, 117^2]; mvncdf([650, 650],mu,C)

Matlab returns an answer of .8097, so for X and Y having a bivariate normal distribution with the parameters specified in Example 4.42, P(X 650 \ Y 650) ¼ .8097. About 81% of students scored 650 or below on both the Critical Reading and Mathematics components, according to this model. ■ The pmvnorm function in R will perform the same calculation with the same inputs (the covariance matrix is labeled sigma). Users must install the mvtnorm package to access this function.

4.7.5

Exercises: Section 4.7 (111–120)

111. Example 4.42 introduced a bivariate normal model for X ¼ SAT Critical Reading score and Y ¼ SAT Mathematics score. Let W ¼ SAT Writing score (the third component of the SAT), which has mean 488 and standard deviation 114. Suppose X and W have a bivariate normal distribution with ρX,W ¼ Corr(X, W) ¼ .5. (a) An English department plans to use X + W, a student’s total score on the non-math sections of the SAT, to help determine admission. Determine the distribution of X + W. (b) Calculate P(X + W > 1200). (c) Suppose the English department wishes to admit only those students who score in the top 10% on this Critical Reading + Writing criterion. What combined score separates the top 10% of students from the rest? 112. In the context of the previous exercise, let T ¼ X + Y + W, a student’s grand total score on the three components of the SAT. (a) Find the expected value of T. (b) Assume Corr(Y, W) ¼ .2. Find the variance of T. [Hint: Use Expression (4.5) from Sect. 4.3.]

314

113.

114.

115.

116.

117.

4

Joint Probability Distributions and Their Applications

(c) Suppose X, Y, W have a multivariate normal distribution, in which case T is also normally distributed. Determine P(T > 2000). (d) What is the 99th percentile of SAT grand total scores, according to this model? Let X ¼ height (inches) and Y ¼ weight (lbs) for an American male. Suppose X and Y have a bivariate normal distribution, the mean and sd of heights are 70 in and 3 in. the mean and sd of weights are 170 lbs and 20 lbs, and the correlation coefficient is ρ ¼ .9. (a) Determine the distribution of Y given X ¼ 68, i.e., the weight distribution for 5’8’’ American males. (b) Determine the distribution of Y given X ¼ 70, i.e., the weight distribution for 5’10’’ American males. In what ways is this distribution similar to that of part (a), and how are they different? (c) Calculate P(Y < 180jX ¼ 72), the probability that a 6-ft-tall American male weighs less than 180 lb. In electrical engineering, the unwanted “noise” in voltage or current signals is often modeled by a Gaussian (i.e., normal) distribution. Suppose that the noise in a particular voltage signal has a constant mean of 0.9 V, and that two noise instances sampled τ seconds apart have a bivariate normal distribution with covariance equal to 0.04e–jτj/10. Let X and Y denote the noise at times 3 s and 8 s, respectively. (a) Determine Cov(X, Y). (b) Determine σ X and σ Y. [Hint: Var(X) ¼ Cov(X, X).] (c) Determine Corr(X, Y). (d) Find the probability we observe greater voltage noise at time 3 s than at time 8 s. (e) Find the probability that the voltage noise at time 3 s is more than 1 V above the voltage noise at time 8 s. For a Calculus I class, the final exam score Y and the average X of the four earlier tests have a bivariate normal distribution with mean μ1 ¼ 73, standard deviation σ 1 ¼ 12, mean μ2 ¼ 70, standard deviation σ 2 ¼ 15. The correlation is ρ ¼ .71. Determine (a) μYjX¼x (b) σ 2YjX¼x (c) σ YjX¼x (d) P(Y > 90jX ¼ 80), i.e., the probability that the final exam score exceeds 90 given that the average of the four earlier tests is 80 Refer to the previous exercise. Suppose a student’s Calculus I grade is determined by 4X + Y, the total score across five tests. (a) Find the mean and standard deviation of 4X + Y. (b) Determine P(4X + Y < 320). (c) Suppose the instructor sets the curve in such a way that the top 15% of students, based on total score across the five tests, will receive As. What point total is required to get an A in Calculus I? Let X and Y, reaction times (sec) to two different stimuli, have a bivariate normal distribution with mean μ1 ¼ 20 and standard deviation σ 1 ¼ 2 for X and mean μ2 ¼ 30 and standard deviation σ 2 ¼ 5 for Y. Assume ρ ¼ .8. Determine (a) μYjX¼x (b) σ 2YjX¼x (c) σ YjX¼x (d) P(Y > 46 j X ¼ 25)

4.8

Reliability

315

118. Refer to the previous exercise. (a) One researcher is interested in X + Y, the total reaction time to the two stimuli. Determine the mean and standard deviation of X + Y. (b) If X and Y were independent, what would be the standard deviation of X + Y? Explain why it makes sense that the sd in part (a) is much larger than this. (c) Another researcher is interested in Y X, the difference in the reaction times to the two stimuli. Determine the mean and standard deviation of Y X. (d) If X and Y were independent, what would be the standard deviation of Y X? Explain why it makes sense that the sd in part (c) is much smaller than this. 119. Let X and Y be the times for a randomly selected individual to complete two different tasks, and assume that (X, Y ) has a bivariate normal distribution with μ1 ¼ 100, σ 1 ¼ 50, μ2 ¼ 25, σ 2 ¼ 5, ρ ¼ .4. From statistical software we obtain P(X < 100, Y < 25) ¼ .3333, P(X < 50, Y < 20) ¼ .0625, P(X < 50, Y < 25) ¼ .1274, and P(X < 100, Y < 20) ¼ .1274. (a) Determine P(50 < X < 100, 20 < Y < 25). (b) Leave the other parameters the same but change the correlation to ρ ¼ 0 (independence). Now recompute the probability in part (a). Intuitively, why should the original be larger? 120. One of the propositions of this section gives an expression for E(YjX ¼ x). (a) By reversing the roles of X and Y give a similar formula for E(XjY ¼ y). (b) Both E(YjX ¼ x) and E(XjY ¼ y) are linear functions. Show that the product of the two slopes is ρ2.

4.8

Reliability

Reliability theory is the branch of statistics and operations research devoted to studying how long systems will function properly. A “system” can refer to a single device, such as a DVR, or a network of devices or objects connected together (e.g., electronic components or stages in an assembly line). For any given system, the primary variable of interest is T ¼ the system’s lifetime, i.e., the duration of time until the system fails (either permanently or until repairs/upgrades are made). Since T measures time, we always have T 0. Most often, T is modeled as a continuous rv on (0, 1), though occasionally lifetimes are modeled as discrete or, at least, having positive probability of equaling zero (such as a light bulb that never turns on). The probability distribution of T is often described in terms of its reliability function.

4.8.1

The Reliability Function

DEFINITION

Let T denote the lifetime (i.e., the time to failure) of some system. The reliability function of T (or of the system), denoted by R(t), is defined for t 0 by R(t) ¼ P(T > t) ¼ 1 F(t), where F(t) is the cdf of T. That is, R(t) is the probability that the system lasts more that t time units. The reliability function is sometimes also called the survival function of T.

316

4

Joint Probability Distributions and Their Applications

Properties of F(t) and the relation R(t) ¼ 1 F(t) imply that 1. If T is a continuous rv on [0, 1), then R(0) ¼ 1. 2. R(t) is a non-increasing function of t. 3. R(t) ! 0 as t ! 1. Example 4.45 The exponential distribution serves as one of the most common lifetime models in engineering practice. Suppose the lifetime T, in hours, of a certain drill bit is exponential with parameter λ ¼ .01 (equivalently, mean 100). From Sect. 3.4, we know that T has cdf F(t) ¼ 1 e–.01t, so the reliability function of T is RðtÞ ¼ 1 FðtÞ ¼ e:01t

t0

This function satisfies properties 1–3 above. A graph of R(t) appears in Fig. 4.18a. Now suppose instead that 5% of these drill bits shatter upon initial use, so that P(T ¼ 0) ¼ .05, while the remaining 95% of such drill bits follow the aforementioned exponential distribution. Since T cannot be negative, R(0) ¼ P(T > 0) ¼ 1 P(T ¼ 0) ¼ .95. For t > 0, the reliability function of T is determined as follows: Rð t Þ ¼ P T > t ¼ Pðbit doesn’t shatterÞP T > t j bit doesn’t shatter ¼ ð:95Þ e:01t ¼ :95e:01t The expression e–.01t comes from the previous reliability function calculation. Since this expression for R(t) equals .95 at t ¼ 0, we have for all t 0 that R(t) ¼ .95e–.01t (see Fig. 4.18b). This, too, is a non-increasing function of t with R(t) ! 0 as t ! 1, but property 1 does not hold because T is not a continuous rv (it has a “mass” of .05 at t ¼ 0).

a

b

R(t)

1

R(t)

0.95

100

200

t

100

200

t

Fig. 4.18 Reliability functions: (a) a continuous lifetime distribution; (b) lifetime with positive probability of failure at t ¼ 0 ■

Example 4.46 The Weibull family of distributions offers a broader class of models than does the exponential family. Recall from Sect. 3.5 that the cdf of a Weibull rv is F(x) ¼ 1 exp(–(x/β)α), where α is the shape parameter and β is the scale parameter (both > 0). If a system’s time to failure follows a Weibull distribution, then the reliability function is

4.8

Reliability

317

RðtÞ ¼ 1 FðtÞ ¼ expððt=βÞα Þ Several examples of Weibull reliability functions are illustrated in Fig. 4.19. The α ¼ 1 case corresponds to an exponential distribution with λ ¼ 1/β. Interestingly, models with larger values of α have higher reliability for small values of t (to be precise, t < β) but lower reliability for larger t than do Weibull models with small α parameter values. R(t)

Fig. 4.19 Reliability functions for Weibull lifetime distributions

1

a=3 a=2 a=1

a = .5

t

■

4.8.2

Series and Parallel Designs

Now consider assessing the reliability of systems configured in series and/or parallel designs. Figure 4.20 illustrates the two basic designs: a series system works if and only if all of its components work, while a parallel system continues to function as long as at least one of its components is still functioning. Let T1, . . ., Tn denote the n component lifetimes and let Ri(t) ¼ P(Ti > t) be the reliability function of the ith component. A standard assumption in reliability theory is that the n components operate independently, i.e., that the Tis are independent rvs. Let T denote the lifetime of the series system depicted in Fig. 4.20a. Under the assumption of component independence, the system reliability function is RðtÞ ¼ P T > t ¼ P the system’s lifetime exceeds t ¼ Pðall n component lifetimes exceed tÞ ¼ PðT 1 > t \ . . . \ T n > tÞ ¼ PðT 1 > tÞ . . . P T n > t ¼ R1 ðtÞ . . . Rn t

series system by independence

That is, for a series design, the system reliability function equals the product of the component reliability functions. On the other hand, the reliability function for the parallel system in Fig. 4.20b is given by

318

4

Joint Probability Distributions and Their Applications

a

Fig. 4.20 Basic system designs: (a) series connection; (b) parallel connection

b

RðtÞ ¼ P the system’s lifetime exceeds t ¼ Pðat least one component lifetime exceeds tÞ ¼ 1 Pðall component lifetimes are tÞ ¼ 1 PðT 1 t \ . . . \ T n tÞ ¼ 1 PðT 1 tÞ . . . P T n t

¼ 1 1 R1 ðtÞ . . . 1 Rn t

parallel system

by independence

These two results are summarized in the following proposition. PROPOSITION

Suppose a system consists of n independent components with reliability functions R1(t),. . ., Rn(t). 1. If the n components are connected in series, the system reliability function is RðtÞ ¼

n Y

Ri ðtÞ

i¼1

2. If the n components are connected in parallel, the system reliability function is RðtÞ ¼ 1

n Y

½1 Ri ðtÞ

i¼1

Example 4.47 Consider three independently operating devices, each of whose lifetime (in hours) is exponentially distributed with mean 100. From the previous example, R1(t) ¼ R2(t) ¼ R3(t) ¼ e–.01t. If these three devices are connected in series, the reliability function of the resulting system is Rð t Þ ¼

3 Y

Ri ðtÞ ¼ e:01t e:01t e:01t ¼ e:03t

i¼1

In contrast, a parallel system using these three devices as its components has reliability function RðtÞ ¼ 1

3 Y i¼1

3 ½1 Ri ðtÞ ¼ 1 1 e:01t

4.8

Reliability

319

These two reliability functions are graphed on the same set of axes in Fig. 4.21. Both functions obey properties 1–3 from p. 383, but for any t > 0 the parallel system reliability exceeds that of the series system, as it logically should. For example, the probability the series system’s lifetime exceeds 100 h (the expected lifetime of a single component) is R(100) ¼ e–.03(100) ¼ e–3 ¼ .0498, while the corresponding reliability for the parallel system is R(100) ¼ 1 (1 e.01(100))3 ¼ 1 (1 e 1)3 ¼ .7474. R(t) 1

0.8

0.6

0.4

0.2

t

0 0

100

200

300

400

Fig. 4.21 Reliability functions for the series (solid) and parallel (dashed) systems of Example 4.47

■

Example 4.48 Consider the system depicted below, which consists of a combination of series and parallel elements. Using previous notation and assuming component lifetimes are independent, let’s determine the reliability function of this system. More than one method may be applied here; we will rely on the Addition Rule: 1

2

3

RðtÞ ¼ P T 1 > t \ T 2 > t [ T 3 > t ¼ PðT 1 > t \ T 2 > tÞ þ P T 3 > t P T 1 > t \ T 2 > t \ T 3 > t Addition Rule ¼ PðT 1 > tÞP T 2 > t þ P T 3 > t P T 1 > t P T 2 > t P T 3 > t independence ¼ R1 ðtÞR2 t þ R3 t R1 t R2 t R3 t It can be shown that this reliability function satisfies properties 1–3 (the first and last are quite easy). If all three components have common reliability function Ri(t) ¼ e–.01t as in Example 4.47, the system reliability function becomes R(t) ¼ e–.02t + e–.01t e–.03t, which lies in between the two reliability functions of Example 4.47 for all t > 0. ■

320

4.8.3

4

Joint Probability Distributions and Their Applications

Mean Time to Failure

If T denotes a system’s lifetime, i.e., its time until failure, then the mean time to failure (mttf) of the system is simply E(T ). The following proposition relates mean time to failure to the reliability function. PROPOSITION

Suppose a system has reliability function R(t) for t 0. Then the system’s mean time to failure is given by ð1 ð1 μT ¼ ½1 FðtÞdt ¼ RðtÞdt ð4:8Þ 0

Expression (4.8) was established for all non-negative random variables in Exercises 38 and 150 of Chap. 3. As a simple demonstration of this proposition, consider a single exponential lifetime with mean 100 h. We have already seen that R(t) ¼ e–.01t for this particular lifetime model; integrating the reliability function yields 1 ð1 ð1 e:01t 1 RðtÞdt ¼ e:01t dt ¼ ¼ 0 :01 ¼ 100 :01 0 0 0 which is indeed the mean lifetime (aka mean time to failure) in this situation. The advantage of using Eq. (4.8) instead of the definition of E(T ) from Chap. 3 is that the former is usually an easier integral to calculate than the latter. Here, for example, direct computation of the mean time to failure would be ð1 ð1 Eð T Þ ¼ t f ðtÞdt ¼ :01te:01t dt, 0

which requires integration by parts (while the preceding computation did not). Example 4.49 Consider again the series and parallel systems of Example 4.47. Using Eq. (4.8), the mttf of the series system is ð1 ð1 1 μT ¼

33:33 hours RðtÞdt ¼ e:03t dt ¼ :03 0 0 More generally, if n independent components are connected in series, and each one has an exponentially distributed lifetime with common mean μ, then the system’s mean time to failure is μ/n. In contrast, mttf for the parallel system is given by ð1 ð1 ð1

:01t :01t 3 RðtÞdt ¼ 1 1e 3e:02t þ e:03t dt 3e dt ¼ 0

3 3 1 550 þ ¼

183:33 hours ¼ :01 :02 :03 3 There is no simple formula for the mttf of a parallel system, even when the components have identical exponential distributions. ■

4.8

Reliability

4.8.4

321

Hazard Functions

The reliability function of a system specifies the likelihood that the system will last beyond a prescribed time, t. An alternative characterization of reliability, called the hazard function, conveys information about the likelihood of imminent failure at any time t. DEFINITION

Let T denote the lifetime of a system. If the rv T has pdf f(t) and cdf F(t), the hazard function is defined by hðtÞ ¼

f ðt Þ 1 FðtÞ

If T has reliability function R(t), the hazard function may also be written as hðtÞ ¼ f ðtÞRðtÞ: Since the pdf f(t) is not a probability, neither is the hazard function h(t). To get a sense of what the hazard function represents, consider the following question: Given that the system has survived past time t, what is the probability the system will fail within the next Δt time units (an imminent failure)? Such a probability may be computed as follows: ð tþΔt f ðtÞdt PðT t þ Δt \ T > tÞ f ðtÞ Δt PðT t þ Δt j T > tÞ ¼ ¼ t ¼ hðtÞ Δt

PðT > tÞ RðtÞ Rð t Þ Rearranging, we have h(t) P(T t + ΔtjT > t)/Δt; more precisely, h(t) is the limit of the righthand side as Δt ! 0. This suggests that the hazard function h(t) is a density function, like f(t), except that h(t) relates to the conditional probability that the system is about to fail. Example 4.50 Once again, consider an exponentially distributed lifetime, T, but with arbitrary parameter λ. The pdf and reliability function of T are λe–λt and e–λt, respectively, so the hazard function of T is hðtÞ ¼

f ðtÞ λeλt ¼ λt ¼ λ Rð t Þ e

In other words, a system whose time to failure follows an exponential distribution will have a constant hazard function. (The converse is true, too; we’ll see how to recover f(t) from h(t) shortly.) This relates to the memoryless property of the exponential distribution: given the system has functioned for t hours thus far, the chance of surviving any additional amount of time is independent of t. As mentioned in Sect. 3.4, this suggests the system does not “wear out” as time progresses (which may be realistic for some devices in the short term, but not in the long term). ■ Example 4.51 Suppose instead that we model a system’s lifetime with a Weibull distribution. From the formulas presented in Sect. 3.5, α

f ðt Þ ðα=βα Þtα1 eðt=βÞ α α1 hðtÞ ¼ ¼ t α ¼ 1 FðtÞ 1 1 eðt=βÞ βα For α ¼ 1, this is identical to the exponential distribution hazard function (with β ¼ 1/λ). For α > 1, h(t) is an increasing function of t, meaning that we are more likely to observe an imminent

322

4

Joint Probability Distributions and Their Applications

failure as time progresses (this is equivalent to the system wearing out). For 0 < α < 1, h(t) decreases with t, which would suggest that failures become less likely as t increases! This can actually be realistic for small values of t: for many devices, manufacturing flaws cause a handful to fail very early, and those that survive this initial “burn in” period are actually more likely to survive a while longer (since they presumably don’t have severe faults). ■ h(t)

Fig. 4.22 A prototype hazard function

burn in

stable

burn out

t

Figure 4.22 shows a prototype hazard function, popularly called a “bathtub” shape. The function can be divided into three time intervals: (1) a “burn in” period of early failures due to manufacturing errors; (2) a “stable” period where failures are due primarily to chance; and (3) a “burn out” period with an increasing failure rate due to devices wearing out. In practice, most hazard functions exhibit one or more of these behaviors. There is a one-to-one correspondence between the pdf of a system lifetime, f(t), and its hazard function, h(t). The definition of the hazard function shows how one may derive h(t) from f(t); the following proposition reverses the process. PROPOSITION

Suppose a system has a continuous lifetime distribution on [0, 1) with hazard function h(t). Then its lifetime (aka time to failure) has reliability function R(t) given by Ðt hðuÞdu RðtÞ ¼ e 0 and pdf f(t) given by 0

f ðtÞ ¼ R ðtÞ ¼ hðtÞe

Ðt 0

hðuÞdu

Proof Since R(t) ¼ 1 F(t), R0 (t) ¼ –f(t), and the hazard function may be written as h(t) ¼ R0 (t)/R(t). Now integrate both sides: ðt 0 ðt R ð uÞ du ¼ ln ½RðuÞj0t ¼ ln ½RðtÞ þ ln ½Rð0Þ hðuÞdu ¼ R ð u Þ 0 0 Since the system lifetime is assumed to be continuous on [0, 1), R(0) ¼ 1 and ln[R(0)] ¼ 0. This leaves the equation

4.8

Reliability

323

ln ½RðtÞ ¼

ðt

hðuÞdu,

and the formula for R(t) follows by solving for R(t). The formula for f(t) follows from the previous observation that R0 (t) ¼ –f(t), so f(t) ¼ –R0 (t), and then applying the chain rule: ðt Ð Ðt Ðt d t hðuÞdu 0 hðuÞdu d hðuÞdu 0 0 hðuÞdu ¼ e 0 hðtÞ f ðtÞ ¼ R ðtÞ ¼ e ¼ e dt dt 0 The last step utilizes the Fundamental Theorem of Calculus. ■ The formulas for R(t) and f(t) in the preceding proposition can be easily modified for the case where T ¼ 0 with some positive probability, and so R(0) < 1 (see Exercise 132). Example 4.52 A certain type of high-quality transistors has hazard function h(t) ¼ 1 + t6 for t 0, where t is measured in thousands of hours. This function is illustrated in Fig. 4.23a; notice there is no “burn in” period, but we see a fairly stable interval followed by burnout. The corresponding pdf for transistor lifetimes is Ðt Ð t 1þu6 Þdu 7 hðuÞdu f ðtÞ ¼ hðtÞe 0 ¼ 1 þ t6 e 0 ð ¼ 1 þ t6 eðtþt =7Þ This pdf appears in Fig. 4.23b. Fig. 4.23 (a) Hazard function and (b) pdf for Example 4.52

a h(t)

b f (t) 1 0.8 0.6 0.4 0.2 t

4.8.5

1

2

3

t

0 0

1

2

3

Exercises: Section 4.8 (121–132)

121. The lifetime, in thousands of hours, of the motor in a certain brand of kitchen blender has a Weibull distribution with α ¼ 2 and β ¼ 1. (a) Determine the reliability function of such a motor and then graph it. (b) What is the probability a motor of this type will last more than 1,500 h? (c) Determine the hazard function of such a motor and then graph it. (d) Find the mean time to failure of such a motor. Compare your answer to the expected value of a Weibull distribution given in Sect. 3.5. [Hint: Let u ¼ x2, and apply the gamma integral formula (3.5) to the resulting integral.] 122. High-speed Internet customers are often frustrated by modem crashes. Suppose the time to “failure” for one particular brand of cable modem, measured in hundreds of hours, follows a gamma distribution with α ¼ β ¼ 2.

324

4

Joint Probability Distributions and Their Applications

(a) Determine and graph the reliability function for this brand of cable modem. (b) What is the probability such a modem does not need to be refreshed for more than 300 h? (c) Find the mean time to “failure” for such a modem. Verify that your answer matches the formula for the mean of a gamma rv given in Sect. 3.4. (d) Determine and graph the hazard function for this type of modem. 123. Empirical evidence suggests that the electric ignition on a certain brand of gas stove has the following lifetime distribution, measured in thousands of days: :375t2 0 t 2 f ðtÞ ¼ 0 otherwise (Notice that the model indicates that all such ignitions expire within 2,000 days, a little less than 6 years.) (a) Determine and graph the reliability function for this model, for all t 0. (b) Determine and graph the hazard function for 0 t 2. (c) What happens to the hazard function for t > 2? 124. The manufacture of a certain children’s toy involves an assembly line with five stations. The lifetimes of the equipment at these stations are independent and all exponentially distributed; the mean time to failure at the first three stations (in hundreds of hours) is 1.5, while the mttf at the last two stations is 2.4. (a) Determine the reliability function for each of the five individual stations. (b) Determine the reliability function for the assembly line. [Hint: An assembly line is an example of what type of design?] (c) Find the mean time to failure for the assembly line. (d) Determine the hazard function for the assembly line. 125. A local bar owns four of the blenders described in Exercise 121, each having a Weibull(2, 1) lifetime distribution. During peak hours, these blenders are in continuous use, but the bartenders can keep making blended drinks (margaritas, etc.) provided that at least one of the four blenders is still functional. Define the “system” to be the four blenders under continuous use as described above, and define the lifetime of the system to be the length of time that at least one of the blenders is still functional. (Assume none of the blenders is replaced until all four have worn out.) (a) What sort of system design do we have in this example? (b) Find the reliability function of the system. (c) Find the hazard function of the system. (d) Find the mean time to failure of the system. [See the hint from Exercise 121(d).] 126. Consider the six-component system displayed below. Let R1(t), . . ., R6(t) denote the reliability functions of the components. Assume the six components operate independently. 1

2

3

4

5

6

(a) Find the system reliability function. (b) Assuming all six components have exponentially distributed lifetimes with mean 100 h, find the mean time to failure for the system.

4.8

Reliability

325

127. Consider the six-component system displayed below. Let R1(t), . . ., R6(t) denote the component reliability functions. Assume the six components operate independently. 1

3

5

2

4

6

(a) Find the system reliability function. (b) Assuming all six components have exponentially distributed lifetimes with mean 100 h, find the mean time to failure for the system. 128. A certain machine has the following hazard function: :002 0 < t 200 hð t Þ ¼ :001 t > 200 This corresponds to a situation where a device with an exponentially distributed lifetime is replaced after 200 h of operation by another, better device also having an exponential lifetime distribution. (a) Determine and graph the reliability function. (b) Determine the probability density function of the machine’s lifetime. (c) Find the mean time to failure. 129. Suppose the hazard function of a device is given by 8 0. This model asserts that if a device lasts β hours, it will last forever (while seemingly unreasonable, this model can be used to study just “initial wearout”). (a) Find the reliability function. (b) Find the pdf of device lifetime. 130. Suppose n independent devices are connected in series and that the ith device has an exponential lifetime distribution with parameter λi. (a) Find the reliability function of the series system. (b) Show that the system lifetime also has an exponential distribution, and identify its parameter in terms of λ1, . . ., λn. (c) If the mean lifetimes of the individual devices are μ1, . . ., μn, find an expression for the mean lifetime of the series system. (d) If the same devices were connected in parallel, would the resulting system’s lifetime also be exponentially distributed? How can you tell? 131. Show that a device whose hazard function is constant must have an exponential lifetime distribution. 132. Reconsider the drill bits described in Example 4.45, of which 5% shatter instantly (and so have lifetime T ¼ 0). It was established that the reliability function for this scenario is R(t) ¼ .95e–.01t, t 0. (a) A generalized version of expected value that applies to distributions with both discrete and continuous elements can be used to show that the mean lifetime of these drill bits is (.05)(0) + (.95)(100) ¼ 95 h. Verify that Eq. (4.8) applied to R(t) gives the same answer.

326

4

Joint Probability Distributions and Their Applications

[This suggests that our proposition about mttf can be used even when the lifetime distribution assigns positive probability to 0.] (b) For t > 0, the expression h(t) ¼ –R0 (t)/R(t) is still valid. Find the hazard function for t > 0. (c) Find a formula for R(t) in terms of h(t) that applies in situations where R(0) < 1. Verify that you recover R(t) ¼ .95e–.01t when your formula is applied to h(t) from part (b). [Hint: Look at the earlier proposition in this section. What one change needs to occur to accommodate R(0) < 1?]

4.9

Order Statistics

Many situations arise in practice that involve ordering sample observations from smallest to largest and then manipulating these ordered values in various ways. For example, once the bidding has closed in a hidden-bid auction (one in which bids are submitted independently of one another), the largest bid in the resulting sample is the amount paid for the item being auctioned, and the difference between the largest and second largest bids can be regarded as the amount that the successful bidder has overpaid. Suppose that X1, X2, . . ., Xn is a random sample from a continuous distribution. Because of continuity, for any i, j with i 6¼ j, P(Xi ¼ Xj) ¼ 0. This implies that with probability 1, the n sample observations will all be different (of course, in practice all measuring instruments have accuracy limitations, so tied values may in fact result). DEFINITION

The order statistics from a random sample are the random variables Y1, . . .Yn given by Y 1 ¼ the smallest among X1 , X2 , . . . , Xn ði:e:, the sample minimumÞ Y 2 ¼ the second smallest among X1 , X2 , . . . , Xn ⋮ Y n ¼ the largest among X1 , X2 , . . . , Xn ðthe sample maximumÞ Thus, with probability 1, Y1 < Y2 < . . .< Yn 1 < Yn. The sample median (i.e., the middle value in the ordered list) is then Y(n + 1)/2 when n is odd, while the sample range is Yn Y1.

4.9.1

The Distributions of Yn and Y1

The key idea in obtaining the distribution of the sample maximum Yn is the observation that Yn is at most y if and only if every one of the Xis is at most y. Similarly, the distribution of Y1 is based on the fact that it will exceed y if and only if all Xis exceed y. Example 4.53 Consider 5 identical components connected in parallel as shown in Fig. 4.20b. Let Xi denote the lifetime, in hours, of the ith component (i ¼ 1, 2, 3, 4, 5). Suppose that the Xis are independent and that each has an exponential distribution with λ ¼ .01, so the expected lifetime of

4.9

Order Statistics

327

any particular component is 1/λ ¼ 100 h. Because of the parallel configuration, the system will continue to function as long as at least one component is still working, and will fail as soon as the last component functioning ceases to do so. That is, the system lifetime is Y5, the largest order statistic in a sample of size 5 from the specified exponential distribution. Now Y5 will be at most y if and only if every one of the five Xis is at most y. With G5( y) denoting the cdf of Y5, G5 ðyÞ ¼ PðY 5 yÞ ¼ PðX1 y \ X2 y \ . . . \ X5 yÞ ¼ Pð X 1 y Þ Pð X 2 y Þ Pð X 5 y Þ Ð For every one of the Xis, P(Xi y) ¼ F( y) ¼ 0y.01e.01xdx ¼ 1 e.01y; this is the common cdf of the Xis evaluated at y. Hence, G5( y) ¼ (1 e.01y) (1 e.01y) ¼ (1 e.01y)5. The pdf of Y5 can now be obtained by differentiating the cdf with respect to y. Suppose instead that the five components are connected in series rather than in parallel (Fig. 4.20a). In this case the system lifetime will be Y1, the smallest of the five order statistics, since the system will crash as soon as a single one of the individual components fails. Note that system lifetime will exceed y hours if and only if the lifetime of every component exceeds y hours. Thus, the cdf of Y1 is G 1 ð y Þ ¼ Pð Y 1 y Þ ¼ 1 Pð Y 1 > y Þ ¼ 1 Pð X 1 > y \ X 2 > y \ . . . \ X 5 > y Þ 5 ¼ 1 PðX1 > yÞ PðX2 > yÞ PðX5 > yÞ ¼ 1 e:01y ¼ 1 e:05y This is the form of an exponential cdf with parameter .05. More generally, if the n components in a series connection have lifetimes that are independent, each exponentially distributed with the same parameter λ, then the system lifetime will be exponentially distributed with parameter nλ. We saw a similar result in Example 4.49. The expected system lifetime will then be 1/(nλ), much smaller than the expected lifetime of an individual component. ■ An argument parallel to that of the previous example for a general sample size n and an arbitrary pdf f(x) gives the following general results. PROPOSITION

Let Y1 and Yn denote the smallest and largest order statistics, respectively, based on a random sample from a continuous distribution with cdf F(x) and pdf f(x). Then the cdf and pdf of Yn are Gn ðyÞ ¼ ½FðyÞn ,

gn ðyÞ ¼ n½FðyÞn1 f ðyÞ

The cdf and pdf of Y1 are G1 ðyÞ ¼ 1 ½1 FðyÞn ,

g1 ðyÞ ¼ n½1 FðyÞn1 f ðyÞ

Example 4.54 Let X denote the contents of a one-gallon container, and suppose that its pdf is f(x) ¼ 2x for 0 x 1 (and 0 otherwise) with corresponding cdf F(x) ¼ x2 on [0, 1]. Consider a random sample of four such containers. The order statistics Y1 and Y4 represent the contents of the least-filled container and the most-filled container, respectively. The pdfs of Y1 and Y4 are 3 3 g1 ðyÞ ¼ 4 1 y2 2y ¼ 8y 1 y2

0y1

328

4

Joint Probability Distributions and Their Applications

3 g4 ðyÞ ¼ 4 y2 2y ¼ 8y7

0y1

The corresponding density curves appear in Fig. 4.24.

a

b g1(y)

g4(y) 8

2.0 6

1.5 1.0

4

0.5

2

0.0 0.0

y 0.2

0.4

0.6

0.8

0 0.0

1.0

y 0.2

0.4

0.6

0.8

1.0

Y4

Y1

Fig. 4.24 Density curves for the order statistics (a) Y1 and (b) Y4 in Example 4.54

Let’s determine the expected value of Y4 Y1, the difference between the contents of the mostfilled container and the least-filled container; Y4 Y1 is just the sample range. Apply linearity of expectation: ð1 ð1 3 7 EðY 4 Y 1 Þ ¼ E Y 4 E Y 1 ¼ y 8y dy y 8y 1 y2 dy 0

8 384 ¼ :889 :406 ¼ :483 ¼ 9 945 If random samples of four containers were repeatedly selected and the sample range of contents determined for each one, the long run average value of the range would be .483. ■

4.9.2

The Distribution of the ith Order Statistic

We have already obtained the (marginal) distribution of the largest order statistic Yn and also that of the smallest order statistic Y1. A generalization of the argument used previously results in the following proposition; Exercise 140 suggests how this result can be derived. PROPOSITION

Suppose X1, X2, . . ., Xn is a random sample from a continuous distribution with cdf F(x) and pdf f(x). The pdf of the ith smallest order statistic Yi is gi ð y Þ ¼

n! ½FðyÞi1 ½1 FðyÞni f ðyÞ ði 1Þ!ðn iÞ!

ð4:9Þ

An intuitive justification for Expression (4.9) will be given shortly. Notice that it is consistent with the pdf expressions for g1( y) and gn( y) given previously; just substitute i ¼ 1 and i ¼ n, respectively.

4.9

Order Statistics

329

Example 4.55 Suppose that component lifetime is exponentially distributed with parameter λ. For a random sample of n ¼ 5 components, the expected value of the sample median lifetime is ð1 ð1 2 2 5! 1 eλy eλy λeλy dy E ðY 3 Þ ¼ y g3 ðyÞdy ¼ y 2! 2! 0 0 Expanding out the integrand and integrating term by term, the expected value is .783/λ. The median of the exponential distribution is, from solving F(η) ¼ .5, η ¼ –ln(.5)/λ ¼ .693/λ. Thus if sample after sample of five components is selected, the long run average value of the sample median will be somewhat larger than the median value of the individual lifetime distribution. This is because the exponential distribution has a positive skew. ■ Here is the intuitive derivation of Eq. (4.9). Let Δ be a number quite close to 0, and consider the three intervals (1, y], (y, y + Δ], and (y + Δ, 1). For a single X, the probabilities of these three intervals are Ð p1 ¼ P(X y) ¼ F( y) p2 ¼ P(y < X y + Δ) ¼ y+Δ y f(x)dx f( y) Δ p3 ¼ P(X > y + Δ) ¼ 1 F(y + Δ) For a random sample of size n, it is very unlikely that two or more Xs will fall in the middle interval, since its width is only Δ. The probability that the ith order statistic falls in the middle interval is then approximately the probability that i 1 of the Xs are in the first interval, one is in the middle, and the remaining n i are in the third. This is just a trinomial probability: Pð y < Y i y þ Δ Þ

n! ½Fðyi Þi1 f ðyÞ Δ ½1 Fðy þ ΔÞni ði 1Þ!1!ðn iÞ!

Dividing both sides by Δ and taking the limit as Δ ! 0 gives exactly (4.9). That is, we may interpret the pdf gi( y) as loosely specifying that i 1 of the original observations are below y, one is “at” y, and the other n i are above y. Similar reasoning works to intuitively derive the joint pdf of Yi and Yj (i < j). In this case there are five relevant intervals: (1, yi], (yi, yi + Δ1], (yi + Δ1, yj], (yj, yj + Δ2], and (yj + Δ2, 1).

4.9.3

The Joint Distribution of the n Order Statistics

We now develop the joint pdf of Y1, Y2, . . ., Yn. Consider first a random sample X1, X2, X3 of fuel efficiency measurements (mpg). The joint pdf of this random sample is f ðx1 ; x2 ; x3 Þ ¼ f ðx1 Þ f ðx2 Þ f ðx3 Þ The joint pdf of Y1, Y2, Y3 will be positive only for values of y1, y2, y3 satisfying y1 < y2 < y3. What is this joint pdf at the values y1 ¼ 28.4, y2 ¼ 29.0, y3 ¼ 30.5? There are six different ways to obtain these ordered values:

330

4

X1 X1 X1 X1 X1 X1

¼ ¼ ¼ ¼ ¼ ¼

28.4, 28.4, 29.0, 29.0, 30.5, 30.5,

X2 X2 X2 X2 X2 X2

¼ ¼ ¼ ¼ ¼ ¼

Joint Probability Distributions and Their Applications

X3 X3 X3 X3 X3 X3

29.0, 30.5, 28.4, 30.5, 28.4, 29.0,

¼ ¼ ¼ ¼ ¼ ¼

30.5 29.0 30.5 28.4 29.0 28.4

These six possibilities come from the 3! ways to order the three numerical observations once their values are fixed. Thus gð28:4; 29:0; 30:5Þ ¼ f ð28:4Þ f ð29:0Þ f ð30:5Þ þ þ f ð30:5Þ f ð29:0Þ f ð28:4Þ ¼ 3!f ð28:4Þ f ð29:0Þ f ð30:5Þ Analogous reasoning with a sample of size n yields the following result: PROPOSITION

Let g(y1, y2, . . ., yn) denote the joint pdf of the order statistics Y1, Y2, . . ., Yn resulting from a random sample of Xis from a pdf f(x). Then ( n!f ðy1 Þ f y2 f yn y1 < y2 < . . . < yn gð y 1 ; y 2 ; . . . ; y n Þ ¼ 0 otherwise

For example, if we have a random sample of component lifetimes and the lifetime distribution is exponential with parameter λ, then the joint pdf of the order statistics is gðy1 ; . . . ; yn Þ ¼ n!λn eλðy1 þþyn Þ

0 < y1 < y2 < < yn

Example 4.56 Suppose X1, X2, X3, and X4 are independent random variables, each uniformly distributed on the interval from 0 to 1. The joint pdf of the four corresponding order statistics Y1, Y2, Y3, and Y4 is g(y1, y2, y3, y4) ¼ 4!∙1 for 0 < y1 < y2 < y3 < y4 < 1. The probability that every pair of Xis is separated by more than .2 is the same as the probability that Y2 Y1 > .2, Y3 Y2 > .2, and Y4 Y3 > .2. This latter probability results from integrating the joint pdf of the Yis over the region .6 < y4 < 1, .4 < y3 < y4 .2, .2 < y2 < y3 .2, 0 < y1 < y2 .2: ð 1 ð y4 :2 ð y3 :2 ð y2 :2 PðY 2 Y 1 > :2, Y 3 Y 2 > :2, Y 4 Y 3 > :2Þ ¼ 4!dy1 dy2 dy3 dy4 :6 :4

:2

The inner integration gives 4!(y2 .2), and this must then be integrated between .2 and y3 .2. Making the change of variable z2 ¼ y2 .2, the integration of z2 is from 0 to y3 .4. The result of this integration is 4!∙(y3 .4)2/2. Continuing with the third and fourth integration, each time making an appropriate change of variable so that the lower limit of each integration becomes 0, the result is PðY 2 Y 1 > :2, Y 3 Y 2 > :2, Y 4 Y 3 > :2Þ ¼ :44 ¼ :0256 A more general multiple integration argument for n independent uniform [0, B] rvs shows that the probability that all values are separated by more than some distance d is

4.9

Order Statistics

331

Pðall values are separated by more than dÞ ¼

1 ðn 1Þd=B 0

n

0 d B= n 1 d > B=ðn 1Þ

As an application, consider a year that has 365 days, and suppose that the birth time of someone born in that year is uniformly distributed throughout the 365-day period. Then in a group of 10 independently selected people born in that year, the probability that all of their birth times are separated by more than 24 h (d ¼1 day) is (1 (10 1)(1)/365)10 ¼ .779. Thus the probability that at least two of the 10 birth times are separated by at most 24 h is .221. As the group size n increases, it becomes more likely that at least two people have birth times that are within 24 h of each other (but not necessarily on the same day). For n ¼ 16, this probability is .467, and for n ¼ 17 it is .533. So with as few as 17 people in the group, it is more likely than not that at least two of the people were born within 24 h of each other. Coincidences such as this are not as surprising as one might think. The probability that at least two people are born on the same calendar day (assuming equally likely birthdays) is much easier to calculate than what we have shown here; see the Birthday Problem in Example 1.22. ■

4.9.4

Exercises: Section 4.9 (133–142)

133. A friend of ours takes the bus 5 days per week to her job. The five waiting times until she can board the bus are a random sample from a uniform distribution on the interval from 0 to 10 min. (a) Determine the pdf and then the expected value of the largest of the five waiting times. (b) Determine the expected value of the difference between the largest and smallest times. (c) What is the expected value of the sample median waiting time? (d) What is the standard deviation of the largest time? 134. Refer back to Example 4.54. Because n ¼ 4, the sample median is the average of the two middle order statistics, (Y2 + Y3)/2. What is the expected value of the sample median, and how does it compare to the median of the population distribution? 135. An insurance policy issued to a boat owner has a deductible amount of $1000, so the amount of damage claimed must exceed this deductible before there will be a payout. Suppose the amount (thousands of dollars) of a randomly selected claim is a continuous rv with pdf f(x) ¼ 3/x4 for x > 1. Consider a random sample of three claims. (a) What is the probability that at least one of the claim amounts exceeds $5000? (b) What is the expected value of the largest amount claimed? 136. A store is expecting n deliveries between the hours of noon and 1 p.m. Suppose the arrival time of each delivery truck is uniformly distributed on this 1-h interval and that the times are independent of each other. What are the expected values of the ordered arrival times? 137. Let X be the amount of time an ATM is in use during a particular 1-h period, and suppose that X has the cdf F(x) ¼ xθ for 0 < x < 1 (where θ > 1). Give expressions involving the gamma function for both the mean and variance of the ith smallest amount of time Yi from a random sample of n such time periods. 138. The logistic pdf f(x) ¼ ex/(1 + ex)2 for 1 < x < 1 is sometimes used to describe the distribution of measurement errors. (a) Graph the pdf. Does the appearance of the graph surprise you? (b) For a random sample of size n, obtain an expression involving the gamma function for the moment generating function of the ith smallest order statistic Yi. This expression can then be differentiated to obtain moments of the order statistics. [Hint: Set up the appropriate integral, and then let u ¼ 1/(1 + ex).]

332

4

Joint Probability Distributions and Their Applications

139. Let X represent a measurement error. It is natural to assume that the pdf f(x) is symmetric about 0, so that the density at a value c is the same as the density at c (an error of a given magnitude is equally likely to be positive or negative). Consider a random sample of n measurements, where n ¼ 2k + 1, so that Yk+1 is the sample median. What can be said about E(Yk + 1)? If the X distribution is symmetric about some other value, so that value is the median of the distribution, what does this imply about E(Yk + 1)? [Hints: For the first question, symmetry implies that 1 F(x) ¼ P(X > x) ¼ P(X < x) ¼ F(x). For the second question, consider W ¼ X η; what is the median of the distribution of W?] 140. The pdf of the second-largest order statistic, Yn–1 can be obtained using reasoning analogous to how the pdf of Yn was first obtained. (a) For any number y, Yn–1 y if and only if at least n 1 of the original Xs are y. (Do you see why?) Use this fact to derive a formula for the cdf of Yn–1 in terms of F, the cdf of the Xs. [Hint: Separate “at least n 1” into two cases and apply the binomial distribution formula.] (b) Differentiate the cdf in part (a) to obtain the pdf of Yn–1. Simplify and verify it matches the formula for gn–1( y) provided in this section. 141. Use the intuitive argument sketched in this section to obtain the following general formula for the joint pdf of two order statistics Yi and Yj with i < j: g yi ; yj ¼ n! Fðyi Þi1 ½Fðyj Þ Fðyi Þji1 ½1 Fðyj Þnj f yi f yj for yi < yj ði 1Þ!ðj i 1Þ!ðn jÞ! 142. Consider a sample of size n ¼ 3 from the standard normal distribution, and obtain the expected value of the largest order statistic. What does this say about the expected value of the largest order statistic in a sample of this size from any normal distribution? [Hint: With ϕ(x) denoting the standard normal pdf, use the fact that (d/dx)ϕ(x) ¼ xϕ(x) along with integration by parts.]

4.10

Simulation of Joint Probability Distributions and System Reliability

In Chaps. 2 and 3, we saw several methods for simulating “generic” discrete and continuous distributions (in addition to built-in functions for binomial, Poisson, normal, etc.). Unfortunately, most of these general methods do not carry over easily to joint distributions or else require significant re-tooling. In this section, we briefly survey some simulation techniques for general bivariate discrete and continuous distributions and discuss how to simulate normal distributions in more than one dimension. We then consider simulations for the lifetimes of interconnected systems, in order to understand the reliability of such systems.

4.10.1 Simulating Values from a Joint PMF Simulating two dependent discrete rvs X and Y can be rather tedious and is easier to understand with a specific example in mind. Suppose we desire to simulate (X, Y) values from the joint pmf in Example 4.1:

4.10

Simulation of Joint Probability Distributions and System Reliability

y 100

200

.20 .05

.10 .15

.20 .30

p(x, y) x

100 250

333

The exhaustive search approach uses the inverse cdf method of Sect. 2.8 by reformatting the table as a single row of (x, y) pairs along with cumulative probabilities. Starting in the upper left corner and going across, create “cumulative” probabilities for the entire table: (x, y)

(100, 0) (100, 100) (100, 200) (250, 0) (250, 100) (250, 250)

cum. prob.

.20

.30

.50

.55

.70

1

Be careful not to interpret these increasing decimals as cumulative probabilities in the traditional sense, e.g., it is not the case that .70 in the preceding table represents P(X 250 \ Y 100). Now the simulation proceeds similarly to those illustrated in Fig. 2.10 for simulating a single discrete random variable: use if-else statements, specifying the pair of values (x, y) for each range of standard uniform random numbers. Figure 4.25 provides the needed Matlab and R code. In both languages, executing the code in Fig. 4.25 results in two vectors x and y that, when regarded as paired values, form a simulation of the original joint pmf. That is to say, if x and y were laid in parallel roughly 20% of the paired values would be (100, 0), about 10% would be (100, 100), and so on. At the end of Sect. 2.8 we mentioned that both Matlab and R have built-in functions to speed up the inverse cdf method (randsample and sample, respectively) for a single discrete rv. Unfortunately, these are not designed to take pairs of values as an input, and so the lengthier code is required. You might be tempted to use these built-in functions to simulate the (marginal) pmfs of X and Y separately, but beware: by design, the resulting simulated values of X and Y would be independent, and the rvs displayed in the original joint pmf are clearly dependent. For example, (100, 0) ought to appear roughly 20% of the time in a simulation; however, separate simulations of X and Y will result in about 50% 100s for X and 25% 0s for Y, independently, meaning the pair (100, 0) will appear in approximately (.5)(.25) ¼ 12.5% of simulated (X, Y) values.

a x=zeros(10000,1); for i=1:10000 u=rand; if u 0. (a) Find the autocorrelation function of Y(t). (b) Find and sketch the power spectral density of Y(t). (c) Find the expected power in Y(t). (d) What proportion of the expected power in Y(t) lies below the frequency λ Hz? Let X(t) have power spectral density SXX( f ) ¼ N0 jf j/A for j f j B (and zero otherwise), where B < N0A. (a) Find the expected power in X(t).

8.1

11.

12. 13.

14. 15.

16.

17.

18.

19. 20.

Power Spectral Density

575

(b) Find the autocorrelation function of X(t). [Hint: It may be helpful to sketch SXX( f ) first.] Suppose a random process X(t) has autocorrelation function RXX(τ) ¼ 100ejτj + 50ejτ1j + 50ejτ+1j. (a) Find the expected power in X(t). (b) Find and sketch the power spectral density of X(t). (c) Find the expected power in X(t) below 1 Hz. Let X(t) be a WSS random process, and define a d-second delay of X(t) by Y(t) ¼ X(t d ). Find the mean, autocorrelation, and power spectrum of Y(t) in terms of those of X(t). Let X(t) be a WSS random process, and define a d-second “moving window” process by W(t) ¼ X(t) – X(t d ). Find the mean, autocorrelation, and power spectrum of W(t) in terms of those of X(t). Let X(t) and Y(t) be jointly WSS random processes. Show that SXY( f ) ¼ SY* X( f ). Let X(t) and Y(t) be orthogonal and WSS random processes, and define Z(t) ¼ X(t) + Y(t). (a) Are X(t) and Y(t) jointly WSS? Why or why not? (b) Is Z(t) WSS? (c) Find the psd of Z(t). Let X(t) and Y(t) be non-orthogonal, jointly WSS random processes, and define Z(t) ¼ X(t) + Y(t). (a) Find the autocorrelation function of Z(t). Is Z(t) WSS? (b) Find the power spectral density of Z(t), and explain why this expression is real-valued. Let X(t) and Y(t) be independent WSS random processes, and define Z(t) ¼ X(t)Y(t). (a) Show that Z(t) is also WSS. (b) Find the psd of Z(t). Pink noise, also called 1/f noise, is characterized by the power spectrum SNN( f ) ¼ 1/j f j for f 6¼ 0. (a) Explain why such a process is not physically realizable. (b) Consider a band-limited pink noise process with psd SNN( f ) ¼ 1/jf j for f0 jf j f1. Find the expected power of such a random process. (c) A “generalized pink noise” process has the psd SNN( f ) ¼ N0/(2j fj1+β) for jfj > f0 and 0 otherwise, where 0 < β < 1. Find the expected power of such a random process. Highpass white noise is characterized by the power spectrum SNN( f ) ¼ N0/2 for jf j > B and 0 otherwise. Is highpass white noise a physically realizable process? Why or why not? The ac power spectral density (ac-psd) of a WSS random process is defined as the Fourier transform of its autocovariance function: ac SXX ðf Þ ¼ F fCXX ðτÞg

(a) By using the relationship between CXX(τ) and RXX(τ), develop an equation relating the psd of a random process to its ac-psd. (b) Find the ac-psd for the random process of Example 8.3. (c) Explain why the term “ac power spectral density” is appropriate. 21. Exercise 36 of Chap. 7 presented a random process of the form X(t) ¼ A Y(t), where A is a random variable and Y(t) is an ergodic, WSS random process independent of A. It was shown that X(t) is WSS but not ergodic. (a) Find the psd of X(t). (b) Find the ac-psd of X(t). (See the previous exercise.) (c) Does the ac-psd of X(t) include an impulse at zero? What does this say about our interpretation of “dc power offset” for non-ergodic processes?

576

8.2

8

Introduction to Signal Processing

Random Processes and LTI Systems

For any communication system to be effective, one must be able to successfully distinguish the intended signal from the noise it encounters during transmission. If we understand enough about the statistical properties of that noise, then in theory a filter can be constructed to minimize noise effects, thereby making the signal easier to “hear.” This section gives a very brief overview of filters2 and then investigates aspects of applying a filter to a random, continuous-time signal. In communication theory, a system refers to anything that operates on a signal. We will denote a generic system by the letter L. If we let x(t) and y(t) denote the input and output of this system, respectively, then we may write yðtÞ ¼ L½xðtÞ where L[] denotes the application of the system to a signal. One particular class of systems is of the greatest interest, since they form the backbone of filtering. DEFINITION

A linear, time-invariant (LTI) system L satisfies the following two properties: 1. (Linearity) For all functions x1(t) and x2(t) and all constants a1 and a2, L½a1 x1 ðtÞ þ a2 x2 ðtÞ ¼ a1 L½x1 ðtÞ þ a2 L½x2 ðtÞ 2. (Time invariance) For all d > 0, if y(t) ¼ L[x(t)], then y(t d) ¼ L[x(t d )]. Part 2 of this definition says that it does not matter on an absolute time scale when we apply the LTI system to x(t); the response will be the same, other than the time delay. As it turns out, an LTI system can be completely characterized by its effect on an impulse, essentially because a signal can generally be decomposed into a weighted sum of impulses, and then we may apply linearity. With this in mind, an LTI system is described in the time domain by its impulse response (function), denoted h(t): hðtÞ ¼ L½δðtÞ It can be shown (see Chap. 6 of the reference by Ambardar) that if L is an LTI system with impulse response h(t), then the input and output signals of L are related by a convolution operation: ð1 ð1 yðtÞ ¼ xðtÞHhðtÞ ¼ xðsÞhðt sÞds ¼ xðt sÞhðsÞds ð8:5Þ 1

1

The same relationship holds for random signals, i.e., if X(t) is the random input to an LTI system and Y(t) the output, then Y(t) ¼ X(t) H h(t). The appearance of a convolution operator suggests it would be desirable to apply a transform to Eq. (8.5). The Fourier transform of the impulse response, denoted H( f ), is called the transfer function of the LTI system:

2

Readers interested in a thorough treatment of filters and other systems should consult the reference by Ambardar.

8.2

Random Processes and LTI Systems

577

H ð f Þ ¼ F fhðtÞg For deterministic signals, we may then write Y( f ) ¼ X( f )H( f ), where X( f ) and Y( f ) denote the Fourier transforms of x(t) and y(t), respectively. However, Fourier transforms of random signals do not exist (due to convergence issues), so the transfer function H( f ) cannot be defined as the ratio of the output and input in the frequency domain as one commonly does in other engineering situations. Still, the transfer function will prove critical in determining how the power in a random signal X(t) is “transferred” by an LTI system, as we will see shortly.

8.2.1

Statistical Properties of the LTI System Output

The following proposition summarizes the relationships between the statistical properties of the random input signal X(t) of an LTI system and the corresponding output signal Y(t). Here X(t) is again assumed to be wide-sense stationary. PROPOSITION

Let L be an LTI system with impulse response h(t) and transfer function H( f ). Suppose X(t) is a wide-sense stationary process and let Y(t) ¼ L[X(t)], the output of the LTI system applied to X(t). Then X(t) and Y(t) are jointly WSS, with the following properties. Time domain ð 1. μY ¼ μX

1

1

Frequency domain hðsÞds

1. μY ¼ μX H(0)

2. RYY(τ) ¼ RXX(τ) H h(τ) H h(τ) 2. SYY( f ) ¼ SXX( f ) jH( f )j2 ð1 SYY ðf Þdf 3. PY ¼ 3. PY ¼ RYY(0) 4. RXY(τ) ¼ RXX(τ) H h(τ)

1

4. SXY( f ) ¼ SXX( f ) H( f )

The quantity jH( f )j2 in property 2 is called the power transfer function of the LTI system. Proof Using the convolution relationship between X(t) and Y(t), ð 1 ð1 Y ðtÞ ¼ XðtÞHhðtÞ ¼ Xðt sÞhðsÞds ) E½Y ðtÞ ¼ E Xðt sÞhðsÞds ¼

ð1 1

1

1

E½Xðt sÞhðsÞds

Since X(t) is WSS, the expression E[X(t s)] is just a constant, μX, from which E[Y(t)] ¼ Ð1 μX 1h(s)ds, as desired. Since this expression does not depend on t, we deduce that the mean of Y(t) is constant (and we may denote it μY). This establishes property 1 in the time domain. For the parallel result in the frequency domain, simply note that since H ðf Þ ¼ F fhðtÞg, it follows from Ð1 the definition of the Fourier transform that 1 h(s)ds ¼ H(0). A similar (but vastly more tedious) derivation yields property 2 in the time domain (see Exercise 31). The right-hand side establishes that the autocorrelation of Y(t) depends only on τ and not t, and therefore Y(t) is indeed WSS. Hence, the Wiener–Khinchin Theorem applies to Y(t), and taking the Fourier transform of both sides gives

578

8

F

Introduction to Signal Processing

RYY ðτÞ ¼ F RXX τ Hh τ Hh τ )

SYY ð f Þ ¼ F RXX τ F h τ F h τ

¼ SXX ð f ÞH f H∗ f ,

where H*( f ) denotes the complex conjugate of H( f ). Now, recall that for any complex number z, z z* ¼ j z j2. We immediately have H( f )H*( f ) ¼ jH( f )j2, completing property 2 in the frequency domain. Both the time and frequency versions of property 3 follow immediately from Sect. 8.1 and the fact that Y(t) is WSS. The proofs of property 4 in the time and frequency domain are parallel to those of property 2. ■ The frequency domain properties of the previous theorem are the most illuminating. Property 1 says the dc offset of X(t), μX, is “transferred” to the dc offset of Y(t) by evaluating the transfer function H( f ) at 0. This makes sense, since the dc offset corresponds to the frequency f ¼ 0. Notice in particular that if μX ¼ 0, necessarily μY ¼ 0; an LTI system cannot introduce a dc offset if none exists in the input signal. Property 2 states that the power spectrum of the output of an LTI system is obtained from the input psd through multiplication by the quantity jH( f )j2, hence the name “power transfer function.” Similar to the preceding discussion about dc offset, observe that if X(t) carries no power at some particular frequency f (so that SXX( f ) ¼ 0), then SYY( f ) will be zero there as well. An LTI system cannot introduce power to any frequency that did not appear in the input signal. Example 8.5 One of the simplest filters is an RC circuit, an LTI system whose impulse response is given by hð t Þ ¼

1 t=RC e uðtÞ RC

where u(t) is the unit step function, equal to 1 for t 0 and zero otherwise. (The product RC of the resistance and the capacitance is called the time constant of the circuit, since its units are seconds. The unit step function makes h(t) equal 0 for t < 0; engineers call this a causal filter.) Suppose we have such a circuit with time constant RC and that we model the input to our system as a pure white noise process with power spectral density SXX( f ) ¼ N0/2 W/Hz. Let’s investigate the properties of the output, Y(t). First, since white noise has mean zero, it follows that μY ¼ 0 as well (property 1). Now we need the transfer function of the system: H ð f Þ ¼ F fhð t Þ g ¼

n o 1 1 0! 1 F et=RC uðtÞ ¼ ¼ RC RC ð1=RC þ j2πf Þ0þ1 1 þ j2πfRC

Next, we find the psd of Y(t) using property 2: 2 N 0 1 12 N 0 =2 2 ¼ N0 SYY ðf Þ ¼ SXX ðf Þ j H ðf Þ j ¼ ¼ 2 2 2 1 þ j2πfRC 2 1 þ ð2π fRCÞ 1 þ ð2πfRCÞ2 Figure 8.7 displays this power spectral density. Finally, the ensemble average power of Y(t) is given by

8.2

Random Processes and LTI Systems

579 SYY ( f )

Fig. 8.7 Power spectral density of Y(t) in Example 8.5

N0 /2

f

PY ¼

ð1 1

ð1 SYY ðf Þdf ¼

1

N 0 =2 1 þ ð2πfRCÞ

df ¼ 2

N0 2

ð1

df

2 1 1 þ ð2πfRCÞ

¼

N0 4RC

where the integral is evaluated by the substitution x ¼ 2πfRC and the fact that the antiderivative of 1/(1 + x2) is arctan(x). We find that, even though the input signal had (theoretically) infinite power, the output Y(t) has finite power, directly proportional to the intensity of the input and inversely proportional to the time constant of the circuit. (As an exercise, see if you can verify that the units on the final expression for power are indeed watts.) ■ Example 8.6 An LTI system has an impulse response of h(t) ¼ t2etu(t). The input to this system is the random process

XðtÞ ¼ V þ 500 cos 2 106 πt þ Θ , where V and Θ are independent random variables, Θ is uniformly distributed on (π, π], and V has mean 60 and variance 12. It was shown in Exercise 25 of Chap. 7 that X(t) is WSS, with mean μX ¼ μV ¼ 60 and autocorrelation function RXX(τ) ¼ 3612 + 125,000cos(2 106πτ). (Depending on whether we choose to interpret X(t) as a voltage or current waveform, the units on the mean are either volts or amperes.) Applying the Wiener–Khinchin Theorem, the psd of X(t) is

SXX ðf Þ ¼ F RXX τ

¼ F 3612 þ 125,000 cos 2 106 πτ

¼ 3612δ f þ 62,500δ f 106 þ 62,500δ f þ 106 Since X(t) consists of a (random) dc offset and a periodic component, the power spectrum of X(t) is comprised entirely of impulses. Now let Y(t) denote the output of the LTI system. To deduce the properties of Y(t) requires the transfer function, H( f ), of the LTI system. Using the table of Fourier transforms in Appendix B, Hðf Þ ¼ F fhðtÞg ¼ F

2 t

t e uðtÞ ¼

2! ð1 þ j2πf Þ

2þ1

¼

2 ð1 þ j2πf Þ3

580

8

Introduction to Signal Processing

According to property 1 of the earlier proposition, the mean of the output signal Y(t) is given by μY ¼ μX H ð0Þ ¼ 60

2 ð1 þ j2π 0Þ3

¼ 120

To find the psd of Y(t), we must first calculate the power transfer function of the LTI system: 2 2 2 2 2 4 H ðf Þ ¼ ¼ ¼

3

3 ð1 þ j2πf Þ 1 þ j2πf 2 3 1 þ ð2πf Þ2 Since the input power spectrum consists of impulses, so does the output power spectrum; the coefficients on the impulses are found by evaluating the power transfer function at the appropriate frequencies:

SYY ðf Þ ¼ SXX f H f 2

¼ 3612δðf ÞH f 2 þ 62, 500δ f 106 H f 2 þ 62, 500δ f þ 106 H f 2

¼ 3612δðf ÞH 0 2 þ 62, 500δ f 106 H 106 2 þ 62, 500δ f þ 106 H 106 2 ¼ 3612δðf Þ

4 1þ0

þ 62, 500δ f 106

3 2

þ 62, 500δ f þ 106

4

1 þ 2 106 π

2 3

4

2 3 1 þ 2 106 π

¼ 14, 448δðf Þ þ 4 1036 δ f 106 þ 4 1036 δ f þ 106

The effect of the LTI system is to “ramp up” the dc power and to effectively eliminate the power at 1 MHz. In particular, the expected power in the output signal Y(t) is ð1

PY ¼ SYY ðf Þdf ¼ 14, 448 þ 2 4 1036 14:448kW, 1

with essentially all of the power coming from the dc component.

8.2.2

■

Ideal Filters

The goal of a filter is, of course, to eliminate (“filter out”) whatever noise has accumulated during the transmission of a signal. At the same time, we do not want our filter to affect the intended signal, lest information be lost. Ideally, we would know at what frequencies the noise in our transmission exists, and then a filter would be designed that completely eliminates those frequencies while preserving all others. (If the frequency band of the noise overlaps that of the signal, one can modulate the signal so that the two frequency bands are disjoint.)

8.2

Random Processes and LTI Systems

581

DEFINITION

An LTI system is an ideal filter if there exists some set of frequencies, Fpass, such that the system’s power transfer function is given by H ð f Þ2 ¼ 1 for f 2 Fpass 0 otherwise If we let X(t) denote the input to the system (which may consist of both signal and noise) and Y(t) the output, then for an ideal filter we have SXX ð f Þ for f 2 Fpass SYY ð f Þ ¼ SXX ð f ÞH ð f Þ2 ¼ 0 otherwise In other words, the power spectrum of X(t) within the band Fpass is unchanged by the filter, while everything in X(t) lying outside that band is completely eliminated. Thus, the obvious goal is to select Fpass to include all frequencies in the signal and exclude all frequencies in the accumulated noise. Figure 8.8 displays |H( f )| for four different types of ideal filters. To be consistent with the two-sided nature of power spectral densities, we present the graphs for 1 < f < 1, even though plots starting at f ¼ 0 are more common in engineering practice. Figure 8.8a shows a lowpass filter, which preserves the signal up to some threshold B. Under our notation, Fpass ¼ [0, B] for an ideal lowpass filter. The ideal highpass filter of Fig. 8.8b does essentially the opposite, preserving frequencies above B. Figure 8.8c, d illustrate a bandpass filter and a bandstop filter (also called a notch filter), respectively. |H( f )|

a

|H( f )|

b

1

1

-B

f

B

-B

|H( f )|

c

f

|H( f )|

d

1

−f0

B

1

f0

f

-f0

f0

f

Fig. 8.8 Ideal filters: (a) lowpass; (b) highpass; (c) bandpass; (d) bandstop

The previous section briefly mentioned band-limited white noise processes, wherein we also used the terms “lowpass” and “bandpass.” These models inherit their names from the aforementioned filters, e.g., if pure white noise passes through an ideal bandpass filter, the result is called bandpass white noise.

582

8

Introduction to Signal Processing

Example 8.7 A WSS random signal X(t) with autocorrelation function given by RXX(τ) ¼ 250 + 1500exp(1.6 109τ2) is passed through an ideal lowpass filter with B ¼ 10 kHz (i.e., 104 Hz). Before considering the effect of the filter, let’s investigate the properties of the input signal X(t). The ensemble average power of the input is PX ¼ RXX(0) ¼ 250 + 1500 ¼ 1750 W; moreover, we recognize that 250 W represents the dc power offset while the other 1500 W comes from an aperiodic component. Applying the Wiener–Khinchin Theorem, the input power spectral density is given by

SXX ðf Þ ¼ F fRXX ðτÞg ¼ F 250 þ 1500exp 1:6 109 τ2

¼ 250δð f Þ þ 1500F exp 1:6 109 τ2 The second Fourier transform requires the rescaling property; however, we must be careful in identifying the rescaling constant. If we rewrite 1.6 109τ2 as (4 104τ)2, we see that the appropriate rescaling constant is actually a ¼ 4 104. Continuing,

SXX ð f Þ ¼ 250δ f þ 1500F exp 4 104 τ 2

1 pﬃﬃﬃ π exp π2 f =4 104 2 ¼ 250δð f Þ þ 1500 4 pﬃﬃﬃ 4 10

3 π exp π2 f 2 =1:6 109 ¼ 250δð f Þ þ 80 This psd appears in Fig. 8.9a. Now let’s apply the filter, and as usual let Y(t) denote the output. Then, based on the preceding discussion, the psd of Y(t) is given by pﬃﬃﬃ ( 3 π π2 f 2 =1:6109 SXX ð f Þ f 2 Fpass e 250δ ð f Þ þ f 104 Hz SYY ð f Þ ¼ ¼ 80 0 otherwise 0 otherwise Figure 8.9b shows the output power spectrum, which is identical to SXX( f ) in the preserved band [0, 104] and zero everywhere else.

a

b

S XX ( f )

S YY ( f )

(250)

(250)

-30000 -20000 -10000

10000

20000

30000

f

-30000 -20000 -10000

10000

20000

30000

f

Fig. 8.9 Power spectral densities for Example 8.7: (a) input signal; (b) output signal

The ensemble average power of the output signal Y(t) is calculated by taking the integral of SYY( f ), which in this case requires numerical integration by a calculator or computer:

8.2

Random Processes and LTI Systems

583

pﬃﬃﬃ ð 104 3 π π2 f 2 =1:6109 e SYY ð f Þdf ¼ 250δð f Þ þ df 80 1 104 ð 104 pﬃﬃﬃ 3 π π2 f 2 =1:6109 e df 250 þ 1100 ¼ 1350W ¼ 250 þ 2 80 0

PY ¼

ð1

■

In the preceding example, the output power from the ideal filter was less than the input power (1350 W < 1750 W). It should be clear that this will always be the case: it is impossible to achieve a power gain with an ideal filter of any type. At best, if the entire input lies within the preserved band Fpass, then the input and output power will be equal. Of course, in practice one cannot actually construct an “ideal” filter—there is no engineering system that will perfectly cut off a signal at a prescribed frequency. But many simple systems can approximate our ideal. For instance, consider Example 8.5: the power transfer function of that RC filter is identical to Fig. 8.7 (except that the height at f ¼ 0 is 1 rather than N0/2). This bears some weak resemblance to the picture for an ideal lowpass filter in Fig. 8.8a. In fact, a more general class of LTI systems called Butterworth filters can achieve an even more “squared off” appearance; the nthorder Butterworth filter has a power transfer function of the form H ð f Þ2 ¼

α 1 þ ðβ2πf Þ2n

,

where the constants α and β can be derived from the underlying circuit. The RC filter of Example 8.5 is a “first-order” (i.e., n ¼ 1) Butterworth filter. The books by Peebles and Ambardar listed in the references provide more information. Examples of these power transfer functions are displayed in Fig. 8.10. |H( f )|2

n=1

|H( f )|2

f

n=2

|H( f )|2

f

n=4

f

Fig. 8.10 Power transfer functions for Butterworth filters (approximations to ideal filters)

8.2.3

Signal Plus Noise

For a variety of physical reasons, it is common in engineering practice to assume that communication noise is additive, i.e., if our intended signal X(t) experiences noise N(t) during transmission, then the received transmission (prior to any filtering) has the form X(t) + N(t). We assume throughout this subsection that X(t) and N(t) are independent, WSS random processes and that E[N(t)] ¼ 0 (i.e., the noise component does not contain a dc offset, a standard engineering assumption).3

3 Please note: The case of a deterministic signal x(t) must be handled somewhat differently. Consult the reference by Ambardar for details.

584

8

Introduction to Signal Processing

The mean of the input process is given by E[X(t) + N(t)] ¼ E[X(t)] + E[N(t)] ¼ μX + 0 ¼ μX, the dc offset of the input signal. Computing the autocorrelation of the input process relies on the assumed independence:

Rin ðτÞ ¼ E X t þ N t X t þ τ þ N t þ τ

¼ E XðtÞX t þ τ þ E X t N t þ τ þ E N t X t þ τ þ E N t N t þ τ

¼ RXX ðτÞ þ E X t E N t þ τ þ E N t E X t þ τ þ RNN τ

¼ RXX ðτÞ þ E X t 0 þ 0E X t þ τ þ RNN τ since μN ¼ 0 ¼ RXX ðτÞ þ RNN ðτÞ Then, by the Wiener–Khinchin Theorem, the input power spectrum is Sin ð f Þ ¼ F fRXX ðτÞ þ RNN ðτÞg ¼ SXX ð f Þ þ SNN ð f Þ Now we imagine passing the random process X(t) + N(t) through some LTI system L (presumably a filter intended to reduce the noise). The foregoing assumptions make the analysis of the output process quite straightforward. To start, the linearity property allows us to regard the system output as the sum of two parts: L½XðtÞ þ N ðtÞ ¼ L½XðtÞ þ L½N ðtÞ That is, we may identify L[X(t)] and L[N(t)] as the output signal and output noise, respectively. These two output processes are also independent and WSS. Letting H( f ) denote the transfer function of the LTI system, the mean of the output signal and output noise are, respectively, μL½X ¼ EðL½XðtÞÞ ¼ μX H ð0Þ,

μL½N ¼ EðL½N ðtÞÞ ¼ μN H ð0Þ ¼ 0

The mean of the overall output process is, by linearity, μXH(0) + 0 ¼ μXH(0). Similarly, the power spectral density of the output process is Sout ð f Þ ¼ Sin ð f ÞH ð f Þ2 ¼ SXX ð f ÞHð f Þ2 þ SNN ð f ÞH ð f Þ2 ; the two halves of this expression are the psds of the output signal and output noise. One measure of the quality of the filter (the LTI system) involves comparing the power signal-tonoise ratio of the input and output: SNRin ¼

PL½X PX versus SNRout ¼ PN PL½ N

A good filter should achieve a higher SNRout than SNRin by reducing the amount of noise without losing any of the intended signal. Example 8.8 Suppose a random signal X(t) incurs additive noise N(t) in transmission. Assume the signal and noise components are independent and wide-sense stationary, X(t) has autocorrelation function RXX(τ) ¼ 2400 + 45,000sinc2(1800τ), and N(t) has autocorrelation function given by RNN(τ) ¼ 1500e10,000|τ|. To filter out the noise, we pass the input X(t) + N(t) through an ideal lowpass filter with band limit 1800 Hz. Our input power signal-to-noise ratio is SNRin ¼

PX RXX ð0Þ 2400 þ 45, 000 ¼ 31:6 ¼ ¼ 1500 PN RNN ð0Þ

8.2

Random Processes and LTI Systems

585

The power spectral density of X(t) is

SXX ð f Þ ¼ F RXX τ ¼ F 2400 þ 45, 000sinc2 1800τ

1 f f tri ¼ 2400δ f þ 25tri ¼ 2400δð f Þ þ 45, 000 1800 1800 1800 This psd is displayed in Fig. 8.11a. Notice that the entire power spectrum of the input signal lies within the band [0 Hz, 1800 Hz], which is precisely the preserved band of the filter. Therefore, the filter will have no effect on the input signal; in particular, the input and output signal components will have the same power spectral density and the same ensemble average power (47.4 kW).

a

Fig. 8.11 Power spectra for Example 8.8: (a) input signal; (b) input noise; (c) output noise

SXX( f )

(2400)

−1800

1800

b

f

c

f

−1800

1800

f

On the other hand, part of the input noise will be removed by the filter. Begin by finding the psd of the input noise: SNN ðf Þ ¼ F fRNN ðτÞg ¼ F

n o 1500e10, 000jτj ¼ 1500

2ð10; 000Þ ð10; 000Þ2 þ ð2πf Þ2

¼

3 107 108 þ ð2πf Þ2

Figure 8.11b shows the psd of the input noise, while in Fig. 8.11c we see the psd of the output noise L[N(t)] resulting from passing N(t) through the ideal filter. The average power in the output noise is ð 1800 3 107 P L½ N ¼ 2 df ¼ ¼ 808:6W, 108 þ ð2πf Þ2 0 slightly more than half the original (i.e., input) noise power. As a result, the output power signal-tonoise ratio equals SNRout ¼

PL½X 47; 400 ¼ 58:6 ¼ 808:6 PL½N

586

8

Introduction to Signal Processing

Because the signal and noise power spectra were so similar, it was not possible to filter out very much noise. Assuming our model for the input noise is correct, one solution would be to modulate the signal before transmission to a center frequency in the “tail” of the SNN( f ) distribution and then employ a bandpass filter around that center frequency (see Exercise 30). ■

8.2.4

Exercises: Section 8.2 (22–38)

22. Let Y(t) be the output process from Example 8.5. Find the autocorrelation function of Y(t). 23. A WSS current waveform X(t) with power spectral density SXX( f ) ¼ 0.02 W/Hz for j f j 60 kHz is the input to a filter with impulse response h(t) ¼ 40e40tu(t). Let Y(t) denote the output current waveform. (a) Find the autocorrelation function of the input process X(t). [Hint: Draw SXX( f ) first.] (b) Calculate the ensemble average power in the input process X(t). (c) Find the transfer function of this filter. (d) Find and graph the power spectral density of the output process Y(t). (e) Determine the ensemble average power in the output process Y(t). 24. A Poisson telegraphic process N(t) with parameter λ ¼ 2 (see Sect. 7.5) is the input to an LTI system with impulse response h(t) ¼ 2etu(t). (a) Find the power spectral density of N(t). (b) Find the transfer function of the LTI system. (c) Find the power spectral density of the output process Y(t) ¼ L[N(t)]. 25. A white noise process X(t) with power spectral density SXX( f ) ¼ N0/2 is the input to an LTI system with impulse response h(t) ¼ 1 for 0 t < 1 (and 0 otherwise). Let Y(t) denote the output. (a) Find the mean of Y(t). (b) Find the transfer function of the LTI system. (c) Find the power spectral density of Y(t). (d) Find the expected power of Y(t). 26. The random process X(t) ¼ A0cos(ω0t + Θ), where Θ ~ Unif(π, π], is the input to an LTI system with impulse response h(t) ¼ BeBtu(t). Let Y(t) denote the output. (a) Determine the transfer function and power transfer function of this system. (b) Find the power spectral density of Y(t). (c) Determine the expected power in Y(t). How does that compare to X(t)? 27. A WSS random process X(t) with autocorrelation function RXX(τ) ¼ 100 + 25e|τ| is passed through an LTI system having impulse response h(t) ¼ te4tu(t). Let Y(t) denote the output. (a) Find the power spectral density of X(t). (b) What is the expected power of X(t)? (c) Determine the transfer function and power transfer function of this system. (d) Find and sketch the power spectral density of Y(t). (e) What is the expected power of Y(t)? 28. A white noise process X(t) with power spectral density SXX( f ) ¼ N0/2 is the input to an LTI system with impulse response h(t) ¼ eBtsin(ω0t)u(t). Let Y(t) denote the output. (a) Determine the transfer function of the LTI system. (b) Find and sketch the power spectral density of Y(t). 29. Suppose X(t) is a white noise process with power spectral density SXX( f ) ¼ N0/2. A filter with transfer function H( f ) ¼ eα|f| is applied to this process; let Y(t) denote the output.

8.2

Random Processes and LTI Systems

587

(a) Find the power spectral density of Y(t). (b) Find the autocorrelation function of Y(t). (c) Find the expected power of Y(t). 30. Let X(t) be a WSS random process with autocorrelation function RXX(τ) ¼ 45,000sinc2(1800τ); this is the signal from Example 8.8 without the dc offset. Suppose X(t) encounters the noise N(t) described in Example 8.8. Since both X(t) and N(t) are concentrated at low frequencies, it is desirable to modulate X(t) and then use an appropriate filter. Consider the following modulation, performed prior to transmission: Xmod(t) ¼ X(t)cos(4000πt + Θ), where Θ ~ Unif(π, π]. The received signal will be Xmod(t) + N(t), to which an ideal bandpass filter on the spectrum of Xmod(t) will be applied. (a) Find the autocorrelation function of Xmod(t). (b) Find the power spectral density of Xmod(t). (c) Based on (b), what would be the optimal frequency band to “pass” through a filter? (d) Use the results of Example 8.8 to determine the expected power in L[N(t)], the filtered noise process. (e) Compare the input and output power signal-to-noise ratios. How do these compare to the SNRs in Example 8.8? 31. Let X(t) be the WSS input to an LTI system with impulse response h(t), and let Y(t) denote the output. (a) Show that the cross-correlation function RXY(τ) equals RXX(τ)Hh(τ) as stated in the main proposition of this section. [Hint: In the definition of RXY(τ), write Y(t + τ) as a convolution integral. Rearrange, and then make an appropriate substitution to show that the integrand is equal to RXX(τ s) h(s).] (b) Show that the autocorrelation function of Y(t) is given by RYY ðτÞ ¼ RXY ðτÞHhðτÞ ¼ RXX ðτÞHhðτÞHhðτÞ [Hint: Write Y(t) ¼ X(t)Hh(t) in the definition of RYY(τ). Rearrange, and then make an appropriate substitution to show that the integrand is equal to RXY(τ s) h(s). Then invoke (a).] 32. A T-second moving-average filter has impulse response h(t) ¼ 1/T for 0 t T (and zero otherwise). (a) Find the transfer function of this filter. (b) Find the power transfer function of this filter. (c) Suppose X(t) is a white noise process with power spectral density SXX( f ) ¼ N0/2. If X(t) is passed through this moving-average filter and Y(t) is the resulting output, find the power spectral density, expected power, and autocorrelation function of Y(t). 33. Suppose we pass band-limited white noise X(t) with arbitrary parameters N0 and B through a differentiator: Y ðtÞ ¼ L½XðtÞ ¼

d X ðt Þ dt

The transfer function of the differentiator is known to be H( f ) ¼ j2πf. (a) Find the power spectral density of Y(t). (b) Find the autocorrelation function of Y(t). (c) What is the ensemble average power of the output?

588

8

Introduction to Signal Processing

34. A short-term integrator is defined by the input-output relationship ð 1 t XðsÞ ds Y ð t Þ ¼ L½ X ð t Þ ¼ T tT

35.

36.

37.

38.

(a) Find the impulse response of this system. (b) Find the power spectrum of Y(t) in terms of the power spectrum of X(t). [Hint: Write the answer to (a) in terms of the rectangular function first.] Let X(t) be WSS, and let Y(t) be the output resulting from the application to X(t) of an LTI system with impulse response h(t) and transfer function H( f ). Define a new random process as the difference between input and output: D(t) ¼ X(t) Y(t). (a) Find an expression for the autocorrelation function of D(t) in terms of RXX and h. (b) Determine the power spectral density of D(t), and verify that your answer is real, symmetric, and nonnegative. An amplitude-modulated waveform can be modeled by A(t)cos(100πt + Θ) + N(t), where A(t) is WSS and has autocorrelation function RAA(τ) ¼ 80sinc2(10τ); Θ ~ Unif(π, π] and is independent of A(t); and N(t) is band-limited white noise, independent of A(t) and Θ, with SNN( f ) ¼ 0.05 W/Hz for jfj < 100 Hz. To filter out the noise, we pass the waveform through an ideal bandpass filter with transfer function H( f ) ¼ 1 for 40 < jfj < 60. Let X(t) ¼ A(t)cos(100πt + Θ), the signal part of the input. (a) Find the autocorrelation of X(t). (b) Find the ensemble average power in X(t). (c) Find and graph the power spectral density of X(t). (d) Find the ensemble average power in the signal part of the output. (e) Find the ensemble average power in N(t). (f) Find the ensemble average power in the noise part of the output. (g) Find the power signal-to-noise ratio of the input and the power signal-to-noise ratio of the output. Discuss what you find. A random signal X(t) incurs additive noise N(t) in transmission. The signal and noise components are independent and wide-sense stationary, X(t) has autocorrelation function RXX(τ) ¼ 250,000 + 120,000cos(70,000πτ) + 800,000sinc(100,000τ), and N(t) has power spectral density SNN( f ) ¼ 2.5102 W/Hz for |f| 100 kHz. To filter out the noise, we pass the input X(t) + N(t) through an ideal lowpass filter with transfer function H( f ) ¼ 1 for |f| 60 kHz. (a) Find the ensemble average power in X(t). (b) Find and sketch the power spectral density of X(t). (c) Find the power spectral density of L[X(t)]. (d) Find the ensemble average power in L[X(t)]. (e) Find the ensemble average power in N(t). (f) Find the ensemble average power in L[N(t)]. (Think about what the power spectral density of L[N(t)] will look like.) (g) Find the power signal-to-noise ratio of the input and the power signal-to-noise ratio of the output. Discuss what you find. Let X(t) be a pure white noise process with psd N0/2. Consider an LTI system with impulse response h(t), and let Y(t) denote the output resulting from passing X(t) through this LTI system. (a) Show that RXY ðτÞ ¼ N20 hðτÞ. (b) Show that PY ¼ N20 Eh , where Eh is the energy in the impulse response function, defined by Ð1 Eh ¼ 1 h2 ðtÞdt.

8.3

Discrete-Time Signal Processing

8.3

589

Discrete-Time Signal Processing

Recall from Sect. 7.4 that a random sequence (i.e., a discrete-time random process) Xn is said to be wide-sense stationary if (1) its mean, μX[n], is a constant μX and (2) its autocorrelation function, RXX[n, n + k], depends only on the integer-valued time difference k (in which case we may denote the autocorrelation RXX[k]). Analogous to the Wiener–Khinchin Theorem, the power spectral density of a WSS random sequence is given by the discrete-time Fourier transform of its autocorrelation function: 1 X

SXX ðFÞ ¼

RXX ½kej2πFk

ð8:6Þ

k¼1

We use parentheses around the argument F in Eq. (8.6) because SXX(F) is a function on a continuum, even though the random sequence is on a discrete index set (the integers). Similar to the continuous case, it can be shown that SXX(F) is a real-valued, nonnegative, symmetric function of F. (The choice of capital F will be explained toward the end of this section.) Power spectral densities for random sequences differ from their continuous-time counterparts in one key respect: the psd of a WSS random sequence is always a periodic function, with period 1. To see this, recall that ej2πk ¼ 1 for any integer k, and write SXX ðF þ 1Þ ¼

þ1 X

RXX ½kej2πðFþ1Þk ¼

k¼1

þ1 X

RXX ½kej2πFk ej2πk ¼

k¼1

þ1 X

RXX ½kej2πFk ¼ SXX ðFÞ

k¼1

As a consequence, we may recover the autocorrelation function of a WSS random sequence from its power spectrum by taking the inverse Fourier transform of SXX(F) over an interval of length 1: RXX ½k ¼

ð 1=2 1=2

SXX ðFÞej2πFk dF

ð8:7Þ

This affects how we calculate the power in a random sequence from its power spectral density. Analogous to the continuous-time case, we define the (ensemble) average power of a WSS random sequence Xn by

PX ¼ E X2n ¼ RXX ½0 ¼

ð 1=2 1=2

SXX ðFÞej2πFð0Þ dF ¼

ð 1=2 1=2

SXX ðFÞdF

That is, the expected power in a random sequence is determined by integrating its psd over one period, not the entire frequency spectrum. Example 8.9 Consider the Bernoulli sequence of Sect. 7.4: the Xn are iid Bernoulli rvs, a stationary sequence with μX ¼ p, CXX[0] ¼ Var(Xn) ¼ p(1 p), and CXX[k] ¼ 0 for k 6¼ 0. From these, the autocorrelation function is p k¼0 RXX ½k ¼ CXX ½k þ μ2X ¼ p2 k 6¼ 0 In particular, PX ¼ RXX[0] ¼ p. To determine the power spectral density, apply Eq. (8.6):

590

8 þ1 X

SXX ðFÞ ¼

Introduction to Signal Processing

X RXX ½kej2πFk ¼ RXX 0 ej2πFð0Þ þ RXX ½kej2πFk

k¼1

¼ p þ p2

X

ej2πFk ¼ p þ p2

k6¼0

þ1 X

¼ pð 1 pÞ þ p2

þ1 X

k6¼0

ej2πFk p2 ej2πFð0Þ

k¼1

ej2πFk

k¼1

Engineers will recognize this last summation as an impulse train (sometimes called a sampling function or Dirac comb), from which we have þ1 X

SXX ðFÞ ¼ pð1 pÞ þ p2

δð F nÞ

n¼1

A graph of this periodic function appears in Fig. 8.12; notice it is indeed a nonnegative, symmetric, periodic function with period 1. Since it’s sufficient to define the psd of a WSS random sequence on the interval (1/2, 1/2), we could drop all but one of the impulses and write SXX(F) ¼ p(1 p) + p2δ(F) for 1/2 < F < 1/2. SXX (F)

−3

−2

−1

1

2

3

F

Fig. 8.12 Power spectral density of a Bernoulli sequence (Example 8.9)

■

For a more general iid sequence with E[Xn] ¼ μX and Var(Xn) ¼ σ X2, a similar derivation shows +1 that SXX(F) ¼ σ X2 + μX2 ∑n¼1 δ(F n), or σ X2 + μX2δ(F) for 1/2 < F < 1/2. In particular, if Xn is a mean-zero iid sequence, the psd of Xn is just the constant σ X2. Example 8.10 Suppose Xn is a WSS random sequence with power spectral density SXX(F) ¼ tri(2F) for 1/2 < F < 1/2. Let’s determine the autocorrelation function of Xn. The psd may be rewritten as SXX(F) ¼ 1 2|F| for 1/2 < F < 1/2, which is shown in Fig. 8.13a. Apply Eq. (8.7): RXX ½k ¼ ¼

ð 1=2 1=2 ð 1=2 1=2 ð 1=2

¼2

SXX ðFÞe

j2πFk

dF ¼

ð 1=2 1=2

ð1 2jFjÞej2πFk dF

ð1 2jFjÞ cosð2πFkÞdF

ðsince 1 2jFj is evenÞ

ð1 2FÞ cosð2πFkÞdF

ðsince the intergrand is evenÞ

For k ¼ 0, this is a simple polynomial integral resulting in RXX[0] ¼ 1/2, which equals the area under SXX(F), as required. For k 6¼ 0, integration by parts yields

8.3

Discrete-Time Signal Processing

591

1 cosðπkÞ RXX ½k ¼ ¼ π2 k 2

2= π2 k2 0

k odd k even

The graph of this autocorrelation function appears in Fig. 8.13b.

a

SXX (F )

RXX[k]

b

1

0.5

0.25

−0.5

0.5

F

−6

−4

−2

2

4

Fig. 8.13 Graphs for Example 8.10: (a) Power spectral density; (b) autocorrelation function

8.3.1

6

k

■

Random Sequences and LTI Systems

A discrete-time LTI system L has similar properties to those described in the previous section for continuous time. If we let δ[n] denote the Kronecker delta function—i.e., δ[0] ¼ 1 and δ[n] ¼ 0 for n 6¼ 0—then a discrete-time LTI system is characterized by an impulse response4 function h[n] defined by h[n] ¼ L[δ[n]]. If we let Xn denote the input to the LTI system and Yn the output, so that Yn ¼ L[Xn], then Yn may be computed through discrete-time convolution: Y n ¼ Xn Hh½n ¼

1 X

X k h½ n k ¼

k¼1

1 X

Xnk h½k

k¼1

Discrete-time LTI systems can be characterized in the frequency domain by a transfer function H(F), defined as the discrete-time Fourier transform of the impulse response: H ðF Þ ¼

1 X

h½nej2πFn

n¼1

This transfer function, like the power spectral density, is periodic in F with period 1. The properties of the output sequence Yn are similar to those for Y(t) in the continuous-time case.

4 In this context, the Kronecker delta function is also commonly called the unit sample response, since it is strictly speaking not an impulse (its value is well defined at zero). It does, however, share the two key properties of a traditional Dirac delta function (i.e., an impulse): it equals zero for all non-zero inputs, and the sum across its entire domain equals 1.

592

8

Introduction to Signal Processing

PROPOSITION

Let L be an LTI system with impulse response h[n] and transfer function H(F). Suppose Xn is a wide-sense stationary sequence and let Yn ¼ L[Xn], the output of the LTI system applied to Xn. Then Yn is also WSS, with the following properties. Time domain 1 X h½ n 1. μY ¼ μX

Frequency domain 1. μY ¼ μX H(0)

n¼1

2. RYY[k] ¼ RXX[k]Hh[k]Hh[k]

2. SYY(F) ¼ SXX(F) |H(F)|2 ð 1=2 SYY ðFÞdF 3. PY ¼

3. PY ¼ RYY[0]

1=2

Example 8.11 A moving average operator can be used to “smooth out” a noisy sequence. The simplest moving average takes the mean of two successive terms: Yn ¼ (Xn1 + Xn)/2. This formula is equivalent to passing the sequence Xn through an LTI system with an impulse response given by h[0] ¼ h[1] ¼ 1/2 and h[n] ¼ 0 otherwise. The transfer function of this LTI system is H ð FÞ ¼

1 X

1 1 1 þ ej2πF , h½nej2πFn ¼ ej2πFð0Þ þ ej2πFð1Þ ¼ 2 2 2 n¼1

from which the power transfer function is 1 þ ej2πF 2 1 þ cosð2πFÞ j sinð2πFÞ2 jH ðFÞj ¼ ¼ 2 2 2 2 ð1 þ cosð2πFÞÞ þ sin ð2πFÞ 1 þ cosð2πFÞ ¼ ¼ 2 22 2

Notice that the function (1 + cos(2πF))/2 is periodic with period 1, as required. Suppose Xn is a WSS random sequence with power spectral density SXX(F) ¼ N0 for |F| < 1/2, as depicted in Fig. 8.14a. Then the moving average Yn has psd equal to

a

SXX (F )

b

N0

−0.5

SYY (F )

N0

0.5

F

−0.5

Fig. 8.14 Power spectral density of the moving average in Example 8.11

0.5

F

8.3

Discrete-Time Signal Processing

593

1 þ cos ð2πFÞ SYY ðFÞ ¼ SXX ðFÞ H ðFÞ2 ¼ N 0 2 The graph of this power spectral density appears in Fig. 8.14b. The ensemble average power in Yn can be determined by integrating this function from 1/2 to 1/2: PY ¼

8.3.2

ð 1=2 1=2

SYY ðFÞdF ¼

N0 2

ð 1=2 1=2

½1 þ cos ð2πFÞdF ¼

N0 N0 ð1Þ ¼ 2 2

■

Random Sequences and Sampling

Modern electronic systems often work with digitized signals: analog signals that have been “sampled” at regular intervals to create a digital (i.e., discrete-time) signal. Suppose we have a continuous-time (analog) signal X(t), which we sample every Ts seconds; Ts is called the sampling interval. That is, we only observe X(t) at times 0, Ts, 2Ts, and so on. Then we can regard our observed (digital) signal as a random sequence X[n] defined by X½n ¼ XðnT s Þ

for n ¼ . . . , 2, 1, 0, 1, 2, . . .

This is illustrated for a sample function in Fig. 8.15. Fig. 8.15 An analog signal x(t) and its sampled version x[n] (indicated by asterisks)

x(t)

t

The following proposition ensures that the sampled version of a WSS random process is also WSS—and, hence, that the spectral density theory presented in this chapter applies. PROPOSITION

Let X(t) be a WSS random process, and for some fixed Ts > 0 define X[n] ¼ X(nTs). Then the random sequence X[n] is a WSS random sequence. The proof was requested in Exercise 45 of Chap. 7.

594

8

Introduction to Signal Processing

If the sampling interval is selected judiciously, then we may (in some sense) recover the original signal from the digitized version. This relies on a key result from communication theory called the Nyquist sampling theorem for deterministic signals: If a signal x(t) has no frequencies above B Hz, then x(t) is completely determined by its sample values x[n] ¼ x(nTs) so long as fs ¼

1 2B Ts

The quantity fs is called the sampling rate. The Nyquist sampling theorem says that a band-limited signal (with band limit B) can be completely recovered from its digital version, provided the sampling rate is at least 2B. For example, a signal with band limit B ¼ 1 kHz ¼ 1000 Hz must be sampled at least 2,000 times per second; equivalently, the sampling interval Ts can be at most 1/(2B) ¼ .0005 s. The minimum sampling rate, 2B, is sometimes called the Nyquist rate of that signal. When Ts 1/(2B), as required by the Nyquist sampling theorem, the original deterministic signal x(t) may be reconstructed by the interpolation formula 1 X t nT s xðtÞ ¼ x½nsinc ð8:8Þ Ts n¼1 The heart of the Nyquist sampling theorem is the statement that the two sides of Eq. (8.8) are equal. For a band-limited random process X(t) with corresponding digital sequence X[n] ¼ X(nTs), we may define a Nyquist interpolation of X(t) by 1 X t nT s XNyq ðtÞ ¼ X½nsinc Ts n¼1 It can be shown that XNyq(t) equals the original X(t) in the “mean square sense,” i.e., that h

2 i E XNyq ðtÞ XðtÞ ¼0 (This is slightly weaker than saying XNyq(t) ¼ X(t); in particular, there may exist a negligible set of sample functions for which the two differ.) There is a direct connection between the Nyquist sampling rate and the argument F of the discretetime Fourier transform. Suppose a random process X(t) has band limit B, i.e., the set of frequencies f represented in the spectrum of X(t) satisfies B f B. Provided we use a sampling rate, fs, at least as great as the Nyquist rate 2B, we have: B f B, f s 2B

)

1 f 1 2 fs 2

If we define F ¼ f/fs, we have a unitless variable whose set of possible values exactly corresponds to that of F in the discrete-time Fourier transform. Said differently, F in the discrete-time Fourier transform represents a normalized frequency; we can recover the spectrum of X(t) across its original frequency band by writing f ¼ F fs. (In some textbooks, you will see the argument of the discretetime Fourier transform denoted Ω, to indicate radian measure. The variables F and Ω are, of course, related by Ω ¼ 2πF.)

8.3

Discrete-Time Signal Processing

8.3.3

595

Exercises: Section 8.3 (39–50)

39. Let X[n] be a WSS random sequence. Show that the power spectral density of X[n] may be rewritten as SXX ðFÞ ¼ RXX ½0 þ 2

1 X

RXX ½k cosð2πkFÞ

k¼1

40. Let X(t) be a WSS random process, and let X[n] ¼ X(nTs), the sampled version of X(t). Find the power spectral density of X[n] in terms of the psd of X(t). 41. Suppose X[n] is a WSS random sequence with autocorrelation function RXX[k] ¼ α|k| for some constant |α| < 1. Find the power spectral density of X[n]. Sketch this psd for α ¼ .5, 0, and .5. 42. Consider the correlated bit noise sequence described in Exercise 50 of Chap. 7: X0 is 0 or 1 with probability .5 each and, for n 1, Xn ¼ Xn1 with probability .9 and 1 Xn1 with probability .1. It was shown in that exercise that Xn is a WSS random sequence with mean μX ¼ .5 and autocorrelation function RXX ½k ¼

1 þ :8jkj 4

(This particular random sequence can be “time reversed” so that Xn is defined for negative indices as well.) Find the power spectral density of this correlated bit noise sequence. 43. A Poisson telegraphic process N(t) with parameter λ ¼ 1 (see Sect. 7.5) is sampled every 5 s, resulting in the random sequence X[n] ¼ N(5n). Find the power spectral density of X[n]. 44. Discrete-time white noise is a WSS, mean-zero process such that Xn and Xm are uncorrelated for all n 6¼ m. (a) Show that the autocorrelation function of discrete-time white noise is RXX[k] ¼ σ 2δ[k] for some constant σ > 0, where δ[k] is the Kronecker delta function. (b) Find the power spectral density of discrete-time white noise. Is it what you’d expect? 45. Suppose Xn is a WSS random sequence with the following autocorrelation function: 8 1 k¼0 > > < 1 k odd RXX ½k ¼ > 2k2 > : 0 otherwise Determine the power spectral density of Xn. [Hint: Use Example 8.10.] 46. Let Xn be the WSS input to a discrete-time LTI system with impulse response h[n], and let Yn be the output. Define the cross-correlation of Xn and Yn by RXY[n, n + k] ¼ E[XnYn+k]. (a) Show that RXY does not depend on n, and that RXY ¼ RXX H h, where H denotes discretetime convolution. (This is the discrete-time version of a result from the previous section.) (b) The cross-power spectral density SXY(F) of two jointly WSS random sequences Xn and Yn is defined as the discrete-time Fourier transform of RXY[k]. In the present context, show that SXY(F) ¼ SXX(F)H(F), where H denotes the transfer function of the LTI system. 47. The WSS random sequence Xn has power spectral density SXX(F) ¼ 2P for |F| 1/4 and 0 for 1/4 < |F| < 1/2. (a) Verify that the ensemble average power in Xn is P. (b) Find the autocorrelation function of Xn.

596

8

Introduction to Signal Processing

48. Let Xn have power spectral density SXX(F), and suppose Xn is passed through a discrete-time LTI system with impulse response h[n] ¼ αn for n ¼ 0, 1, 2, . . . for some constant |α| < 1 (and h[n] ¼ 0 otherwise). Let Yn denote the output sequence. (a) Find the mean of Yn in terms of the mean of Xn. (b) Find the power spectral density of Yn in terms of the psd of Xn. 49. The system in Example 8.11 can be extended to an M-term simple moving average filter, with impulse response 1=M n ¼ 0, 1, . . . , M 1 h½n ¼ 0 otherwise Let Xn be the WSS input to such a filter, and let Yn be the output. (a) Write an expression for Yn in terms of the Xn. (b) Determine the transfer function of this filter. (c) Assuming Xn is a discrete-time white noise process (see Exercise 44), determine the autocorrelation function of Yn. 50. A more general moving average process has the form Y ½n ¼ θ0 X½n þ θ1 X½n 1 þ þ θM X½n M for some integer M and constants θ0, . . ., θM. Let the input sequence X[n] be iid, with mean 0 and variance σ 2. (a) Find the impulse response h[n] of the LTI system that produces Y[n] from X[n]. (b) Find the transfer function of this system. (c) Find the mean of Y[n]. (d) Find the variance of Y[n]. (e) Find the autocovariance function of Y[n].

Appendix A: Statistical Tables

A.1 Binomial cdf

Table A.1 Cumulative binomial probabilities Bðx; n; pÞ ¼

x P

bðy; n; pÞ

y¼0

(a) n = 5

x

0 1 2 3 4

0.05

0.10

0.20

0.25

.774 .977 .999 1.000 1.000

.590 .919 .991 1.000 1.000

.328 .737 .942 .993 1.000

0.05

0.10

0.20

0.25

0.30

0.40

.599 .914 .988 .999 1.000 1.000 1.000 1.000 1.000 1.000

.349 .736 .930 .987 .998 1.000 1.000 1.000 1.000 1.000

.107 .376 .678 .879 .967 .994 .999 1.000 1.000 1.000

.056 .244 .526 .776 .922 .980 .996 1.000 1.000 1.000

.028 .149 .383 .650 .850 .953 .989 .998 1.000 1.000

.006 .046 .167 .382 .633 .834 .945 .988 .998 1.000

.237 .633 .896 .984 .999

0.30 .168 .528 .837 .969 .998

0.40 .078 .337 .683 .913 .990

p 0.50 .031 .188 .500 .812 .969

0.60 .010 .087 .317 .663 .922

0.70 .002 .031 .163 .472 .832

0.75

0.80

0.90

0.95

.001 .016 .104 .367 .763

.000 .007 .058 .263 .672

.000 .000 .009 .081 .410

.000 .000 .001 .023 .226

0.75

0.80

0.90

0.95

.000 .000 .000 .004 .020 .078 .224 .474 .756 .944

.000 .000 .000 .001 .006 .033 .121 .322 .624 .893

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .002 .000 .013 .001 .070 .012 .264 .086 .651 .401 (continued)

(b) n = 10

x

0 1 2 3 4 5 6 7 8 9

p 0.50 .001 .011 .055 .172 .377 .623 .828 .945 .989 .999

0.60 .000 .002 .012 .055 .166 .367 .618 .833 .954 .994

0.70 .000 .000 .002 .011 .047 .150 .350 .617 .851 .972

# Springer International Publishing AG 2017 M.A. Carlton, J.L. Devore, Probability with Applications in Engineering, Science, and Technology, Springer Texts in Statistics, DOI 10.1007/978-3-319-52401-6

597

598

Appendix A: Statistical Tables

Table A.1 (continued) (c) n = 15

x

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

0.05

0.10

0.20

0.25

0.30

0.40

p 0.50

0.60

.463 .829 .964 .995 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.206 .549 .816 .944 .987 .998 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.035 .167 .398 .648 .836 .939 .982 .996 .999 1.000 1.000 1.000 1.000 1.000 1.000

.013 .080 .236 .461 .686 .852 .943 .983 .996 .999 1.000 1.000 1.000 1.000 1.000

.005 .035 .127 .297 .515 .722 .869 .950 .985 .996 .999 1.000 1.000 1.000 1.000

.000 .005 .027 .091 .217 .402 .610 .787 .905 .966 .991 .998 1.000 1.000 1.000

.000 .000 .004 .018 .059 .151 .304 .500 .696 .849 .941 .982 .996 1.000 1.000

.000 .000 .000 .002 .009 .034 .095 .213 .390 .597 .783 .909 .973 .995 1.000

0.05

0.10

0.20

0.25

0.30

0.40

p 0.50

0.60

.358 .736 .925 .984 .997 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.122 .392 .677 .867 .957 .989 .998 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.012 .069 .206 .411 .630 .804 .913 .968 .990 .997 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.003 .024 .091 .225 .415 .617 .786 .898 .959 .986 .996 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.001 .008 .035 .107 .238 .416 .608 .772 .887 .952 .983 .995 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.000 .001 .004 .016 .051 .126 .250 .416 .596 .755 .872 .943 .979 .994 .998 1.000 1.000 1.000 1.000 1.000

.000 .000 .000 .001 .006 .021 .058 .132 .252 .412 .588 .748 .868 .942 .979 .994 .999 1.000 1.000 1.000

.000 .000 .000 .000 .000 .002 .006 .021 .057 .128 .245 .404 .584 .750 .874 .949 .984 .996 .999 1.000

0.70 .000 .000 .000 .000 .001 .004 .015 .050 .131 .278 .485 .703 .873 .965 .995

0.75

0.80

0.90

0.95

.000 .000 .000 .000 .000 .001 .004 .017 .057 .148 .314 .539 .764 .920 .987

.000 .000 .000 .000 .000 .000 .001 .004 .018 .061 .164 .352 .602 .833 .965

.000 .000 .000 .000 .000 .000 .000 .000 .000 .002 .013 .056 .184 .451 .794

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .001 .005 .036 .171 .537

0.75

0.80

0.90

0.95

.000 .000 .000 .000 .000 .000 .000 .000 .001 .004 .014 .041 .102 .214 .383 .585 .775 .909 .976 .997

.000 .000 .000 .000 .000 .000 .000 .000 .000 .001 .003 .010 .032 .087 .196 .370 .589 .794 .931 .988

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .002 .000 .011 .000 .043 .003 .133 .016 .323 .075 .608 .264 .878 .642 (continued)

(d) n = 20

x

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

0.70 .000 .000 .000 .000 .000 .000 .000 .001 .005 .017 .048 .113 .228 .392 .584 .762 .893 .965 .992 .999

Appendix A: Statistical Tables

599

Table A.1 (continued) (e) n = 25

x

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

0.05

0.10

0.20

0.25

0.30

0.40

p 0.50

0.60

0.70

0.75

0.80

0.90

0.95

.277 .642 .873 .966 .993 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.072 .271 .537 .764 .902 .967 .991 .998 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.004 .027 .098 .234 .421 .617 .780 .891 .953 .983 .994 .998 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.001 .007 .032 .096 .214 .378 .561 .727 .851 .929 .970 .980 .997 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.000 .002 .009 .033 .090 .193 .341 .512 .677 .811 .902 .956 .983 .994 .998 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.000 .000 .000 .002 .009 .029 .074 .154 .274 .425 .586 .732 .846 .922 .966 .987 .996 .999 1.000 1.000 1.000 1.000 1.000 1.000 1.000

.000 .000 .000 .000 .000 .002 .007 .022 .054 .115 .212 .345 .500 .655 .788 .885 .946 .978 .993 .998 1.000 1.000 1.000 1.000 1.000

.000 .000 .000 .000 .000 .000 .000 .001 .004 .013 .034 .078 .154 .268 .414 .575 .726 .846 .926 .971 .991 .998 1.000 1.000 1.000

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .002 .006 .017 .044 .098 .189 .323 .488 .659 .807 .910 .967 .991 .998 1.000

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .001 .003 .020 .030 .071 .149 .273 .439 .622 .786 .904 .968 .993 .999

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .002 .006 .017 .047 .109 .220 .383 .579 .766 .902 .973 .996

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .002 .009 .033 .098 .236 .463 .729 .928

.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .001 .007 .034 .127 .358 .723

600

Appendix A: Statistical Tables

A.2 Poisson cdf Table A.2 Cumulative Poisson probabilities Pðx; mÞ ¼

x P y¼0

em my y!

μ

x

0 l 2 3 4 5 6

.1

.2

.3

.4

.5

.6

.7

.8

.9

1.0

.905 .995 1.000

.819 .982 .999 1.000

.741 .963 .996 1.000

.670 .938 .992 .999 1.000

.607 .910 .986 .998 1.000

.549 .878 .977 .997 1.000

.497 .844 .966 .994 .999 1.000

.449 .809 .953 .991 .999 1.000

.407 .772 .937 .987 .998 1.000

.368 .736 .920 .981 .996 .999 1.000

2.0

x

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

.135 .406 .677 .857 .947 .983 .995 .999 1.000

3.0

4.0

5.0

6.0

.050 .199 .423 .647 .815 .916 .966 .988 .996 .999 1.000

.018 .092 .238 .433 .629 .785 .889 .949 .979 .992 .997 .999 1.000

.007 .040 .125 .265 .440 .616 .762 .867 .932 .968 .986 .995 .998 .999 1.000

.002 .017 .062 .151 .285 .446 .606 .744 .847 .916 .957 .980 .991 .996 .999 .999 1.000

μ 7.0 .001 .007 .030 .082 .173 .301 .450 .599 .729 .830 .901 .947 .973 .987 .994 .998 .999 1.000

8.0

9.0

10.0

15.0

20.0

.000 .003 .014 .042 .100 .191 .313 .453 .593 .717 .816 .888 .936 .966 .983 .992 .996 .998 .999 1.000

.000 .001 .006 .021 .055 .116 .207 .324 .456 .587 .706 .803 .876 .926 .959 .978 .989 .995 .998 .999 1.000

.000 .000 .003 .010 .029 .067 .130 .220 .333 .458 .583 .697 .792 .864 .917 .951 .973 .986 .993 .997 .998 .999 1.000

.000 .000 .000 .000 .001 .003 .008 .018 .037 .070 .118 .185 .268 .363 .466 .568 .664 .749 .819 .875 .917 .947 .967 .981 .989 .994 .997 .998 .999 1.000

.000 .000 .000 .000 .000 .000 .000 .001 .002 .005 .011 .021 .039 .066 .105 .157 .221 .297 .381 .470 .559 .644 .721 .787 .843 .888 .922 .948 .966 .978 .987

Appendix A: Statistical Tables

601

A.3 Standard Normal cdf

Table A.3 Standard normal curve areas

z

.00

.01

.02

.03

.04

.05

.06

.07

.08

–3.4 –3.3 –3.2 –3.1 –3.0 –2.9 –2.8 –2.7 –2.6 –2.5 –2.4 –2.3 –2.2 –2.1 –2.0 –1.9 –1.8 –1.7 –1.6 –1.5 –1.4 –1.3 –1.2 –1.1 –1.0 –0.9 –0.8 –0.7 –0.6 –0.5 –0.4 –0.3 –0.2 –0.1 –0.0

.0003 .0005 .0007 .0010 .0013 .0019 .0026 .0035 .0047 .0062 .0082 .0107 .0139 .0179 .0228 .0287 .0359 .0446 .0548 .0668 .0808 .0968 .1151 .1357 .1587 .1841 .2119 .2420 .2743 .3085 .3446 .3821 .4207 .4602 .5000

.0003 .0005 .0007 .0009 .0013 .0018 .0025 .0034 .0045 .0060 .0080 .0104 .0136 .0174 .0222 .0281 .0352 .0436 .0537 .0655 .0793 .0951 .1131 .1335 .1562 .1814 .2090 .2389 .2709 .3050 .3409 .3783 .4168 .4562 .4960

.0003 .0005 .0006 .0009 .0013 .0017 .0024 .0033 .0044 .0059 .0078 .0102 .0132 .0170 .0217 .0274 .0344 .0427 .0526 .0643 .0778 .0934 .1112 .1314 .1539 .1788 .2061 .2358 .2676 .3015 .3372 .3745 .4129 .4522 .4920

.0003 .0004 .0006 .0009 .0012 .0017 .0023 .0032 .0043 .0057 .0075 .0099 .0129 .0166 .0212 .0268 .0336 .0418 .0516 .0630 .0764 .0918 .1093 .1292 .1515 .1762 .2033 .2327 .2643 .2981 .3336 .3707 .4090 .4483 .4880

.0003 .0004 .0006 .0008 .0012 .0016 .0023 .0031 .0041 .0055 .0073 .0096 .0125 .0162 .0207 .0262 .0329 .0409 .0505 .0618 .0749 .0901 .1075 .1271 .1492 .1736 .2005 .2296 .2611 .2946 .3300 .3669 .4052 .4443 .4840

.0003 .0004 .0006 .0008 .0011 .0016 .0022 .0030 .0040 .0054 .0071 .0094 .0122 .0158 .0202 .0256 .0322 .0401 .0495 .0606 .0735 .0885 .1056 .1251 .1469 .1711 .1977 .2266 .2578 .2912 .3264 .3632 .4013 .4404 .4801

.0003 .0004 .0006 .0008 .0011 .0015 .0021 .0029 .0039 .0052 .0069 .0091 .0119 .0154 .0197 .0250 .0314 .0392 .0485 .0594 .0722 .0869 .1038 .1230 .1446 .1685 .1949 .2236 .2546 .2877 .3228 .3594 .3974 .4364 .4761

.0003 .0004 .0005 .0008 .0011 .0015 .0021 .0028 .0038 .0051 .0068 .0089 .0116 .0150 .0192 .0244 .0307 .0384 .0475 .0582 .0708 .0853 .1020 .1210 .1423 .1660 .1922 .2206 .2514 .2843 .3192 .3557 .3936 .4325 .4721

.0003 .0002 .0004 .0003 .0005 .0005 .0007 .0007 .0010 .0010 .0014 .0014 .0020 .0019 .0027 .0026 .0037 .0036 .0049 .0048 .0066 .0064 .0087 .0084 .0113 .0110 .0146 .0143 .0188 .0183 .0239 .0233 .0301 .0294 .0375 .0367 .0465 .0455 .0571 .0559 .0694 .0681 .0838 .0823 .1003 .0985 .1190 .1170 .1401 .1379 .1635 .1611 .1894 .1867 .2177 .2148 .2483 .2451 .2810 .2776 .3156 .3121 .3520 .3482 .3897 .3859 .4286 .4247 .4681 .4641 (continued)

.09

602

Appendix A: Statistical Tables

Table A.3 (continued) z

.00

.01

.02

.03

.04

.05

.06

.07

.08

.09

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4

.5000 .5398 .5793 .6179 .6554 .6915 .7257 .7580 .7881 .8159 .8413 .8643 .8849 .9032 .9192 .9332 .9452 .9554 .9641 .9713 .9772 .9821 .9861 .9893 .9918 .9938 .9953 .9965 .9974 .9981 .9987 .9990 .9993 .9995 .9997

.5040 .5438 .5832 .6217 .6591 .6950 .7291 .7611 .7910 .8186 .8438 .8665 .8869 .9049 .9207 .9345 .9463 .9564 .9649 .9719 .9778 .9826 .9864 .9896 .9920 .9940 .9955 .9966 .9975 .9982 .9987 .9991 .9993 .9995 .9997

.5080 .5478 .5871 .6255 .6628 .6985 .7324 .7642 .7939 .8212 .8461 .8686 .8888 .9066 .9222 .9357 .9474 .9573 .9656 .9726 .9783 .9830 .9868 .9898 .9922 .9941 .9956 .9967 .9976 .9982 .9987 .9991 .9994 .9995 .9997

.5120 .5517 .5910 .6293 .6664 .7019 .7357 .7673 .7967 .8238 .8485 .8708 .8907 .9082 .9236 .9370 .9484 .9582 .9664 .9732 .9788 .9834 .9871 .9901 .9925 .9943 .9957 .9968 .9977 .9983 .9988 .9991 .9994 .9996 .9997

.5160 .5557 .5948 .6331 .6700 .7054 .7389 .7704 .7995 .8264 .8508 .8729 .8925 .9099 .9251 .9382 .9495 .9591 .9671 .9738 .9793 .9838 .9875 .9904 .9927 .9945 .9959 .9969 .9977 .9984 .9988 .9992 .9994 .9996 .9997

.5199 .5596 .5987 .6368 .6736 .7088 .7422 .7734 .8023 .8289 .8531 .8749 .8944 .9115 .9265 .9394 .9505 .9599 .9678 .9744 .9798 .9842 .9878 .9906 .9929 .9946 .9960 .9970 .9978 .9984 .9989 .9992 .9994 .9996 .9997

.5239 .5636 .6026 .6406 .6772 .7123 .7454 .7764 .8051 .8315 .8554 .8770 .8962 .9131 .9278 .9406 .9515 .9608 .9686 .9750 .9803 .9846 .9881 .9909 .9931 .9948 .9961 .9971 .9979 .9985 .9989 .9992 .9994 .9996 .9997

.5279 .5675 .6064 .6443 .6808 .7157 .7486 .7794 .8078 .8340 .8577 .8790 .8980 .9147 .9292 .9418 .9525 .9616 .9693 .9756 .9808 .9850 .9884 .9911 .9932 .9949 .9962 .9972 .9979 .9985 .9989 .9992 .9995 .9996 .9997

.5319 .5714 .6103 .6480 .6844 .7190 .7517 .7823 .8106 .8365 .8599 .8810 .8997 .9162 .9306 .9429 .9535 .9625 .9699 .9761 .9812 .9854 .9887 .9913 .9934 .9951 .9963 .9973 .9980 .9986 .9990 .9993 .9995 .9996 .9997

.5359 .5753 .6141 .6517 .6879 .7224 .7549 .7852 .8133 .8389 .8621 .8830 .9015 .9177 .9319 .9441 .9545 .9633 .9706 .9767 .9817 .9857 .9890 .9916 .9936 .9952 .9964 .9974 .9981 .9986 .9990 .9993 .9995 .9997 .9998

Appendix A: Statistical Tables

603

A.4 Incomplete Gamma Function Table A.4 The incomplete gamma function Gðx; aÞ ¼

ðx 0

1 a1 y y e dy GðaÞ α

1

x

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

.632 .865 .950 .982 .993 .998 .999 1.000

2 .264 .594 .801 .908 .960 .983 .993 .997 .999 1.000

3 .080 .323 .577 .762 .875 .938 .970 .986 .994 .997 .999 1.000

4 .019 .143 .353 .567 .735 .849 .918 .958 .979 .990 .995 .998 .999 1.000

5

6

7

8

9

10

.004 .053 .185 .371 .560 .715 .827 .900 .945 .971 .985 .992 .996 .998 .999

.001 .017 .084 .215 .384 .554 .699 .809 .884 .933 .962 .980 .989 .994 .997

.000 .005 .034 .111 .238 .394 .550 .687 .793 .870 .921 .954 .974 .986 .992

.000 .001 .012 .051 .133 .256 .401 .547 .676 .780 .857 .911 .946 .968 .982

.000 .000 .004 .021 .068 .153 .271 .407 .544 .667 .768 .845 .900 .938 .963

.000 .000 .001 .008 .032 .084 .170 .283 .413 .542 .659 .758 .834 .891 .930

604

Appendix A: Statistical Tables

A.5 Critical Values for t Distributions t density curve

Central area

Table A.5 Critical values for t distributions 0 −t critical value

ν 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 34 36 38 40 50 60 120 1

80%

90%

95%

3.078 1.886 1.638 1.533 1.476 1.440 1.415 1.397 1.383 1.372 1.363 1.356 1.350 1.345 1.341 1.337 1.333 1.330 1.328 1.325 1.323 1.321 1.319 1.318 1.316 1.315 1.314 1.313 1.311 1.310 1.309 1.307 1.306 1.304 1.303 1.299 1.296 1.289 1.282

6.314 2.920 2.353 2.132 2.015 1.943 1.895 1.860 1.833 1.812 1.796 1.782 1.771 1.761 1.753 1.746 1.740 1.734 1.729 1.725 1.721 1.717 1.714 1.711 1.708 1.706 1.703 1.701 1.699 1.697 1.694 1.691 1.688 1.686 1.684 1.676 1.671 1.658 1.645

12.706 4.303 3.182 2.776 2.571 2.447 2.365 2.306 2.262 2.228 2.201 2.179 2.160 2.145 2.131 2.120 2.110 2.101 2.093 2.086 2.080 2.074 2.069 2.064 2.060 2.056 2.052 2.048 2.045 2.042 2.037 2.032 2.028 2.024 2.021 2.009 2.000 1.980 1.960

Central area 98% 31.821 6.965 4.541 3.747 3.365 3.143 2.998 2.896 2.821 2.764 2.718 2.681 2.650 2.624 2.602 2.583 2.567 2.552 2.539 2.528 2.518 2.508 2.500 2.492 2.485 2.479 2.473 2.467 2.462 2.457 2.449 2.441 2.434 2.429 2.423 2.403 2.390 2.358 2.326

t critical value

99%

99.8%

99.9%

63.657 9.925 5.841 4.604 4.032 3.707 3.499 3.355 3.250 3.169 3.106 3.055 3.012 2.977 2.947 2.921 2.898 2.878 2.861 2.845 2.831 2.819 2.807 2.797 2.787 2.779 2.771 2.763 2.756 2.750 2.738 2.728 2.719 2.712 2.704 2.678 2.660 2.617 2.576

318.31 22.326 10.213 7.173 5.893 5.208 4.785 4.501 4.297 4.144 4.025 3.930 3.852 3.787 3.733 3.686 3.646 3.610 3.579 3.552 3.527 3.505 3.485 3.467 3.450 3.435 3.421 3.408 3.396 3.385 3.365 3.348 3.333 3.319 3.307 3.262 3.232 3.160 3.090

636.62 31.598 12.924 8.610 6.869 5.959 5.408 5.041 4.781 4.587 4.437 4.318 4.221 4.140 4.073 4.015 3.965 3.922 3.883 3.850 3.819 3.792 3.767 3.745 3.725 3.707 3.690 3.674 3.659 3.646 3.622 3.601 3.582 3.566 3.551 3.496 3.460 3.373 3.291

Appendix A: Statistical Tables

605

A.6 Tail Areas of t Distributions t curve

Area to the right of t

Table A.6 t curve tail areas 0

t

t

1

2

3

4

Degrees of Freedom (ν) 5 6 7

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0

.500 .468 .437 .407 .379 .352 .328 .306 .285 .267 .250 .235 .221 .209 .197 .187 .178 .169 .161 .154 .148 .141 .136 .131 .126 .121 .117 .113 .109 .106 .102 .099 .096 .094 .091 .089 .086 .084 .082 .080 .078

.500 .465 .430 .396 .364 .333 .305 .278 .254 .232 .211 .193 .177 .162 .148 .136 .125 .116 .107 .099 .092 .085 .079 .074 .069 .065 .061 .057 .054 .051 .048 .045 .043 .040 .038 .036 .035 .033 .031 .030 .029

.500 .463 .427 .392 .358 .326 .295 .267 .241 .217 .196 .176 .158 .142 .128 .115 .104 .094 .085 .077 .070 .063 .058 .052 .048 .044 .040 .037 .034 .031 .029 .027 .025 .023 .021 .020 .018 .017 .016 .015 .014

.500 .463 .426 .390 .355 .322 .290 .261 .234 .210 .187 .167 .148 .132 .117 .104 .092 .082 .073 .065 .058 .052 .046 .041 .037 .033 .030 .027 .024 .022 .020 .018 .016 .015 .014 .012 .011 .010 .010 .009 .008

.500 .462. .425 .388 .353 .319 .287 .258 .230 .205 .182 .162 .142 .125 .110 .097 .085 .075 .066 .058 .051 .045 .040 .035 .031 .027 .024 .021 .019 .017 .015 .013 .012 .011 .010 .009 .008 .007 .006 .006 .005

.500 .462 .424 .387 .352 .317 .285 .255 .227 .201 .178 .157 .138 .121 .106 .092 .080 .070 .061 .053 .046 .040 .035 .031 .027 .023 .020 .018 .016 .014 .012 .011 .009 .008 .007 .006 .006 .005 .004 .004 .004

.500 .462 .424 .386 .351 .316 .284 .253 .225 .199 .175 .154 .135 .117 .102 .089 .077 .065 .057 .050 .043 .037 .032 .027 .024 .020 .018 .015 .013 .011 .010 .009 .008 .007 .006 .005 .004 .004 .003 .003 .003

8

9

10

11

12

.500 .461 .423 .386 .350 .315 .283 .252 .223 .197 .173 .152 .132 .115 .100 .086 .074 .064 .055 .047 .040 .034 .029 .025 .022 .018 .016 .014 .012 .010 .009 .007 .006 .005 .005 .004 .004 .003 .003 .002 .002

.500 .461 .423 .386 .349 .315 .282 .251 .222 .196 .172 .150 .130 .113 .098 .084 .072 .062 .053 .045 .038 .033 .028 .023 .020 .017 .014 .012 .010 .009 .007 .006 .005 .005 .004 .003 .003 .002 .002 .002 .002

.500 .461 .423 .385 .349 .314 .281 .250 .221 .195 .170 .149 .129 .111 .096 .082 .070 .060 .051 .043 .037 .031 .026 .022 .019 .016 .013 .011 .009 .008 .007 .006 .005 .004 .003 .003 .002 .002 .002 .001 .001

.500 .461 .423 .385 .348 .313 .280 .249 .220 .194 .169 .147 .128 .110 .095 .081 .069 .059 .050 .042 .035 .030 .025 .021 .018 .015 .012 .010 .009 .007 .006 .005 .004 .004 .003 .002 .002 .002 .001 .001 .001

.500 .461 .422 .385 .348 .313 .280 .249 .220 .193 .169 .146 .127 .109 .093 .080 .068 .057 .049 .041 .034 .029 .024 .020 .017 .014 .012 .010 .008 .007 .006 .005 .004 .003 .003 .002 .002 .002 .001 .001 .001

606

Appendix A: Statistical Tables

t

13

14

15

16

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0

.500 .461 .422 .384 .348 .313 .279 .248 .219 .192 .168 .146 .126 .108 .092 .079 .067 .056 .048 .040 .033 .028 .023 .019 .016 .013 .011 .009 .008 .006 .005 .004 .003 .003 .002 .002 .002 .001 .001 .001 .001

.500 .461 .422 .384 .347 .312 .279 .247 .218 .191 .167 .144 .124 .107 .091 .077 .065 .055 .046 .038 .032 .027 .022 .018 .015 .012 .010 .008 .007 .005 .004 .004 .003 .002 .002 .002 .001 .001 .001 .001 .001

.500 .461 .422 .384 .347 .312 .279 .247 .218 .191 .167 .144 .124 .107 .091 .077 .065 .055 .046 .038 .032 .027 .022 .018 .015 .012 .010 .008 .007 .005 .004 .004 .003 .002 .002 .002 .001 .001 .001 .001 .001

.500 .461 .422 .384 .347 .312 .278 .247 .218 .191 .166 .144 .124 .106 .090 .077 .065 .054 .045 .038 .031 .026 .021 .018 .014 .012 .010 .008 .006 .005 .004 .003 .003 .002 .002 .001 .001 .001 .001 .001 .001

Degrees of Freedom (ν) 17 18 19 .500 .461 .422 .384 .347 .312 .278 .247 .217 .190 .166 .143 .123 .105 .090 .076 .064 .054 .045 .037 .031 .025 .021 .017 .014 .011 .009 .008 .006 .005 .004 .003 .003 .002 .002 .001 .001 .001 .001 .001 .000

.500 .461 .422 .384 .347 .312 .278 .246 .217 .190 .165 .143 .123 .105 .089 .075 .064 .053 .044 .037 .030 .025 .021 .017 .014 .011 .009 .007 .006 .005 .004 .003 .002 .002 .002 .001 .001 .001 .001 .001 .000

.500 .461 .422 .384 .347 .311 .278 .246 .217 .190 .165 .143 .122 .105 .089 .075 .063 .053 .044 .036 .030 .025 .020 .016 .013 .011 .009 .007 .006 .005 .004 .003 .002 .002 .002 .001 .001 .001 .001 .000 .000

20

21

22

23

24

.500 .461 .422 .384 .347 .311 .278 .246 .217 .189 .165 .142 .122 .104 .089 .075 .063 .052 .043 .036 .030 .024 .020 .016 .013 .011 .009 .007 .006 .004 .004 .003 .002 .002 .001 .001 .001 .001 .001 .000 .000

.500 .461 .422 .384 .347 .311 .278 .246 .216 .189 .164 .142 .122 .104 .088 .074 .062 .052 .043 .036 .029 .024 .020 .016 .013 .010 .008 .007 .005 .004 .003 .003 .002 .002 .001 .001 .001 .001 .001 .000 .000

.500 .461 .422 .383 .347 .311 .277 .246 .216 .189 .164 .142 .121 .104 .088 .074 .062 .052 .043 .035 .029 .024 .019 .016 .013 .010 .008 .007 .005 .004 .003 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000

.500 .461 .422 .383 .346 .311 .277 .245 .216 .189 .164 .141 .121 .103 .087 .074 .062 .051 .042 .035 .029 .023 .019 .015 .012 .010 .008 .006 .005 .004 .003 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000

.500 .461 .422 .383 .346 .311 .277 .245 .216 .189 .164 .141 .121 .103 .087 .073 .061 .051 .042 .035 .028 .023 .019 .015 .012 .010 .008 .006 .005 .004 .003 .002 .002 .001 .001 .001 .001 .001 .000 .000 .000

Appendix A: Statistical Tables

607

t

25

26

27

28

29

30

35

40

60

120

1(¼ z)

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0

.500 .461 .422 .383 .346 .311 .277 .245 .216 .188 .163 .141 .121 .103 .087 .073 .061 .051 .042 .035 .028 .023 .019 .015 .012 .010 .008 .006 .005 .004 .003 .002 .002 .001 .001 .001 .001 .001 .000 .000 .000

.500 .461 .422 .383 .346 .311 .277 .245 .215 .188 .163 .141 .120 .103 .087 .073 .061 .051 .042 .034 .028 .023 .018 .015 .012 .010 .008 .006 .005 .004 .003 .002 .002 .001 .001 .001 .001 .001 .000 .000 .000

.500 .461 .421 .383 .346 .311 .277 .245 .215 .188 .163 .141 .120 .102 .086 .073 .061 .050 .042 .034 .028 .023 .018 .015 .012 .009 .007 .006 .005 .004 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000 .000

.500 .461 .421 .383 .346 .310 .277 .245 .215 .188 .163 .140 .120 .102 .086 .072 .060 .050 .041 .034 .028 .022 .018 .015 .012 .009 .007 .006 .005 .004 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000 .000

.500 .461 .421 .383 .346 .310 .277 .245 .215 .188 .163 .140 .120 .102 .086 .072 .060 .050 .041 .034 .027 .022 .018 .014 .012 .009 .007 .006 .005 .004 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000 .000

.500 .461 .421 .383 .346 .310 .277 .245 .215 .188 .163 .140 .120 .102 .086 .072 .060 .050 .041 .034 .027 .022 .018 .014 .011 .009 .007 .006 .004 .003 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000 .000

.500 .460 .421 .383 .346 .310 .276 .244 .215 .187 .162 .139 .119 .101 .085 .071 .059 .049 .040 .033 .027 .022 .017 .014 .011 .009 .007 .005 .004 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000 .000 .000

.500 .460 .421 .383 .346 .310 .276 .244 .214 .187 .162 .139 .119 .101 .085 .071 .059 .048 .040 .032 .026 .021 .017 .013 .011 .008 .007 .005 .004 .003 .002 .002 .001 .001 .001 .001 .000 .000 .000 .000 .000

.500 .460 .421 .383 .345 .309 .275 .243 .213 .186 .161 .138 .117 .099 .083 .069 .057 .047 .038 .031 .025 .020 .016 .012 .010 .008 .006 .004 .003 .003 .002 .001 .001 .001 .001 .000 .000 .000 .000 .000 .000

.500 .460 .421 .382 .345 .309 .275 .243 .213 .185 .160 .137 .116 .098 .082 .068 .056 .046 .037 .030 .024 .019 .015 .012 .009 .007 .005 .004 .003 .002 .002 .001 .001 .001 .000 .000 .000 .000 .000 .000 .000

.500 .460 .421 .382 .345 .309 .274 .242 .212 .184 .159 .136 .115 .097 .081 .067 .055 .045 .036 .029 .023 .018 .014 .011 .008 .006 .005 .003 .003 .002 .001 .001 .001 .000 .000 .000 .000 .000 .000 .000 .000

Appendix B: Background Mathematics

B.1 Trigonometric Identities cos ða þ bÞ ¼ cos ðaÞ cos ðbÞ sin ðaÞ sin ðbÞ cos ða bÞ ¼ cos ðaÞ cos ðbÞ þ sin ðaÞ sin ðbÞ sin ða þ bÞ ¼ sin ðaÞ cos ðbÞ þ cos ðaÞ sin ðbÞ sin ða bÞ ¼ sin ðaÞ cos ðbÞ cos ðaÞ sin ðbÞ cos ðaÞ cos ðbÞ ¼ ½½ cos ða þ bÞ þ cos ða bÞ sin ðaÞ sin ðbÞ ¼ ½½ cos ða bÞ cos ða þ bÞ

B.2 Special Engineering Functions uðxÞ ¼

1 x0 0 x 0:5

1

−1

−0.5

x 0

0.5

1

(continued)

# Springer International Publishing AG 2017 M.A. Carlton, J.L. Devore, Probability with Applications in Engineering, Science, and Technology, Springer Texts in Statistics, DOI 10.1007/978-3-319-52401-6

609

610

Appendix B: Background Mathematics

triðxÞ ¼

1 x 0

x 1 x > 1

8 < sin ðπxÞ πx sincðxÞ ¼ : 1

1

x

−1

x 6¼ 0

1

1

x¼0

−3

−2

−1

1

2

3

x

B.3 o(h) Notation The symbol o(h) denotes any function of h which has the property that lim

h!0

oð hÞ ¼0 h

Informally, this property says that the value of the function approaches 0 even faster than h approaches 0. For example, consider the function f(h) ¼ h3. Then f(h)/h ¼ h2, which does indeed approach 0 as pﬃﬃﬃ pﬃﬃﬃ h ! 0. On the other hand, f ðhÞ ¼ h does not have the o(h) property, since f ðhÞ=h ¼ 1= h, which approaches 1 as h ! 0+. Likewise, sin(h) does not have the o(h) property: from calculus, sin(h)/ h ! 1 as h ! 0. Note that the sum or difference of two functions that have this property also has this property: o(h) o(h) ¼ o(h). The two o(h) functions need not be the same as long as they both have the property. Similarly, the product of two such functions also has this property: o(h) o(h) ¼ o(h).

B.4 The Delta Function The Dirac delta function, δ(x), also called an impulse or impulse function, is such that δ(x) ¼ 0 for x 6¼ 0 and ð1 δðxÞdx ¼ 1 1

More generally, an impulse at location x0 with intensity a is a δ(x x0). An impulse is often graphed as an arrow, with the intensity listed in parentheses, as in the accompanying figure. The height of the arrow is meaningless; in fact, the “height” of an impulse is +1.

Appendix B: Background Mathematics

611

(a)

x

x0

Properties of the delta function: Basic integral: Antiderivative:

ð1 ð1 x 1

Rescaling: Sifting:

ð1 δðxÞdx ¼ 1, so aδðx x0 Þdx ¼ a 1

δðtÞdt ¼ uðxÞ

δðcxÞ ¼ δjðcxjÞ for c 6¼ 0 ð1 gðxÞδðx x0 Þdx ¼ gðx0 Þ 1

Convolution:

g(x) ★ δ(x x0) ¼ g(x x0)

B.5 Fourier Transforms The Fourier transform of a function g(t), denoted F fgðtÞg or G( f ), is defined by ð1 Gðf Þ ¼ F fgðtÞg ¼ gðtÞej2πft dt 1

pﬃﬃﬃﬃﬃﬃﬃ where j ¼ 1. The Fourier transform of g(t) exists provided that the integral of g(t) is absolutely ð1 gðtÞdt < 1. convergent; i.e., 1

The inverse Fourier transform of a function G( f ), denoted F 1 fGðf Þg or g(t), is defined by ð1 gðtÞ ¼ F 1 fGðf Þg ¼ Gðf Þeþj2πft df 1

Properties of Fourier transforms:

Duality: Time shift: Frequency shift:

F fa1 g1 ðtÞ þ a2 g2 ðtÞg ¼ a1 G1 ðf Þ þ a2 G2 ðf Þ 1 f F fgðatÞg ¼ G a j aj F fgðtÞg ¼ Gðf Þ ) F fGðtÞg ¼ gðf Þ F fgðt t0 Þg ¼ Gðf Þej2πf t0 F gðtÞej2πf 0 t ¼ Gðf f 0 Þ

Time convolution: Frequency convolution:

F fg1 ðtÞ★g2 ðtÞg ¼ G1 ðf ÞG2 ðf Þ F fg1 ðtÞg2 ðtÞg ¼ G1 ðf Þ★G2 ðf Þ

Linearity: Rescaling:

612

Appendix B: Background Mathematics

Fourier transform pairs: g(t)

G( f )

1 u(t)

δ( f ) 1 1 δð f Þ þ 2 j2πf 1 ½δðf f 0 Þ þ δðf þ f 0 Þ 2 1 ½δðf f 0 Þ δðf þ f 0 Þ 2j k!

cos(2πf0t) sin(2πf0t) tkeatu(t), a > 0, k ¼ 0, 1, 2, . . . e

ða þ j2πf Þkþ1 2a

a|t|

, a>0

a2 þ ð2πf Þ2 pﬃﬃﬃ π2 f 2 πe sinc( f ) sinc2( f )

et rect(t) tri(t) 2

B.6 Discrete-Time Fourier Transforms The discrete-time Fourier transform (DTFT) of a function g[n] is defined by G ð FÞ ¼

1 X

g½nej2πFn

n¼1

The DTFT of g[n] exists provided that g[n] is absolutely summable; i.e.,

1 X

jg½nj < 1.

n¼1

The inverse DTFT of a function G(F) is defined by g½ n ¼

ð 1=2 1=2

GðFÞeþj2πFn dF

Properties of DTFTs: (an arrow indicates application of the DTFT) Periodicity: Linearity: Time shift: Frequency shift: Time convolution: Frequency convolution:

G(F + m) ¼ G(F) for all integers m; i.e., G(F) has period 1 a1g1[n] + a2g2[n] ! a1G1(F) + a2G2(F) g½n n0 ! GðFÞej2πFn0 g½nej2πF0 n ! GðF F0 Þ g1[n] ★ g2[n] ! G1(F)G2(F) ð 1=2 g1 ½ng2 ½n ! G1 ðϕÞG2 ðF ϕÞdϕ (periodic convolution of G1 and G2) 1=2

Appendix B: Background Mathematics

613

DTFT pairs: g[n] 1 δ[n] u[n] cos(2πF0n) sin(2πF0n) α|n|, |α| < 1 αnu[n], |α| < 1

G(F) δ(F) 1 1 1 δðFÞ þ 2 1 ej2πF 1 ½δðF F0 Þ þ δðF þ F0 Þ 2 1 ½δðF F0 Þ δðF þ F0 Þ 2j 1 α2 2 1 þ α 2α cos ð2πFÞ 1 1 αej2πF

Appendix C: Important Probability Distributions

C.1 Discrete Distributions For discrete distributions, the specified pmf and cdf are valid on the range of the random variable. The cdf and mgf are only provided when simple expressions exist for those functions. Binomial (n, p) range: parameters: pmf: cdf: mean: variance: mgf:

X ~ Bin(n, p) {0, 1, . . ., n} n, n ¼ 0, 1, 2, . . . (number of trials) p, 0 < p < 1 (success probability) n x bðx; n; pÞ ¼ p ð1 pÞnx x B(x; n, p) (see Table A.1) np np(1 p) (1 p + pet)n

Note: The n ¼ 1 case is called a Bernoulli distribution. Geometric (p) range: parameter: pmf: cdf: mean: variance: mgf:

{1, 2, 3, . . .} p, 0 < p < 1 (success probability) p(1 p)x1 1 (1 p)x 1 p 1p p2 pet 1 ð1 pÞet

Note: Other sources defined a geometric rv to be the number of failures preceding the first success in independent and identical trials. See Sect. 2.6 for details.

# Springer International Publishing AG 2017 M.A. Carlton, J.L. Devore, Probability with Applications in Engineering, Science, and Technology, Springer Texts in Statistics, DOI 10.1007/978-3-319-52401-6

615

616

Hypergeometric (n, M, N) range: parameters:

pmf: cdf: mean: variance:

Appendix C: Important Probability Distributions

X ~ Hyp(n, M, N) {max(0, n N + M), . . ., min(n, M )} n, n ¼ 0, 1, . . ., N (number of trials) M, M ¼ 0, 1, . . ., N (population number of successes) N, N ¼ 1, 2, 3, . . . (population size) M NM x n x hðx; n; M; N Þ ¼ N n H(x; n, M, N) M n N M M Nn n 1 N N N1

Note: With the understanding that

a ¼ 0 for a < b, the range of the hypergeometric distribub

tion can be simplified to {0, . . ., n}. Negative Binomial (r, p) range: parameters: pmf: mean: variance: mgf:

X ~ NB(r, p) {r, r + 1, r + 2, . . .} r, r ¼ 1, 2, . . . (desired number of successes) p, 0 < p < 1 (success probability) x1 r nbðx; n; pÞ ¼ p ð1 pÞxr r1 r p r ð 1 pÞ p2 r pet t 1 ð1 pÞe

Notes: The r ¼ 1 case corresponds to the geometric distribution. Other sources defined a negative binomial rv to be the number of failures preceding the rth success in independent and identical trials. See Sect. 2.6 for details. Poisson (μ) range: parameter: pmf: cdf: mean: variance: mgf:

{0, 1, 2, . . .} μ, μ > 0 (expected number of events) eμ μx pðx; μÞ ¼ x! P(x; μ) (see Table A.2) μ μ eμðe 1Þ t

Appendix C: Important Probability Distributions

617

C.2 Continuous Distributions For continuous distributions, the specified pdf and cdf are valid on the range of the random variable. The cdf and mgf are only provided when simple expressions exist for those functions. Beta (α, β, A, B) range: parameters:

pdf: mean: variance:

[A, B] α, α > 0 (first shape parameter) β, β > 0 (second shape parameter) A, 1 < A < B (lower bound) B, A < B < 1 (upper bound) 1 Γðα þ βÞ x A α1 B x β1 B A ΓðαÞ ΓðβÞ B A BA α A þ ð B AÞ αþβ ðB AÞ2 αβ ðα þ βÞ2 ðα þ β þ 1Þ

Notes: The A ¼ 0, B ¼ 1 case is called the standard beta distribution. The α ¼ 1, β ¼ 1 case in the uniform distribution. Exponential (λ) range: parameter: pdf: cdf: mean: variance: mgf:

(0, 1) λ, λ > 0 (rate parameter) λeλx 1 eλx 1 λ 1 λ2 λ t 0 (shape parameter) β, β > 0 (scale parameter) 1 xα1 ex=β ΓðαÞβα x G ; α (see Table A.4) β αβ αβ2 α 1 t < 1/β 1 βt

Notes: The α ¼ 1, β ¼ 1/λ case corresponds to the exponential distribution. The β ¼ 1 case is called the standard gamma distribution. The α ¼ n (an integer), β ¼ 1/λ case is called the Erlang distribution. A third parameter γ, called a threshold parameter, can be introduced to shift the density curve away from x ¼ 0. In that case, X γ has the two-parameter gamma distribution described above.

618 Lognormal (μ, σ) range: parameters: pdf: cdf: mean: variance:

Appendix C: Important Probability Distributions

(0, 1) μ, 1 < μ < 1 (first shape parameter) σ, σ > 0 (second shape parameter) 2 2 1 pﬃﬃﬃﬃﬃ e½ln ðxÞμ =ð2σ Þ 2πσx ln ðxÞ μ Φ σ eμþσ e

2

=2

2μþσ 2

2

eσ 1

Note: A third parameter γ, called a threshold parameter, can be introduced to shift the density curve away from x ¼ 0. In that case, X γ has the two-parameter lognormal distribution described above. Normal (μ, σ) [or Gaussian (μ, σ)] range: (1, 1) parameters: μ, 1 < μ < 1 (mean) σ, σ > 0 (standard deviation) 2 2 1 pdf: pﬃﬃﬃﬃﬃ eðxμÞ =ð2σ Þ σ 2π x μ

(see Table A.3) Φ cdf: σ mean: μ variance: σ2 2 2 mgf: eμtþσ t =2

X ~ N(μ, σ)

Note: The μ ¼ 0, σ ¼ 1 case is called the standard normal or z distribution. Uniform (A, B) range: parameters: pdf: cdf: mean: variance: mgf:

X ~ Unif[A, B] [A, B] A, 1 < A < B (lower bound) B, A < B < 1 (upper bound) 1 BA xA BA AþB 2 ðB AÞ2 12 eBt eAt t 6¼ 0 ðB AÞt

Note: The A ¼ 0, B ¼ 1 case is called the standard uniform distribution. Weibull (α, β) range: parameters: pdf: cdf:

(0, 1) α, α > 0 (shape parameter) β, β > 0 (scale parameter) α α1 ðx=βÞα x e βα α

1 eðx=βÞ

(continued)

Appendix C: Important Probability Distributions

mean: variance:

619

1 βΓ 1þ α ( ) 2 1 2 2 β Γ 1þ Γ 1þ α α

Note: A third parameter γ, called a threshold parameter, can be introduced to shift the density curve away from x ¼ 0. In that case, X γ has the two-parameter Weibull distribution described above.

C.3 Matlab and R Commands Table C.1 indicates the template for Matlab and R commands related to the “named” probability distributions. In Table C.1, x ¼ input to the pmf, pdf, or cdf p ¼ left-tail probability (e.g., p ¼ .5 for the median, or .9 for the 90th percentile) N ¼ simulation size; i.e., the length of the vector of random numbers pars ¼ the set of parameters, in the order prescribed name ¼ a text string specifying the particular distribution Table C.2 catalogs the names and parameters for a variety of distributions. Table C.1 Matlab and R syntax for probability distribution commands pmf/pdf cdf Quantile Random #s

Matlab namepdf(x,pars) namecdf(x,pars) nameinv(p,pars) namernd(pars,N,1)

R dname(x,pars) pname(x,pars) qname(p,pars) rname(N,pars)

Table C.2 Names and parameter sets for major distributions in Matlab and R Matlab Distribution Binomial Geometrica Hypergeometric Negative binomiala Poisson Betab Exponential Gamma Lognormal Normal Uniform Weibull a

name bino geo hyge nbin poiss beta exp gam logn norm unif wbl

R pars n, p p N, M, n r, p μ α, β 1/λ α, β μ, σ μ, σ A, B β, α

name binom geom hyper nbinom pois beta exp gamma lnorm norm unif weibull

pars n, p p M, N M, n r, p μ α, β λ α, 1/β μ, σ μ, σ A, B α, β

The geometric and negative binomial commands in Matlab and R assume that the random variable counts only failures, and not the total number of trials. See Sect. 2.6 or the software documentation for details. b The beta distribution commands in Matlab and R assume a standard beta distribution; i.e., with A ¼ 0 and B ¼ 1.

Answers to Odd-Numbered Exercises

Chapter 1 1. 3.

5.

7.

9.

13. 15.

17.

(a) A \ B0 (b) A [ B (c) (A \ B0 ) [ (B \ A0 ) (a) S ¼ {1324, 1342, 1423, 2314, 2341, 2413, 2431, 3124, 3142, 4123, 4132, 3214, 3241, 4213, 4231} (b) A ¼ {1324, 1342, 1423, 1432} (c) B ¼ {2314, 2341, 2413, 2431, 3214, 3241, 4213, 4231} (d) A [ B ¼ {1324, 1342, 1423, 1432, 2314, 2341, 2413, 2431, 3214, 3241, 4213, 4231} A\B¼Ø A0 ¼ {2314, 2341, 2413, 2431, 3124, 3142, 4123, 4132, 3214, 3241, 4213, 4231} (a) A ¼ {SSF, SFS, FSS} (b) B ¼ {SSS, SSF, SFS, SSS} (c) C ¼ {SSS, SSF, SFS} (d) C0 ¼ {SFF, FSS, FSF, FFS, FFF} A [ C ¼ {SSS, SSF, SFS, FSS} A \ C ¼ {SSF, SFS} B [ C ¼ {SSS, SSF, SFS, FSS} B \ C ¼ {SSS, SSF, SFS} (a) {111, 112, 113, 121, 122, 123, 131, 132, 133, 211, 212, 213, 221, 222, 223, 231, 232, 233, 311, 312, 313, 321, 322, 323, 331, 332, 333} (b) {111, 222, 333} (c) {123, 132, 213, 231, 312, 321} (d) {111, 113, 131, 133, 311, 313, 331, 333} (a) S ¼ {BBBAAAA, BBABAAA, BBAABAA, BBAAABA, BBAAAAB, BABBAAA, BABABAA, BABAABA, BABAAAB, BAABBAA, BAABABA, BAABAAB, BAAABBA, BAAABAB, BAAAABB, ABBBAAA, ABBABAA, ABBAABA, ABBAAAB, ABABBAA, ABABABA, ABABAAB, ABAABBA, ABAABAB, ABAAABB, AABBBAA, AABBABA, AABBAAB, AABABBA, AABABAB, AABAABB, AAABBBA, AAABBAB, AAABABB, AAAABBB} (b) {AAAABBB, AAABABB, AAABBAB, AABAABB, AABABAB} (a) .07 (b) .30 (c) .57 (a) They are awarded at least one of the first two projects, .36 (b) They are awarded neither of the first two projects, .64 (c) They are awarded at least one of the projects, .53 (d) They are awarded none of the projects, .47 (e) They are awarded only the third project, .17 (f) Either they fail to get the first two or they are awarded the third, .75 (a) .572 (b) .879 (continued)

621

622

19. 21. 23. 25. 27. 29. 31. 33. 35. 37. 39. 41. 43. 45. 47. 51. 53. 55. 57. 59. 65. 67. 71. 73. 75. 77. 81. 83. 85. 87. 89. 91. 93. 95.

97. 99.

101. 103. 105. 107. 109. 111. 113. 115.

Answers to Odd-Numbered Exercises

(a) SAS and SPSS are not the only packages (b) .7 (c) .8 (d) .2 (a) .8841 (b) .0435 (a) .10 (b) .18, .19 (c) .41 (d) .59 (e) .31 (f) .69 (a) 1/15 (b) 6/15 (c) 14/15 (d) 8/15 (a) .85 (b) .15 (c) .22 (d) .35 (a) 1/9 (b) 8/9 (c) 2/9 (a) 10,000 (b) .9876 (c) .03 (d) .0337 (a) 336 (b) 593,775 (c) 83,160 (d) .140 (e) .002 (a) 240 (b) 12 (c) 108 (d) 132 (e) .55, .413 (a) .0775 (b) .0082 (a) 8008 (b) 3300 (c) 5236 (d) .4121, .6538 .2 (a) .2967 (b) .0747 (c) .2637 (d) .042 (a) 369,600 (b) .00006494 (a) 1/15 (b) 1/3 (c) 2/3 P(A|B) > P(B|A) (a) .50 (b) .0833 (c) .3571 (d) .8333 (a) .05 (b) .12 (c) .56, .44 (d) .49, .25 (e) .533 (f) .444, .556 .04 (a) .50 (b) .0455 (c) .682 (d) .0189 (a) 3/4 (b) 2/3 (a) .067 (b) .509 (a) .765 (b) .235 .087, .652, .261 .00329 .4657 for airline #1, .2877 for airline #2, .2466 for airline #3 A2 and A3 are independent .1936, .3816 .1052 .99999969, .226 .9981 (a) Yes (b) No (a) .343 (b) .657 (c) .189 (d) .216 (e) .3525 (a) P(A) ¼ P(B) ¼ .02, P(A \ B) ¼ .039984, A and B are not independent (b) .04, very little difference (c) P(A \ B) ¼ .0222, not close; P(A \ B) is close to P(A)P(B) when the sample size is very small relative to the population size (a) Route #1 (b) .216 (a) 1 (1 1/N )n (b) n ¼ 3: .4212, 1/2; n ¼ 6: .6651, 1; n ¼ 10: .8385, 10/6; the answers are not close (c) .1052, 1/9 ¼ .1111; much closer (a) Exact answer ¼ .46 (b) se .005 .8186 (answers will vary) .39, .88 (answers will vary) .91 (answers will vary) .02 (answers will vary) (b) .37 (answers will vary) (c) 176,000,000 (answers will vary; exact ¼ 176,214,841) (a) .20 (b) .56 (answers will vary) (a) .5177 (b) .4914 (answers will vary) (continued)

Answers to Odd-Numbered Exercises

117. 119.

.2 (answers will vary) ^ ðAÞ (numerical answers will vary) (b) π 4 P

121. 123. 125. 127. 129. 131. 133. 135. 137. 139. 141. 143. 145. 149.

(a) 1140 (b) 969 (c) 1020 (d) .85 (a) .0762 (b) .143 (a) .512 (b) .608 (c) .7835 .1074 (a) 1014 (b) 7.3719 109 (a) .974 (b) .9754 .926 (a) .018 (b) .601 .156 (a) .0625 (b) .15625 (c) .34375 (d) .014 (a) .12, .88 (b) .18, .38 1/4 ¼ P(A1 \ A2 \ A3) 6¼ P(A1) P(A2) P(A3) ¼ 1/8 (a) a0 ¼ 0, a5 ¼ 1 (b) a2 ¼ (1/2)a1 + (1/2)a3 (c) ai ¼ i/5 for i ¼ 0, 1, 2, 3, 4, 5 (a) .6923 (b) .52

623

Chapter 2 1. 3. 5. 7.

9. 11. 13. 15. 17. 19. 21.

23. 25. 27. 29. 31. 33. 35. 37. 39.

x ¼ 0 for FFF; x ¼ 1 for SFF, FSF, and FFS; x ¼ 2 for SSF, SFS, and FSS; x ¼ 3 for SSS Z ¼ average of the two numbers, with possible values 2/2, 3/2, . . ., 12/2; W ¼ absolute value of the difference, with possible values 0, 1, 2, 3, 4, 5 No. In Example 2.4, let Y ¼ 1 if at most three batteries are examined and let Y ¼ 0 otherwise. Then Y has only two values (a) {0, 1, 2. . ., 12}; discrete (c) {1, 2, 3, . . .}; discrete (e) {0, c, 2c, . . ., 10000c} where c is the royalty per book; discrete (g) {x: m x M} where m and M are the minimum and maximum possible tension; continuous (a) {2, 4, 6, 8, . . .}, that is, {2(1), 2(2), 2(3), 2(4), . . .}, an infinite sequence; discrete (a) .10 (c) .45, .25 (a) .70 (b) .45 (c) .55 (d) .71 (e) .65 (f) .45 (a) (1,2), (1,3), (1,4), (1,5), (2,3), (2,4), (2,5), (3,4), (3,5), (4,5) (b) p(0) ¼ .3, p(1) ¼ .6, p(2) ¼ .1 (c) F(x) ¼ 0 for x < 0, ¼ .3 for 0 x < 1, ¼ .9 for 1 x < 2, and ¼ 1 for x 2 (a) .81 (b) .162 (c) it is A; AUUUA, UAUUA, UUAUA, UUUAA; .00324 p(0) ¼ .09, p(1) ¼ .40, p(2) ¼ .32, p(3) ¼ .19 (b) p(x) ¼ .301, .176, .125, .097, .079, .067, .058, .051, .046 for x ¼ 1, 2, . . ., 9 (c) F(x) ¼ 0 for x < 1, ¼ .301 for 1 x < 2, ¼ .477 for 2 x < 3, . . ., ¼ .954 for 8 x < 9, and ¼ 1 for x 9 (d) .602, .301 (a) .20 (b) .33 (c) .78 (d) .53 (a) p( y) ¼ (1 p)y p for y ¼ 0, 1, 2, 3, . . . (a) 1234, 1243, 1324, . . ., 4321 (b) p(0) ¼ 9/24, p(1) ¼ 8/24, p(2) ¼ 6/24, p(3) ¼ 0, p(4) ¼ 1/24 (a) 6.45 GB (b) 15.6475 (c) 3.96 GB (d) 15.6475 4.49, 2.12, .68 (a) p (b) p(1 p) (c) p E[h3(X)] ¼ $4.93, E[h4(X)] ¼ $5.33, so 4 copies is better E(X) ¼ (n + 1)/2, E(X2) ¼ (n + 1)(2n + 1)/6, Var(X) ¼ (n2 1)/12 (b) .61 (c) .47 (d) $2598 (e) $4064 (continued)

624

41. 45. 47.

49. 51. 53. 55. 57. 59. 61. 63. 65. 67. 69. 71. 73.

75. 77. 79. 81. 83. 85. 87. 89. 91. 93. 95. 97. 99. 101. 103. 105. 107. 109. 111. 113. 115. 117. 121. 123. 125. 129.

Answers to Odd-Numbered Exercises

(a) μ ¼ $2/38 for both methods (c) single number: σ ¼ $5.76; square: σ ¼ $2.76 E(X c) ¼ E(X) c, E(X μ) ¼ 0 (a) .25, .11, .06, .04, .01 (b) μ ¼ 2.64, σ ¼ 1.54; for k ¼ 2, the probability is .04, and the bound of .25 is much too conservative; for k ¼ 3, 4, 5, 10, the probability is 0, and the bounds are again conservative (c) μ ¼ $0, σ ¼ $d, 0 (d) 1/9, same as the Chebyshev bound (e) there are many, e.g., p(1) ¼ p(1) ¼ .02 and p(0) ¼ .96 (a) Yes, n ¼ 10, p ¼ 1/6 (b) Yes, n ¼ 40, p ¼ 1/4 (c) No (d) No (e) No (f) Yes, assuming the population is very large; n ¼ 15, p ¼ P(a randomly selected apple weighs > 150 g) (a) .515 (b) .218 (c) .011 (d) .480 (e) .965 (f) .000 (g) .595 (a) .354 (b) .115 (c) .918 (a) 5 (b) 1.94 (c) .017 (a) .403 (b) .787 (c) .774 .1478 .407, independence (a) .010368 (c) the probability decreases, to .001970 (d) 1500, 259.2 (a) .017 (b) .811, .425 (c) .006, .902, .586 When p ¼ .9, the probability is .99 for A and .9963 for B. If p ¼ .5, the probabilities are .75 and .6875, respectively (a) 20, 16 (b) 70, 21 (a) p ¼ 0 or 1 (b) p ¼ .5 P(|X μ| 2σ) ¼ .042 when p ¼ .5 and ¼ .065 when p ¼ .75, compared to the upper bound of .25. Using k ¼ 3 in place of k ¼ 2, these probabilities are .002 and .004, respectively, whereas the upper bound is .11 (a) .932 (b) .065 (c) .068 (d) .492 (e) .251 (a) .011 (b) .441 (c) .554, .459 (d) .945 Poisson(5) (a) .492 (b) .133 .271, .857 (a) 2.9565, .948 (b) .726 (a) .122, .809, .283 (b) 12, 3.464 (c) .530, .011 (a) .221 (b) 6,800,000 (c) p(x; 20.106) (a) 1/(1 eθ) (b) θ ¼ 2; .981 (c) 1.26 (a) .114 (b) .879 (c) .121 (d) Use the binomial distribution with n ¼ 15, p ¼ .10 (a) h(x; 15, 10, 20) for x ¼ 5, . . ., 10 (b) .0325 (c) .697 (a) h(x; 10, 10, 20) (b) .033 (c) h(x; n, n, 2n) (a) .2817 (b) .7513 (c) .4912, .9123 (a) nb(x; 2, .5) (b) .188 (c) .688 (d) 2, 4 nb(x; 6, .5), 6 nb(x; 5, 6/36), 30, 12.2 (a) 160, 21.9 (b) .6756 (a) .01e9t+.05e10t+.16e11t+.78e12t (b) E(X) ¼ 11.71, SD(X) ¼ 0.605 pﬃﬃﬃ MX(t) ¼ et/(2 et), E(X) ¼ 2, SDðXÞ ¼ 2 Skewness ¼ 2.20 (Ex. 107), +0.54 (Ex. 108), +2.12 (Ex. 109), 0 (Ex. 110) E(X) ¼ 0, Var(X) ¼ 2 p( y) ¼ (.25)y1(.75) for y ¼ 1, 2, 3, . . . MY ðtÞ ¼ et =2 , E(Y ) ¼ 0, Var(Y ) ¼ 1 E(X) ¼ 5, Var(X) ¼ 4 Mn X(t) ¼ ( p + (1 p)et)n MY(t) ¼ pr[1 (1 p)et] r, E(Y ) ¼ r(1 p)/p; Var(Y ) ¼ r(1 p)/p2 mean 0.5968, sd 0.8548 (answers will vary) 2

(continued)

Answers to Odd-Numbered Exercises

131. 133. 135. 137. 139. 141. 143. 145. 147. 149. 151. 153. 155. 157. 159. 161. 163. 165. 167. 169.

625

.9090 (answers will vary) (a) μ 13.5888, σ 2.9381 (b) .1562 (answers will vary) mean 3.4152, variance 5.97 (answers will vary) (b) 142 tickets (a) .2291 (b) $8696 (c) $7811 (d) .2342, $7,767, $7,571 (answers will vary) (b) probability .9196, confidence interval ¼ (.9143, .9249) (answers will vary) (b) 3.114, .405, .636 (a) b(x; 15, .75) (b) .686 (c) .313 (d) 11.25, 2.81 (e) .310 (a) .013 (b) 19 (c) .266 (d) Poisson with μ ¼ 500 (a) p(x; 2.5) (b) .067 (c) .109 1.813, 3.05 p(2) ¼ p2, p(3) ¼ (1 p)p2, p(4) ¼ (1 p)p2, p(x) ¼ [1 p(2) . . . p(x 3)](1 p)p2 for x ¼ 5, 6, 7, . . .; .99950841 (a) .0029 (b) .0767, .9702 P1 [p(x; 2)]5 (a) .135 (b) .00144 (c) x¼0 3.590 (a) No (b) .0273 (b) .5 μ1 + .5 μ2 (c) .25(μ1 μ2)2 + .5(μ1 + μ2) (d) .6 and .4 replace .5 and .5, respectively μ ¼ .5 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 500p + 750, 100 pð1 pÞ (a) 2.50 (b) 3.1

Chapter 3 1. 3. 5. 7. 9. 11. 13. 15. 17. 19. 21. 23. 25. 27. 29. 31. 33. 35. 39. 41. 43. 45. 47.

(b) .4625; the same (c) .5, .278125 (b) .5 (c) .6875 (d) .6328 (a) k ¼ 3/8 (b) .125 (c) .296875 (d) .578125 (a) f(x) ¼ 1/4.05 for .20 x 4.25 (b) .3086 (c) .4938 (d) 1/4.05 (a) .562 (b) .438, .438 (c) .071 (a) .25 (b) .1875 (c) .4375 (d) 1.414 h (e) f(x) ¼ x/2 for 0 x < 2 (a) k ¼ 3 (b) F(x) ¼ 1 1/x3 for x 1 and ¼ 0 otherwise (c) .125, .088 (a) F(x) ¼ x3/8 for 0 x 2, ¼ 0 for x < 0, ¼ 1 for x > 2 (b) .015625 (c) .0137, .0137 (d) 1.817 min (a) .597 (b) .369 (c) f(x) ¼ [ln(4) ln(x)]/4 for 0 < x < 4 (a) 1.333 h (b) .471 h (c) $2 (a) .8182 ft3 (b) .3137 (a) A + (B A)p (b) (A + B)/2 (c) (Bn+1 An+1)/[(n + 1)(B A)] 314.79 m2 248 F, 3.6 F 1/4 min, 1/4 min (c) μR v/20, σ R v/800 (d) ~100π (e) ~80π2 g(x) ¼ 10x 5, MY(t) ¼ (e5t e5t)/10t, Y ~ Unif[5, 5] (a) MX(t) ¼ .15e.5t/(.15 t), μ ¼ 7.167, variance ¼ 44.444 (b) .15/(.15 t), μ ¼ 6.67, variance ¼ 44.444 (c) MY(t) ¼ .15/(.15 t) (a) .4850 (b) .3413 (c) .4938 (d) .9876 (e) .9147 (f) .9599 (g) .9104 (h) .0791 (i) .0668 (j) .9876 (a) 1.34 (b) 1.34 (c) .675 (d) .675 (e) 1.555 (a) .9664 (b) .2451 (c) .8664 (a) .4584 (b) 135.8 kph (c) .9265 (d) .3173 (e) .6844 (a) .9236 (b) .0021 (c) .1336 (continued)

626

49. 51. 53. 55. 57. 59. 61. 63. 65. 69. 71. 73. 75. 77. 79. 81. 85. 89. 91. 93. 95. 97. 99. 101. 103. 105. 107. 109. 111. 113. 115. 117. 119. 121. 123. 125.

129. 131. 133. 135. 137. 141. 143. 145. 147.

Answers to Odd-Numbered Exercises

.6826 < .9987 ) the second machine (a) .2514, ~0 (b) ~39.985 ksi σ ¼ .0510 (a) .8664 (b) .0124 (c) .2718 (a) .7938 (b) 5.88 (c) 7.938 (d) .2651 (a) Φ(1.72) Φ(.55) (b) Φ(.55) [1 Φ(1.72)] (a) .7286 (b) .8643, .8159 (a) .9932 (b) .9875 (c) .8064 (a) .0392 (b) ~1 (a) .1587 (b) .0013 (c) .999937 (d) .00000029 (a) 1 (b) 1 (c) .982 (d) .129 (a) .1481 (b) .0183 pﬃﬃﬃ (a) 120 (b) ð3=4Þ π (c) .371 (d) .735 (e) 0 (a) .424 (b) .567; median < 24 (c) 60 weeks (d) 66 weeks ηp ¼ ln(1 p)/λ, η ¼ .693/λ (a) .5488 (b) .3119 (c) 7.667 s (d) 6.667 s (a) .8257, .8257, .0636 (b) .6637 (c) 172.727 h (a) .9295 (b) .2974 (c) 98.184 ksi (a) μ ¼ 9.164, σ ¼ .38525 (b) .8790 (c) .4247 (d) no η ¼ eμ ¼ 9547 kg/day/km (a) 3.96, 1.99 months (b) .0375 (c) .7016 (d) 7.77 months (e) 13.75 months (f) 4.522 α¼β (b) Γ(α + β)Γ(m + β)/[Γ(α + m + β)Γ(β)], β/(α + β) Yes, since the pattern in the plot is quite linear Yes Yes Plot ln(x) versus z percentile. The pattern is somewhat straight, so a lognormal distribution is plausible It is plausible that strength is normally distributed, because the pattern is reasonably linear There is substantial curvature in the plot. λ is a scale parameter (as is σ for the normal family) fY( y) ¼ 2/y3 for y > 1 f Y ðyÞ ¼ yey =2 for y > 0 fY( y) ¼ 1/16 for 0 < y < 16 fY( y) ¼ 1/[π(1 + y2)] for 1 < y < 1 Y ¼ g(X) ¼ X2/16

pﬃﬃﬃ f Y ðyÞ ¼ 1= 2 y for 0 < y 1 8 pﬃﬃﬃ > < 1=4 y 0 < y 1 pﬃﬃﬃ f Y ðyÞ ¼ 1= 8 y 1 < y 9 > : 0 otherwise pﬃﬃﬃ (a) FðxÞ ¼ x2 =4, F1 ðuÞ ¼ 2 u (c) μ ¼ 1.333, σ ¼ 0.4714, x and s will vary

pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ The inverse cdf is F1 ðuÞ ¼ 1 þ 48u 1 =3 (a) The inverse cdf is F1(u) ¼ τ [1 (1 u)1/θ] (b) E(X) ¼ 16, x will vary ^ ðM < :1Þ ¼ :8760 (answers will vary) (a) c ¼ 1.5 (c) 15,000 (d) μ ¼ 3/8, x will vary (e) P pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ 1 (a) x ¼ G (u) ¼ ln(1 u) (b) 2e=π 1:3155 (c) ~13,155 (a) .4 (b) .6 (c) F(x) ¼ x/25 for 0 x 25, ¼ 0 for x < 0, ¼ 1 for x > 25 (d) 12.5, 7.22 (b) F(x) ¼ 1 16/(x + 4)2 for x > 0, ¼ 0 for x 0 (c) .247 (d) 4 years (e) 16.67 (a) .6568 (b) 41.56 V (c) .3197 (a) .0003 (exact: .00086) (b) .0888 (exact: .0963) 2

(continued)

Answers to Odd-Numbered Exercises

149. 151. 153. 155. 157. 159. 161. 163. 165. 171.

627

(a) 68.03 dB, 122.09 dB (b) .3204 (c) .7642, because the lognormal distribution is not symmetric (a) F(x) ¼ 1.5(1 1/x) for 1 x 3, ¼ 0 for x < 1, ¼ 1 for x > 3 (b) .9, .4 (c) 1.648 s (d) .553 s (e) .267 s (a) 1.075, 1.075 (b) .0614, .333 (c) 2.476 mm (b) $95,600, .3300 (b) F(x) ¼ .5e2x for x < 0, ¼ 1 .5e2x for x 0 (c) .5, .665, .256, .670 (a) k ¼ (α 1)5α1, α > 1 (b) F(x) ¼ 1 (5/x)α1 for x 5 (c) 5(α 1)/(α 2), α > 2 (b) .4602, .3636 (c) .5950 (d) 140.178 MPa pﬃﬃﬃ (a) Weibull, with α ¼ 2 and β ¼ 2σ (b) .542 .5062 (a) 710, 84.423, .684 (b) .376

Chapter 4 1. 3. 5. 7. 9. 11. 13. 15. 17. 19. 21. 23. 25. 27. 29. 31. 33. 35. 37. 43. 45. 47. 49. 51. 53. 55. 57. 59. 61. 65. 67.

(a) .20 (b) .42 (c) .70 (d) pX(x) ¼ .16, .34, .50 for x ¼ 0, 1, 2; pY( y) ¼ .24, .38, .38 for y ¼ 0, 1, 2; .50 (e) no (a) .15 (b) .40 (c) .22 (d) .17, .46 (e) p1(x1) ¼ .19, .30, .25, .14, .12 for x1 ¼ 0, 1, 2, 3, 4 (f) p2(x2) ¼ .19, .30, .28, .23 for x2 ¼ 0, 1, 2, 3 (g) no (a) .0305 (b) .1829 (c) .1073 (a) .054 (b) .00018 (a) .030 (b) .120 (c) .300 (d) .380 (e) no (a) k ¼ 3/380,000 (b) .3024 (c) .3593 (d) fX(x) ¼ 10kx2 + .05 for 20 x 30 (e) no (a) pðx; yÞ ¼

eμ1 μ2 μ1x μ2y x!y! xy

(b) eμ1 μ2 ½1 þ μ1 þ μ2 (c) e

μ1 μ2

m!

ðμ1 þ μ2 Þm

(a) f(x, y) ¼ e for x, y 0 (b) .400 (c) .594 (d) .330 (a) F( y) ¼ (1 eλy) + (1 eλy)2 (1 eλy)3 for y > 0, f( y) ¼ 4λe2λy 3λe3λy for y > 0 (b) 2/3λ pﬃﬃﬃﬃﬃﬃﬃﬃﬃ r 2 x2 for r x r, fY( y) ¼ fX( y), no (a) .25 (b) 1/π (c) 2/π (d) f X ðxÞ ¼ 2 πr 2 1/3 (a) .11 (b) pX(x) ¼ .78, .12, .07, .03 for x ¼ 0, 1, 2, 3; pY( y) ¼ .77, .14, .09 for y ¼ 0, 1, 2 (c) no (d) 0.35, 0.32 (e) 95.72 .15 L2 .25 h, or 15 min 2/3 (a) 3.20 (b) .207 (a) .238 (b) .51 ÐÐ ÐÐ (a) Var(h(X, Y )) ¼ [h(x, y)]2 f(x, y)dA [ h(x, y) f(x, y)dA]2 (b) 13.34 (a) 87,850, 4370.37 (b) mean yes, variance no (c) .0027 .2877, .3686 .0314 (a) 45 min (b) 68.33 (c) 1 min, 13.67 (d) 5 min, 68.33 (a) 50, 10.308 (b) .0075 (c) 50 (d) 111.5625 (e) 131.25 (a) .9616 (b) .0623 (a) E(Yi) ¼ 1/2, E(W ) ¼ n(n + 1)/4 (b) Var(Yi) ¼ 1/4, Var(W ) ¼ n(n + 1)(2n + 1)/24 10:52.76 a.m. pﬃﬃﬃ (a) mean ¼ 0, sd ¼ 2 (a) X ~ Bin(10, 18/38) (b) Y ~ Bin(15, 18/38) (c) X + Y ~ Bin(25, 18/38) (f) no (a) α ¼ 2, β ¼ 1/λ (c) gamma, α ¼ n, β ¼ 1/λ (a) .5102 (b) .000000117 (continued)

628

69. 71. 73. 75. 77. 79. 81. 83. 85. 87. 89. 91. 93. 95. 97. 99. 101. 103. 105. 107. 111. 113. 115. 117. 119. 121. 123. 125. 127. 129. 133. 135. 137. 139. 143. 145. 147. 149. 151. 153.

Answers to Odd-Numbered Exercises pﬃﬃﬃ (a) x2/2, x4/12 (b) f(x, y) ¼ 1/x2 for 0 < y < x2 < 1 (c) f Y ðyÞ ¼ 1= y 1 for 0 < y < 1 (a) pX(x) ¼ 1/10 for x ¼ 0, 1, . . ., 9; p(y|x) ¼ 1/9 for y ¼ 0, . . ., 9 and y 6¼ x; p(x, y) ¼ 1/90 for x, y ¼ 0, 1, . . ., 9 and y 6¼ x (b) 5 x/9 (a) fX(x) ¼ 2x, 0 < x < 1 (b) f(y|x) ¼ 1/x, 0 < y < x (c) .6 (d) no (e) x/2 (f) x2/12 x y 2xy 2! (b) X ~ Bin(2, .3), Y ~ Bin(2, .2) (c) YjX ¼ x ~ Bin(2 x, .2/.7) (a) pðx; yÞ ¼ x!y!ð2xy Þ! ð:3Þ ð:2Þ ð:5Þ (d) no (e) (4 2x)/7 (f) 10(2 x)/49 (a) x/2, x2/12 (b) f(x, y) ¼ 1/x for 0 < y < x < 1 (c) fY( y) ¼ ln( y) for 0 < y < 1 (a) .6x, .24x (b) 60 (c) 60 176 lbs, 12.68 lbs pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ (a) 1 + 4p, 4p(1 p) (b) $2598, 16,158,196 (c) 2598(1 + 4p), 16518196 þ 93071200p 26998416p2 (d) $2598 and $4064 for p ¼ 0; $7794 and $7504 for p ¼ .5; $12,990 and $9088 for p ¼ 1 (a) 12 cm, .01 cm (b) 12 cm, .005 cm (c) the larger sample (a) .9772, .4772 (b) 10 43.29 h .9332 (a) .8357 (b) no (a) .1894 (b) .1894 (c) 621.5 gallons (a) .0968 (b) .8882 .9616 1=X 1 ðy1 þy2 Þ=4 ﬃ ey1 =4 (c) yes (a) f ðy1 ; y2 Þ ¼ 4π e (b) f Y 1 ðy1 Þ ¼ p1ﬃﬃﬃ 4π 2

2

2

(a) y for 0 y 1 and y(2 y) for 1 < y 2 (b) 2(1 w) for 0 w 1 4y3[ln(y3)]2 for 0 < y3 < 1 (a) N(984, 197.45) (b) .1379 (c) 1237 (a) N(158, 8.72) (b) N(170, 8.72) (c) .4090 (a) .8875x + 5.2125 (b) 111.5775 (c) 10.563 (d) .0951 (a) 2x 10 (b) 9 (c) 3 (d) .0228 (a) .1410 (b) .1165 2

(a) RðtÞ ¼ et (b) .1054 (c) 2t (d) 0.886 thousand hours (a) R(t) ¼ 1 .125t3 for 0 t 2, ¼ 0 for t > 2 (b) 3t2/(8 t3) (c) undefined

4 2 2 3 8tet 1et 2 (a) parallel (b) RðtÞ ¼ 1 1 et (c) hðtÞ ¼ 4 1ð1et2 Þ (a) [1 (1 R1(t))(1 R2(t))][1 (1 R3(t))(1 R4(t))][1 (1 R5(t))(1 R6(t))] (b) 70 h

2 2 (a) RðtÞ ¼ eαðtt =½2βÞ for t β, ¼ e αβ/2 for t > β (b) f ðtÞ ¼ α 1 t eαðtt =½2βÞ 2

β

(a) 5y4/105 for 0 < y < 10, 8.33 min (b) 6.67 min (c) 5 min (d) 1.409 min (a) .0238 (b) $2,025 2 n!Γði þ 1=θÞ n!Γði þ 2=θÞ n!Γði þ 1=θÞ , ði 1Þ!Γðn þ 1=θ þ 1Þ ði 1Þ!Γðn þ 2=θ þ 1Þ ði 1Þ!Γðn þ 1=θ þ 1Þ E(Yk+1) ¼ η ^ ðX 1, Y 1Þ ¼ :4154 (answers will vary), exact ¼ .42 (c) mean 0.4866, sd 0.6438 (answers (b) P will vary) (b) 60,000 (c) 7.0873, 1.0180 (answers will vary) (d) .2080 (answers will vary) (a) fX(x) ¼ 12x(1 x2) for 0 x 1, f(y|x) ¼ 2y/(1 x)2 for 0 y 1 x (c) we expect 16/9 candidates per accepted value, rather than 6 (a) pX(100) ¼ .5 and pX(250) ¼ .5 (b) p(y|100) ¼ .4, .2, .4 for y ¼ 0, 100, 200; p(y|250) ¼ .1, .3, .6 for y ¼ 0, 100, 200 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ (a) N(μ1, σ 1), N(μ2 + ρσ 2/σ 1[(x μ1)], σ 2 1 ρ2 ) (b) μ ^ ¼ 196:6193 h, standard error ¼ 1.045 h (answers will vary) (c) .9554, .0021 (answers will vary) (continued)

Answers to Odd-Numbered Exercises

155. 157. 159. 163. 165.

167. 169. 171. 173.

175. 177. 179. 181. 183. 185. 187.

fT(t) ¼ e t/2 e t for t > 0 (a) k ¼ 3/81,250 (b) fX(x) ¼ k(250x 10x2) for 0 x 20, ¼ k(450x 30x2 + .5x3) for 20 x 30; fY( y) ¼ fX( y); not independent (c) .355 (d) 25.969 lb (e) 32.19, .894 (f) 7.66 t ¼ E(X + Y) ¼ 1.167 (c) p ¼ 1, because μ < 1; p ¼ 2/3 < 1, because μ > 1 (a) F(b, d) F(a, d) F(b, c) + F(a, c) (b) F(10,6) F(4,6) F(10,1) + F(4,1); F(b, d) F(a 1, d) F(b, c 1) + F(a 1, c 1) (c) At each (x*, y*), F(x*, y*) is the sum of the probabilities at points (x, y) such that x x* and y y*. The table of F(x, y) values is x 100 250 200 :50 1 y 100 :30 :50 0 :20 :25 (d) Fðx; yÞ ¼ :6x2 y þ :4xy3 , 0 x 1; 0 y 1; Fðx; yÞ ¼ 0, x 0; Fðx; yÞ ¼ 0, y 0; Fðx; yÞ ¼ :6x2 þ :4x, 0 x 1, y > 1; Fðx; yÞ ¼ :6y þ :4y3 , x > 1, 0 y 1; Fðx; yÞ ¼ 1, x > 1, y > 1 Pð:25 x :75, :25 y :75Þ ¼ :23125 (e) Fðx; yÞ ¼ 6x2 y2 , x þ y 1, 0 x 1; 0 y 1, x 0, y 0 Fðx; yÞ ¼ 3x4 8x3 þ 6x2 þ 3y4 8y3 þ 6y2 1, x þ y > 1, x 1, y 1 Fðx; yÞ ¼ 0, x 0; Fðx; yÞ ¼ 0, y 0; Fðx; yÞ ¼ 3x4 8x3 þ 6x2 , 0 x 1, y > 1 Fðx; yÞ ¼ 3y4 8y3 þ 6y2 , 0 y 1, x > 1 Fðx; yÞ ¼ 1, x > 1, y > 1 (a) 2x, x (b) 40 (c) 100 Undefined, 0 2 , 1500 h ð1 1000tÞð2 1000tÞ Not valid for 75th percentile, but valid for 50th percentile; sum of percentiles ¼ (μ1 + zσ 1) + (μ2 + zσ 2) ¼ μ1 + μ2 + z(σ 1 + σ 2), pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ percentile of sums ¼ ðμ1 þ μ2 Þ þ z σ 21 þ σ 22 (a) 2360, 73.7 (b) .9713 .9686 .9099 .8340 σ2 (a) 2 W 2 (b) .9999 σW þ σE 26, 1.64 (a) g(y1, yn) ¼ n(n 1)[F(yn) F(y1)]n 2f(y1)f(yn) for y1 < yn (b) f(w1, w2) ¼ n(n ð 1)[F(w1 + w2) F(w1)]n 2f(w1)f(w1 + w2), f W 2 ðw2 Þ ¼ nðn 1Þ

191.

629

1

1

½Fðw1 þ w2 Þ Fðw1 Þn2 f ðw1 Þf ðw1 þ w2 Þ dw1

(c) n(n 1)w2n 2(1 w2) for 0 w2 1 (a) 10/9 (b) 10/8 (c) 1 + Y2 + . . . + Y10, 29.29 boxes (d) 11.2 boxes

Chapter 5 1. 3.

(a) x ¼ 113:73 (b) e x ¼ 113 (c) s ¼ 12.74 (d) .9091 (e) s= x ¼ 11:2 (a) x ¼ 1:3481 (b) x ¼ 1:3481 (c) x þ 1:28s ¼ 1:7814 (d) .6736 (continued)

630

Answers to Odd-Numbered Exercises

5.

^θ 1 ¼ N X ¼ 1, 703, 000, ^ ¼ 1, 591, 300, ^ θ 2 ¼ τ ND θ 3 ¼ τ XY ¼ 1, 601, 438:281

7. 9.

(a) 120.6 (b) 1,206,000 (c) .80 (d) 120 pﬃﬃﬃ x ¼ 2:11 (b) pﬃﬃﬃ (a) X; μ= n, .119 (b) nλ/(n 1) (c) n2λ2/(n 1)2(n 2) pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ p 1 ¼ x1 =n1 and ^ p 2 ¼ x2 =n2 , ^ p 1^ p 2^ q 1 =n1 þ ^ q 2 =n2 (d) .245 (e) .041 (b) p1 q1 =n1 þ p2 q2 =n2 (c) with ^ (a) ∑ Xi2/2n (b) 74.505 (b) .444 (a) ^p ¼ 2Y=n :3; .2 (c) (10/7)Y/n 9/70 pﬃﬃ npþ1=2 ﬃﬃ , ppðﬃﬃ1pÞ2 , pﬃﬃ1 2 ; the MSE does not depend on p (b) when p is near .5, the MSE from part (a) is (a) p nþ1

11. 13. 17. 19. 21. 23. 25. 27. 29. 31.

ð nþ1Þ

4ð nþ1Þ

smaller; when p is near 0 or 1, the usual estimator has lower MSE (a) ^p ¼ x=n ¼ :15 (b) yes (c) .4437 x, y, x y ^p ¼ r=x ¼ :15, yes qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ X (a) ^θ ¼ X2i =2n ¼ 74:505, yes (b) ^η ¼ 2 ln ð:5Þ^ θ ¼ 10:163

33.

(a) ^θ ¼ Σ ln ðn1xi =τÞ (b) ðθ 1Þ

35.

^λ ¼ X n i¼1

37. 39. 41. 43. 45. 47. 49. 51. 53. 55. 57. 59. 61. 63. 65. 67. 69. 71. 73. 75. 77. 79. 81. 83. 85.

n X xi ¼ n, subject to τ > max(xi) τ xi i¼1

n

ðY i =ti Þ

(a) 2.228 (b) 2.131 (c) 2.947 (d) 4.604 (e) 2.492 (f) ~2.715 (a) A normal probability plot of these 20 values is quite linear. (b) (23.79, 26.31) (c) yes (a) (357.38, 384.01) (b) narrower (a) Based on a normal probability plot, it is reasonable to assume the sample observations came from a normal distribution. (b) (430.51, 446.08); 440 is plausible, 450 is not Interval (c) 26.14 (c) (12.10, 31.70) (a) yes (b) no (c) no (d) yes (e) no (f) yes Using Ha: μ < 100 results in the welds being believed in conformance unless proved otherwise, so the burden of proof is on the nonconformance claim (a) reject H0 (b) reject H0 (c) don’t reject H0 (d) reject H0 (e) don’t reject H0 (a) .040 (b) .018 (c) .130 (d) .653 (e) 200, t ¼ 1.19 at ll df, P-value ¼ .128, do not reject H0 H0: μ ¼ 3 versus Ha: μ 6¼ 3, t ¼ 1.759, P-value ¼ .082, reject H0 at α ¼ .10 but not at α ¼ .05 H0: μ ¼ 360 versus Ha: μ > 360, t ¼ 2.24 at 25 df, P-value ¼ .018, reject H0, yes H0: μ ¼ 15 versus Ha: μ < 15, z ¼ 6.17, P-value 0, reject H0, yes H0: σ ¼ .05 versus Ha: σ < .05. Type I error: Conclude that the standard deviation is .2, z ¼ 1.27, P-value ¼ .1020, fail to reject H0 (b) Type I: conclude that more than 20% of the population of female workers is obese, when the true percentage is 20%. Type II: fail to recognize that more than 20% of the population of female workers is obese when that’s actually true H0: p ¼ .1, Ha: p > .1, z ¼ 0.74, P-value .23, fail to reject H0 H0: p ¼ .1 versus Ha: p > .1, z ¼ 1.33, P-value ¼ .0918, fail to reject H0; Type II H0: p ¼ .25 versus Ha: p < .25, z ¼ 6.09, P-value 0, reject H0 (a) H0: p ¼ .2 versus Ha: p > .2, z ¼ 0.97, P-value ¼ .166, fail to reject H0, so no modification appears necessary (b) .9974 (a) Gamma(9, 5/3) (b) Gamma(145, 5/53) (c) (11.54, 15.99) B(490, 455), the same posterior distribution found in the example Gamma(α + Σ xi, 1/(n + 1/β)) Beta(α + x, β + n x) n/∑kxk ¼ .0436 No: Eðσ^ 2 Þ ¼ σ 2 =2 (a) expected payoff ¼ 0 (b) ^ θ ¼ Σxi þ2y Σxi þ2n

(a) The pattern of points in a normal probability plot (not shown) is reasonably linear, so, yes, normality is plausible. (b) (33.53, 43.79) (.1295, .2986) (a) A normal probability plot lends support to the assumption that pulmonary compliance is normally distributed. (b) (196.88, 222.62) (a) (.539, .581) (b) 2401 pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ x1 x2 1:96 x21 þx22 ð1:96Þ2 (a) N(0, 1) (b) provided x12 + x22 (1.96)2 x2 ð1:96Þ2 2

123. 125. 127. 129. 131. 133. 135. 137.

(a) 90.25% (b) at least 90% (c) at least 100(1 kα)% pﬃﬃﬃ (a) H0: μ ¼ 2150 versus Ha: μ > 2150 (b) t ¼ ðx 2150Þ=ðs= nÞ (c) 1.33 (d) .107 (e) fail to reject H0 H0: μ ¼ 29.0 versus Ha: μ > 29.0, t ¼ .7742, P-value ¼ .232, fail to reject H0 H0: μ ¼ 9.75 versus Ha: μ > 9.75, t ¼ 4.75, P-value 0. The condition is not met. H0: μ ¼ 1.75 versus Ha: μ 6¼ 1.75, t ¼ 1.70, P-value ¼ .102, do not reject H0; the data does not contradict prior research H0: p ¼ .75 versus Ha: p < .75, z ¼ 3.28, P-value ¼ .0005, reject H0 (a) H0: p .02 versus Ha: p > .02; with X ~ Bin(200, .02), P-value ¼ P(X 17) ¼ 7.5 107; reject H0 here and conclude that the NIST benchmark is not satisfied (b) .2133 H0: μ ¼ 4 versus Ha: μ > 4, z ¼ 1.33, P-value ¼ .0918 > .02, fail to reject H0

Chapter 6 1. 3. 5.

{cooperative, competitive}; with 1 ¼ cooperative and 2 ¼ competitive, p11 ¼ .6, p12 ¼ .4, p22 ¼ .7, p21 ¼ .3 (a) {full, part, broken} (b) with 1 ¼ fill, 2 ¼ part, 3 ¼ broken, p11 ¼ .7, p12 ¼ .2, p13 ¼ .1, p21 ¼ 0, p22 ¼ .6, p23 ¼ .4, p31 ¼ .8, p32 ¼ 0, p33 ¼ .2 (a) X1 ¼ 2 with prob. p and ¼ 0with prob. 1 p (b) 0, 2, 4 x y (c) P Xnþ1 ¼ 2y Xn ¼ x ¼ p ð1 pÞxy for y ¼ 0, 1, . . ., x y (continued)

632

7.

9. 11. 13. 15. 17. 19.

21. 23. 25. 27. 29. 31. 33. 35.

39.

41.

45.

47.

Answers to Odd-Numbered Exercises

(a) A son’s social status, given his father’s social status, has the same probability distribution as his social status conditional on all family history; no (b) The probabilities of social status changes (e.g., poor to middle class) are the same in every generation; no (a) no (b) define a state space by pairs; probabilities from each pair into the next state :90 :10 (a) (b) .8210, .5460 (c) .8031, .5006 :11 :89 (a) Willow City: P(S ! S) ¼ .988 > .776 (b) .9776, .9685 (c) .9529 :6 :4 (a) (b) .52 (c) .524 (d) .606 :3 :7 (a) .2740, .7747 (b) .0380 (c) 2.1, 2.2 3 2 :1439 :2790 :2704 :1747 :1320 6 :2201 :3332 :2522 :1272 :0674 7 7 6 7 (a) 6 6 :1481 :2829 :2701 :1719 :1269 7 (b) .0730 (c) .1719 4 :0874 :2129 :2596 :2109 :2292 5 :0319 :1099 :1893 :2174 :4516 (a) .0608, .0646, .0658 (b) .0523, .0664, .0709, .0725 (c) they increase to .2710, .1320, .0926, .0798 (a) .525 (b) .4372 :96 :04 (a) (b) .778 0’s, .222 1’s (c) .7081 0’s, .2919 1’s :05 :95 (a) π ¼ [.80 .20] (b) P(X1 ¼ G) ¼ .816, P(X1 ¼ S) ¼ .184 (c) .8541 (a) π ¼ [0 1] (b) P(cooperative) ¼ .3, P(competitive) ¼ .7 (c) .39, .61 (a) no (b) yes (a) (.3681, .2153, .4167) (b) .4167 (c) 2.72 3 2 :7 :2 :1 7 6 (a) 4 0 :6 :4 5 (b) P2 has all nonzero entries (c) (8/15, 4/15, 1/5) :8 0 :2 (d) 8/15 (e) 5 (a) π 0 ¼ β/(α + β), π 1 ¼ α/(α + β) (b) α ¼ β ¼ 0 ) the chain is constant; α ¼ β ¼ 1 ) the chain alternates perfectly; α ¼ 0, β ¼ 1 ) the chain is always 0; α ¼ 1, β ¼ 0 ) the chain is always 1; α ¼ 0, 0 < β < 1 ) the chain eventually gets stuck at 0; 0 < α < 1, β ¼ 0 ) the chain eventually gets stuck at 1; 0 < α < 1 and β ¼ 1 or α ¼ 1 and 0 < β < 1 ) the chain is regular, and the answers to (a) still hold 3 2 αð 1 αÞ αð1 αÞ α2 ð1 αÞ2 00 6 7 βð1 αÞ ð1 αÞ 1 β αβ αð1 βÞ 7 01 6 7 6 (a) 10 6 αβ ð1 αÞ 1 β αð1 βÞ 7 5 4 β ð 1 αÞ 11 2 2 β ð1 β Þ βð1 βÞ ð1 βÞ β β2 αβ αβ α2 α2 (b) , , , (c) ðα þ βÞ2 ðα þ βÞ2 ðα þ βÞ2 ðα þ βÞ2 ðα þ β Þ2 3 2 :25 :75 0 0 7 6 6 0 :25 :75 0 7 7 (b) .4219, .7383, .8965 (c) 4 (d) 1; no (a) 6 6 0 0 :25 :75 7 5 4 0 0 0 1 (a) states 4 and 5 k 1 2 3 4 5 6 7 8 9 10 (b) P(T1 £ k) 0 .46 .7108 .8302 .9089 .9474 .9713 .9837 .9910 .9949 k 1 2 3 4 5 6 7 8 9 10 (c) P(T1 = k) 0 .46 .2508 .1194 .0787 .0385 .0239 .0124 .0073 .0039 μ 3.1457 (d) 3.2084 (e) .3814, .6186 (continued)

Answers to Odd-Numbered Exercises

49.

51. 53.

55. 59. 61. 63. 65. 67.

69.

3 :5 :5 0 0 0 6 :5 0 :5 0 0 7 7 6 7 (a) 6 6 :5 0 0 :5 0 7, 4 is an absorbing state 4 :5 0 0 0 :5 5 0 0 0 0 1 (b) P(T0 k) ¼ 0 for k ¼ 1, 2, 3; the probabilities for k ¼ 4, . . ., 15 are .0625, .0938, .1250, .1563, .1875, .2168, .2451, .2725, .2988, .3242, .3487, .3723 (c) .2451 (d) P(T0 ¼ k) ¼ 0 for k ¼ 1, 2, 3; the probabilities for k ¼ 4, . . ., 15 are .0625, .03125, .03125, .03125, .03125, .0293, .0283, .0273, .0264, .0254, .0245, .0236; μ 3.2531, σ 3.9897 (e) 30 μcoop ¼ 4.44, μcomp ¼ 3.89; cooperative 3 2 0 1 0 0 0 0 16 0 p 0 07 7 61 p (a) 2 6 0 1 p 0 p 07 7 6 34 0 0 1 p 0 p5 4 0 0 0 0 1 2p2 þ 1 2 2p2 4p þ 3 (b) for x0 ¼ $1, $2, $3: 2 , 2 , 2 2p 2p þ 1 2p 2p þ 1 2p 2p þ 1 p3 p2 p3 p2 þ p (c) for x0 ¼ $1, $2, $3: 2 , , 2p 2p þ 1 2p2 2p þ 1 2p2 2p þ 1 3.4825 generations (c) (2069,0, 2079.8) (d) (.5993, .6185) (answers will vary) (a) P(Xn+1 ¼ 10 | Xn ¼ x) ¼ .4, P(Xn+1 ¼ 2x | Xn ¼ x) ¼ .6 (b) mean $47.2 billion, sd $2.07 trillion (c) ($6.53 billion, $87.7 billion) (d) ($618.32 million, $627.90 million); easier (a) ($5586.60, $5632.3) (b) ($6695.50, $6773.80) (answers will vary) (b) .9224 (answers will vary) (c) (6.89, 7.11) (answers will vary) 3 2 0 :5 0 0 0 :5 6 :5 0 :5 0 0 0 7 7 6 6 0 :5 0 :5 0 0 7

1 1 1 1 1 1 7 (a) 6 6 0 0 :5 0 :5 0 7 (b) no (c) π¼ 6 6 6 6 6 6 (d) 6 (e) 9 7 6 4 0 0 0 :5 0 :5 5 :5 0 0 0 :5 0 3 2 0 1 0 0 0 0 6 1 0 1 1 0 07 7 63 3 3 7 6 7 6 60 1 0 1 1 07 7 6 3 3 3 7 (b) all entries of P6 are positive (a) 6 60 1 1 0 0 07 7 6 2 2 7 6 6 1 17 5 40 0 0 0 2

2

71.

73. 75.

633

2

0 0 0 0 1 0 (c) 1/12, 1/4, 1/4, 1/6, 1/6, 1/12 (d) 1/4 (e) 12 3 2 0 0 0 0 0 0 1 6 1 6 :3 :7 0 0 0 0 7 7 2 6 0 :3 :7 0 0 0 7 7 (b) .0566, .1887, .1887, .1887, .1887, .1887 (a) 6 6 3 6 0 0 :3 :7 0 0 7 7 4 4 0 0 0 :3 :7 0 5 5 0 0 0 0 :3 :7 (c) 17.67 weeks (including the one week of shipping) (a) 2 seasons (b) .3613 (c) 15 seasons (d) 6.25 seasons (a) p1 ¼ [0.3168 0.1812 0.2761 0.1413 0.0846]; p2 ¼ [0.3035 0.1266 0.2880 0.1643 0.1176]; p3 ¼ [0.2908 0.0918 0.2770 0.1843 0.1561] (b) 35.7 years, 11.9 years, 9.2 years, 4.3 years (c) 16.6 years (continued)

634

77.

79. 81.

Answers to Odd-Numbered Exercises 3 2 0 0 1 0 0 0 0 16 0 :041 0 7 7 6 0 0 :959 26 0 0 0 :987 :013 0 7 7 (c) 3.9055 weeks (d) .8145 6 (a) 36 0 0 :804 :196 7 7 60 0 4 pd 0 0 0 0 1 0 5 tbr 0 0 0 0 0 1 (e) payments are always at least 1 week late; most payments are made at the end of 3 weeks :98 :02 :97 :03 :99 :01 (a) P1 ¼ P3 ¼ , P2 ¼ , P4 ¼ P5 ¼ (b) .916 :02 :98 :03 :97 :01 :99 (a) [3259 22,533 19,469 26,066 81,227 16,701 1511 211,486 171,820 56,916] (b) [2683 24,119 21,980 27,015 86,100 15,117 1518 223,783 149,277 59,395]; [2261 25,213 24,221 27,526 89,397 13,926 1524 233,533 131,752 61,636]; 44%, +24%, +46%, +12%, +20%, 26%, +1.3%, +19%, +34%, +13.4% (c) [920 23,202 51,593 21,697 78,402 8988 1445 266,505 65,073 93,160]

Chapter 7 1. 7.

9. 11. 13. 15. 19. 23. 25. 27. 29. 31. 33. 35. 37. 41. 43.

47. 49. 53. 55. 57. 59. 61. 63. 67.

(a) Continuous-time, continuous-space (b) continuous-time, discrete-space (c) discrete-time, continuousspace (d) discrete-time, discrete-space (b) No: at time t ¼ .25, x0(.25) ¼ cos(π/2) ¼ 0 and x1(.25) ¼ cos(π/2) ¼ 0 (c) X(0) ¼ 1 with probability .8 and +1 with probability .2; X(.5) ¼ +1 with probability .8 and 1 with probability .2 (a) discrete-space (c) Xn ~ Bin(n, 18/38) (a) 0 (b) 1/2 CXX(t, s) ¼ Var(A)cos(ω0t + θ0)cos(ω0s + θ0), RXX(t, s) ¼ v02 + v0E[A][cos(ω0t + θ0) + cos (ω0s + θ0)] + E[A2]cos(ω0t + θ0)cos(ω0s + θ0) (b) N(s) > 0, because covariance > 0 (c) ρ ¼ e2 (d) Gaussian, mean 0, variance 1.73 (a) μS(t) + μN(t) (b) RSS(t, s) + μS(t)μN(s) + μN(t)μS(s) + RNN(t, s) (c) CSS(t, s) + CNN(t, s) (d) σ 2S ðtÞ þ σ 2N ðtÞ (a) (1/2)sin(ω0(s t)) (b) not orthogonal, not uncorrelated, not independent (a) μV (b) E[V2] + (A02/2)cos(ω0τ) (c) yes (a) yes (b) no (c) yes (d) yes no μA + μB, CAA(τ) + CAB(τ) + CBA(τ) + CBB(τ), yes (a) yes, because its autocovariance has periodic components (b) 42 (c) 50cos(100πτ) + 8cos(600πτ) + 49 (d) 107 (e) 58 yes: both the time average and ensemble average are 0 CXX(τ)/CXX(0) 2π (a) .0062 (b) 75 þ 25 sin 365 ð59 150Þ (c) 16δ[n m] (d) no, and it shouldn’t be (a) 18n/38, 360n/1444, 360 min(m, n)/1444, (360 min(m, n) + 324mn)/1444 (b) 10n/38, 36,000n/1444, 36,000 min(m, n)/1444, (36,000 min(n, m) + 100mn)/1444 (c) .3141 (a) μX (b) 14 ð2CXX ½m n þ CXX ½m n þ 1 þ CXX ½m n 1Þ (c) yes (d) (CXX[0] + CXX[1])/2 μ (c) 1α (d) α1ασ2 (e) yes (f) αk (a) .0993 (b) .1353 (c) 2 (a) .0516 (b) 1 ∑ x ¼ 075e 5050x/x ! (c) .9179 (d) 6 s (e) .8679 k/λ mn 2

(a) .0911 (b) e

3ðtsÞ ½3ðtsÞnm

ðnmÞ!

e pλt fY( y) ¼ 2λe λy(1 e λy) for y > 0 (a) .0492 (b) .00255 (continued)

Answers to Odd-Numbered Exercises

71. 73. 75. 77. 79. 81. 83. 87.

89.

91. 93. 95.

99. 101.

635

pmf: N(t) ¼ 0 or 1 with probability 1/2 each for all t; mean ¼ .5, variance ¼ .25, CNN(τ) ¼ .25e2λ|τ|, RNN(τ) ¼ .25 + .25e2λ|τ| (a) .0038 (b) .9535 (a) yes (b) .3174 (c) .3174 (d) .4778 π (a) E½XðtÞ ¼ 80 þ 20 cos 12 ðt 15Þ , Var(X(t)) ¼ .2t (b) .1251 (c) .3372 (d) .1818 (a) .3078 (b) .1074 (a) .1171 (b) .6376 (c) .0181, .7410 (a) yes (b) E[X(t)] ¼ 0, RXX(t, s) ¼ (N0/2)min(t, s), no (a) 0 ¼ empty, 1 ¼ a person in stage 1, and 2 ¼ a person in stage 2; q0 ¼ λ, q1 ¼ λ1, q2 ¼ λ2; q02 ¼ q21 ¼ q10 ¼ 0; q01 ¼ λ, q12 ¼ λ1, q20 ¼ λ2 (b) π ¼ (6/11, 2/11, 3/11) (c) π ¼ (6/11, 3/11, 2/11) (d) π ¼ (1/7, 2/7, 4/7) (a) q0 ¼ λ, q1 ¼ λ1, q2 ¼ λ2; q02 ¼ q10 ¼ 0; q01 ¼ λ, q12 ¼ λ1, q20 ¼ .8λ2, q21 ¼ .2λ2 (b) π ¼ (24/49, 10/49, 15/49) (c) π ¼ (24/49, 15/49, 10/49) (d) π ¼ (2/17, 5/17, 10/17) (e) 1.25(1/λ1 + 1/λ2) qi ¼ iβ, qi,i+1 ¼ iβ for i ¼ 1, . . ., N 1 qi,i+1 ¼ λ for i 0, qi,i1 ¼ iβ for i 1, qi ¼ λ + iβ for i 1 α1 β 1 α1 β 0 α0 β 1 α0 β 0 π00 ¼ , π01 ¼ , π10 ¼ , π11 ¼ , where Σ ¼ α1β1 + α1β0 + α0β1 + α0β0; Σ Σ Σ Σ α0 β 0 1 π11 ¼ 1 α1 β 1 þ α1 β 0 þ α0 β 1 þ α0 β 0 (a) 0 (b) CXX(t, s) ¼ 1 if floor(t) ¼ floor(s), ¼ 0 otherwise n X cos ðωk τÞ, yes (a) 0, (1/3)cos(ωkτ) (b) 0, 13 k¼1

103.

(a) 0 (b) 12

n X

cos ðωk τÞ pk (c) yes

k¼1

105.

107. 109. 111.

(a) Sn denotes the total lifetime of the machine through its use of the first n rotors. (b) μS[n] ¼ 125n; σ 2S [n] ¼ 15, 625n; CSS[n, m] ¼ 15,625 min(n, m); RSS[n, m] ¼ 15,625[min(n, m) + nm] (c) .5040 Yes (a) e λt (b) e λt(1 + λt) (c) e λε 10ð1 eαt0 Þ 2λ (b) ð1 eαt0 Þ (a) αt0 α

Chapter 8 1. 3. 5. 7. 9.

F {RXX(τ)} ¼ sinc( f ), which is not 0 for all f

pﬃﬃ π2 f 2 (b) 240.37 W (c) 593.17 W (a) 250δðf Þ þ 2π exp 4 10 6 (a) 112,838 W (b) 108,839 W (c) R ðτÞ ¼ 200p, ﬃﬃ000 exp 1012 τ2 XX

π

(a) N0B (b) N0Bsinc(2Bτ) 2λA2

(a) A02e 2λ|τ| (b) λ2 þð2πf0 Þ2 (c) A02 (d)

2A20 π

arctanð2πÞ

11.

(a) 100(1 + e1) 136.8 W (b) 1þ200 ½1 þ cos ð2πf Þ (c) 126.34 W ð2πf Þ2

13. 15. 17. 19. 21.

μW(t) ¼ 0, RWW(τ) ¼ 2RXX(τ) RXX(τ d ) RXX(τ + d ), SWW( f ) ¼ 2SXX( f )[1 cos(2πfd)] (a) Yes (b) Yes (c) SZZ( f ) ¼ SXX( f ) + SYY( f ) (b) SZZ( f ) ¼ SXX( f ) ★ SYY( f ) No, because PN ¼ 1 2 2 (a) SXX( f ) ¼ E[A2]SYY( f ) (b) Scc XX ( f ) ¼ E[A ]SYY( f ) (E[A]μY) δ( f ) (c) Yes; our “engineering interpretation” of the elements of a psd are not valid for non-ergodic processes (a) 2400sin(120,000τ) (b) 2400 W (c) 40/(40 + j2πf ) (d) 32/(1600 + (2πf )2) for |f| 60 kHz (e) 0.399997 W (continued)

23.

636

25. 27.

29. 33. 35. 37. 41. 43. 45. 47. 49.

Answers to Odd-Numbered Exercises

(a) 0 (b) (1 ej2πf)/( j2πf ) (c) (N0/2)sinc2( f ) (d) N0/2 1 1 (a) 100δðf Þ þ 1þð50 (b) 125 W (c) ð4þj2πf , 2πf Þ2 Þ2 ð16þð2πf Þ2 Þ2 h i 1 (d) 100δðf Þ þ 1þð50 2 (e) 0.461 W 2πf Þ2 ð16þð2πf Þ2 Þ 0α (a) (N0/2)e2α|f| (b) 4α22N þ4π2 τ2 (c) N0/2α

2 2 2 N0 (a) 2N0π2f2rect( f/2B) (b) πτ 3 2π B τ sin ð2πBτ Þ þ 2πBτ cos ð2πBτ Þ sin ð2πBτ Þ (c) 4N0π2B3/3 (a) RXX(τ) RXX(τ) ★ h(τ) RXX(τ) ★ h(τ) + RXX(τ) ★ h(τ) ★ h(τ) (b) SXX( f )|1 H( f )|2

(a) 1.17 MW (b) 250, 000δðf Þ þ 60, 000½δðf 35, 000Þ þ δðf þ 35, 000Þ þ 8rect 100,f 000 (c) same as part

(b) (d) 1.17 MW (e) 5000 W (f) 3000 W (g) SNRin ¼ 234, SNRout ¼ 390 1 α2 2 1 þ α 2α cos ð2πFÞ 1 e20λ 1 þ e20λ 2e10λ cos ð2πFÞ π2 π2 1 þ trið2FÞ 8 4 (b) Psinc(k/2) 1 ej2πFM 2M k (a) Yn ¼ (Xn M + 1 + . . . + Xn)/M (b) (c) σ for |k| ¼ 0, 1, . . ., M 1 and zero 2 j2πF M ð1 e Þ M otherwise

References

Ambardar, Ashok, Analog and Digital Signal Processing (2nd ed.), Brooks/Cole Publishing, Pacific Grove, CA, 1999. A thorough treatment of the mathematics of signals and systems, including both discrete- and continuous-time structures. Bury, Karl, Statistical Distributions in Engineering, Cambridge University Press, Cambridge, England, 1999. A readable and informative survey of distributions and their properties. Crawley, Michael, The R Book (2nd ed.), Wiley, Hoboken, NJ, 2012. At more than 1000 pages, carrying it may give you lower back pain, but it obviously contains a great deal of information about the R software. Gorroochurn, Prakash, Classic Problems of Probability, Wiley, Hoboken, NJ, 2012. An entertaining excursion through 33 famous probability problems. Davis, Timothy A., Matlab Primer (8th ed.), CRC Press, Boca Raton, FL, 2010. A good reference for basic Matlab syntax, along with extensive catalogs of Matlab commands. DeGroot, Morris and Mark Schervish, Probability and Statistics (4th ed.), Addison-Wesley, Upper Saddle River, NJ, 2012. Contains a nice exposition of subjective probability and an introduction to Bayesian methods of inference. Devore, Jay and Ken Berk, Modern Mathematical Statistics with Applications (2nd ed.), Springer, New York, 2011. A comprehensive text on statistical methodology designed for upper-level students. Durrett, Richard, Elementary Probability for Applications, Cambridge Univ. Press, London, England, 2009. A very brief (254 pp.) introduction that still finds room for some interesting examples. Johnson, Norman, Samuel Kotz, and Adrienne Kemp, Univariate Discrete Distributions (3rd ed.), Wiley-Interscience, New York, 2005. An encyclopedia of information on discrete distributions. Johnson, Norman, Samuel Kotz, and N. Balakrishnan, Continuous Univariate Distributions, vols. 1–2, Wiley, New York, 1993. These two volumes together present an exhaustive survey of various continuous distributions. Law, Averill, Simulation Modeling and Analysis (4th ed.), McGraw-Hill, New York, 2006. An accessible and comprehensive guide to many aspects of simulation. Meys, Joris, and Andrie de Vries, R for Dummies, For Dummies (Wiley), New York, 2012. Need we say more? Mosteller, Frederick, Robert Rourke, and George Thomas, Probability with Statistical Applications (2nd ed.), AddisonWesley, Reading, MA, 1970. A very good precalculus introduction to probability, with many entertaining examples; especially good on counting rules and their application. Nelson, Wayne, Applied Life Data Analysis, Wiley, New York, 1982. Gives a comprehensive discussion of distributions and methods that are used in the analysis of lifetime data. Olofsson, Peter, Probabilities: The Little Numbers That Rule Our Lives, Wiley, Hoboken, NJ, 2007. A very non-technical and thoroughly charming introduction to the quantitative assessment of uncertainty. Peebles, Peyton, Probability, Random Variables, and Random Signal Principles (4th ed.), McGraw-Hill, New York, 2001. Provides a short introduction to probability and distributions, then moves quickly into signal processing with an emphasis on practical considerations. Includes some Matlab code. Ross, Sheldon, Introduction to Probability Models (9th ed.), Academic Press, San Diego, CA, 2006. A good source of material on the Poisson process and generalizations, Markov chains, and other topics in applied probability. Ross, Sheldon, Simulation (5th ed.), Academic Press, San Diego, CA, 2012. A tight presentation of modern simulation techniques and applications. Taylor, Howard M. and Samuel Karlin, An Introduction to Stochastic Modeling (3rd ed.), Academic Press, San Diego, CA, 1999. More sophisticated than our book, but with a wealth of information about discrete and continuous time Markov chains, Poisson processes, Brownian motion, and queueing systems. Winkler, Robert, Introduction to Bayesian Inference and Decision (2nd ed.), Probabilistic Publishing, Sugar Land, Texas, 2003. A very good introduction to subjective probability.

637

Index

A Accept–reject method, 224–227, 334 Ambardar, Ashok, 576, 583 Autocorrelation/autocovariance functions, 499–502 B Band-limited white noise, 571 Bandpass filter, 581 Bandstop filter, 581 Bayesian inference comments on, 413–414 conjugation, 414 credibility interval, 413 posterior distribution inferences from, 413 of parameter, 410–412 prior distribution, 409–410 Bayes’ theorem, 35 Berk, Ken, 293, 381, 405, 414 Bernoulli random sequence, 518 Bernoulli random variable, 68 Beta distributions, 201–202 Binomial CDF, 597–601 Binomial distribution, 95–97 approximating, 180–182 computing, 99–101 mean and variance of, 101–102 negative, 117–120 poisson distribution comparing with, 108 random variable, 97–99 with software, 102 standard error, 102 Bivariate normal distribution, 309–311 conditional distributions, 311 multivariate normal distribution, 312 regression to mean, 312 simulating, 336–338 with software, 313 Brownian motion process, 493, 536–538 with drift, 541 geometric, 541 as limit, 538 properties of, 538–540 variations, 540

C Carlton, Matthew, xxiv CDF See Cumulative distribution function (CDF) Central limit theorem (CLT), 293–297 applications of, 297–298 definition, 293 Chambers, John, 212 Chapman–Kolmogorov Equations, 431–436 Chebyshev, Pafnuty, 89–90 Chebyshev’s inequality, 89–90 CI See Confidence interval (CI) CLT See Central limit theorem (CLT) Combinations, 22–25 Conditional distributions, 277–279 bivariate normal distribution, 311 and independence, 279–280 Conditional expectation, 277–281 Conditional mean, 280 Conditional probability, 29–30 Bayes’ theorem, 35–36 definition, 30–32 density/mass function, 277 Law of Total Probability, 34–35 Markov chains, 427 multiplication rule, 32–34 Confidence interval (CI) bootstrap confidence interval, 381 large-sample for μ, 380–381 for μ with confidence level, 379 for normal population mean, 376–380 for population mean, 375–376 population proportion, 401–405 score, 401 software for calculation, 381–382 statistical inference, 351 t distributions family, 377 properties, 377 Continuous distribution, 619 beta distributions, 201–202 lognormal distributions, 199–201 mean value, 162 percentiles of, 156–157 variance, 164

639

640 Continuous distribution (cont.) Weibull distributions, 196–199 Continuous random variables, 221 accept–reject method, 224–226 built-in simulation packages for Matlab and R, 227 inverse CDF method, 221–224 PDF for, 148–152 precision of simulation results, 227 Correlation, 255–259 vs. causation, 262 coefficient, 260 Counting processes, 603 Covariance, 255–259 matrix, 313 Crawley, Michael J., xviii Credibility interval, 413 Cross-correlation/covariance function, 502 Cumulative distribution function (CDF), 75–79, 152–154 binomial, 597–602 inverse method, 133–134, 221–224 PDF and, 147–148 poisson, 602–603 probability density functions and, 147–148 standard normal, 603–604 step function, 76 Cuthbert, Daniel, 211 D Davis, Timothy A., xviii De Morgan, Augustus, 5 DeGroot, Morris, 486 Delta function, 610–611 De Morgan’s laws, 5 Devore, Jay L., xxiv, 293, 377, 381, 405, 414, 482 Diaconis, Persi, xxiv Dirac delta function, 610 Discrete distributions, 615–616 Discrete random variable, 147 probability distributions for, 71–74 simulation of, 131–134 Discrete sequences, 518–519 Discrete-time Fourier transform (DTFT), 612–613 Discrete-time random processes, 516–519 Discrete-time signal processing discrete-time Fourier transform, 612 random sequences and LTI systems, 591–593 and sampling, 593–594 E Engineering functions, 609–610 Error(s) estimated standard, 357 in hypothesis testing, 392–395 simulation of random events, 55 standard, 101 of mean, 69, 291 point estimation, 357 Type I, 393–395

Index Type II, 393–395 Estimated standard error, 357 Estimators, 354–356 Event(s) complement, 4 compound, 3 definition, 3 De Morgan’s laws, 4 dependent, 43 disjoint, 5 independent, 43 intersection, 4 mutually exclusive, 5 probability of, 7 relations from set theory, 4–5 relative frequency, 10 simple, 3 simulation, 50 estimated/standard error, 55 precision, 55–56 RNG, 51–55 union, 4 venn diagrams, 6 Expected value, 83–85, 162–166, 255–256 of function, 86–87 linearity of, 87 properties, 256–257 Experiment definition, 1 sample space of, 2–3 Exponential distribution, 187–190 and gamma distribution, 524–527 F Fermat, Pierre de, xvii Finite population correction factor, 117 Fisher, R.A., 366 Fourier transform, 611–612 discrete-time, 589, 612–613 G Galton, Francis, 311 Gamma distribution, 190–192 calculations with software, 193 exponential and, 524–526 incomplete, 191 MGF, 193 standard, 191 Gates, Bill, 352 Gaussian/normal distribution, 172 binomial distribution, approximating, 183 calculations with software, 182 and discrete populations, 179–180 non-standardized, 175–178 normal MGF, 178–180 standard, 173–175 Gaussian processes, 535–536 Gaussian white noise, 570 Geometric distributions, 75

Index negative, 117––120 Geometric random variable, 119 Gosset, William Sealy, 378 Gosset’s theorem, 378 H Highpass filter, 581 Hoaglin, David, 373 Hypergeometric distribution, 114–117 Hypothesis testing about population mean, 386 alternative, 387 errors in, 392–395 null, 387 population proportion, 403–405 power of test, 392–395 P-values and one-sample t test, 387–391 significance level, software for, 395–396 statistical, 386 test procedures, 386–388 about population mean μ, 388–389 test statistic, 389 Type I error, 392–395 Type II error, 392–395 I Ideal filters, 580–583 Impulse function, 610 Inclusion-exclusion principle, 13 Incomplete gamma function, 603 Independence, 43–44 events, 44–47 mutually, 46 Interval estimate, 376 Inverse CDF method, 221–224 Inverse DTFT, 612 Inverse Fourier transform, 611 J Jointly wide-sense stationary, 508 Joint probability density function, 241–245 Joint probability distributions, 239 bivariate normal distribution, 309–311 conditional distributions, 311–312 multivariate normal distribution, 312 regression to mean, 312 with software, 313 conditional distributions, 277–279 and independence, 279–280 conditional expectation, 277–279 and variance, 280–281 correlation, 255–256, 259–262 vs. causation, 262 coefficient, 260 covariance, 255–259 dependent, 245 expected values, 255–256 properties, 256–257

641 independent random variables, 245–246 joint PDF, 241–245 joint PMF, 240–241 joint probability table, 240 Law of Large Numbers, 299–300 Laws of Total Expectation and Variance, 281–286 limit theorems (see Limit theorems) linear combinations, properties, 264–277 convolution, 268 moment generating functions, 270–272 PDF of sum, 268–270 theorem, 265 marginal probability density functions, 243 marginal probability mass functions, 241 multinomial distribution, 247 multinomial experiment, 247 order statistics, 326 distributions of Yn and Y1, 326–328 ith order statistic distribution, 328–329 joint distribution of n order statistics, 329–331 of random variables, 246–249 reliability (see Reliability) simulations methods (see Simulations methods) transformations of variables, 302–307 Joint probability mass function, 240–241 K Kahneman, Daniel, xxiii Karlin, Samuel, 449, 450 L Law of Large Numbers, 299–300 Law of Total Probability, 34–35 Laws of Total Expectation, 281–286 Laws of Variance, 281–286 Likelihood function, 368 Limit theorems CLT, 293–297 applications of, 297–298 independent and identically distributed, 290 random samples, 290–293 standard error of mean, 291 Linear combinations, properties, 264–277 convolution, 268 moment generating functions, 270–272 PDF of sum, 268–270 theorem, 265 Linear, time-invariant (LTI) system, 576–577 butterworth filters, 583 ideal filters, 580–583 impulse response, 576 power signal-to-noise ratio, 584 random sequences and, 591–593 signal plus noise, 583–586 statistical properties of, 577–580 transfer function, 576 Lognormal distributions, 199–201 Lowpass filter, 581, 582 LTI system See Linear, time-invariant (LTI) system

642 M Marginal probability density functions, 243 Marginal probability mass functions, 241 Markov, Andrey A., 423 Markov chains, 423 with absorbing states, 457–458 canonical form, 467 Chapman–Kolmogorov Equations, 431–436 conditional probabilities, 426 continuous-time, 425 discrete-space, 424 discrete-time, 425 eventual absorption probabilities, 466–469 finite-state, 424 initial distribution, specifying, 440–443 initial state, 424 irreducible chains, 453–454 mean first passage times, 465–466 mean time to absorption, 461–465 one-step transition probabilities, 426 periodic chains, 453–454 process of, 544 birth and death process, 551 continuous-time, 544–546 explicit form of transition matrix, 554–555 generator matrix, 552 infinitesimal parameters, 548 instantaneous transition rates, 547 long-run behavior, 552–554 sojourn times, transition and, 548–551 time homogeneous, 544 transition probabilities, 546 property, 423–428 regular, 446–448 simulation, 472–480 states, 424 state space, 424 steady-state distribution and, 450–451 Steady-State Theorem, 448–449 time-homogeneous, 425 time to absorption, 458–461 transition matrix, 431–432 probabilities, 426, 432–436 Matlab probability plots in, 213 and R commands, xviii, 619 simulation implemented in, 134–135 Maximum likelihood estimation (MLE), 366–373 Mean and autocorrelation functions, 496–504 first passage times, 465–466 recurrence time, 450 and variance functions, 496–499 Mean square sense, 512 value, 509 Mean time to absorption (MTTA), 461–465 Mean value See Expected value Memoryless property, 189

Index Mendel, Gregor, 442 Minimum variance unbiased estimator (MVUE), 359 Moment generating functions (MGF), 125–126, 166–168 of common distributions, 128–129 gamma distributions, 193 normal, 178–179 obtaining moments from, 127–128 Moments, 123–125 from MGF, 127–128 skewness coefficient, 124 MTTA See Mean time to absorption (MTTA) Multinomial distribution, 247 Multinomial experiment, 247 Multiplication rule, 32–34 Multivariate normal distribution, 312 N Negative binomial distributions alternative definition, 120 and geometric distributions, 117–120 Notch filter See Bandstop filter Nyquist rate, 594 Nyquist sampling theorem, 594 O Olofsson, Peter, xxv o(h) notation, 610 Order statistics, 326 distributions of Yn and Y1, 326–328 ith order statistic distribution, 328–329 joint distribution of the n order statistics, 329–331 P Pascal, Blaise, xvii PDF See Probability density function (PDF) Peebles, Peyton, 583 Periodic chains, 453–454 Permutations, 20–22 PMF See Probability mass function (PMF) Point estimation, 352 accuracy and precision, 357–359 estimated standard error, 357 estimates and estimators, 354–356 parameter, 352 sample mean, 353 sample median, 353 sample range, 353 sample standard deviation, 353 sample variance, 353 standard error, 357 statistic, 352 unbiased estimator, 357 Poisson cumulative distribution function, 600 Poisson distribution, 107 with binomial distributions, 108 as limit, 107–110 mean and variance, 110 poisson process, 110–111 with software, 111 Poisson process, 110–111, 522–524

Index alternative definition, 528–530 combining and decomposing, 526–528 exponential and gamma distributions, 524–526 independent increments, 522 intensity function, 530 non-homogeneous, 530–531 rate, 522 spatial, 530 stationary increments, 522 telegraphic process, 531–532 Population proportion confidence intervals, 401–403 hypothesis testing, 403–405 score confidence interval, 401 software for inferences, 405 Power spectral density (PSD), 563 average/expected power, 564 cross-power spectral density, 572 in frequency band, 569–570 partitioning, 567–569 properties, 566–569 for two processes, 572–573 white noise processes, 570–572 Wiener–Khinchin Theorem, 565 Precision, 135–137 Principle of Unbiased Estimation, 359 Probability Addition Rule, 12–13 application, xviii to business, xix to engineering and operations research, xx–xxii to finance, xxii–xxiii to life sciences, xix–xx axioms, 7–9 Complement Rule, 11–12 conditional, 29–30 Bayes’ theorem, 35–37 definition, 30–32 Law of Total Probability, 34–35 multiplication rule, 32–34 counting methods combinations, 22–25 fundamental principle, 18–19 k-tuple, 19 permutations, 20–22 tree diagrams, 19–20 coupon collector problem, xviii definition, 1 De Morgan’s laws, 4 determining systematically, 13 development of, xvii events, 3, 7 of eventual absorption, 466–469 in everyday life, xxiii–xxvii experiment, 1 game theory, xvii inclusion–exclusion principle, 13 independence, 43–44 events, 44–47 mutually, 46

643 interpretations, 7–11 outcomes, 14 properties, 7–9, 11–13 relations from set theory, 4–5 sample spaces, 1–2 simulation of random events, 51 estimated/standard error, 55 precision, 55–56 RNG, 51–55 software in, xviii transition, 432–436 vectorization, 54 Probability density function (PDF) continuous distribution, percentiles of, 156–157 for continuous variables, 148–152 and cumulative distribution functions, 147–148 joint, 241–245, 334–336 marginal PDF, 243 median of, 156 obtaining f(x) from F(x), 155–156 symmetric, 157 uniform distribution, 150 using F(x) to compute probabilities, 154–155 Probability distributions continuous distributions, 617–619 cumulative, 75–78 discrete distributions, 615–616 for discrete random variables, 71–74 family of, 74 geometric distribution, 75 Matlab and R commands, 619 parameter of, 74–75 Probability histogram, 74 Probability mass function (PMF), 72, 240–241 joint, 332–334 marginal PMF, 241 view of, 78–79 Probability plots, 205–209 beyond normality, 211–212 departures from normality, 209–211 location and scale parameters, 211 in Matlab and R, 213 normal, 208 sample percentiles, 205–206 shape parameter, 211 PSD See Power spectral density (PSD) P-values, 389–392 R Random noise, 489 Random number generator (RNG), 51–55 Random process, 489 autocovariance/autocorrelation functions, 499–502 classification, 493 continuous-space process, 493 continuous-time processes, 493 discrete sequences, 518–519 discrete-space process, 493 discrete-time, 493, 516–519 ensemble, 490

644 Random process (cont.) independent, 502 joint distribution of, 502 mean and variance functions, 496–499 orthogonal, 502 poisson process (see Poisson process) random sequence, 493 regarded as random variables, 493–494 sample function, 490 stationary processes, 504–508 types, 489–492 uncorrelated, 502 WSS (see Wide-sense stationary (WSS) processes) Random variable (RV), 67 Bernoulli, 68 binomial distribution, 97–99 continuous, 70 definition, 68 discrete, 70 transformations of, 216–220 types, 69–70 Random walk, 518 R commands Matlab and, xviii, 619 probability plots in, 213 simulation implemented in, 134–135 Regular Markov chains, 446–448 Reliability, 315 function, 315–317 hazard functions, 321–323 mean time to failure, 320 series and parallel designs, 317–319 simulations methods for, 338–339 RNG See Random number generator (RNG) Ross, Sheldon, 227, 428 RV See Random variable (RV) S Sample mean definition, 136 point estimation, 353 Sample median, 205, 326, 353 Sample space, 1–2 Sample standard deviation, 166, 353 Sample variance, 353 Sampling interval, 593 random sequences and, 593–594 rate, 594 Score confidence interval, 401 SD See Standard deviation (SD) Set theory, 4–5 Signal processing discrete-time (see Discrete-time signal processing) LTI systems, random processes and, 576–577 ideal filters, 580–583 signal plus noise, 583–586 statistical properties of, 577–580 power spectral density, 563–566

Index power in frequency band, 569–570 for processes, 572–573 properties, 566–569 white noise processes, 570–572 Simulation bivariate normal distribution, 336–338 of discrete random variables, 131–134 implemented in R and Matlab, 134–135 of joint probability distributions/system reliability, 332–339 mean, standard deviation, and precision, 135–137 for reliability, 338–339 standard error of mean, 136 values from joint PDF, 334–336 values from joint PMF, 332–334 Standard deviation (SD), 135–137, 164 Chebyshev’s inequality, 89–90 definition, 88 function, 496 Standard error, 102 of mean, 136, 291 point estimation, 357 Standard normal CDF, 601–602 Standard normal random variable, 173–175 Stationary processes, 504–508 definition, 505 ergodic processes, 511–513 Statistical inference Bayesian inference (see Bayesian inference) Bayesian method, 352 CI (see Confidence interval (CI)) hypothesis testing (see Hypothesis testing) maximum likelihood estimation, 366–373 point estimation (see Point estimation) population proportion, inferences for confidence intervals, 401–403 hypothesis testing, 403–405 score confidence interval, 401 software for inferences, 405 Steady-state distribution, 449–451 Steady-state probabilities, 451–453 Steady-State Theorem, 448–449 Step function, 76 Stochastic processes See Random process T Taylor, Howard M., 449, 450 t distribution critical values for, 604 family, 377 properties, 377 tail areas of, 605–607 Thorp, Edward O., xvii, xxii Transformations of random variable, 216–220 Transition matrix, 431–432 Transition probability multi-step, 432–436 one-step, 426 Tree diagrams, 19–20

Index Trigonometric identities, 609 t test, one-sample, 389–392 Tversky, Amos, xxiii U Uncorrelated random processes, 502 Uniform distribution, 150 V Variance Chebyshev’s inequality, 89–90 conditional expectation and, 280–281 definition, 88 functions, 496–499 Laws of Total Expectation and, 281–286 mean-square value, 90 properties, 90–91 shortcut formula, 90–91 Venn diagram, 5 Volcker, Paul, xxiii W Weibull, Waloddi, 196 Weibull distributions, 196–199

645 White noise processes, 570–572 Wide-sense stationary (WSS) processes, 504–508 autocorrelation ergodic, 513 dc power offset, 511 definition, 506 ergodic processes, 511–513 mean ergodic, 512 mean square sense, 512 value, 508 properties, 508–511 time autocorrelation, 513 time average, 512–513 Wiener–Khinchin Theorem, 565, 572–573 Wiener process See Brownian motion process Winkler, Robert, 11 Wood, Fred, 211 WSS processes See Wide-sense stationary (WSS) processes Z z interval, one-proportion, 401 z test, one-proportion, 403