Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 ... 6  All

Author Topic: A question in probability  (Read 34925 times)

0 Members and 1 Guest are viewing this topic.

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
A question in probability
« on: December 02, 2015, 04:45:51 am »
+2

I'm starting this thread as a place to talk about the question in probability that arose during the recently-finished game of Harry Potter Mafia: http://forum.dominionstrategy.com/index.php?topic=14209.0

The setup is the following.  7 letters are selected at random.  For each letter individually, there is a 1/2 chance of selecting a "T", 1/10 of selecting a "P", 1/10 of selecting a "K" and 3/10 of choosing some other letter. 

At some point in the game it became known that:
1) Exactly 3 Ts had been chosen.
2) At least 2 Ps had been chosen.
3) At least 1 K had been chose.

The question: given this information, what is the probability that in fact 3 Ps had been chosen?  (ie. the letters were some arrangement of TTTPPPK?)
The "obvious" answer: 20%, since the chance of getting a P out of a single letter which is known not to be a T is 1/5.

I argue that this is wrong.

The argument is based on the following fact. 

I flip two (fair) coins and tell you that at least one of them came up heads.  Then the probability of both being heads, given that information is 1/3. 
This is because there are 4 equally likely possibilities: HH, HT, TH and TT.  Of these, exactly 3 contain one or more heads, and exactly 1 contains 2 heads, the P(2 heads | 1 or more heads)=1/3.

By a similar argument (which I will present in the next post), I argue that the answer to the larger question is 2/23, as unintuitive as this seems.

Let's discuss.
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #1 on: December 02, 2015, 05:01:01 am »
+1

Proof that P(3 Ts, 3Ps, 1K  |  3 Ts, 2+ Ps, 1+ K) = 2/23.

We model the problem as having rolled 7 10-sided die (in fact the letters other than T, P, K are subdivided more awkwardly, but the chance of getting something other than TPK is still 3/10, so this model is fine).

The probability of getting 3 Ts, 3Ps and 1K (absent all other data) is precisely:
  (1/2)^3 x (1/10)^3 x 1/10 x (number of distinct ways of rearranging the letters TTTPPPK)
=(5^3/10^7) x (7!/(3!x3!)),

since there are 7! ways of rearranging 7 objects, but in this case that will be 3!3! too many since there are 3! copies of things that look like (for instance)  TxTxTxx.  (and the same for Ps).

The probability of getting exactly 3 Ts, 2 or more Ps, 1 or more K (absent all other data) and then one more non-T is precisely:
  P(3Ts, 3Ps, 1K) + P(3Ts, 2Ps, 2Ks) + P(3Ts, 2Ps, 1K, 1 other)

=(5^3/10^7) x  7!/(3!3!)   +  (1/2)^3 x (1/10)^2 x (1/10)^2 x 7!/(3!2!2!)     +  (1/2)^3 x (1/10)^2 x (1/10) x (3/10) x 7!/(3!2!)

= (5^3/10^7) x (7!/(3!3!) + 7!/(3!2!2!)  +  3 x 7!/(3!2!))

= (5^3/10^7) x (7!2!2! + 7!3! + 3 x 7!3!2!)/(3!3!2!2!)

= (5^3/10^7) x 7! x (46/(4x3!))


So  by the laws of conditional probability, we have

P(3 Ts, 3Ps, 1K  |  3 Ts, 2+ Ps, 1+ K)= (5^3)/(10^7) x 7!/(3!3!)  divided by  (5^3/10^7) x 7! x 46/(4x3!)
                                                   = 1/(46/4) = 4/46 = 2/23.

Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #2 on: December 02, 2015, 05:08:01 am »
0

