Discrete Random Variables and Probability Distributions

Slides:



Advertisements
Similar presentations
Discrete Random Variables and Probability Distributions
Advertisements

DISCRETE RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
Lecture (7) Random Variables and Distribution Functions.
Flipping an unfair coin three times Consider the unfair coin with P(H) = 1/3 and P(T) = 2/3. If we flip this coin three times, the sample space S is the.
Chapter 2 Discrete Random Variables
Discrete Random Variables and Probability Distributions
Review.
Probability Distributions
Chapter 4 Probability Distributions
Discrete Probability Distributions
Discrete Random Variables and Probability Distributions
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 4 Continuous Random Variables and Probability Distributions.
Discrete Random Variables and Probability Distributions
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
Chapter 5 Several Discrete Distributions General Objectives: Discrete random variables are used in many practical applications. These random variables.
Copyright © Cengage Learning. All rights reserved. 3.5 Hypergeometric and Negative Binomial Distributions.
Copyright © Cengage Learning. All rights reserved. 3.4 The Binomial Probability Distribution.
Discrete Random Variables and Probability Distributions
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved.
Slide 1 Copyright © 2004 Pearson Education, Inc..
 A probability function is a function which assigns probabilities to the values of a random variable.  Individual probability values may be denoted by.
 A probability function is a function which assigns probabilities to the values of a random variable.  Individual probability values may be denoted by.
Copyright © 2015 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 C H A P T E R F I V E Discrete Probability Distributions.
1 Lecture 7: Discrete Random Variables and their Distributions Devore, Ch
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
 A probability function is a function which assigns probabilities to the values of a random variable.  Individual probability values may be denoted by.
1 Topic 3 - Discrete distributions Basics of discrete distributions Mean and variance of a discrete distribution Binomial distribution Poisson distribution.
1 Since everything is a reflection of our minds, everything can be changed by our minds.
 A probability function is a function which assigns probabilities to the values of a random variable.  Individual probability values may be denoted.
3.3 Expected Values.
STA347 - week 31 Random Variables Example: We roll a fair die 6 times. Suppose we are interested in the number of 5’s in the 6 rolls. Let X = number of.
Random Variables Presentation 6.. Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics Seventh Edition By Brase and Brase Prepared by: Mistah Flynn.
1 Lecture 9: The Poisson Random Variable and its PMF Devore, Ch. 3.6.
Exam 2: Rules Section 2.1 Bring a cheat sheet. One page 2 sides. Bring a calculator. Bring your book to use the tables in the back.
Chapter 4-5 DeGroot & Schervish. Conditional Expectation/Mean Let X and Y be random variables such that the mean of Y exists and is finite. The conditional.
Random Variables Example:
 A probability function is a function which assigns probabilities to the values of a random variable.  Individual probability values may be denoted.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
1 Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 5 Joint Probability Distributions and Random Samples.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Chapter 5 Discrete Random Variables.
PROBABILITY AND STATISTICS WEEK 5 Onur Doğan. The Binomial Probability Distribution There are many experiments that conform either exactly or approximately.
Engineering Probability and Statistics - SE-205 -Chap 3 By S. O. Duffuaa.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics Seventh Edition By Brase and Brase Prepared by: Lynn Smith.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Copyright © Cengage Learning. All rights reserved. 3 Discrete Random Variables and Probability Distributions.
Probability Distribution for Discrete Random Variables
Chapter 3 Applied Statistics and Probability for Engineers
Probability Distributions
Chapter Five The Binomial Probability Distribution and Related Topics
The Poisson probability distribution
MAT 446 Supplementary Note for Ch 3
Discrete Random Variables and Probability Distributions
3 Discrete Random Variables and Probability Distributions
Engineering Probability and Statistics - SE-205 -Chap 3
Expected Values.
Chapter 2 Discrete Random Variables
Discrete Random Variables and Probability Distributions
PROBABILITY AND STATISTICS
Discrete Random Variables and Probability Distributions
Presentation transcript:

Discrete Random Variables and Probability Distributions 3

3.1 Random Variables

Random Variables Definition A random variable (rv) is any rule that associates a number with each outcome in sample space S. Mathematically, a random variable is a function whose domain is the sample space S, and whose value range is a set of real numbers.

Random Variables Random variables are denoted by X, Y, etc. Use x, y to represent specific values of rvs X, Y. → X (s) = x means that x is the value of rv X associated with the outcome s.

Example 3.1 Calling help desk for computer support will have two possible outcomes: (i) Get someone (S, for success); and (ii) put on hold (F, for failure). With sample space {S, F}, define rv X by X (S) = 1 X (F) = 0 The rv X indicates whether the student can immediately speak to someone (1), or not (0).

Random Variables Definition A random variable with only two possible values of 0 and 1 is called a Bernoulli random variable. Example Let X denote the outcomes of tossing a quarter, with X(W) = 1, and X(E) = 0. Then this X is a Bernoulli rv.

Example 3.3 Observe the # of pumps in use at 2 6-pump gas stations. Define rv’s X, Y, and U by X = the total # of pumps in use at the two stations Y = the difference between the # of pumps in use at station 1 and the # in use at station 2 U = the maximum of the numbers of pumps in use at the two stations X, Y, and U are rvs.

Example 3.3 For observation (2, 3), determine the values of X, Y, & U. cont’d For observation (2, 3), determine the values of X, Y, & U. X((2, 3)) = 2 + 3 = 5, so we say that the observed value of X is x = 5. Y((2, 3)) = 2 – 3 = – 1 → The observed value of Y is y = –1. U((2, 3)) = max(2, 3) = 3 → Observed value of U is u = 3.

Example 3.3 X, Y, & U all have the same domain: The sample space cont’d X, Y, & U all have the same domain: The sample space S = {(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6) (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)} There are 49 possible outcomes in S.

Example 3.3 They have different value ranges. cont’d They have different value ranges. Value range of rv X: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}. Range of rv Y: {–6, –5, –4, –3, –2, –1, 0, 1, 2, 3, 4, 5, 6}. Range of rv U: {0, 1, 2, 3, 4, 5, 6}.

Two Types of Random Variables Definitions A discrete random variable: One whose range is a finite set or countable infinite set of numbers. X, Y, U in Example 3.3 are all discrete random variables. A continuous random variable: One (1) whose range includes all numbers in a single interval or the union of several disjoint intervals (e.g., [0, 10][20, 30]). (2) P(X = c) = 0 for any c in the range of rv X. Remark: P(X = c) = 0 for any c NOT in the range of rv X.

Example 3.5 Randomly select a spot in continental US and find its height above sea level, denoted by Y. The Y is a continuous rv. The domain of Y is sample space S = continental US. The highest spot in US is 14,494 ft at Mt. Whitney The lowest spot is –282 ft at Death Valley Therefore, the value range of Y is [–282 ft, 14,494 ft].

Example 3.6 Married couples are selected at random, and a blood test is done on both until we find a couple with the same Rh factor. Define rv X = # of blood tests to be performed, the value range of X is D = {2, 4, 6, 8, …}. Since the value range is a countable infinite set of numbers, X is a discrete rv. What is the domain of X? It depends on what is of interest! All married couples in Florida State All married couples of age 30-50 in Hillsborough County

More Examples Randomly select a student at USF. Define X = 0, if the selected student is male; and 1, otherwise. Range: {0, 1} Y = the weight of the selected student. Range: [70, 400] lbs Z = the height in meters of the selected student. Range: (4, 7) ft U = 0, 1, and 2, if the selected student is from Florida, out-of-state, and a foreign country, respectively. Range: {0, 1, 2} X, Y, Z, U have the same domain: USF student body.

Exercise Problem 4 X = # of non-zero digits in a randomly selected zip code. Domain = Sample space S = {all US zip codes}. A zip code has 5 digits → In theory, the value range can be {0, 1, 2, 3, 4, 5}. But 00000 is not a valid zip code, & there are no zip codes with 4 zeros. → Value range of X is {2, 3, 4, 5}. 3 zip code examples: 33647, 33620, 90210 X(33647) = 5, X(33620) = 4, X(90210) = 3

Section Summary Concepts discussed Random Variables Bernoulli Random Variables Discrete Random Variables Continuous Random Variables

Probability Distributions for Discrete Random Variables 3.2

Probability Distributions for Discrete Random Variables Probabilities assigned to various outcomes in in turn determine probabilities associated with the values of any particular rv X. The probability distribution of X says how the total probability of 1 is distributed among (allocated to) the various possible X values. Suppose, for example, that a business has just purchased four laser printers, and let X be the number among these that require service during the warranty period.

Probability Distributions for Discrete Random Variables P(X = x) = the probability of rv X = x, denoted by p(x). p (0) = P(X = 0) = the probability of X equal to 0. p (1) = P(X = 1) = the probability of X value to 1.

Example 3.7 The Statistics Dept. at Cal Poly has a lab with 6 computers. Let X = the # of computers in use at a particular time of day. Suppose the probability distribution of X is as given below. p(0) = 0.05 → 5% of time no one uses computers. p(3) = 0.25 → 25% of time 3 computers are in use.

Example 3.7 P(X  2) = P(X = 0 or X = 1 or X = 2) cont’d P(X  2) = P(X = 0 or X = 1 or X = 2) = P(X=0) + P(X=1) + P(X=2) = p(0) + p(1) + p(2) = 0.05 + 0.10 + 0.15 = 0.30

Example 3.7 A = {X  3}: the event at least 3 computers are in use. cont’d A = {X  3}: the event at least 3 computers are in use. B = {X  2}: the event at most 2 computers are in use. Then B = A'. → P(X  3) = 1 – P(X  2) = 1 – 0.30 = 0.70

Example 3.7 P(2  X  5) = P(X = 2, X = 3, X = 4, or X = 5) cont’d P(2  X  5) = P(X = 2, X = 3, X = 4, or X = 5) = 0.15 + 0.25 + 0.20 + 0.15 = 0.75 P(2 < X < 5) = P(X = 3 or X = 4) = 0.25 + 0.20 = 0.45

