1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Discrete Math vs. Statistics

  1. Apr 16, 2009 #1
    In statistics I learned how to do this problem one way, & in discrete mathematics I learned how to do it another way, but the answers don't jive. So I'm wondering if I'm doing something wrong. Below is the question.

    A bakery produces six different kinds of pastry. If the different kinds of selections of 20 pastries are equally likely, what is the probability that a selection contains exactly three eclairs?

    In discrete the problem is solved as follows, (17+5-1)C(17)=5985 is the number of ways to get exactly 3 eclairs. The total number of ways to choose is (20+6-1)C(20)=53130. So the probability of getting exactly 3 eclairs is 5985/53130=.113. The book has the same answer.

    But in statistics I'd solve the problem as a binomial. The chance of selecting an eclair would be viewed as a success (1/6 chance). So just plugging this into my calculator for a quick answer I do bipdf(20,1/6,3)=.238, & I get the same thing when I use the formula by hand.

    So why are these values different? The question is from the discrete book, so is my statistics wrong?
  2. jcsd
  3. Apr 16, 2009 #2
    I'm not sure how you're doing it the discrete way.

    In my mind, there are 6^20 ways to pick 20 pastries if each pastry is 1 of 6 different kinds of pastry. This is the denominator of the fraction.

    Now how many ways are there to get 3 eclairs in 20 pastries? Well how many ways can you fill 20 buckets with 3 eclairs? Easy - C(20,3). How many ways can you fill the remaing 17 buckets with any of the 5 remaining kinds of pastries? Easy again - 5^17.

    Try (5^17)C(20,3) / 6^20 and see if that doesn't give you the 0.238 answer.

    Basically, the problem is that you can't consider the sample space as inherently unsorted, because it's not true that getting 20 eclairs is as likely as getting about 3 of each. The binomial distribution takes this into account; your solution a la discrete math did not.
  4. Apr 16, 2009 #3
    Ok, thats how I'd go about the problem. I dunno though, the books explanation is this "If exactly three of the pastries are eclairs, then 17 additional pastries are selected from five kinds. The number of selections is (17+5-1)C(17)=5985. Then that number is just over the total selections they calculated before (outline in my original post).

    "The total number of different combinations is derived from a theorem that states "The number of r-combinations with repetition allowed that can be selected from a set of n elements is (r+n-1)C(r). This equals the number of ways r objects can be selected from n categories of objects with repetition."

    Like I said, I would have solved it the statistics way, but how can you really tell which approach to take? I see you said the problem was assuming the sample space was unsorted, but I'm not sure exactly why the sample space wouldn't have been unsorted.
  5. Apr 16, 2009 #4
    I mean, it's the same reason that if you flip a pair of coins the probabilities aren't 1/3 for two heads, 1/3 for two tails, and 1/3 for one of each. The "one of each" thing can happen more ways than the "both" ways.

    I think you're misinterpreting the formula given in the book. The one you list clearly doesn't apply here... (17+5-1) C (17) looks more like the way to arrange the pastries in *specific blocks*, that is, the number of ways to partition 17 elements into 5 blocks. Either way, I don't see how that formula can be used here.

    One thing you'll learn in discrete math is that it's not about formulae, it's about ideas. The ideas suggest algorithms, not formulae... I can't think of a formula from discrete math which I have memorized, per se. If you know the ideas, you can solve most problems without relying blindly on a formula. I'm not trying to be insulting, but it seems like that's what's going on here... you can't explain why the formula you provided should work, and in fact it doesn't.
  6. Apr 17, 2009 #5
    Well thats what I'm saying. I wouldn't have solved the problem how the book solves them. That formula is what the book used to solve the problem, I just pulled the answer verbatim from the book. But they solve all their problems in the same way... & then treating them with has a binomial just doesn't give you the same answer. Why should that formula work though? Well read through it, what they say makes sense, though I trust what I've already learned in statistics more, which is why I questioned the answer.
  7. Apr 17, 2009 #6
    Like I said, I think you're misinterpreting the formula. For the question you asked, the binomial distribution gives the correct answer. Now is this really what the book was asking? I doubt it, or else the book is *lying to you*.
  8. Apr 17, 2009 #7
    Ok, I think I'm getting what it is "really" asking now. Their denominator is "how many different selections of twenty pastries," while I guess that is different from "how many ways are there to select twenty different pastries."

    Also, the question asks "what is the probability that a selection contains three eclairs," which here again must be different from "what is the probability of selecting 3 eclairs."

    In the first case, the discrete method I reckon would be right, but in the other case, the binomial distribution would be correct. Tricky wording. But does the reasoning make sense?
  9. Apr 17, 2009 #8

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Yes, you're correct. You need to calculate how many selections of 20 pastries from 6 types there are. I don't think the wording is particularly tricky - it is just not what you expect it to say so your mind, whilst looking on the words, substitutes in the kind of question you normally expect.
  10. Apr 17, 2009 #9
    True. Thanks everyone for the help. It makes sense now.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook