Solved

Calculating Probability

Posted on 2016-10-30
18
92 Views
Last Modified: 2016-11-01
Five hands (Five cards per hand) are dealt from a standard 52-card deck of cards.

What is the probability that the Queen of Heart will appear at least three times?

Note: After each dealing the entire deck (52 cards) are reshuffled.
0
Comment
Question by:Ray Turner
  • 8
  • 6
  • 3
  • +1
18 Comments
 
LVL 25

Expert Comment

by:Dr. Klahn
ID: 41866465
Can you show us the work you have done so far on the problem, so that we can assist appropriately?
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 41866983
>> rgturner
Looking at your Question History, it is unlikely that this is a homework question.  But it would help if you could give us some background.

If you can find the probability of the Q/H in one deal, you can use the binomial theorem (Pascal's Triangle) for the rest of the problem.

The calculations are fairly tedious.  But you can use the Binomial Distribution function in Excel.
0
 

Author Comment

by:Ray Turner
ID: 41867504
I'm trying to create a class using Visual Basic.  Here's what I have so far.

http://www.wikihow.com/Calculate-Probability

Calculating the Probability of Multiple Random Events

Can I use something like this???  If so,  how???
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 27

Expert Comment

by:d-glitch
ID: 41867521
This is a more complicated problem than any on the wikihow website.

The probability of seeing the Q/H in deal of five 5-card hands is 25/52, which is pretty straight forward.

The probability of this happening at least three times in five deals is not so simple.
There are 25=64 possible outcomes.

Look at the help file for the Binomial Distribution function in Excel.  It sounds like you want to duplicate this in Visual Basic.
0
 

Author Comment

by:Ray Turner
ID: 41867625
I've found several links about Binomial Distribution.  They all use a coin or a die.  How would I use Binomial Distribution to solve this problem?
0
 

Author Comment

by:Ray Turner
ID: 41867630
Please note I am not a Mathematician; nor am I a Statistician.  However; I am an expert with Visual Basic.
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 41867716
You will have seen the polynomial in terms of p and q.

In this problem:     p = 25/52        q = 1 - p = 27/52

The coefficients of the terms are C( x, n), the number of combination of n things taken x at a time.
0
 

Author Comment

by:Ray Turner
ID: 41868246
So the probability of this event occurring is 25/52?
0
 

Author Comment

by:Ray Turner
ID: 41868249
Can you provide the equation showing how you arrived at this value?
0
 
LVL 27

Assisted Solution

by:d-glitch
d-glitch earned 250 total points
ID: 41868374
There are 52 cards in a standard deck.
  • If you draw one card, the probability that it is the Q/H (or any specified card) is 1/52.
  • If you deal five hands of five cards (for a total of 25), the probability that the Q/H is in one of the hands is 25/52.
  • Similarly, the probability of the Q/H remaining in the deck (not being in among the dealt cards) is 27/52.

This is the easy part.  Dealing with the 64 possible outcomes of five deals is more complicated and requires some understanding of the Binomial Theorem.
     https://en.wikipedia.org/wiki/Binomial_theorem
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 41868908
I have gone back and reread your question.

Do you deal five hands from the deck, then reshuffle, and do it four more times.
This is the case I have been talking about.

Or do you deal one hand from the deck, then reshuffle, and do it four more times.
The solution method here is similar, but the numbers are very different.
0
 

Author Comment

by:Ray Turner
ID: 41869125
Sorry for the confusion.

I'm dealing one hand from the deck, then reshuffle, and do it four more times.
The solution method here is similar, but the numbers are very different.
0
 
LVL 27

Accepted Solution

by:
d-glitch earned 250 total points
ID: 41869229
The probability of getting the Q/H in a five card hand is 5/52 = 0.0962
The probability of this happening 3 or more times in 5 deals is  0.0077, less than 1%.
Binomial-Distribution-for-ExEx.PNG
1
 
LVL 32

Assisted Solution

by:phoffric
phoffric earned 250 total points
ID: 41869288
I agree with d-glitch's post in #a41869229 which gives the probability of getting at least 3 QH's in 5 deals as 0.0077.

I had originally gotten this number but I saw that d-glitch was taking a different interpretation of the OP. Now that you clarified the OP with #a41869125 , I can add a post which tries to explain the theory behind the spreadsheet.
0
 
LVL 32

Expert Comment

by:phoffric
ID: 41869320
As d-glitch noted, P = Prob( one QH in 5 cards out of 52) = 5/52.
And the probability of not getting a QH in one deal is Q = 1 - P = 47/52
To get at least 3 QH's in 5 hands, that is asking for the probability of getting:
1) exactly 3 QH's in 5 hands OR
2) exactly 4 QH's in 5 hands OR
3) exactly 5 QH's in 5 hands