Probability Distributions for Discrete Random Variables Definition The probability mass function (pmf) f of a discrete rv is defined for every number x by f (x) = P(X = x) such that (i) f (x)  0, and (ii) all possible x f(x) = 1.

Example 3.8 6 lots of components ready for shipment lot 1 2 3 4 5 6 # defects 0 2 0 1 2 0 X = # of defects in the lot selected for shipment. The value range of X is {0, 1, 2}. Its pmf f is f (0) = P(X=0) = P(lot 1, 3 or 6 is shipped) = 3/6 = 0.500 f (1) = P(X=1) = P(lot 4 is shipped) = 1/6 = 0.167 f (2) = P(X=2) = P(lot 2 or 5 is shipped) = 2/6 = 0.333

A Parameter of a Probability Distribution The pmf p of the Bernoulli rv X: where α is a parameter (0 < α < 1) of the above pmf p. Each different value of  between 0 and 1 determines a different member of the Bernoulli family of distributions. (3.1)

Example 3.12 Observe the gender of the next newborn at a certain hospital, and the observation stops when a boy (B) is born. Let B be event a girl is borm. Let p = P (B). Then P(B) = 1 – p. Assume that successive births are independent. Define rv X = # of births observed. Then the range of X is {1, 2, 3, 4, 5, 6, …}. p(1) = P(X = 1) = P(B) = p.

Example 3.12 p(2) = P(X = 2) = P(GB) = P(G)  P(B) = (1 – p)p and cont’d p(2) = P(X = 2) = P(GB) = P(G)  P(B) = (1 – p)p and p(3) = P(X = 3) = P(GGB) = P(G)  P(G)  P(B) = (1 – p)2p

Example 3.12 cont’d → The pmf p is Where the parameter p is in open set (0, 1). pmf given by (3.2) defines the geometric distributions. In the gender example, p = 0.51 might be appropriate. But if we were looking for the first child with Rh-positive blood, then we might have p = 0.85. (3.2)

The Cumulative Distribution Function We often wish to compute the following probability P(the observed value of X will be at most x) = P(X ≤ x) P(X is at most 1) = P(X  1) = p(0) + p(1) = 0.500 + 0.167 = 0.667

The Cumulative Distribution Function Similarly, P(X  1.5) = P(X  1) = .667 P(X  0) = P(X = 0) = 0.5 P(X  .75) = P(X = 0) = 0.5 In fact for any x satisfying 0  x < 1, P(X  x) = 0.5.

The Cumulative Distribution Function The largest possible X value is 2, → P(X  2) = 1 P(X  3.7) = 1 P(X  20.5) = 1 and so on.

The Cumulative Distribution Function Definition The cumulative distribution function (cdf) F(x) of a discrete rv X with pmf p(x) is definedby F (x) = P(X  x) = ∑y: y ≤ x p(y) (3.3) F(x) = P(the observed value of X is at most x).

Example 3.13 A store has flash drives of 1, 2, 4, 8, or 16 GB of memory. Let Y = the memory size of a purchased drive. The pmf of Y is given below.

Example 3.13 Then (Assume that all purchases are independent) cont’d Then (Assume that all purchases are independent) F (1) = P (Y  1) = P (Y = 1) = p (1) = 0.05 F (2) = P (Y  2) = P (Y = 1 or Y = 2) = p (1) + p (2) = 0.15

Example 3.13 F(4) = P(Y  4) = P(Y = 1 or Y = 2 or Y = 4) cont’d F(4) = P(Y  4) = P(Y = 1 or Y = 2 or Y = 4) = p(1) + p(2) + p(4) = 0.50 F(8) = P(Y  8) = p(1) + p(2) + p(4) + p(8) = 0.90 F(16) = P(Y  16) = 1.00

Example 3.13 For any non-integer y in (1, 16), F (y) = F(int(y)). cont’d For any non-integer y in (1, 16), F (y) = F(int(y)). For example, F(2.7) = P(Y  2.7) = P(Y  2) = F(2) = 0.15 F(7.999) = P(Y  7.999) = P(Y  4) = F(4) = 0.50

Example 3.13 If y < 1, F (y) = 0 [e.g. F(.58) = 0], and cont’d If y < 1, F (y) = 0 [e.g. F(.58) = 0], and if y > 16, F (y) = 1[e.g. F(25) = 1]. → The cdf is

Example 3.13 cont’d This cdf is depicted below.

The Cumulative Distribution Function cdf F (x) of a discrete rv X is a step function, and the step size at each possible value x of X is equal to p(x). Proposition For any a and b with a  b, P (a  X  b) = P(X ≤ b) – P(X < a) = F (b) – F (a–) where “a–” represents the largest possible X value that is strictly less than a.

The Cumulative Distribution Function If all possible values, and a and b are integers, then P (a  X  b) = P(X = a or X = a + 1 or . . . or X = b) = F (b) – F (a – 1). Taking a = b yields P(X = a) = F (a) – F (a – 1) in this case.

