Probability dealing a deck of cards. Need helps!

2 views (last 30 days)
I'd like to use Matlab to solve this problem.
There are 10 cards in a box that each has its number from 1 to 10. The cards number 1,2,3 and 4 have prize of 1000, 500, 200, 300 cent respectively, the other don't. A choose 2 cards randomly and he got the prize, then he put the cards back into the box. B choose 2 cards randomly and he got the prize too.
What's the probability that "the difference amount of money" that received by A and B are not exceed 500 cent ?
Thank you

Answers (2)

Roger Stafford
Roger Stafford on 15 Nov 2014
It is really up to you to try to work on the matlab approach to this problem yourself and to then show us what you have tried so that we can advise you on it. However, here is a hint to get you started.
You are actually given a problem in conditional probability here. Based on your description, it is given that A has selected either one or two of the prize cards and that the same is true of B. I figure there are 30 different ways each of these pairings can happen, giving you 900 combinations altogether. Your task is to determine how many out of these 900 satisfy the stated result and from that you can determine the conditional probability. What's holding you up? Get cracking!

Image Analyst
Image Analyst on 15 Nov 2014
What was wrong with the answer I gave in http://www.mathworks.com/matlabcentral/answers/160856#answer_157301? You accepted it (thanks).
  4 Comments
Image Analyst
Image Analyst on 18 Nov 2014
Yes, but you have to know the exact statistical formula, and there are lots of statistical formula. Sometimes they're tricky and people use the wrong one. The beauty of Monte Carlo is that you can get an empirical result without knowing any formulas. You just need to call rand() a bunch of times, which is pretty simple, perhaps simpler than trying to look up or figure out the formula. True, it's not as efficient as if you knew the formula in advance and could solve it in one line of code, but if you don't know the formula it's simple and fine. Plus it has a cool name.
Roger Stafford
Roger Stafford on 18 Nov 2014
Knowing the correct statistical formula is what this problem is all about. In this case it is finding the percentage of the possible combinations of two pairs each winning at least one prize in which the difference in total winnings is no more than five dollars. It is simply a matter of counting, and in my opinion much simpler than doing Monte Carlo approximations for the same procedure. Matlab quickly gave me 624 out of a total of 900, and that gives an exact conditional probability.
Unless you are careful in that statistical model you set up in #160856, you will get an approximation to Michael's answer which is the unconditional probability and not the right answer. In any case I suspect that if this is homework, the teacher would not give full credit to such a Monte Carlo method of working the problem. I wouldn't have if I had given this problem to my students in the college-level statistics class I once taught.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!