1 / 71

Chapter 6 Discrete Probability Distributions

KVANLI PAVUR KEELING. Chapter 6 Discrete Probability Distributions. Chapter Objectives. At the completion of this chapter, you should be able to answer the following questions: ∙ What is meant by the term " probability distribution ?"

cybil
Download Presentation

Chapter 6 Discrete Probability Distributions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. KVANLI PAVUR KEELING Chapter 6Discrete Probability Distributions

  2. Chapter Objectives • At the completion of this chapter, you should be able to answer the following questions: ∙ What is meant by the term "probability distribution?" ∙ What is the formula for the mean and variance of a discrete random variable? ∙ When, and how, is the binomial distribution used? ∙ When, and how, is the Poisson distribution used?

  3. Example • Flip a coin 2 times • Suppose we’re interested in the number of heads in the 2 flips • Chapter 5 way: Define A: H on 1st flip and H on 2nd flip B: H on 1st flip and T on 2nd flip C: T on 1st flip and H on 2nd flip D: T on 1st flip and T on 2nd flip

  4. Example • Chances of getting exactly one H in the 2 flips is P(B or C) = P(B) + P(C) since B and C are mutually exclusive • P(B) = P(H on 1st flip and T on 2nd flip) = P(H on 1st flip) · P(T on 2nd flip) = ½ · ½ = ¼ • Similarly, P(C) = ¼ • P(B or C) = ¼ + ¼ = ½

  5. An Easier Way • Define X to be the number of H’s in the 2 flips 0 with probability X = 1 with probability 2 with probability X=0 How can this occur? T on 1st flip and T on 2nd flip For a fair coin, this is ½ · ½ since coin flips are independent P(X = 0) is ½ · ½ = ¼ ¼

  6. Defining the Random Variable ¼ 0 with probability X = 1 with probability 2 with probability X=1 How can this occur? H on 1st flip and T on 2nd flip - OR - T on 1st flip and H on 2nd flip P(X = 1) is ¼ + ¼ = ½ ½ As before, this is ½ · ½ = ¼ And this is ½ · ½ = ¼

  7. Defining the Random Variable 0 with probability X = 1 with probability 2 with probability X=2 How can this occur? H on 1st flip and H on 2nd flip P(X = 2) is ½ · ½ = ¼ ¼ ½ ¼ Once again, this is ½ · ½ = ¼

  8. A Discrete Random Variable • X = number of H’s in 2 coin flips is called a discrete random variable • Why discrete? • Suppose you observe X • You would get something like {1, 1, 0, 2, 1, 2, 0, 1, …,1} • These are discrete data • Here, X = (counting something) This is a sample

  9. Continuous Random Variable • The other type of random variable is a continuous random variable • Here, X = (measuring something) • Examples: Height, weight, length, length of time • Consider a sample of heights: {5.82’, 6.45’,…., 5.41’} • These are continuous data • Continuous random variables will be discussed in Chapter 7

  10. Another Discrete Random Variable Container with 30 poker chips 10 of these 10 of these 10 of these 1 2 3 Select 2 chips with replacement Let X = total of the 2 chips

  11. X = Total of the 2 Chips 2 with probability 3 with probability X = 4 with probability 5 with probability 6 with probability X=2 How can this occur? on the 1st draw and on the 2nd draw The probability of selecting a on each draw is 1/3 since 10 of the 30 chips are numbered one • P(X = 2) is ⅓ · ⅓ = 1/9 Remember: We replace the 1st chip before drawing the 2nd chip

  12. X = Total of the 2 Chips 2 with probability 3 with probability X = 4 with probability 5 with probability 6 with probability X=3 How can this occur? on the 1st draw and on the 2nd draw -- OR -- on the 1st draw and on the 2nd draw • P(X = 3) is (1/3)(1/3) + (1/3)(1/3)= 1/9 + 1/9 = 2/9 1/9 2/9

  13. X = Total of the 2 Chips 2 with probability 3 with probability X = 4 with probability 5 with probability 6 with probability X=4 How can this occur? on the 1st draw and on the 2nd draw -- OR -- on the 1st draw and on the 2nd draw -- OR -- on the 1st draw and on the 2nd draw 1/9 It looks like P(X = x) is We’ll see if this holds up! 2/9 3/9 P(X = 4) is 1/9 + 1/9 + 1/9 = 3/9

  14. X = Total of the 2 Chips 2 with probability 3 with probability X = 4 with probability 5 with probability 6 with probability X=5 How can this occur? on the 1st draw and on the 2nd draw -- OR -- on the 1st draw and on the 2nd draw 1/9 According to the previous expression, P(X = 5) should be (5 – 1)/9 = 4/9 This expression will not work! 2/9 3/9 2/9 P(X = 5) is 1/9 + 1/9 = 2/9

  15. X = Total of the 2 Chips 2 with probability 3 with probability X = 4 with probability 5 with probability 6 with probability X=6 How can this occur? on the 1st draw and on the 2nd draw P(X = 6) is ⅓ · ⅓ = 1/9 Sum these values The total must equal one (and it does) 2/9 3/9 2/9 1/9

  16. Representing a Discrete Random Variable • Make a list - - this was done in the previous slides • Make a histogram/bar chart 3/9 Prob. 2/9 1/9 2 3 4 5 6

  17. Finding the Probabilities • Earlier, we tried the expression P(X = x) is • This did not work for x = 5 and x = 6 • There is an expression that works here; namely P(X = x) is • You will never be asked to find such an expression! • Let’s just make sure it works

  18. The Probability Mass Function (PMF) • P(X = 3) = • P(X = 2) = • P(X = 4) = • P(X = 6) = • This expression is called a probability mass function • The PMF probabilities should be between 0 and 1 and sum to 1 • P(X = 5) = Everything checks out – this is the correct expression! PMF

  19. Another Look at Coin Flipping 0 with probability X = 1 with probability 2 with probability • To find the PMF for this situation, we need to define the combination function • This is written aCb • aCb counts the number of ways of getting “b” heads (H’s) in “a” flips of a coin ¼ ½ ¼

  20. The Combination Function a! is read “a factorial” • How to find: • For example, 5C2 counts the number of ways of getting 2 H’s (and 3 T’s) in 5 flips of a coin • This is • I would suggest you figure out how to find combinations on your calculator!!

  21. The PMF for this Example • X = number of H’s in 2 flips of a coin • The PMF here: P(X = x) is 2Cx(½)2 • Does this work? • P(X = 0) is • So, P(X = 0) is (1)(¼) = ¼ (this is correct) • P(X = 1) is = (2)(¼) = (½) (correct) • P(X = 2) is = (1)(¼) = ¼ (correct) 2C0 = 1 (Hint: 0! Is defined to be 1) It works!

  22. The PMF for any Number of Coin Flips • Does this pattern extend to any number of coin flips? • As we’ll see in the next section, it does • For example, the chances of getting 6 H’s in 10 flips of a coin is 10C6(½)10 = (210)(½)10 = .205 • When you flip a coin 10 times, 20% of the time you’ll get 6 H’s and 4 T’s There are 210 ways of getting 6 H’s in 10 flips

  23. Section 6.2 • Let X = total of the 2 chips • Suppose we observe X say, 10 times • Observations: {3, 5, 4, 4, 2, 5, 6, 3, 5,4} • Sample mean is x = 4.1 • Sample variance is s2 = 1.433 • Sample standard deviation is s = 1.197 • Question: What is the mean going to be if X is observed indefinitely? a sample

  24. Mean of a Random Variable • The answer to the question is referred to the mean of X • The symbol for the mean of X is µ • This is spelled mu and pronounced “myoo” • So, µ is the average value of X if it is observed indefinitely • How to find: µ is ∑x·P(x)

  25. X = Total of the 2 chips • µ is (2)(1/9) + (3)(2/9) + (4)(3/9) + (5)(2/9) + (6)(1/9) • This is µ = 36/9 = 4.0 • Question: The sample variance was s2 = 1.433 • What is the variance going to be if X is observed indefinitely? • This is called the variance of X • The symbol for the variance is σ2 Read as “sigma squared”

  26. X = Total of the 2 chips • How to find the variance: σ2 = ∑(x - µ)2 · P(x) • An easier way: σ2 = ∑x2P(x) - µ2 • Here, σ2 = [(2)2(1/9) + (3)2(2/9) + (4)2(3/9) + (5)2(2/9) + (6)2(1/9)] – (4)2 This is: σ2 = 156/9 – 16 = 1.333 • The standard deviation of X is • Here, This is the variance of X This is the standard deviation of X

  27. Summary • Every discrete random variable, X, has a ∙ mean (µ) ∙ variance (σ2) ∙ standard deviation (σ)

  28. Section 6.3 – Binomial Random Variables • Example X = number of heads (H’s) in 5 flips of a coin • As we will see, X is a special kind of discrete random variable, called a binomial random variable

  29. Conditions for a Binomial Random Variable 1. Have n = 5 coin flips 1. Have n trials 2. Each trial has two possible outcomes Called: success and failure 3. The chances of a success on each trial is p 2. Each flip has two possible outcomes success: flipping a H failure: flipping a T 3. p is ½ (assuming a fair coin)

  30. Conditions for a Binomial Random Variable 4. The trials are independent (don’t affect each other) 5. X = number of successes (out of the n trials) 4. Coin flips are always independent 5. X = number of H’s (out of the 5 flips) This is a binomial random variable

  31. X = Number of H’s in 5 Flips 0 with probability 1 with probability X = 2 with probability 3 with probability 4 with probability 5 with probability • It appears that P(X = x) is 5Cx(½)5 • Using this PMF, the values on the next slide are obtained Consider X = 2 (2 H’s and 3 T’s) How many ways can you get 2 H’s? There are 5C2 = 10 ways. Consider one of these: T H T T H Chances of this occurring is (½)(½)(½)(½)(½) = (½)5 = 1/32 Ditto for all 10 of these So, P(X = 2) is 5C2(½)5 = 10/32

  32. P(X = x) is 5Cx(½)5 0 with probability 5C0(½)5 = (1)(1/32) = 1/32 1 with probability 5C1(½)5 = (5)(1/32) = 5/32 2 with probability 5C2(½)5 = (10)(1/32) = 10/32 3 with probability 5C3(½)5 = (10)(1/32) = 10/32 4 with probability 5C4(½)5 = (5)(1/32) = 5/32 5 with probability 5C5(½)5 = (1)(1/32) = 1/32 X = This is a binomial random variable with n = 5 and p = ½

  33. Any Number of Coin Flips • For any number of coin flips (say, n) the PMF is P(X = x) is nCx(½)n • Consider n = 20 coin flips • The chances of getting 12 H’s is 20C12(½)20 • 20C12 is very large – in fact, there are 125,970 ways of getting 12 H’s and 8 T’s • (½)20 is very small • It turns out that 20C12(½)20 = .120

  34. Using an Unfair Coin • Suppose you don’t have a fair coin • In fact, there is a 20% chance of flipping a head and an 80% chance of flipping a tail • These percentages are determined by flipping this coin many times and observing the results • Let X = number of H’s in 5 flips using this coin • X is still binomial, only now p = .2 rather than ½

  35. X = Number of H’s in 5 Flips of an Unfair Coin 0 with probability 1 with probability X = 2 with probability 3 with probability 4 with probability 5 with probability • It appears that P(X = x) is 5Cx(.2)x(.8)5-x • Using this PMF, the values on the next slide are obtained Consider X = 2 (2 H’s and 3 T’s) How many ways can you get 2 H’s? There are still 5C2 = 10 ways. Consider one of these: T H T T H Chances of this occurring is (.8)(.2)(.8)(.8)(.2) = (.2)2(.8)3 Ditto for all 10 of these So, P(X = 2) is 5C2(.2)2(.8)3

  36. P(X = x) is 5Cx(.2)x(.8)5-x This is p This is 1 -p 0 with probability 5C0(.2)0(.8)5 = .328 1 with probability 5C1(.2)1(.8)4 = .410 2 with probability 5C2(.2)2(.8)3 = .205 3 with probability 5C3(.2)3(.8)2 = .051 4 with probability 5C4(.2)4(.8)1 = .006 5 with probability 5C5(.2)5(.8)0 = .000 X = This is a binomial random variable with n = 5 and p = .2

  37. Any Binomial Random Variable • The PMF for any binomial random variable with n trials and probability of success on each trial equal to p is P(X = x) is nCxpx(1 – p)n-x • Table A-1 has this PMF worked out for n ≤ 20 and certain values of p • This table will be illustrated using the unfair coin example

  38. Table A-1

  39. Another Container Container with 20 poker chips 6 red ones 14 blue ones Select 4 chips with replacement Let X = number of red chips

  40. Is X Binomial? • There are n = 4 trials • There are 2 possible outcomes on each trial • drawing a red chip ← success • drawing a blue chip ← failure • What is p (chance of a success in each trial)? p is 6/20 = .3 • Are the trials independent? Yes, since the chips are selected with replacement • Yes, X is binomial with n = 4 and p = .3

  41. Table A-1

  42. X = Number of Red Chips This is 4C1(.3)1(.7)3 0 with probability .240 1 with probability .412 X = 2 with probability .265 3 with probability .076 4 with probability .008 • Buzz Words: “no more than” and “at least” • “no more than” means ≤ • “at least” means ≥

  43. X = Number of Red Chips • What are the chances of getting no more than 2 red chips? • P(X ≤ 2) = P(0) + P(1) + P(2) = .240 + .412 + .265 = .917 • An easier way: Use Table A-2 • It contains ≤ probabilities and will be slightly more accurate

  44. Table A-2

  45. X = Number of Red Chips • What are the chances of getting at least 2 red chips? • P(X ≥ 2) = P(2) + P(3) + P(4) = .265 + .076 + .008 = .349 • You can use Table A-2 • P(X ≥ 2) = 1 – P(X < 2) = 1 – P(X ≤ 1) • Using Table A-2 on the next slide, this is 1 - .652 = .348 (slightly more accurate) Using Table A-1 Don’t forget this step!

  46. Table A-2

  47. With or Without Replacement • When selecting items, your choice is with replacement or without replacement • To be a binomial random variable, items should be selected with replacement • But with this procedure, you could select one of the items more than once, generally not something you want to happen • For this reason, sampling without replacement is the usual procedure

  48. With or Without Replacement • It turns out that it doesn’t really matter whether you are sampling with replacement or without replacement provided your sample size (n) is less than 5% of the population size (N) - - that is, n/N < .05 • In the previous example, N = number of chips in the container (20)

  49. With or Without Replacement • In the chips example, 4/20 = .2 > .05 and this rule doesn’t apply • For this situation, the chips must be selected with replacement for X to be binomial • For many situations, you are selecting a sample from a huge population and the sample size is less than 5% of the population size • In this case, whether you select the items with or without replacement doesn’t really matter

  50. Shortcuts for the Mean and Variance • Some good news: There is no need to hammer out the mean and variance as discussed in section 2 for a binomial random variable • It turns out for a binomial random variable: mean = µ = np variance = σ2 = np(1 – p) standard deviation = σ =

More Related