Example 3.15 X = # of days of sick leave taken by a randomly selected employee of a large company per year. If the maximum # of allowable sick days per year is 14, value range of X is {0, 1, 3, 4, . . . , 14}.

Example 3.15 Given F(0) = 0.58, F(1) = 0.72, F(2) = 0.76, cont’d Given F(0) = 0.58, F(1) = 0.72, F(2) = 0.76, F(3) = 0.81, F(4) = 0.88, F(5) = 0.94, P(2  X  5) = P(X = 2, 3, 4, or 5) = F(5) – F(1) = 0.22 and P(X = 3) = F(3) – F(2) = 0.05

Exercise Problem 12 55 tickets sold for a 50 seat flight. Y = # of ticketed passengers actually showed up. y 45 46 47 48 49 50 51 52 53 54 55 p(y) .05 .10 .12 .14 .25 .17 .06 .05 .03 .02 .01 a. P(accommodate all ticketed passengers showed up) = ? b. P(cannot take all ticketed passengers showed up) = ? c. P(1sf standby person can take the flight) = ? P(3rd standby person can take the flight) = ?

Exercise Problem 12 a. P(accommodate all ticketed passengers showed up) = ? = P(Y≤50) = P(Y=45 or 46 or 47 or 48 or 49 or 50) = P(Y=45)+P(Y=46)+ … + P(Y=50) = 0.05 + 0.1 + 0.12 + 0.14 + 0.25 + 0.17 = 0.83 b. P(cannot take all ticketed passengers showed up) = P(Y ≥ 51) = 1 – P(Y ≤ 50) = 0.17

Exercise Problem 12 c. P(1sf standby person can take the flight) = P(Y≤49) = 0.66 P(3rd standby person can take the flight) = P(Y ≤ 47) = 0.27

Exercise Problem 23 The cdf of rv X is given. a. p(2) = P(X=2) = F(2) – F(1) = 0.39 – 0.19 = 0.20 b. P(X > 3) = 1 – P(X ≤ 3) = 1 – F(3) = 1 – 0.67 = 0.33

Exercise Problem 23 c. P(2 ≤ X ≤ 5) = P(X≤5) – P(X≤1) = F(5) – F(1) = 0.92 – 0.19 = 0.73 d. P(2 < X < 5) = P(3 ≤ X ≤ 4) = P(X≤4) – P(X≤2) = F(4) – F(2) = 0.92 – 0.39 = 0.53

Section Summary Concepts discussed Probability Mass (Distribution) Function (pmf) Parameters of a Probability Distribution Cumulative Distribution Function (cdf)

3.3 Expected Values

The Expected Value of X Definition rv X has value range D and pmf p (x). The expected value or mean of X, denoted by E(X) or X or just , is

Example 3.16 A university has 15,000 students. X = # of courses a student is registered. The pmf of X follows.  = 1p(1) + 2p(2) + 3p(3) + 4p(4) + 5p(5) + 6p(6) + 7p(7) = 1(.01) + 2(.03) + 3(.13) + 4(.25) + 5(.39) + 6(.17) + 7(.02) = 0.01 + 0.06 + 0.39 + 1.00 + 1.95 + 1.02 + 0.14 = 4.57

The Expected Value of a Function Given a function h (X) of rv X, determine E [h(X)]. Remark: h (X) is also a random variable. Proposition For rv X with value range D and pmf p (x), the expected value of any function h (X), denoted by E [h (X)] or h(X), is computed by

Example 3.23 A store has purchased 3 computers at $500 apiece, and will sell them for $1000 apiece. The manufacturer has agreed to repurchase any computers unsold after a specified period at $200 apiece. Let X denote the number of computers sold. Suppose that p(0) = 0.1, p(1) = 0.2, p(2) = 0.3 and p(3) = 0.4. Then E(X) = 0(0.1) + 1(0.2) + 2(0.3) + 3(0.4) = 2.0

Example 3.23 h (X) = profit from selling X units. Then cont’d h (X) = profit from selling X units. Then h (X) = revenue – cost = 1000X + 200(3 – X) – 1500 = 800X – 900 Value range of rv h(X) is {–900, –100, 700, 1500} The expected profit is then E [h (X)] = h(0)  p(0) + h(1)  p(1) + h(2)  p(2) + h(3)  p(3) = (–900)(.1) + (– 100)(.2) + (700)(.3) + (1500)(.4) = $700

Rules of Expected Value Proposition E (aX + b) = a  E(X) + b. In Example 23, h (X) = 800X – 900, and E(X) = 2. E[h(x)] = 800E(X) – 900 = 800(2) – 900 = $700.

The Variance of X Definition Let X have pmf p (x) and expected value . Then the variance of X, denoted by V(X) or 2X or just 2, is The standard deviation (SD) of X is

Example 3.24 A library has an upper limit of 6 on # of videos that can be checked out by an individual. Let X = # of videos checked out by an individual. The pmf of X is as follows: The expected value of X is easily computed as  = 2.85.

Example 3.24 The variance of X is then cont’d The variance of X is then = (1 – 2.85)2(0.30) + (2 – 2.85)2(0.25) + ... + (6 – 2.85)2(0.15) = 3.2275 The standard deviation of X is  = 1.800.

