Chapter 4: Discrete Random Variables and the Binomial Distribution

Chapter 4: Discrete Random Variables and the Binomial Distribution Chapter 4: Discrete Random Variables and the Binomial Distribution Keith E. Emmert...
Author: Bernice Kennedy
1 downloads 2 Views 525KB Size
Chapter 4: Discrete Random Variables and the Binomial Distribution

Chapter 4: Discrete Random Variables and the Binomial Distribution Keith E. Emmert Department of Mathematics Tarleton State University

June 16, 2011

Chapter 4: Discrete Random Variables and the Binomial Distribution Outline

1

Random Variables

2

Binomial Random Variables

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Some Basic Definitions

A random variable is an uncertain numerical quantity whose value depends on the random outcome of an experiment. We can think of a random variable as a rule that assigns one (and only one) numerical value to each outcome of a random experiment. A discrete random variable can assume at most a finite or infinite but countable number of distinct values. A continuous random variable can assume any value in an interval or collection of intervals.

Think of the capital letter X as random, the value of the ::::::: variable before it is observed. Think of x as known, a :::::: particular value of X that has been observed. :::::::::::::::::::

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It Random Variables

1

Otitis media, a disease of the middle ear, is one of the frequent reasons for visiting a doctor in the first 2 years of life other than routine well-baby visit. Let X be the random variable that represents the number of episodes of Otitis media in the first two years of life. What are the values, x, the random variable X will assume?

2

Suppose a physician agrees to use a new anti-hypertensive drug on a trial basis on the first 4 untreated hypertensive patients she encounters in her practice, before deciding whether to adopt the drug for routine use. Let X be the number of patients out of 4 who are brought under control. What are the values, x, the random variable X can assume?

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It Random Variables

3

A study on effects of exposure to radiation was performed at the Portsmouth Naval Shipyard, where each exposed worker wore a dosimeter that measures the annual exposure in rem. The cumulative exposure over a workers lifetime could then be obtained by summing the yearly exposure. Let X be the amount of cumulative exposure. What are the values, x, the random variable X will assume?

4

A biology teacher gives a 30 minutes test. Define the random variable as the time it takes a student to finish the test. What are the values, x, the random variable X will assume?

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It Random Variables

Random Variable, X Continuous

Probability density function. Area corresponds to probability.

Probability Density

Discrete

Probability mass function. Height corresponds to proability.

P r(X = a)

x

a P r(a ≤ X ≤ b)

a

b

x

Identify as discrete or continuous. 1

Reaction time difference to same stimulus before and after training.

2

The number of violent crimes committed per month in your community.

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Probability Mass Functions A probability mass function of a discrete random variable X assigns to each observation, x1 , x2 , . . . , xk , a probability of occurrence, p1 , p2 , . . . , pk . The values of a discrete probability distribution (the assigned probabilities) must be between 0 and 1 P and must add up to 1, that is pi = p1 + p2 + · · · + pk = 1. We often group this information as a table or a function: Value of X Probability Pr (X = x)   p1 ,    p2 p(x) = . ..      pk

x1 p1

x2 p2

if x = x1 if x = x2 .. . if x = xk .

··· ···

xk pk

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It! Probability Mass Functions

Determine which of the following represents a probability mass function for a random variable X . Explain. (a)

x Pr (X = x)

0 0.26

1 0.32

2 0.42

3 0

(b)

x Pr (X = x)

0 0.20

1 0.32

2 0.42

3 0.10

(c)

x Pr (X = x)

0 0.26

1 0.32

2 0.42

3 0.10

(d)

x Pr (X = x)

0 0.25

1 0.35

2 0.45

3 -0.05

(e) p(x) = 0.5 + x, (f) p(x) = 0.5 + x,

x = −0.75, 0, 0.25.

x = −0.25, 0, 0.25.

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Example Probability Mass Functions

Let X be the number of people in a household for a certain community. x Pr (X = x)

1 0.20

2 0.32

3 0.18