I backed this up by having a computer run through all the possibilities and count them.  Here's some C# code which people can run if they want (it's messy, but it gets the job done).

Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        public static int Count(int a,int b, int c, int d, int e, int f, int g, int lower, int upper)  //counts how many of a,b,c,...g lie in the range lower<=x<=upper.
        {
            int result = 0;
            if (a<= upper && a>=lower)
            {
                result++;
            }
            if (b <= upper && b >= lower)
            {
                result++;
            }
            if (c <= upper && c >= lower)
            {
                result++;
            }
            if (d <= upper && d >= lower)
            {
                result++;
            }
            if (e <= upper && e >= lower)
            {
                result++;
            }
            if (f <= upper && f >= lower)
            {
                result++;
            }
            if (g <= upper && g >= lower)
            {
                result++;
            }
            return result;
        }


        static void Main(string[] args)
        {
            long noOf3Ps = 0; // keeps count of how many scenarios occur with 3 Ps 3Ts and 1 K.
            long noOf2PlusPs = 0;  //  keeps count of how many scenarios occur with 2+Ps, 1+K and exactly 3Ts.
            for(int i1=1; i1<= 10;i1++)
            {
                for (int i2 = 1; i2 <= 10; i2++)
                {
                    for (int i3 = 1; i3 <= 10; i3++)
                    {
                        for (int i4 = 1; i4 <= 10; i4++)
                        {
                            for (int i5 = 1; i5 <= 10; i5++)
                            {
                                for (int i6 = 1; i6 <= 10; i6++)
                                {
                                    for (int i7 = 1; i7 <= 10; i7++)
                                    {
                                        int noOfTs = Count(i1,i2,i3,i4,i5,i6,i7,1,5); //Count the Ts occurring in this arrangement.
                                        int noOfPs = Count(i1,i2,i3,i4,i5,i6,i7,6,6); // Count the Ps occurring.
                                        int noOfKs = Count(i1,i2,i3,i4,i5,i6,i7,7,7); // Count the Ks occurring.
                                        if(noOfTs==3 && noOfPs==3&&noOfKs==1)
                                        {
                                            noOf3Ps++;
                                        }
                                        if(noOfTs==3 && noOfPs>=2 && noOfKs>=1)
                                        {
                                            noOf2PlusPs++;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            decimal above = noOf3Ps;
            decimal below = noOf2PlusPs;
            Console.WriteLine(noOf3Ps);
            Console.WriteLine(noOf2PlusPs);
            Console.WriteLine(String.Format("  {0:F25}", above / below));
            Console.ReadLine();
        }
    }
}
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Hydrad

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 142
  • Shuffle iT Username: Hidrad
  • Respect: +109
    • View Profile
Re: A question in probability
« Reply #3 on: December 02, 2015, 05:14:50 am »
0

Hmm I don't really get it. But is this the same kinda idea as if lets say in hearthstone you have avenging wrath as a card vs a 4 health minion.

What avenging wrath does is hit a random target 8 times. 1 damage at a time.

so if the opponent has a 4 health minion and thats all on their board the only think wrath can hit is the minion or their face.

So I originally thought that the chance for the minion to die was 50%. But it actually ended up being 63.6% for it to die. Is this the same kinda math idea? Or am I completely wrong because this stuff is going over my head but I'm still interested in it.
Logged
For anyone else, such a statement would be a scum tell.  For Hydrad, it's simply a tell that you're reading something from Hydrad.

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: A question in probability
« Reply #4 on: December 02, 2015, 05:23:29 am »
0

The T's disappear because we know exactly how many there are, so we're choosing 4 times from the distribution (P, 1/5), (K, 1/5), (X,3/5).  This should already make us suspicious of 2/23 as the denominator of our answer should divide 625.

Three sets of outcomes are consistent with the observations: PPKP (which can appear 4 ways), PPKK (which can appear 6 ways) and PPKX (which can appear 12 ways).  So the probability is (4x1 + 6x1 + 12x3)/625 = 46/625 = 0.0736.  I think.

What answer does your C# give? 

EDIT: This is P(observations), which is so obviously not what was asked for it's embarrassing.  It is at least a quick way of getting the 46.
« Last Edit: December 02, 2015, 05:50:22 am by qmech »
Logged

ashersky

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2343
  • 2013/2014/2015 Mafia Mod of the Year
  • Respect: +1520
    • View Profile
Re: A question in probability
« Reply #5 on: December 02, 2015, 05:28:01 am »
0

/tag
Logged
f.ds Mafia Board Moderator

2013, 2014, 2015 Mafia Mod of the Year
2015 f.ds Representative, World Forum Mafia Championships
2013, 2014 Mafia Player of the Year (Tie)

11x MVP: M30, M83, ZM16, M25, M38, M61, M76, RMM5, RMM41, RMM46, M51

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #6 on: December 02, 2015, 05:39:40 am »
+1

The T's disappear because we know exactly how many there are, so we're choosing 4 times from the distribution (P, 1/5), (K, 1/5), (X,3/5).  This should already make us suspicious of 2/23 as the denominator of our answer should divide 625.

Three sets of outcomes are consistent with the observations: PPKP (which can appear 4 ways), PPKK (which can appear 6 ways) and PPKX (which can appear 12 ways).  So the probability is (4x1 + 6x1 + 12x3)/625 = 46/625 = 0.0736.  I think.

What answer does your C# give?
C# agrees with me that it's 2/23.
The implementation could be wrong I guess, that's why I posted it.  But I don't think so.

I think you're probably right that the Ts just disappear from calculations, but I wanted to do it with the Ts for completeness.

The 23 denominator comes from the 46 you've got there.  You've summed all the possibilities that are consistent with observations; so now you need to divide the probability of the exact thing you want (ie. 4/625) by the probability of the set of consistent outcomes (ie 46/625), to get 4/46=2/23.  This is pretty much exactly what I'm doing in my proof above, it's just messier because I don't remove the Ts (or collapse the factorials, for clarity).
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: A question in probability
« Reply #7 on: December 02, 2015, 05:49:01 am »
0

The T's disappear because we know exactly how many there are, so we're choosing 4 times from the distribution (P, 1/5), (K, 1/5), (X,3/5).  This should already make us suspicious of 2/23 as the denominator of our answer should divide 625.

Three sets of outcomes are consistent with the observations: PPKP (which can appear 4 ways), PPKK (which can appear 6 ways) and PPKX (which can appear 12 ways).  So the probability is (4x1 + 6x1 + 12x3)/625 = 46/625 = 0.0736.  I think.

What answer does your C# give?
C# agrees with me that it's 2/23.
The implementation could be wrong I guess, that's why I posted it.  But I don't think so.

I think you're probably right that the Ts just disappear from calculations, but I wanted to do it with the Ts for completeness.

The 23 denominator comes from the 46 you've got there.  You've summed all the possibilities that are consistent with observations; so now you need to divide the probability of the exact thing you want (ie. 4/625) by the probability of the set of consistent outcomes (ie 46/625), to get 4/46=2/23.  This is pretty much exactly what I'm doing in my proof above, it's just messier because I don't remove the Ts (or collapse the factorials, for clarity).


Yes, I'm being a muppet.

Here's how I justify ignoring the T's.  The idea is that you don't look at all of your information in one go.  First you check whether you have the right number of T's.  To do this you only need to know whether each draw was T or not-T.  Conditioning on the fact that you have 3 T's just leaves you with 4 not-T's, and since you're assuming everything is independent these are just draws from the remaining options.  Formally it's coupling mumble mumble.
Logged

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #8 on: December 02, 2015, 05:50:57 am »
0

Hmm I don't really get it. But is this the same kinda idea as if lets say in hearthstone you have avenging wrath as a card vs a 4 health minion.

What avenging wrath does is hit a random target 8 times. 1 damage at a time.

so if the opponent has a 4 health minion and thats all on their board the only think wrath can hit is the minion or their face.

So I originally thought that the chance for the minion to die was 50%. But it actually ended up being 63.6% for it to die. Is this the same kinda math idea? Or am I completely wrong because this stuff is going over my head but I'm still interested in it.
This is quite a different problem, but nonetheless interesting.  The way I would instinctively do this is to consider the possible number of shots it could take to kill the minion.
4: It kills it in the first 4 shots (then has to hit face).  P = 1/16.
5: It kills it in the first 5 shots (but not in 4) P = 4/32, since there are are 4 ways to arrange FMMMM which end with an M.
6: It kills it in the first 6 shots (but not in 5) P = 10/64, since there are 10 ways to arrange FFMMMM which end with an M.
7: It kills it in 7 shots (not in 6) P = 20/128 since there are 20 ways to arrange FFFMMMM which end with an M.
8: It kills in in 8 shots (not in 7) P = 35/256 since there are 35 ways to arrange FFFFMMMM which end with an M.
 So the total probability is (16+32+60+40+35)/256 = 183/256 = 71.4%?  I think? 
I may have done my xCy's wrong.  This was all done in my head so I could be completely wrong here.  There also might be easier ways to do this.  Just my first thought, anyway.
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #9 on: December 02, 2015, 05:53:06 am »
0

Yes, I'm being a muppet.

Here's how I justify ignoring the T's.  The idea is that you don't look at all of your information in one go.  First you check whether you have the right number of T's.  To do this you only need to know whether each draw was T or not-T.  Conditioning on the fact that you have 3 T's just leaves you with 4 not-T's, and since you're assuming everything is independent these are just draws from the remaining options.  Formally it's coupling mumble mumble.
Then hooray, someone agrees with me!

Yeah that Ts thing looks convincing, but probably the argument I give above is OK including the Ts, that way not having to go through this.  The only thing that stopped me from ignoring them was a) it gives people something to look at and say "this is why your argument is wrong", even though its actually fine and b) I thought at first that it might make the arrangement possibilities different.  But it doesn't, it's fine.
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #10 on: December 02, 2015, 06:02:59 am »
0

I guarantee you silverspawn's argument is correct.  If all ten coins are heads, there are 10C9=10 different ways that you could have seen that 9 of them were heads, so it is 10 times as likely that you will be telling us about the HHHHHHHHHH case than it is that you will be telling us about the THHHHHHHHH case (which only has one possible way for you to see nine heads).  Since the HHHHHHHHHH case is 10 times as likely as each of the ten single-tails cases, the probability that the last coin is tails is 10/20=1/2.
I'm responding to this, as I said I would in the other thread.  Firstly, this is wrong.  The probability of HHHHHHHHHH taken independently does not change.  The law of conditional probability says
P(A given B) = P(A and B)/P(B).  In this case, A is HHHHHHHHHH, B is "at least 9 heads", so A contains B and P(A and B) is just P(A), which is the same independent constant as it always has been.


During the game, you said that if you roll two five-sided dice, and are told that one shows a 5, then the probability that the other shows a 5 is 1/9.  Again, this is incorrect for the same reason.  If we did roll two fives, there are two chances that we will be told about one of the fives, compared to only one chance in each of the other eight cases, which gives us a 2/10=1/5 chance, which is exactly what we would expect.
This is not correct for the same reason as above.  You have to consider the probability of 2 5s firstly independent of everything else (1/25), and then divide through by the possibility of consistent observations, which in this case is 9/25.
"There are two chances that we will be told about one of the fives" supports my argument, not yours.

You would agree that the probability of rolling doubles is 1/5, right?
Correct.

Now I tell you that one of the dice shows x, where x=1, 2, 3, 4, or 5 (but I don't tell you which value x is).  Now by your argument, the probability that the other die shows x (and therefore, the probability that we rolled doubles) is 1/9. 
No, this is now a different question entirely.  You haven't told me anything, so the probability of rolling doubles is still 1/5.  We haven't fixed x, so it's not 1/9 any more because there are various possible cases for x so the probability increases.
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5318
  • Shuffle iT Username: sty.silver
  • Respect: +3224
    • View Profile
Re: A question in probability
« Reply #11 on: December 02, 2015, 06:44:58 am »
+1

This is because there are 4 equally likely possibilities: HH, HT, TH and TT.

No.

I can only repeat the exact thing I said last time which you did not respond to, save for saying 'you are wrong'.

We already know that one of your two coins has come up heads. We know this. Therefore, the probability of each of the two flips changes. It is not

We flip two fair coins.

anymore. It now is

we observe a flip of two fair coins that has happened in the past in light of new information.

This information makes each coin more likely to have been on heads. Treating each flip as 50% is not accurate anymore. I know you are currently convinced that you are right, but you are in fact wrong, so in order to solve this issue, you need to consider the possibility of being wrong while thinking about this, otherwise it can't get through to you.



I preferred the 10 coin example, as is a bit more intuitive. You don't even need to know anything about probability. If 10 coins flip, and you know that 9 of them are heads, and someone asks you 'I'll take a random coin out of those 10; do you want to bet on heads or tails?' you would immediately say 'heads'. You would do so because heads is more likely. Thus each coin is more likely to have been heads. Thus HTHH.... is much less likely than HHHH.

EgorK

  • Apprentice
  • *****
  • Offline Offline
  • Posts: 272
  • Respect: +74
    • View Profile
Re: A question in probability
« Reply #12 on: December 02, 2015, 06:49:04 am »
0

The T's disappear because we know exactly how many there are, so we're choosing 4 times from the distribution (P, 1/5), (K, 1/5), (X,3/5).  This should already make us suspicious of 2/23 as the denominator of our answer should divide 625.

23 is ok denominator because not all 625 variants are reachable
Logged

Hyphen-ated

  • Baron
  • ****
  • Offline Offline
  • Posts: 57
  • Respect: +49
    • View Profile
Re: A question in probability
« Reply #13 on: December 02, 2015, 06:53:23 am »
+3

The answer to problems like these depends on what procedure was used to give you the information you have. All the analysis in this thread is assuming some particular procedure, but it hasn't been specified.
I flip two (fair) coins and tell you that at least one of them came up heads.  Then the probability of both being heads, given that information is 1/3. 
This is because there are 4 equally likely possibilities: HH, HT, TH and TT.  Of these, exactly 3 contain one or more heads, and exactly 1 contains 2 heads, the P(2 heads | 1 or more heads)=1/3.
Here is an information-distributing procedure that gives a different probability at the end:
If the flipper gets HH, he says "I got at least one heads". If the flipper gets any other result, he says "I got at least one tails."
If this stuff is not specified, then the problem is ill-posed.
Logged

EgorK

  • Apprentice
  • *****
  • Offline Offline
  • Posts: 272
  • Respect: +74
    • View Profile
Re: A question in probability
« Reply #14 on: December 02, 2015, 06:54:12 am »
+1

I'm starting this thread as a place to talk about the question in probability that arose during the recently-finished game of Harry Potter Mafia: http://forum.dominionstrategy.com/index.php?topic=14209.0

The setup is the following.  7 letters are selected at random.  For each letter individually, there is a 1/2 chance of selecting a "T", 1/10 of selecting a "P", 1/10 of selecting a "K" and 3/10 of choosing some other letter. 

At some point in the game it became known that:
1) Exactly 3 Ts had been chosen.
2) At least 2 Ps had been chosen.
3) At least 1 K had been chose.

The question: given this information, what is the probability that in fact 3 Ps had been chosen?  (ie. the letters were some arrangement of TTTPPPK?)
The "obvious" answer: 20%, since the chance of getting a P out of a single letter which is known not to be a T is 1/5.

I argue that this is wrong.

The argument is based on the following fact. 

I flip two (fair) coins and tell you that at least one of them came up heads.  Then the probability of both being heads, given that information is 1/3. 
This is because there are 4 equally likely possibilities: HH, HT, TH and TT.  Of these, exactly 3 contain one or more heads, and exactly 1 contains 2 heads, the P(2 heads | 1 or more heads)=1/3.

By a similar argument (which I will present in the next post), I argue that the answer to the larger question is 2/23, as unintuitive as this seems.

Let's discuss.

My quick calculation confirms 2/23.

We can get rid of Ts, so we basically have 3 variants:
PPKX. Probability is 36 / 625
PPKK. Probability is 6 / 625
PPPK. Probability is 4 / 625

Hence P (PPPK | PPPK or PPKK ir PPKX) = 4 / (4 + 6 + 36) = 2 / 23
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: A question in probability
« Reply #15 on: December 02, 2015, 06:58:33 am »
+1

This is just a variant of the Monty Hall problem, right?

The important thing to take away from that is that probabilities are not static or set in stone. Probabilities change based on extra information being revealed.
If I have 2 different colors of socks in my drawer (100 red, 100 blue), the chance of getting a pair by picking 2 random socks is different than first picking a sock, looking at its color and determining the chances of matching it with the second sock.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5318
  • Shuffle iT Username: sty.silver
  • Respect: +3224
    • View Profile
Re: A question in probability
« Reply #16 on: December 02, 2015, 07:02:51 am »
0

Another try: Here is a really simple formula to determine the % of a flip that has happened in the past.



I'm sure you would agree that this formula is accurate? good.

usually, this formula yields the result 50%, because the expected number of heads flips is half as large as the number of flips. In case of one coin, the former is 0.5, the latter is 1.

In case of 10 coins, you don't even have to agree that the expected number of head flips is exactly 9.5, as that is the entire thing I'm trying to explain. But you will concede that it is clearly between 9 and 10. Thus, the probability for each coin to have been heads is at least 90%... not 50%.

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #17 on: December 02, 2015, 07:14:56 am »
0

This is because there are 4 equally likely possibilities: HH, HT, TH and TT.

No.

I can only repeat the exact thing I said last time which you did not respond to, save for saying 'you are wrong'.

We already know that one of your two coins has come up heads. We know this. Therefore, the probability of each of the two flips changes. It is not

We flip two fair coins.

anymore. It now is

we observe a flip of two fair coins that has happened in the past in light of new information.

This information makes each coin more likely to have been on heads. Treating each flip as 50% is not accurate anymore.
I can't really say anything OTHER than "this is wrong".  The absolute probabilities remain fixed.  P(2 Hs) is always always 1/4, no matter what.  It just is.  It can't change.

The question is, does P(2 Hs GIVEN some other stuff) change.  And yes it does, depending on what the "other stuff" is.  The way you answer these questions is to do
P(2 Hs AND other stuff) divided by P(other stuff).  That gives P(2 Hs GIVEN other stuff).  That's an absolute fact.  In our case the "other stuff" is a subset of "2Hs", so you can replace P(2 Hs AND other stuff) with just P(2 Hs).  Which remains an absolute constant, 1/4.


I know you are currently convinced that you are right, but you are in fact wrong, so in order to solve this issue, you need to consider the possibility of being wrong while thinking about this, otherwise it can't get through to you.
Look, this is a hard problem.  I was willing to believe that I may have done it wrong.  As time goes one, more people agree with me, my proof is verified, and my simulations have backed me up (please please run that C# code yourself if you can, then try to find something that's wrong with it).  I came at this with an open mind, I promise I did.  But I'm right, I really am.

I preferred the 10 coin example, as is a bit more intuitive. You don't even need to know anything about probability. If 10 coins flip, and you know that 9 of them are heads, and someone asks you 'I'll take a random coin out of those 10; do you want to bet on heads or tails?' you would immediately say 'heads'. You would do so because heads is more likely. Thus each coin is more likely to have been heads. Thus HTHH.... is much less likely than HHHH.
No, HTHH.... and THHH... and HHTH... and HHHH... are all equally likely , given 9+ heads.  They are all a particular arrangement of 50/50 decisions which are compatible with the conditional and were equally likely before the conditional.  The laws of conditional probability back me up here.
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #18 on: December 02, 2015, 07:18:50 am »
0

I understand my problem with your argument now.

You can't say that a head "was more likely to have happened" when you already know that it did or didn't.  P(X given X) is 1.  P(X given not X) is 0.  Probabilities change retroactively with information, but the absolute probabilities remain the same.
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5318
  • Shuffle iT Username: sty.silver
  • Respect: +3224
    • View Profile
Re: A question in probability
« Reply #19 on: December 02, 2015, 07:20:00 am »
+1

The answer to problems like these depends on what procedure was used to give you the information you have. All the analysis in this thread is assuming some particular procedure, but it hasn't been specified.

It has been specified by the context. We were playing mafia; the setup rolls independent letters.

    1-50 = T
    51-65 = I
    66-75 = P
    76-85 = H
    86-95 = K
    96-100 = R

Among the three relevant letters, one was P, one was K, and the third was unknown, but not T. The question was: how likely is that one a P? And Joseph and I agreed that it is 20%.

I believe I agree that the problem here is not properly specified, but for the sake of this argument, that's the problem.

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #20 on: December 02, 2015, 07:23:55 am »
0

The answer to problems like these depends on what procedure was used to give you the information you have. All the analysis in this thread is assuming some particular procedure, but it hasn't been specified.
I flip two (fair) coins and tell you that at least one of them came up heads.  Then the probability of both being heads, given that information is 1/3. 
This is because there are 4 equally likely possibilities: HH, HT, TH and TT.  Of these, exactly 3 contain one or more heads, and exactly 1 contains 2 heads, the P(2 heads | 1 or more heads)=1/3.
Here is an information-distributing procedure that gives a different probability at the end:
If the flipper gets HH, he says "I got at least one heads". If the flipper gets any other result, he says "I got at least one tails."
If this stuff is not specified, then the problem is ill-posed.


I'm not sure what you mean here. 

The procedure is: I take a ten sided die and write a T on five of its faces, a P on one, a K on one and an X on the other three. 
I roll this die 7 times, noting the results in order.  I then announce some information about the letters that I wrote down.

In this case it is given that the information I announce is "There are exactly 3 Ts in total and at least 2 Ps and at least 1 K".   
I think if you knew what the possibilities were for the different pieces of information I would give, then the answer MIGHT be different, because you can deduce something from the fact that I didn't give another piece of information.  But that doesn't apply here.


And Joseph and I agreed that it is 20%.
I'd like to get Joseph back here.  He claims to have a masters in maths, but I don't think he really gave this problem much thought. 

I've just found this: http://math.stackexchange.com/questions/86797/whats-the-probability-of-2-head-given-at-least-1-head
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Ampharos

  • Scout
  • ****
  • Offline Offline
  • Posts: 42
  • Respect: +37
    • View Profile
Re: A question in probability
« Reply #21 on: December 02, 2015, 07:24:10 am »
0

I'm starting this thread as a place to talk about the question in probability that arose during the recently-finished game of Harry Potter Mafia: http://forum.dominionstrategy.com/index.php?topic=14209.0

The setup is the following.  7 letters are selected at random.  For each letter individually, there is a 1/2 chance of selecting a "T", 1/10 of selecting a "P", 1/10 of selecting a "K" and 3/10 of choosing some other letter. 

At some point in the game it became known that:
1) Exactly 3 Ts had been chosen.
2) At least 2 Ps had been chosen.
3) At least 1 K had been chose.