A Shortcut Formula for 2 Proposition V(X) = 2 = – 2 = E(X2) – [E(X)]2

Rules of Variance The variance of h (X) is the expected value of the squared difference between h (X) and its expected value: V [h (X)] = 2h(X) = For linear function h (X) = aX + b, h (x) – E [h (X)] = ax + b – (a + b) = a (x – ). → V (a X+b) = a2V(X) (3.13)

Example 3.26 In Example 23, E(X) = 2, and → V(X) = 5 – (2)2 = 1. The profit function h(X) = 800X – 900 → V[h(X)] = (800)2 V(X) = (640,000)(1) = 640,000 → Standard deviation of profit function h(X) is 800.

Another Example a. What value of c will make the following a pmf? f(x) = c(1/2)x, x = 1, 2, 3. b. Find E(X). c. Find V(X).

Another Example a. c(1/2)1 + c(1/2)2 + c(1/2)3 = 1 → c = 8/7 cont’d a. c(1/2)1 + c(1/2)2 + c(1/2)3 = 1 → c = 8/7 b. E(X) = 1[(8/7)(1/2)] + 2[(8/7)(1/2)2] + 3[(8/7)(1/2)3] = 11/7 c. V(X) = 12[(8/7)(1/2)] + 22[(8/7)(1/2)2] + 32[(8/7)(1/2)3] – (11/7)2 = 26/49 .

Section Summary Concepts discussed Expected Value of a rv Expected Value of Function of a rv Expected Value of a Linear Function of a rv Variance of a rv Variance of Function of a rv Variance of a Linear Function of a rv

3.4 The Binomial Probability Distribution Copyright © Cengage Learning. All rights reserved.

The Binomial Probability Distribution Many experiments conform to the following: The experiment consists of a sequence of n smaller experiments called trials, with n fixed in advance. Each trial results in 1 of the same 2 possible outcomes, denoted by success (S) and failure (F). The trials are independent. The probability of success P(S), denoted by p, is constant from trial to trial. And P(F) = 1 – p

The Binomial Probability Distribution Definition An experiment satisfying Conditions 1~4 is called a binomial experiment.

Example 3.27 A quarter is tossed successively & independently n times. Use S to denote the outcome W (Washington) and F the outcome E (Eagle), for each toss. Then this results in a binomial experiment with p = P(S) = 0.5, and P(F) = 1 – p = 0.5.

Another Example A die is tossed n times. Use S to denote outcome 1, 2, 3, or 4, and F outcome 5 or 6, for each toss. Then this also results in a binomial experiment with p = P(S) = 4/6 = 2/3, and P(F) = 1 – p = 1/3.

The Binomial Random Variable and Distribution Definition Let X = # of successes (S) resulted from a binomial experiment (i.e., # of times S is observed in the n trials). Then X is a rv, called a binomial random variable, and its probability distribution is called a binomial distribution, denoted as Bin(n, p). Any binomial random variable is discrete!

The Binomial Random Variable and Distribution Consider n = 3. There are 8 possible outcomes: SSS SSF SFS SFF FSS FSF FFS FFF By definition, X(SSF) = 2, X(SFS) = 2, X(SFF) = 1, & so on. The value range of X for n = 3 is {0, 1, 2, 3}. Range of X for an n-trial experiment is {0, 1, 2, . . . , n}.

The Binomial Random Variable and Distribution Write X ~ Bin(n, p) to indicate that X is a binomial rv with n trials and success probability of p. Use b(x; n, p) to denote the pmf of a binomial rv X. Use B(x; n, p) to denote the cdf of a binomial rv X.

The Binomial Random Variable and Distribution Formulas to compute b(x; n, p) and B(x; n, p) b(x; n, p) = Cx,n px (1 – p)n – x, x = 0, 1, 2, 3, …, n; and b(x; n, p) = 0, for all other x values. B(x; n, p) = P(X  x) = b(y; n, p) x = 0, 1, . . . , n

Example 3.31 Randomly select 6 cola drinkers. Each is given a glass of cola S and a glass of cola F. Glasses are all identical except for a code on the bottom to identify the cola. A cola drinker has no tendency to prefer 1 cola to the other. Then p = P(a cola drinker prefers S) = 0.5. Let X = the # of cola drinkers (of the six) who prefer S. Then X ~ Bin(6, 0.5). P(X = 3) = b(3; 6, 0.5) = (0.5)3(0.5)3 = 20(0.5)6 = 0.313

Example 3.31 The probability that at least three prefer S is cont’d The probability that at least three prefer S is P(3  X) = b(x; 6, 0.5) = (0.5)x(1–0.5)6 – x = 0.656 and the probability that at most one prefers S is P(X  1) = b(x; 6, 0.5) = 0.109

Using Binomial Tables (Table A.1) Consider n = 20, and p = 0.25. P(X ≤ 10) = B(10; 20, 0.25) = 0.996 P(5 ≤ X ≤ 10) = P(X ≤ 10) – P(X ≤ 4) = B(10; 20, 0.25) – B(4; 20, 0.25) = 0.996 – 0.415 = 0.581