Look at case (1). Each reshuffle and redeal are independent events. That is, the results of the one deal does not affect the results of the subsequent deals. Consider flipping a fair coin. If you get 10 Heads in a row, the probability of getting a Tail in the 11th toss is not more likely than getting a head (in a fair coin). The probability is still 1/2.

When you have independent events, the probability of two events is just the multiplication of the two probabilities. For example, the probability of flipping a fair coin two times and getting H, H is 1/2 * 1/2 = 1/4.

Here is one scenario for case 1:
QH  noQH  noQH QH QH (i.e., you got the QH in the first, 4th, and 5th deal)
The probability of getting this exact sequence of (independent) events is:
P * Q * Q * P * P = P^3 * Q^2

But, there are other ways to getting exactly 3 QH's in 5 deals - for example:
Probability(noQH  QH  noQH QH QH) = Q * P * Q * P * P = P^3 * Q^2
which results in the same probability.

There are obviously more scenarios to get exactly 3 QH's. The number of combinations to achieve this is given by the formula C(5,3) =

    5!              5 * 4 * 3 * 2* 1               5 * 4
----------- =  ----------------------------  =   ---------  = 10
 (5-3)! 3!       (2 * 1) * (3 * 2 * 1)               2

(To get a feel for this, you could enumerate all the cases to convince yourself that there are exactly 10 cases.)

In general, the combinatoric formula, C(n,k) gives the number of ways to select k items from n items.
       C(n,k) = n!/[ (n-k)! k! ]

In case you want to read a little about this formula, here is the wiki link:
https://en.wikipedia.org/wiki/Combination

To get exactly 3 QH's in 5 deals, we have to consider all 10 combinations. So the probability of this occurring is:
P(exactly 3 QH's in 5 deals) = 10 *  P^3 * Q^2 = 10 * (5/52)^3 * (47/52)^2 = 0.0073
----
Likewise, to get exactly 4 QH's in 5 deals, we have to consider all C(5,4) = 5 combinations. So the probability of this occurring is:
P(exactly 4 QH's in 5 deals) = 5 *  P^4 * Q^1 = 5 * (5/52)^4 * (47/52)^1 = 0.000386
----
Likewise, to get exactly 5 QH's in 5 deals, we have to consider all C(5,5) = 1 combinations. So the probability of this occurring is:
P(exactly 5 QH's in 5 deals) = 1 *  P^5 * Q^0 = (5/52)^5 = 0.000008219
----

To get at least 3 QH's in 5 deals, you just add up the three cases: 0.0073 + 0.000386 + 0.000008219 = 0.0077

===============

BTW, we added up 3 terms for exactly 3, 4, or 5 QH's in 5 deals.
If you added to this number 3 more terms corresponding to exactly, 0, 1, or 2 QH's in 5 deals, then this new number will be 1.0. Why? Because the probability that you will get either no QH's or 1 or more QH's in 5 deals is 100%. That is, in 5 deals, you either see at least one QH or you do not. There are no other cases to consider, so 100% is guaranteed.

Line 12 in d-glitch's spreadsheet demonstrates that when you ask for the probability that the even consists of all possible scenarios, then you naturally get 100%. Going back to the simpler fair coin example, if you ask what is the probability that a coin flip will be either a head or a tail, the answer is 100%

===============

Hope this helps.
Any questions?
0
 

Author Comment

by:Ray Turner
ID: 41869333
Thanks!  Wow!
0
 

Author Closing Comment

by:Ray Turner
ID: 41869336
Thanks!!!
0
 
LVL 32

Expert Comment

by:phoffric
ID: 41869361
Glad we could help.
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Nicole
This is a research brief on the potential colonization of humans on Mars.
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question