4 0.15

5 0.07

6 0.03

7

(a) What must be the probability of 7 people in a household for this to be a legitimate discrete distribution? (b) Display this probability mass function graphically. (c) What is the probability that a randomly chosen household contains more than 5 people? (d) What is the probability that a randomly chosen household contains no more than 2 people? (e) What is Pr (2 < X ≤ 4)? The probability that a randomly selected household has more than 2 but at most 4 people.

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It! Probability Mass Functions

Researchers found the following probability values for the dental habits of x, the age children begin brushing their teeth or gums. x Pr (X = x)

0 0.04

1 0.19

2 0.22

3 0.24

4 0.31

(a) Present the probability distribution function graphically. (b) Find the Pr (X < 2). (c) Find the probability of a child three years old or older beginning to brush their teeth or gums? (d) Using probability values, determine if it is unusual for a child less than one year old to brush their teeth or gums.

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Expected Value of a Discrete Random Variable Mean, Variance, and Standard Deviation

Suppose X is a discrete random variable taking on the values x1 , x2 , . . . , xk , with probabilities p1 , p2 , . . . , pk . The mean or expected value of X if given by E (X ) = µX = x1 p1 + x2 p2 + · · · + xk pk =

k X

xi pi .

i=1

The variance of X is given by   Var (X ) = σX2 = E (X − µX )2 = E (X 2 ) − [E (X )]2 X = xi2 pi − µ2X . The standard deviation of X is given by SD(X ) = σX =

q σX2 .

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Example Mean, Variance, and Standard Deviation

The probability mass function for the number of episodes of Otitis media on the first 2 years of life is given in the table.Let r denote the number of episodes. r Pr (X = r )

0 0.129

1 0.264

2 0.271

3 0.185

4 0.095

5 0029

6 0.017

The average (mean) number of episodes of Otitis media on the first two years of life is µX = E (X ) = 0(0.129) + 1(0.264) + 2(0.271) + 3(0.185) + 4(0.095) + 5(0.029) + 6(0.017) = 1.988 Thus, there are µX = 1.988 episodes in the first two years of life. Continued...

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Example Mean, Variance, and Standard Deviation

The probability mass function for the number of episodes of Otitis media on the first 2 years of life is given in the table. Let r denote the number of episodes. r Pr (X = r )

0 0.129

1 0.264

2 0.271

3 0.185

4 0.095

5 0029

6 0.017