The Mean and Variance of X If X ~ Bin(n, p), then mean E(X) = np, variance V(X) = np(1 – p) = npq, and sd X = , where q = 1 – p.

Example 3.34 75% purchases at a store are made with a credit card. 10 purchases are observed, and let X = # of purchases made with a credit card. Then X ~ Bin(10, .75). Thus E(X) = np = (10)(0.75) = 7.5, V(X) = npq = 10(0.75)(0.25) = 1.875, and  = = 1.37.

Example 3.34 cont’d The probability that X is within 1 standard deviation of its mean value is P(7.5 – 1.37  X  7.5 + 1.37) = P(6.13  X  8.87) = P(X = 7 or X = 8) = P(X = 7) P(X = 8) = b(7; 10, 0.75)b(8; 10, 0.75) = 0.532. P(7.5–1.37  X  7.5+1.37) = P(7  X  8) = B(8; 10, 0.75) – B(6; 10, 0.75) = 0.532

Exercise Problem 54 cont’d P(A customer chooses an oversize tennis racket) = 0.6. X = # of customers among the 10 who choose oversize one. Then X ~ Bin(10, 0.6). a. P(X ≥ 6) = 1 – P(X ≤ 5) = 1 – B(5; 10, 0.6) = 1 – 0.367 = 0.633 b. µ = np = (10(0.6) = 6 σ = √[10(0.6)(0.4)] = 1.55 → µ – σ = 4.45, and µ + σ = 7.55 → P(4.45  X  7.55) = P(5  X  7) = P(X≤7) – P(X≤4) = B(7; 10, 0.6) – B(4; 10, 0.6) = 0.833 – 0.166 = 0.667

Exercise Problem 54 cont’d c. All 10 customers can get what they want iff 3 ≤ X ≤ 7. → P(3  X  7) = P(X≤7) – P(X≤2) = B(7; 10, 0.6) – B(2; 10, 0.6) = 0.833 – 0.012 = 0.821

Hypergeometric and Negative Binomial Distributions 3.5

The Hypergeometric Distribution The assumptions leading to the hypergeometric distribution are as follows: 1. The population to be sampled consists of N elements (a finite population). 2. Each element is characterized either as a success (S) or a failure (F), and there are M successes in the population. 3. A sample of n elements is randomly selected without replacement.

The Hypergeometric Distribution X = # of successes in the random sample of n elements. Then X is a rv, called hypergeometric rv. Its value range is {t, t+1, t+2, …, min(n, M)}, where t = max{0, n – N + M}. pmf: h(x; n, M, N) = P(X = x). See Eq. (3.15)

Example 3.35 We received 20 service calls for printer problems (8 laser printers and 12 inkjet printers). A random sample of 5 is selected for inclusion in a customer satisfaction survey. P(exactly 0, 1, 2, 3, 4, or 5 inkjet printers are selected) = ? Let X = # of inkjet printers in the sample of 5 printers. Then X is a hypergeometric rv.

Example 3.35 cont’d N = 20, n = 5, and M = 12. Value range: {0, 1, 2, 3, 4, 5} Consider X = 2. P(X = 2) = = 77/323 = 0.238

Example 3.35 If M =18 (not 12), P(X = 2) = ? Sample space is given by cont’d If M =18 (not 12), P(X = 2) = ? Sample space is given by {t, t+1, t+2, …, min(n, M)}, where t = max{0, n – N + M}. N = 20, n = 5, and M = 18. → t = max(0, 5-20+18) = 3, and min(n, M) = 5 → Sample space: {3, 4, 5} P(X = 2) = 0.

Example 3.35 If the sample size is increased to n = 15, P(X = 14) = ? cont’d If the sample size is increased to n = 15, P(X = 14) = ? Value range is given by {t, t+1, t+2, …, min(n, M)}, where t = max{0, n – N + M}. N = 20, n = 15, and M = 12. → t = 0 and min(n, M) = min(15, 12) = 12 → Value range: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} P(X = 14) = 0.

The Hypergeometric Distribution For hypergeometric rv X with pmf h(x; n, M, N), the mean and variance are In Example 3.35, N = 20, n = 5, and M = 12. → E(X) = 5(12)/20 = 3.0 V(X) = 0.9474

The Negative Binomial Distribution The negative binomial rv and distribution are based on an experiment satisfying the following conditions: 1. The experiment consists of a sequence of independent trials. 2. Each trial can result in a success (S) or a failure (F). 3. The probability of success is constant from all trial. 4. The experiment continues until a total of r successes observed.

The Negative Binomial Distribution Let X = # of failures that precede the rth success. Then X is called a negative binomial random variable, Its sample space is {0, 1, 2, 3, 4, 5, 6, …}, and Its pmf is written as nb(x; r, p), computed by

Example 3.38 A pediatrician wishes to recruit 5 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 = 0.2, P(15 couples must be asked) = ? With S = {agrees to participate}, r = 5, p = 0.2, and x = 10, P(15 couples must be asked) = = 0.034