The question: given this information, what is the probability that in fact 3 Ps had been chosen?  (ie. the letters were some arrangement of TTTPPPK?)
The "obvious" answer: 20%, since the chance of getting a P out of a single letter which is known not to be a T is 1/5.

I argue that this is wrong.

The argument is based on the following fact. 

I flip two (fair) coins and tell you that at least one of them came up heads.  Then the probability of both being heads, given that information is 1/3. 
This is because there are 4 equally likely possibilities: HH, HT, TH and TT.  Of these, exactly 3 contain one or more heads, and exactly 1 contains 2 heads, the P(2 heads | 1 or more heads)=1/3.

By a similar argument (which I will present in the next post), I argue that the answer to the larger question is 2/23, as unintuitive as this seems.

Let's discuss.

I'm having a hard time understanding why the answer is no 20%. 

You asked "given this information"

"1) Exactly 3 Ts had been chosen.
2) At least 2 Ps had been chosen.
3) At least 1 K had been chose."

You know all that has happened, so I read your question as asking the odds for the last letter being P.

Are you meaning to say what are the odds that this scenario happened in the first place, without knowing facts 1-3 as above?

Edit: get %s right dumpharos
Logged

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +559
    • View Profile
Re: A question in probability
« Reply #22 on: December 02, 2015, 07:27:04 am »
0

