Chapter 5: Probability

Similar documents
Chapter 6: Random Variables and Probability Distributions

Theoretical Foundations

Homework: Due Wed, Nov 3 rd Chapter 8, # 48a, 55c and 56 (count as 1), 67a

Unit 04 Review. Probability Rules

Counting Basics. Venn diagrams

ME3620. Theory of Engineering Experimentation. Spring Chapter III. Random Variables and Probability Distributions.

Section 7.5 The Normal Distribution. Section 7.6 Application of the Normal Distribution

Statistics for Business and Economics

Chapter 3 - Lecture 5 The Binomial Probability Distribution

Statistics and Probability

Module 4: Probability

ECON 214 Elements of Statistics for Economists 2016/2017

Homework: Due Wed, Feb 20 th. Chapter 8, # 60a + 62a (count together as 1), 74, 82

(c) The probability that a randomly selected driver having a California drivers license

MANAGEMENT PRINCIPLES AND STATISTICS (252 BE)

Central Limit Theorem, Joint Distributions Spring 2018

Chapter 7. Random Variables

No, because np = 100(0.02) = 2. The value of np must be greater than or equal to 5 to use the normal approximation.

The normal distribution is a theoretical model derived mathematically and not empirically.

continuous rv Note for a legitimate pdf, we have f (x) 0 and f (x)dx = 1. For a continuous rv, P(X = c) = c f (x)dx = 0, hence

Standard Normal, Inverse Normal and Sampling Distributions

Lecture 23. STAT 225 Introduction to Probability Models April 4, Whitney Huang Purdue University. Normal approximation to Binomial

Part V - Chance Variability

Stat511 Additional Materials

Lecture 9. Probability Distributions. Outline. Outline

Lecture 9. Probability Distributions

4 Random Variables and Distributions

Chapter 11. Data Descriptions and Probability Distributions. Section 4 Bernoulli Trials and Binomial Distribution

MA : Introductory Probability

Bernoulli and Binomial Distributions

MAKING SENSE OF DATA Essentials series

Business Statistics 41000: Probability 4

MATH 446/546 Homework 1:

Normal distribution Approximating binomial distribution by normal 2.10 Central Limit Theorem

Lecture 6 Probability

The topics in this section are related and necessary topics for both course objectives.

Business Statistics 41000: Probability 3

Chapter 8. Variables. Copyright 2004 Brooks/Cole, a division of Thomson Learning, Inc.

Probability & Sampling The Practice of Statistics 4e Mostly Chpts 5 7

Experimental Probability - probability measured by performing an experiment for a number of n trials and recording the number of outcomes

Probability Review. Pages Lecture 1: Probability Theory 1 Main Ideas 2 Trees 4 Additional Examples 5

Probability: Week 4. Kwonsang Lee. University of Pennsylvania February 13, 2015

Data that can be any numerical value are called continuous. These are usually things that are measured, such as height, length, time, speed, etc.

AP STATISTICS FALL SEMESTSER FINAL EXAM STUDY GUIDE

Inverse Normal Distribution and Approximation to Binomial

