Why Are Discrete Math and Statistics Approaches Giving Different Probabilities?

In summary, the conversation discussed the differences in solving a probability problem using discrete mathematics and statistics. The problem involved selecting 20 pastries from a bakery that produces six different kinds of pastries, with the specific question being the probability of selecting exactly three eclairs. While the book's solution used a formula from discrete math, the correct approach was to use the binomial distribution. The conversation also highlighted the importance of understanding the concepts behind the formulas rather than relying on memorized equations.
  • #1
kuahji
394
2
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?
 
Physics news on Phys.org
  • #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 remaining 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.
 
  • #3
Ok, that's how I'd go about the problem. I don't know 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.
 
  • #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.
 
  • #5
Well that's 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.
 
  • #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*.
 
  • #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?
 
  • #8
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.
 
  • #9
True. Thanks everyone for the help. It makes sense now.
 

FAQ: Why Are Discrete Math and Statistics Approaches Giving Different Probabilities?

1. What is the difference between discrete math and statistics?

Discrete math is a branch of mathematics that deals with finite and countable sets, while statistics is a branch of mathematics focused on collecting, analyzing, and interpreting data.

2. Which field is more applicable to real-world problems?

Both discrete math and statistics have practical applications in various fields, but statistics is more commonly used in real-world problems such as market research, data analysis, and risk assessment.

3. Are there any similarities between discrete math and statistics?

Both discrete math and statistics use mathematical models and algorithms to solve problems. Additionally, both fields involve logical reasoning and critical thinking skills.

4. Can you give an example of a problem that can be solved using discrete math and statistics?

A problem related to analyzing data from a survey can be solved using both discrete math and statistics. Discrete math can be used to create a survey design and formulate questions, while statistics can be used to analyze the collected data and draw conclusions.

5. Which field is more important for a data scientist?

Both discrete math and statistics are important for a data scientist, as they provide the necessary tools and techniques to analyze and interpret data. However, a strong foundation in statistics is crucial for understanding and working with data in a data science role.

Back
Top