The variance is Var (X ) = σX2 = E (X 2 ) − µ2X .. Hence, we need E (X 2 ). E (X 2 ) = 02 (0.129) + 12 (0.264) + 22 (0.271) + 32 (0.185) + 42 (0.095) + 52 (0.029) + 62 (0.017) = 5.87 So the variance and the standard deviation can be computed σX2 = E (X 2 ) − µ2X = (5.87 − (1.988)2 = 1.92 q √ and σX = σX2 = 1.92 = 1.39.

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It! Mean, Variance, and Standard Deviation

A Pharmacy has a drive-through service. The number of customers arriving during a 15-minute period is distributed as shown. Find the mean, variance, and standard deviation for the distribution. # of Customers, x Pr (X = x)

0 0.12

1 0.20

2 0.31

3 0.25

4 0.12

Chapter 4: Discrete Random Variables and the Binomial Distribution Random Variables

Let’s Do It! Mean, Variance, and Standard Deviation

The following distribution shows the number of students enrolled in CPR classes offered by the local fire department. Find the mean, variance, and standard deviation for the distribution # of Students, x Pr (X = x)

12 0.15

13 0.20

14 0.38

15 0.18

16 0.09

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Combinations For a positive integer n, factorial of n is n! = n(n − 1)(n − 2) · · · (2)(1). For convenience, we define 0! = 1. n choose x represents the number of ways of selecting x items (without replacement) from a set of n distinguishable items when the order of the selection is not important is given by:   n n! = provided 0 ≤ x ≤ n. x x!(n − x)!  If x < 0 or x > n, then we define xn = 0 (it is hard to pick a negative number of things or to pick more things than are available).

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Example Combinations

How many subsets of S = {1, 2} are there which contain... # Subsets 0 1 2

Answer 1 2 1

Subsets ∅ {1}, {2} S = {1, 2}

Combination  2 0 = 1 2 1 = 2 2 2 =1

How many subsets of S = {1, 2, 3} are there which contain... # Subsets 0 1 2 3

Answer 1 2 1 1

Subsets ∅ {1}, {2}, {3} {1, 2}, {1, 3}, {2, 3} S = {1, 2, 3}

Combination  3 0 = 1 3 1 = 3 3 2 = 3 3 3 =1

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Example Combinations with the Calculator Using nCr

Find the number of ways to select 2 apples from a bag of 20 apples. By hand, calculate   20 · 19 · 18 · 17 · · · 2 · 1 20 · 19 20 20! = = = 190. = 2!(20 − 2)! 2 · 1 · 18 · 17 · · · 2 · 1 2 2 By calculator, follow these instructions

2

0

MATH

Total # of items, n = 20

3

2

ENTER the # of items to select, r = 2

for the operation nCr Your calculator should give you 190 as an answer.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! How many subsets of S = {1, 2, 3, 4} are there which contain... # Subsets 0 1

Answer 1

Subsets {1}, {2}, {3}, {4}

4

4 2

=6

4 3

=4



2

3

Combination



4 S = {1, 2, 3, 4}

Complete the table. The set S has 4 values, so the total number of possible subsets is 24 = . Confirm that this does this equal the total of the answer column.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Bernoulli Random Variables

A dichotomous or Bernoulli random variable is one which has exactly two possible outcomes, often referred to as “success” and “failure.” In this text we will only consider such variables in which the success probability p remains the same if the random experiment were repeated under identical conditions. The failure probability, q = 1 − p.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! Bernoulli Random Variables

(a) The national incidence rate of chronic bronchitis in children in their first year of life in households where both parents are chronic bronchitis is 5%. A researcher investigates 20 households where both parents are chronic bronchitis. If success is defined be “child in his first year of life with chronic bronchitis,” what is the probability of success? What is the probability of failure? Failure: q = Success: p = (b) Suppose that the rate of major congenital malformations in the general population is 2.5 malformations per 100 deliveries. A sample of 100 infants identified in birth registry as offspring of Vietnam-veteran fathers. If success is defined be “infant with congenital malformation,” what is the probability of success? What is the probability of failure? Success: p = Failure: q =

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Binomial Random Variables A binomial random variable X is the total number of successes in n independent Bernoulli trials where on each trial the probability of a success is p. Basic Properties of a Binomial Experiment The experiment consists of n identical trials. Each trial has two possible outcomes (success, failure). The trials are independent. The probability of a success, p, remains the same for each trial. The probability of a failure is q = 1 − p. X can take on the values 0, 1, 2, . . . , n.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! Binomial Random Variables

Determine which of the following is a binomial experiment? Explain. (a) Surveying 100 people to determine if they like Sudsy Soap. (b) Asking 1000 people which brand of cigarettes they smoke. (c) Testing one brand of aspirin by using 10 people to determine whether it is effective. (d) Asking 100 people if they smoke. (e) Surveying 300 prisoners to see how many different crimes they were convicted of. (f) Surveying 300 prisoners to see whether this is their first offense.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Binomial Probability Distribution The Math

The binomial probability distribution is   n x n−x p(x) = Pr (X = x) = p q , x

x = 0, 1, 2, . . . , n,

where p is the probability of a success on each single trial q = 1 − p is the probability of failure on each single trial n is the number of independent trials x is the number of success in the n trials. The mean is µX = E (X ) = np. The variance is σX2 = Var (X ) = npq = np(1 − p). The standard deviation p is q √ σX = σX2 = npq = np(1 − p).

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Binomial Probability Distribution The Math

Assume that X follows a binomial probability distribution with n trials and probability of success p.  Then, Pr (X = x) = xn p x q n−x , x = 0, 1, 2, . . . , n. The cumulative distribution for a binomial random variable is Pr (X ≤ x) =

x X

Pr (X = i)

i=0

= Pr (X = 0) + Pr (X = 1) + · · · + Pr (X = x). The word “cumulative” is used because it “accumulates” all of the probability from 0 to x.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Binomial Probability Distribution Using the TI-84

1 Suppose your probability of success is with n = 4 trials of a 3 binomial experiment. The probability of obtaining exactly three successes is 0.0987... 2nd 0 4

Vars

brings up the DISTR menu

selects the binomPDF(n, p, x) function

,

1

÷

3

,

3

)

ENTER

The probability of obtaining at most two successes is 0.8889...

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! Binomial Probability Distribution

According to 2001 study of college students by Harvard Universitys School of Public Health 20% of those included in the study abstain from drinking. A random sample of six college students is selected. Identify the following: A trial = n = number of independent trials p = probability of a success on each single trial x = number of successes in the n trials 1

2

3

What is the probability that exactly three students in this sample abstain from drinking? What is the probability that at most two students in this sample abstain from drinking? What is the probability that less than two students in this sample abstain from drinking? Continued...

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! Binomial Probability Distribution

According to 2001 study of college students by Harvard Universitys School of Public Health 20% of those included in the study abstain from drinking. A random sample of six college students is selected. Identify the following: A trial = n = number of independent trials p = probability of a success on each single trial x = number of successes in the n trials 4

5

6

What is the probability that at least three students in this sample abstain from drinking? What is the probability that more than three students in this sample abstain from drinking? What is the mean and standard deviation of the number of students abstaining from drinking?

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! Binomial Probability Distribution

The national incidence rate of chronic bronchitis in children in their first year of life in households where both parents are chronic bronchitis is 5%. A researcher investigates 20 households where both parents are chronic bronchitis. (a) How likely are infants in at least 3 out of 20 households to develop chronic bronchitis? (b) What is the mean and standard deviation of the number of households, where both parents are chronic bronchitis, with infants having chronic bronchitis?

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

When Is It Extreme? The national incidence rate of chronic bronchitis in children in their first year of life in households where both parents are chronic bronchitis is 5%. We wish to test unusual occurrences of chronic bronchitis when n = 1, 500 and x = 75.  75 1500−75 = 0.0472. Note Pr (X = 75) = 1500 75 (0.05) (0.95) that 5% of 1,500 is 75 (the national average!), and yet this occurs with a small probability. This doesn’t make intuitive sense. Another approach is to find the probability of obtaining a result at least as extreme as the one obtained, that is :::::::::::::::::::::::::::::::::::: Pr (X ≥ 75) = 1 − Pr (X < 75) = 1 − Pr (X ≤ 74) = 0.5165, a very likely event! Compare to Pr (X ≥ 90) = 1 − Pr (X ≤ 89) = 0.0361, an unlikely event occurs with just 15 more cases!

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Let’s Do It! Binomial Probability Distribution

Suppose that the rate of major congenital malformations in the general population is 2.5 malformations per 100 deliveries. A study is set up to investigate if the offspring of Vietnam-veteran fathers are at special risk for congenital malformations. (a) A sample of 100 infants identified in birth registry as offspring of Vietnam-veteran fathers and 4 have a major congenital malformation. Is there an excess risk of malformation in this group, i.e. compute the probability that at least 4 occurs. (b) Find the mean and the standard deviation of the number of malformations of the offspring of Vietnam-veteran fathers.

Chapter 4: Discrete Random Variables and the Binomial Distribution Binomial Random Variables

Homework

HW page 112: 2*, 3*, 6, 7, 8, 9, 10, 14, 15, 34, 39, 40 * For #2 and #3 use the following distribution x 0 1 2

Pr (X = x) 0.72 0.26 0.02

Suggest Documents