= 0.35 (or ˆp = We have 20 independent trials, each with probability of success (heads) equal to 0.5, so X has a B(20, 0.5) distribution.

Probability Distributions II

E509A: Principle of Biostatistics. GY Zou

STAT 201 Chapter 6. Distribution

Unit2: Probabilityanddistributions. 3. Normal distribution

The Normal Probability Distribution

Basic Data Analysis. Stephen Turnbull Business Administration and Public Policy Lecture 4: May 2, Abstract

CHAPTER 8 PROBABILITY DISTRIBUTIONS AND STATISTICS

Probability and Sample space

7. For the table that follows, answer the following questions: x y 1-1/4 2-1/2 3-3/4 4

x is a random variable which is a numerical description of the outcome of an experiment.

PROBABILITY DISTRIBUTIONS. Chapter 6

NORMAL RANDOM VARIABLES (Normal or gaussian distribution)

MATH 118 Class Notes For Chapter 5 By: Maan Omran

Probability. An intro for calculus students P= Figure 1: A normal integral

Elementary Statistics Lecture 5

Density curves. (James Madison University) February 4, / 20

4.1 Probability Distributions

Sampling Distribution

TOPIC: PROBABILITY DISTRIBUTIONS

Event p351 An event is an outcome or a set of outcomes of a random phenomenon. That is, an event is a subset of the sample space.

5.2 Random Variables, Probability Histograms and Probability Distributions

Binomial Random Variable - The count X of successes in a binomial setting

Statistical Methods in Practice STAT/MATH 3379

Figure 1: 2πσ is said to have a normal distribution with mean µ and standard deviation σ. This is also denoted

MATH 264 Problem Homework I

Lecture 8. The Binomial Distribution. Binomial Distribution. Binomial Distribution. Probability Distributions: Normal and Binomial

Review. Binomial random variable

MLLunsford 1. Activity: Central Limit Theorem Theory and Computations

CHAPTER 6 Random Variables

Version A. Problem 1. Let X be the continuous random variable defined by the following pdf: 1 x/2 when 0 x 2, f(x) = 0 otherwise.

Probability is the tool used for anticipating what the distribution of data should look like under a given model.

Discrete Random Variables; Expectation Spring 2014

7.1: Sets. What is a set? What is the empty set? When are two sets equal? What is set builder notation? What is the universal set?

5.1 Personal Probability

Probability Theory. Probability and Statistics for Data Science CSE594 - Spring 2016

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Binomial Distribution. Normal Approximation to the Binomial

Consumer Guide Dealership Word of Mouth Internet

Unit 5: Sampling Distributions of Statistics

Unit 5: Sampling Distributions of Statistics

Binomial and normal distributions

Distributions and Intro to Likelihood

The Binomial Probability Distribution

Econ 6900: Statistical Problems. Instructor: Yogesh Uppal

Chapter 4 and 5 Note Guide: Probability Distributions

Random Variables Handout. Xavier Vilà

Review. What is the probability of throwing two 6s in a row with a fair die? a) b) c) d) 0.333

Section Random Variables and Histograms

Lecture 12. Some Useful Continuous Distributions. The most important continuous probability distribution in entire field of statistics.

5.4 Normal Approximation of the Binomial Distribution

Probability Distributions for Discrete RV

Name Period AP Statistics Unit 5 Review

Probability Review. The Practice of Statistics, 4 th edition For AP* STARNES, YATES, MOORE

Binomial Random Variables. Binomial Random Variables

Transcription:

Chapter 5: These notes reflect material from our text, Exploring the Practice of Statistics, by Moore, McCabe, and Craig, published by Freeman, 2014. quantifies randomness. It is a formal framework with a very specific vocabulary and notation. Imagine an experiment with a specific set of outcomes (say, flipping a fair coin twice). S is the sample space of all possible outcomes. Subsets of S are called events and are denoted with letters like A and B. The empty set, φ, is the event that contains no outcomes. Two events are disjoint if their intersection is empty. The Russian mathematician Kolmogorov helped to clarify the essential properties of a probability function, P. P(S) = 1 for the entire sample space S 0 P(A) 1 for any event A S P( n i=1 A i) = n i=1 P(A i) for disjoint events A i First examples : flip a coin, flip three coins, roll a die, roll two dice If you roll a die once the result is completely uncertain, because the individual outcomes are equally likely. But now begin to methodically roll the die and after each toss calculate the total number of 6 s observed so far divided by the total number of rolls at this point. Call this a cumulative proportion and graph these cumulative proportions for a large number of rolls of the die, say 100,000 rolls. A computer did this and displayed the following graph. In this particular simulation, the first ten rolls of the die produced the sequence 0001010010, where 1 means a 6 was rolled and 0 means something else appeared. Calculate the first ten cumulative sums for this short sequence and compare your results to the following chart. What is the height of the dotted red line? 0.30 0.25 0.20 p^n 0.15 0.10 0.05 0.00 1 10 100 1,000 10,000 100,000 n (number of rolls) Fig. Cumulative proportions of a 6 in 100,000 rolls of a fair die, from OpenIntro Statistics, chapter 2 Display discrete probabilities in a table Flip a fair coin outcome h t probability 0.5 0.5 Spring 2017 Page 1 of 12