You know all that has happened, so I read your question as asking the odds for the last letter being P.
This isolates the problem perfectly.  The question is not "is the last letter P?".  That is a different question to the real question, which is "are there 3 Ps in total, regardless of whether or not the "last" letter is a P?".
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

EgorK

  • Apprentice
  • *****
  • Offline Offline
  • Posts: 272
  • Respect: +74
    • View Profile
Re: A question in probability
« Reply #23 on: December 02, 2015, 07:27:37 am »
+1

The answer to problems like these depends on what procedure was used to give you the information you have. All the analysis in this thread is assuming some particular procedure, but it hasn't been specified.

It has been specified by the context. We were playing mafia; the setup rolls independent letters.

    1-50 = T
    51-65 = I
    66-75 = P
    76-85 = H
    86-95 = K
    96-100 = R

Among the three relevant letters, one was P, one was K, and the third was unknown, but not T. The question was: how likely is that one a P? And Joseph and I agreed that it is 20%.

I believe I agree that the problem here is not properly specified, but for the sake of this argument, that's the problem.

Silver, if you is not persuaded by arguments provided by Haddock (for some reason, they are quite clear and convincing), can you just take it from someone who was candidate for Russian IMO team and won both Google CodeJam and TopCoder Open (and probability is quite popular theme in this competitions) that he is correct. Also if I remember correctly you program yourself, so you can just run simulation of generation, throw away all variants not fit to preconditions and then see probability for yourself
Logged

Hyphen-ated

  • Baron
  • ****
  • Offline Offline
  • Posts: 57
  • Respect: +49
    • View Profile
Re: A question in probability
« Reply #24 on: December 02, 2015, 07:28:31 am »
+3

I believe I agree that the problem here is not properly specified, but for the sake of this argument, that's the problem.
Quote
The procedure is: I take a ten sided die and write a T on five of its faces, a P on one, a K on one and an X on the other three. 
I roll this die 7 times, noting the results in order.  I then announce some information about the letters that I wrote down.
You guys still haven't specified the necessary details. Why do we know the results from some of the rolls and not others? What mechanism selected the ones that we know about? Is it based on what letter they are? Is it based on what position they had in the roll sequence? Is it based on what certain players selectively choose to reveal, based on how they think it will influence others' decisionmaking?
« Last Edit: December 02, 2015, 07:31:11 am by Hyphen-ated »
Logged
Pages: [1] 2 3 ... 6  All
 

Page created in 0.068 seconds with 20 queries.