Re: Easy probability question (Bayes theorem)



On Dec 13, 11:32 pm, Randy Poe <poespam-t...@xxxxxxxxx> wrote:
On Dec 13, 5:48 am, Taras_96 <taras...@xxxxxxxxx> wrote:



Hi Robert,

On Dec 10, 1:04 pm, Robert Israel

<isr...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Taras_96 <taras...@xxxxxxxxx> writes:
Hi everyone,

I'm having a bit of trouble with probability and ordering. I'll try to
explain with an example:

QUESTION: what is the probability that you choose an ace of spades and
an ace of diamonds out of a deck of cards

The question is ambiguous. Assuming you are choosing two cards at random
(without replacement), is it asking for the aces of spades and diamonds to be
in that order, or is any order OK?

Using Baye's theorem:
Pr(pick an ace of space and an ace of diamonds) = Pr(ace of
spaces)*Pr(ace of diamonds|ace of spades)
= 1/52 * 1/51

That's using conditional probabilities, but it has little to do with Bayes'
theorem.

You are correct - although some notes state it as 'Bayes' formula'

This is OK for the version of the question in which you don't care which
order the cards are in. You could also do this one with conditional
probabilities: the probability that the first card is the ace of diamonds or
the ace of spades is 2/52, and the conditional probability, given that the
first card is one of those, that the second is the other one is 1/51. So
the answer is 2/52 * 1/51.

I should have clarified, but the original question was supposed to be
ordering unimportant and no replacement. I understand everything that
has been written so far, but there's still some little thing that
doesn't quite sit right - I can't quite put my finger on it. we are
essentially using the same formula/definition is used in two different
ways.

So we have P(A&B) = P(A)*P(B|A) without any meaning attached to A or B

To explain my confusion, let's consider separate problems.

"A classroom is 50% boys. 10% of the boys' names are Jack. You pick a
student at random - what is the probability that that student's name
is Jack?"

Let A = the student is a boy
B = the student's name is Jack

From the question P(A) = .5, and P(B|A) = 0.1. So P(A&B) = 0.5*0.1 =
0.05.

Now consider the original question I posed.

"What is the probability of drawing an ace of spaces and an ace of
diamonds out of a pack of cards (no replacement, order unimportant)"

Let A = ace of spaces is drawn from the pack
B = ace of diamonds is drawn from the pack

P(A) = 1/52
P(B|A) = 1/51

But now, P(A&B) = P(A)P(B|A) + P(B)P(A|B)

What is the nature of the question that makes the formula 'change'?

This equation is not true. That is not a translation
of the solution you were given. That is, the events
that appeared in the expression that looked like your
right hand side were not the same events that
appeared on the left hand side.

There are actually four events:
A1 = first card drawn is ace of spades
B1 = first card drawn is ace of diamonds
A2 = second card drawn is ace of spades
B2 = second card drawn is ace of diamonds

Well, actually, there are two more:
A = one of the cards drawn is ace of spades
= A1 or A2
B = one of the cards drawn is ace of diamonds
= B1 or B2

It is still true that
P(A & B) = P(A) P(B|A) = P(A1 or A2) P(B1 or B2 | A1 or A2)
and it is also true that
P(A & B) = P(B) P(A|B)

However it turns out to be easier to calculate
P(A & B) = P(A2 & B1) + P(A1 & B2)
= P(B1)P(A2 | B1) + P(A1) P(B2|A1)

Once we have translated the original question into a 'mathematical'
form (by assigning values to variables), then the solution of the
question should just become a manipulation of variables.

Yes. And so the key to probability calculations often
rests on properly defining the events.

- Randy

Excellent explanation Randy, thanks a lot :) !
.



Relevant Pages

  • Re: cards out of wack
    ... in main, not in the card class, and pass a reference to it to the card class ... > case ACE: ... >ace of spades ...
    (comp.lang.java.programmer)
  • Re: Flawed Analysis
    ... After taking H Q, if diamonds break 3-2, there are 12 tricks on top. ... Now you know that West had 5 spades to start with, ... If East wins ace, 12 tricks. ... then cash the black suit winners. ...
    (rec.games.bridge)
  • cards out of wack
    ... I'm trying to put together the constructs of a card game. ... really fast it will sometimes have the same random card between ... ace of spades ...
    (comp.lang.java.programmer)
  • Re: Easy probability question (Bayes theorem)
    ... an ace of diamonds out of a deck of cards ... is it asking for the aces of spades and diamonds to be ... first card is one of those, that the second is the other one is 1/51. ... B1 = first card drawn is ace of diamonds ...
    (sci.math)
  • Re: Flawed Analysis
    ... After taking H Q, if diamonds break 3-2, there are 12 tricks on top. ... Now you know that West had 5 spades to start with, ... If East wins ace, 12 tricks. ... then cash the black suit winners. ...
    (rec.games.bridge)