Venn diagram A B Rules of Mutually exclusive events. A B = φ Unions. P(A B) = P(A) + P(B) P(A B). Complements. P(A c ) = 1 P(A). Independent events. P(A B) = P(A)P(B) when A and B are independent. Conditional probability. P(A B) = P(A B)/P(B) when P(B) 0 Intersections. P(A B) = P(A B)P(B) Spring 2017 Page 2 of 12

Contingency tables and conditional probabilities Vocabulary for diagnostic testing, S medical state present, P OS test positive : sensitivity P(P OS S), specificity P(NEG S c ), incidence P(S) Consider the Triple Blood Test for Down Syndrome (Agresti and Franklin, chapter 5, pp.232-233) Blood Test Status P OS NEG T otal D (Down) 48 6 54 D c (unaffected) 1307 3921 5228 T otal 1355 3927 5282 Calculate the following probabilities based on the figures in this study: sensitivity P(P OS D), specificity P(NEG D c ), incidence P(D) false positives P(P OS D c ), false negatives P(NEG D) An individual being tested would be most concerned about P(D P OS). What is this probability? Why is it so small? Hint: Calculate P(D c P OS). Again, an individual being tested would want to know P(D N EG). How would that probability compare to the a priori P(D)? Triple Blood Test POS NEG status unaffected Down blood test Spring 2017 Page 3 of 12

Using R to Compute Conditional Probabilities Construct a data frame named down to represent the Down Syndrome contingency table, and then use addmargins(down) to compute its row and column totals. down <- c(48, 1307, 6, 3921) dim(down) <- c(2, 2) dimnames(down) <- list(status=c("down", "unaffected"), "blood test"=c("pos", "neg")) down # blood test # status pos neg # down 48 6 # unaffected 1307 3921 addmargins(down) # blood test # status pos neg Sum # down 48 6 54 # unaffected 1307 3921 5228 # Sum 1355 3927 5282 Then prop.table(down, 1) will divide each row by its row sum. The numbers in each row are conditional probabilities. And prop.table(down, 2) will divide each column by its column sum. The numbers in each column are conditional probabilities. Therefore, each of the eight numbers shown below is a conditional probability of the form P(A B) for some A and B. Identify the correct A and B for each number. prop.table(down, 1) # blood test # status pos neg # down 0.8888889 0.1111111 # unaffected 0.2500000 0.7500000 prop.table(down, 2) # blood test # status pos neg # down 0.03542435 0.001527884 # unaffected 0.96457565 0.998472116 What values do these tables indicate for P(pos down) and P(down pos)? Spring 2017 Page 4 of 12

Boston Smallpox Epidemic of 1721 The following contingency table (OpenIntro Statistics, pp.83 87) refers to the Boston smallpox epidemic of 1721. A total of 6224 residents of Boston contracted smallpox in this epidemic and 850 of them died. The epidemic was marked by vigorous public debate of the value (or lack thereof) of a type of inoculation known as variolation (which was dangerous). The Reverend Cotton Mather advocated inoculation but the physician William Douglass was firmly against it. See the article in Harvard s Contagion for more details. An effective smallpox vaccination procedure was eventually demonstrated by Edward Jenner in England in 1796, and succeeding efforts to eradicate smallpox from the world were finally declared to be successful in 1980 by the World Health Organization. Cotton Mather, on the other hand, lives on in infamy for his role in the Salem witch trials. Inoculated Result yes no T otal lived 238 5136 5374 died 6 844 850 T otal 244 5980 6224 Smallpox Epidemic, Boston, 1721 yes no died result lived innoculated Spring 2017 Page 5 of 12

