Bayesian? Probability of 2 Aces

Indeed, using the proper 3/51 and 48/51, Pasta’s calculation comes out to the same 1/9 as has been noted.

I got them from typing too quickly for my own good. Yes, it should be 1/17 and 16/17 (or 3/51 and 48/51), which leads to 1/9. :smack:

I also just ran my own simulation and get the same answer. Code (ROOT v5.10) and output below:

output:



trials: 10000000
conditions met: 407651
rockets!: 45137

P = 0.110725 +/- 0.000491469


code:



#include <iostream>
#include "TRandom3.h"

int Ax() {

  TRandom3 rand(0);

  const Int_t trials = 10000000;
  Int_t total = 0;
  Int_t rockets = 0;

  for (Int_t i=0;i<trials;i++) {
    Int_t cardA = rand.Integer(52);
    Int_t cardB = rand.Integer(52);
    while (cardB==cardA) {
      cardB = rand.Integer(52);
    }

    // look at first card.  Is it an ace (0,1,2,3)?
    if (cardA<4) {
      // look at random card
      Int_t secondLook = cardA;
      if (rand.Uniform()<0.5) secondLook = cardB;
      if (secondLook<4) {
        // we have seen an ace on the second shot
        total++;
        if (cardA<4&&cardB<4) rockets++;
      }
    }
  }

  cout << "trials: " << trials << endl;
  cout << "conditions met: " << total << endl;
  cout << "rockets!: " << rockets << endl;
  cout << endl;
  Double_t p  = (Double_t)rockets/total;
  Double_t sp = pow(p*(1-p)/total,0.5);
  cout << "P = " << p << " +/- " << sp << endl;

  return 0;

}


So if I peek and one of the cards is an 8, there’s still a 0.452% chance of them both being Aces?

sorry I’m pretty slow with maths but as I read it - have you factored in the number of looks? E.g. the dealer looked twice at the cards and saw aces both times. What if he looked 100 times and saw aces each time. One would be very certain that it was AA - yet the number of looks doesnt seem to enter above.

or to put it another way - we know it is either Ax or AA. If it was Ax then one would only expect not to see an x 25% of the time after two deals. I would say it was it was >50% chance of being AA, but couldnt say for certain whhat the exact odds are

The point that you’re missing is that Ax where x<>A has a much higher probability than Ax where x=A because we know we have one ace, so there’s only a 3/51 chance that x=A. if p(x=A) = p(x<>A), you would be right or close to it (I’m not up to working out that calculation right now).

Tests do have different false-postive and false-negative rates. Consider a (not actually useful) test where the procedure is “Throw the sample away, and always report negative.” That has a zero false-positive rate, but a 100% false-negative rate.
The difference between false-positive and false-negative rates is very important for exactly the reasons you highlight — since diseases are generally rare, having an equal false positive and false negative rate gives a lot more actual erroneous positive responses (but generally an erroneous positive is less dangerous than an erroneous negative).

You can factor in the number of looks by repeating the calculations.

For example, after looking once:
…same card…different card

AA… 1.5/51…1.5/51

Ax…24/51…24/51
You subtract the lower right box because you didn’t see an “x”.

That leaves you with 3/27 that you have AA, and 24/27 that you have Ax.
If you put the numbers back in, you get:
…same card…different card

AA… 1.5/27…1.5/27

Ax…12/27…12/27
You subtract the lower right box again (because you didn’t see “x”), and you get

1.5+1.5 for the numerator, and 1.5+1.5+12 for the denominator, for 3/15, or 1/5 chance of AA.

Every time you repeated the shuffle and peak (and saw an ace), your chances of AA would go up (but never to 100%).

Actually I think I see where my analysis differed from yours. You took a probability analysis, based on how two random cards from a real deck would play out.

I was taking the view (subconciously) that one had no knowledge of the deck (maybe it’s all aces). Therefore one had no a prior knowledge of the chance of AX vs AA. Based on that, one can only take a statistical approach (based on a very small sample mind you) about the chance of AA vs Ax. Given that with Ax one should only see A come up twice 1/4, then it favours the second card being an ace too. By how much I couldnt say (student T anyone?)