Example 3.38 P(at most 10 F’s are observed) cont’d P(at most 10 F’s are observed) = P(at most 15 couples are asked) =

The Negative Binomial Distribution Remark. Some books define the negative binomial rv as the # of trials, rather than the # of failures. A special case: r = 1. The pmf is The random variable X = # of failures (or trials) until one success is observed is called a geometric random variable, and the pmf in Eq. (3.17) is called a geometric distribution. (3.17)

The Negative Binomial Distribution For a geometric random variable X (defined as # of failures until 1 success observed in our Textbook), E(X) = (1 – p)/p, and V(X) = (1–p)/p2. If a geometric random variable X is defined as # of trials until 1 success observed, then E(X) = 1/p, and V(X) = (1–p)/p2.

The Negative Binomial Distribution For a negative binomial rv X with pmf nb(x; r, p), its mean and variance are E(X) = r(1 – p)/p, and V(X) = r(1–p)/p2.

Exercise Problem 74 Inspector checks 10 firms for possible violation of regulations. Let X = # of firms among 10 checked that actually violate. a. If there are 50 firms, & 15 actually violate, What if the pmf of X? b. If there are 500 firms, and 150 actually violate, What is the pmf of X? An approximate pmf? c. Find E(X) and V(X) for both pmfs in Part (b).

Exercise Problem 74 cont’d a. X is Hypergeometric with n = 10, M = 15, and N = 50. Its pmf: p(x) = h(x; 10, 15, 50), x = 0, 1, 2, …, 10. b. X is Hypergeometric with n = 10, M = 150, and N = 500. Its pmf: p(x) = h(x; 10, 150, 500), x = 0, 1, 2, …, 10. Since N is very large relative to n, X can be approximated as a binomial rv with n = 10 and p = M/N. That is, h(x; 10, 150, 500) ≈ b(x; 10, 0.3) Note 0.3 = 150/500 c. For h(x; 10, 150, 500), E(X) = 10(150/500) = 3, V(X) = 2.06 For b(x; 10, 0.3), E(X) = 10(0.3) = 3, V(X) = 10x0.7x0.7 = 2.1

Exercise Problem 76 A family decides to have children until 3 same sex children. Let X = # of children in the family. With P(B) = P(G) = 0.5, What is the pmf of X?

Exercise Problem 76 cont’d This question relates to negative binomial distribution. But we cannot use it directly. Clearly, X cannot be 0, 1 or 2, and X < 6 → 3 ≤ X ≤ 5. P(X=3) = P(BBB U GGG) = P(BBB) + P(GGG) = 2(0.5)3 = 0.25 P(X=4) = P(GBBB U BGBB U BBGB U BGGG U GBGG U GGBG) = 6(0.5)4 = 0.375 P(X=5) = 1 – P(X=3) – P(X=4) = 0.375

The Poisson Probability Distribution 3.6 The Poisson Probability Distribution

The Poisson Probability Distribution Definition A discrete random variable X is said to have a Poisson distribution with parameter  ( > 0) if the pmf of X is P(X=x) = Its cdf is F(x, µ) = P(X ≤ x). X is called a Poisson random variable.

Example 3.39 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. P(a trap contains exactly five creatures) is

Example 3.39 cont’d P(a trap has at most five creatures) is

The Poisson Distribution as a Limit Proposition Suppose that in the binomial pmf b(x; n, p), we let n  and p  0 in such a way that np approaches a value  > 0. Then b(x; n, p)  p(x; ). By this proposition, if n is large and p is small, then b(x; n, p)  p(x; ), where  = np. As a rule of thumb, this approximation can safely be applied if n > 50 and np < 5.

Example 3.40 If (i) P(any given page containing at least typo) = 0.005 and (ii) typos are independent from page to page, P(a 400-page book has exactly one page with typos) = ? P(it has at most three pages with typos) = ? Let S be a page containing at least one error and F be an error-free page. Then X = # of pages having at least one typo is a binomial rv with n = 400 and p = 0.005, so np = 2.

Example 3.40 P(a 400-page book has exactly one page with typos) cont’d P(a 400-page book has exactly one page with typos) = P(X = 1) = b(1; 400, .005)  p(1; 2) The binomial value b(1; 400, 0.005) = 0.270669, so the approximation is very good.

Example 3.40 Similarly, P(X  3) cont’d Similarly, P(X  3) = 0.135335 + 0.270671 + 0.270671 + 0.180447 = 0.8571 This again is very close to the binomial value P(X  3) = 0.8576

The Poisson Distribution as a Limit Table below shows the Poisson distribution for  = 3 along with three binomial distributions with np = 3.

The Poisson Distribution as a Limit Table A.2 gives the cdf F(x; ) for  = 0.1, 0.2, . . . ,1, 2, . . ., 10, 15, and 20. Consider  = 2. From Table A.2 on page A-5, P(X  3) = F(3; 2) = 0.857. P(X = 3) = F(3; 2) – F(2; 2) = 0.180.

The Mean and Variance of X Proposition For a Poisson distribution X with parameter , E(X) = V(X) = .

Example 3.41 Example 39 continued… Both the expected number of creatures per trap and the variance of the number trapped equal 4.5, and X = = 2.12.

The Poisson Process

The Poisson Process A very important application of the Poisson distribution arises in connection with the occurrence of events of some type over time. Vehicles (driving east) passing USF main entrance Visits to a particular website Pulses of some sort recorded by a counter Email messages sent to a particular address Accidents in an industrial facility Cosmic ray showers observed by astronomers

The Poisson Process Given an interval, events occur at random throughout the interval. Partition the interval into subintervals of small enough length such that 1. P(more than one event in a subinterval) = 0. 2. The probability of one event in a subinterval is the same for all subintervals & proportional to the length of the subinterval. 3. The event in each subinterval is independent of other subintervals. The experiment of observing random events in an interval is called a Poisson process.

The Poisson Process X = # of events in the interval is a Poisson rv with pmf p(x; µ), where µ is the expected number of events in the interval. Remark If events occur at a rate of α per unit interval, then µ = α·t for a t-unit interval.

Example 3.42 Suppose pulses arrive at a counter at an average rate of 6 per minute, so that  = 6. P(at least one pulse is received in a 0.5-min interval) = ? The interval length t = 0.5 minutes → µ = α·t = 3 X = # of pulses received in a 30-sec interval is a Poisson rv.

Exercise Problem 85 Small aircrafts arrive according to a Poisson process with a rate of 8 per hour. a. Let X = # of aircrafts that arrive in 1 hour. P(X = 6) = ? P(X ≥ 6) = ? P(X ≥10) = ? b. Let X = # of aircrafts that arrive in a 90-min period. E(X) = ? V(X) = ? c. Let X = # of aircrafts that arrive in a 2.5-hour period.

Exercise Problem 85 a. E(X) = 8 aircrafts/hour. cont’d a. E(X) = 8 aircrafts/hour. P(X = 6) = e–886/6! = 0.122 P(X ≥ 6) = 1 – F(5; 8) = 1 – 0.191 = 0.809 P(X ≥10) = 1 – F(9; 8) = 1 – 0.717 = 0.283 b. E(X) = 8(1.5) = 12 aircrafts arriving in 90 minutes. P(X = 6) = e–12126/6! = 0.0255 P(X ≥ 6) = 1 – F(5; 8) = 1 – 0.0203 = 0.9797 P(X ≥10) = 1 – F(9; 8) = 1 – 0.242 = 0.758 E(X) = 12 V(X) = 12

Exercise Problem 85 cont’d c. E(X) = 8(2.5) = 20 aircrafts arriving in 2.5 hours. P(X = 6) = e–20206/6! = 0.00018 P(X ≥ 6) = 1 – F(5; 20) = 1 – 0.000072 = 0.999928 P(X ≥10) = 1 – F(9; 20) = 1 – 0.005 = 0.995 µ P(X = 6) P(X ≥ 6) P(X ≥10) t 8 0.112 0.809 0.283 1 hr 12 0.0255 0.9797 0.758 1.5 hrs 20 0.00018 0.999928 0.995 2.5 hrs

Exercise Problem 92 cont’d Vehicles arrive according to a Poisson process at a rate of α = 10 vehicles per hour. Suppose that p = P(an arriving vehicle has no equipment violations) = 0.5. a. P(exactly 10 arrive in 1 hr & none has violations) = ? b. P(y arrive in 1 hr & 10 of the y have no violations) = ? y≥10. c. P(10 no-violation vehicles arrive in the next hour) = ? [Hint: Sum the probabilities in part (b) from y=10 to ∞]

Exercise Problem 92 cont’d a. Let Y = # of cars arriving in the hour. → Y ~ Poisson(10). P(Y = 10 ∩ no violations) = P(Y=10)P(no violations│Y=10) = [e–101010/10!][(0.5)10] = 0.000122 b. P(Y = y ∩ 10 have no violations) = P(Y=y)P(10 have no violations│Y=y) = [e–1010y/y!][C10,y (0.5)10 (0.5)y–10] = e–105y/[10!(y-10)!]

Exercise Problem 92 c. P(exactly 10 without violations) cont’d c. P(exactly 10 without violations) = ∑y=10~∞ e–105y/[10!(y-10)!] = [e–10510/10!] ∑y=10~∞ [5y–10 /(y-10)!] = [e–10510/10!] ∑u=0~∞ [5u /(u!] u=y–10 = [e–10510/10!] e5 = e–5510/10! = p(10; 5) → X = # of vehicles without violations per hour. Then X ~ Poisson(µ), with µ = αp = 10(0.5) = 5 vehicles/hour.

Chapter Summary Concepts and Probability Distributions Discussed Random Variables Bernoulli Random Variables Probability Mass Functions (pmf) Cumulative Distribution Functions (cdf) Expected Values E(X). E[h(X)] & Variances V(X), V[h(X)] Binomial Distribution Hypergeometric Distribution Negative Binomial Distribuion Geometric Distribution Poisson Distribution