Tree Diagrams The following tree diagram, generated by OpenIntro software, summarizes the relevant statistics for the Boston smallpox epidemic of 1721. Here Inoculated is a categorical explanatory variable with levels yes and no. In the Inoculated column of the tree diagram are the probabilities P(yes) and P(no). The categorical response variable Result has levels lived and died. The conditional probabilities in the Result column are P(lived yes), P(died yes), P(lived no), P(died no). The probabilities calculated by the software in the third column are P(lived and yes), P(died and yes), P(lived and no), P(died and no), because P(A) P(B A) = P(A B). Innoculated yes, 0.0392 Result lived, 0.9754 died, 0.0246 0.0392*0.9754 = 0.03824 0.0392*0.0246 = 0.00096 no, 0.9608 lived, 0.8589 died, 0.1411 0.9608*0.8589 = 0.82523 0.9608*0.1411 = 0.13557 Fig. Smallpox in Boston, 1721, from OpenIntro Statistics, chapter 2, pp.83-87 Spring 2017 Page 6 of 12

Random variables A random variable is a function from the sample space, S, of an experiment to the real numbers, X : S R, so we might characterize a random variable as a function which assigns a numerical value to an outcome of an experiment. Random variables can be defined on discrete and on continuous sample spaces. discrete: flip a coin, flip three coins, roll a die, roll two dice, roulette wheel, spinner continuous: random number generators: U[0, 1], N(0, 1), N(µ, σ) Expected value of a random variable, E(X) = µ X Variance of a random variable, Var(X) = σ 2 X Linear combinations of random variables, Y = ax 1 + bx 2 Expected value and variance of a linear combination of random variables. If Y = ax 1 + bx 2, then E(Y ) = ae(x 1 ) + be(x 2 ), and Var(Y ) = a 2 Var(X 1 ) + b 2 V(X 2 ). Distributions of random variables Calculation of probability using a continuous distribution, P(X x). The area of the blue region in the following figure is the probability that the random variable X N(µ, σ) takes on a value less than or equal to 5. That probability is denoted P(X 5). X ~ N(µ, σ) y -3-1 1 3 5 7 9 x Normal distributions Normal random variable, X N(µ, σ). z-score, z = (x µ)/σ. If z = (x µ)/σ, then x = µ + z σ. Spring 2017 Page 7 of 12

Standardized normal random variable, Z N(0, 1). If X N(µ, σ) and Z = (X µ)/σ, then Z N(0, 1). This is why our textbook need only contain a table of values for the standard normal distribution. Areas of regions under a normal distribution curve. Percentiles. The 68-95-99.7% rule. Q-Q plots. Calculations with X N(0, 1) Suppose that the random variable X has a standard normal distribution, X N(0, 1). X ~ N(0, 1) 0.0 0.1 0.2 0.3 0.4-3 -2-1 0 1 2 3 There are four useful procedures in R for working with normal distributions: dnorm, pnorm, qnorm, rnorm. a. pnorm(2) P(X 2) b. pnorm(2) - pnorm(-2) P( 2 X 2) c. 1 - pnorm(2) P(X 2) d. qnorm(0.60) q 60 such that P(X q 60 ) = 0.60, the 60th percentile e. rnorm(3) three random numbers from the standard normal distribution, for instance 0.3612443 0.1075216 1.0473477 f. dnorm() used for drawing the graph of the bell curve Spring 2017 Page 8 of 12

Calculations with X N(µ, σ) Agresti and Franklin report that female students at the University of Georgia have an approximately normal height distribution, with mean µ W = 65 inches and standard deviation σ W =3.5 inches. Male students have an approximately normal height distribution, with mean µ M = 70 inches and standard deviation σ M =4.0 inches. Let W N(µ W, σ W ), and M N(µ M, σ M ), and calculate the following (using R and using Agresti and Franklin, Appendix A, pp.a-1 and A-2): P(W 66), P(M 72), q such that P(W q) = 0.30, q such that P(M q) = 0.25 Calculate the z-score of a person with W = 63, of a person with M = 67. How tall is a woman with z-score 0.6? How tall is a man with z-score -0.7? See page 11 of these notes for R expressions which will calculate the answers to these questions. Men's and Women's Heights men women 0.00 0.02 0.04 0.06 0.08 0.10 Student s t, Chi-Square, F 55 60 65 70 75 80 85 height (in) Student s t, Chi-Square, and F distributions play key roles in the sequel. All of them are families of continuous distributions. Student s t distributions resemble Normal distributions but they have fatter tails. Chi-Square and F distributions have domains the half line [0, ), so neither one is symmetric. Discrete distributions For X to be a Bernoulli random variable, and hence have a Bernoulli distribution, X Bernoulli(p), we require i. a binary outcome for a single event (generally coded as success, 1, or failure, 0) ii. a fixed probability of success, P(X = 1) = p, and failure, P(X = 0) = 1 p, for that event iii. exactly one event Examples of Bernoulli random variables include the outcome of a coin flip (h or t), or driver was wearing a seat belt (yes or no), or basketball player made a basket (1 or 0). Spring 2017 Page 9 of 12

Expected value and variance of a Bernoulli random variable, X Bernoulli(p): Expected value, µ X = p. Variance, σx 2 = p(1 p). Bernoulli distribution, p=1/6 probability density 0.0 0.2 0.4 0.6 0.8 1.0 0 1 k Binomial random variable, X Binomial(n, p). The probability of k successes in n trials. Expected value, µ X = np. Variance, σx 2 = np(1 p). Normal approximation to a binomial distribution. binomial distribution, p=1/6, n=10 probability density 0.00 0.10 0.20 0.30 0 2 4 6 8 10 k Spring 2017 Page 10 of 12

Conditions for a binomial distribution For X to be a binomial random variable, and hence have a binomial distribution, X Binomial(n, p), we require i. a binary outcome for each event (coin flip produces h or t) ii. a single fixed probability of success for each event (p = 0.5) iii. a fixed number of events (n = 10 coin flips) Normal approximations to binomial distributions The distribution of a binomial random variable, X Binomial(n, p), has mean np and standard deviation np(1 p). It can be approximated by a normal probability distribution with the same mean and standard deviation, Y N(µ = np, σ = np(1 p)). The fit improves as n gets larger. binomial distribution, p=1/6, n=10 binomial distribution, p=1/6, n=30 probability density 0.00 0.10 0.20 0.30 probability density 0.00 0.05 0.10 0.15 0 1 2 3 4 5 6 k 0 2 4 6 8 10 12 k binomial distribution, p=1/6, n=50 binomial distribution, p=1/6, n=100 probability density 0.00 0.05 0.10 0.15 probability density 0.00 0.04 0.08 0 5 10 15 20 k 0 10 20 30 40 k Answers The following R expressions calculate the answers to the questions about heights of men and women at the University of Georgia posed above. For each calculation, draw a corresponding normal curve and shade the area or mark the measurement in question. pnorm(66, mean = 65, sd = 3.5), 1 pnorm(72, mean = 70, sd = 4.0), qnorm(0.30, mean = 65, sd = 3.5), qnorm(1 0.25, mean = 70, sd = 4.0), 63 65 67 70 z, z, 3.5 4.0 x 65 + 0.6 3.5, x 70 0.7 4.0. Spring 2017 Page 11 of 12

Exercises We will attempt to solve some of the following exercises as a community project in class today. Finish these solutions as homework exercises, write them up carefully and clearly, and hand them in at the beginning of class next Friday. Homework 5a probability models Exercises from Sections 5.1, 5.2: 5.2 (graduation rates), 5.3 (free throws), 5.24 (blood types), 5.26 (Canada) Homework 5b random variables Exercises from Sections 5.3, 5.4: 5.46 (households), 5.54 (foreign-born), 5.65 (fruits and veggies), 5.75 (sums) Homework 5c binomial distributions and probability rules Exercises from Sections 5.5, 5.6 and Chapter 5 exercises: 5.94 (music), 5.102 (die), 5.118 (tree diagram), 5.142 (SAT scores) Spring 2017 Page 12 of 12