Results 1 to 22 of 22

Thread: Probability question.

  1. #1

    Thread Starter
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272

    Probability question.

    This is going to be either extremely easy or extremely difficult ..
    I would rather say I am confused

    If you are picking two cards in sequence from a pack of 52 cards. what is the probability that the second card you picked is a spade ?

    Before the first card is picked there are 52 cards out of which 13 is spade. so probability of picking a spade is 13/52 = 1/4.
    Easy.. now..


    I haven't seen the picked card. It can be a spade or something.
    Now I pick the second card from the remaing 51 cards.

    The number of spades in that 51 may be either 13 or 12 depending on whether my first card was a spade or not.

    So the propbability that this second card is a spade can be

    13/51 or 12/51 which is ambiguous.

    Knowing the probability of picking a spade the first time to be 1/4
    how can i remove this ambiguity ??

  2. #2
    DerFarm
    Guest
    The probabitlity of any given card of a full deck being a spade is (13/52) => p(spade) and p(~spade) = .75

    Therefore, by selecting one card and casting it away the probability for the next random card being a spade becomes:

    .75(13/51) + .25(12/51) or about 24.99%

    which is what you would expect.

    Is this even close?

  3. #3

    Thread Starter
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    I am not asking the propability of tuning up two spades when picked in succesion. Just the probability of the second card to be spade.

  4. #4

    Thread Starter
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    The entire question arises because... other than we can say that probability of picking a spade the first time is 1/4...we have no way to confirm if the card picked was a spade or not.

  5. #5
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    I would like to claim that this was obvious to me and you are all making it too complicated.

    I calculated the probabilities of drawing the following (let S be spade and N be non spade)

    SS + NS = .25 exactly, P(2nd is a spade)
    SSS + SNS + NSS + NNS = .25 exactly, P(3rd is a spade)

    Then it occurred to me that we are making this too complicated. The question is equivalent to asking the following.

    What is the probability that the second card in a deck is a spade? The answer is 1/4 (.25)

    If you had asked any one of the following questions, the answer in each case would be the same (1/4).

    What is the probability that the 6th card is a spade?
    What is the probability that the 25th card is a spade?
    What is the probability that the last card is a spade?
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  6. #6

    Thread Starter
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    Well it wasn't that obvious to me..

    I thought removing a card had an effect on the probability of the Second card to be spade. But later realized that after all we are taking the probability of the first card to conjure up the probability of the second one. Which in effect would be the case for the nth card to be spade provided you don't know for sure the removed cards are spade or not.

    But the probability for the nth card should change when at least one card you removed is confirmed not a spade.

  7. #7
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    ThinkTank2: There are various questions you can ask. For example.
    • Look at the first two cards from a deck and inspect them. Neither is a Spade. What is the probability that the third card is a Spade? 13/50.
    • Look at the first two cards from a deck: One is a Spade; The other is a Heart. What is the probability that the third card is a Spade? 12/50
    • Look at the fiirst two cards in a deck and both are spades. What is the probability that the third card is a Spade? 11/50
    • What is the probability that the third card is a Spade? 13/52
    If you have no information about a 52-card deck, the probability that the nth card is a Spade = 13/52 = 1/4 (.25), no matter what n is.

    If the above does not seem correct, think about it some more>
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  8. #8
    wossname
    Guest
    Hang on, are we removing the first card and discounting it from further calculations (maybe burning it, for physical analogy)

    It seems to me to be totally impossible to find an exact value for the probability of the second card being a spade, if you don't know the value of the first card (which has been destroyed by now). The problem is undefined.

    Don't you need to know the first card before you can calculate the prob of the second being a spade?

  9. #9
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Wossname: Knowledge relating to the first card does affect probabilities relating to the second (or any other card).

    In the absence of any knowledge about the deck, the probability is exactly 1/4 (.25) that any particular card in the deck is a spade. You can fight your way through a lot of arithmetic to come up with this answer. Use the notation S for Spade and N for non-spade. Now compute probabilities for the following being dealt..

    S = 13/52 = 1/4, probability for first card being a spade.

    SS + NS = (13/52)*(12/51) + (39/52)*(13/51) = 1/4, probability for the second card. Being a spade.

    SSS + SNS + NSS + NNS
    = (13/52)*(12/51)*(11/50)
    + (13/52)*(39/51)*(12/50)
    + (39/52)*(13/51)*(12/50)
    + (39/52)*(38/51)*(13/50) = 1/4, probability for the third card being a spade.

    Note that the above exhaust the ways of dealing a spade as the first, second or third card.

    Consider another way of looking at the problem. Suppose you cut a deck and look at the card at the bottom of the top part. What is the probability that the card is a spade? Does it matter how deep a cut you make? I claim that the chances of cutting a spade is 1/4, no matter how deep the cut.

    If you have lots of time, shuffle a deck, count down to the 5th card and note what it is. Do this 400 times. About 100 times that 5th card will be a spade.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  10. #10
    sql_lall
    Guest

    Lightbulb HERE'S WHY...

    Say you arrange a deck of card. Without looking, the probability of the nth card being a certain suit is always 1/4 (if n < 53!)
    The fact that you see the first card doesn't change the origional probability!!!
    For instance, you want to know if the 52nd card is a club. If you shuffle the cards, then deal them out, turning them up as you go, then you will know by the 51st card what suit the last will be. Say it will be a heart.
    Apparently, according to some, that means there is no chance that the last card will ever be a club. This is not true, as it only implies that in -this- example the last card can't be.
    You can't then say that every time you shuffle, the last card won't be a club.

  11. #11
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    What in the name of bejebus are u talking about??? Of course knowledge of the first card effects the probability of the next drawn card. Your example did nothing but reinforce that... in selecting the last card the probability of making a correct choice is 100% not 25% (unless u are seriously bad at adding as u go along )... maybe i misunderstood you. who knows
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  12. #12
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Sql_lall: The bolded part of your statement is invalid. The first part is true for a standard 52-Card deck.
    Say you arrange a deck of card. Without looking, the probability of the nth card being a certain suit is always 1/4 (if n < 53!)The fact that you see the first card doesn't change the origional probability!!!
    Seeing exactly one card anywhere in the deck changes the probabilities relating to all cards. The probability for the card seen changes from 1/4 to 1 (certainty), while the probability for all the others changes from 1/4 to either 12/51 or 13/51.

    If you deal down to a particular card without looking at the cards dealt, the probability is 1/4 that the card dealt down to is a Spade.

    Once you look at one or more cards, the probabilities change for all cards.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  13. #13
    wossname
    Guest
    Originally posted by Guv
    Wossname: Knowledge relating to the first card does affect probabilities relating to the second (or any other card).
    Well...

    Originally posted by wossname
    Hang on, are we removing the first card and discounting it from further calculations (maybe burning it, for physical analogy)

    It seems to me to be totally impossible to find an exact value for the probability of the second card being a spade, if you don't know the value of the first card
    Yes, my earlier comment does seem a bit contradictory. What I was thinking at the time was that it shouldn't be placed back into the pack. Obviously it should be taken into consideration.

    Someone hands you a damaged deck of only 51 cards, and they won't tell you what suit the removed card was from. You cut the deck. Therefore there are two possible probabilities for your cut card being a spade.

    Either 13/51 or 12/51. But the former of these two is 3 times more likely to be the actual probability than the latter.

    It is similar to Schrodinger's cat paradox, the cat is only dead or alive when the box is opened, before the box is opened the cat is in a state of uncertainty (as far as we are concerned. In actual fact the cat is extremely pissed off.).

    It is vital to the task of finding an accurate and reliable value for the probability of the second card being a spade, that you know the value of the first.

    By my calculations, and if I was a gambler, I would use 0.23077 as the probability of card 2 being spade-ish. Please don't ask me how I arrived at that, since I can't remember! I haven't made a fortune from gambling though.

  14. #14
    sql_lall
    Guest

    Lightbulb EASY Proof

    Firstly, knowledge of a previous card only changes the likelyhood in the sample you are currently doing, not out of the total possible samples. Sorry if my wording was wrong.

    Anyway, last night, the lightbulb turned on, as the saying goes.
    Firstly, say you want to find the probability of the nth card being a certain suit. For simplicity, lets say you want to know what is the probability of the 3rd card being a spade.
    Now, this is obviously the same probability that the 3rd card is a heart, and the same probability that the 3rd card is a club, and the same probability that the 3rd card is a diamond.
    (Doesn't take much thinking about!)
    Now, all i'm saying is that if the probability must be 25%,
    because P(heart) + P(spade) + P(club) + P(diamond) = 1
    also, P(heart) = P(spade) = P(club) = P(diamond) -from above
    => P(heart) = P(spade) = P(club) = P(diamond) = 0.25 = 25%

    (Note, P(SUIT) stands for the probability that the nth card is the suit SUIT)

  15. #15
    sql_lall
    Guest

    Talking Sorry, I forgot

    I forgot to add one thing:

    Quote from DerFarm:
    The probabitlity of any given card of a full deck being a spade is (13/52) => p(spade) and p(~spade) = .75

    Therefore, by selecting one card and casting it away the probability for the next random card being a spade becomes:

    .75(13/51) + .25(12/51) or about 24.99%

    which is what you would expect.
    Actually:
    .75(13/51) + .25(12/51) = 25%

  16. #16
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357

    Another way....

    I know this thread is quite old now but here is my 2 cents. The following is a conversation between Mathematician and Fred.

    Mathematician: Hello. Here is a standard 52 card deck. Would you like to play a game?
    Fred: OK.
    Mathematician: First, what is the probability of drawing a spade?
    Fred: That's easy. 13/52 which is 1/4.
    Mathematician: Well done. If I tell you that on the 1st draw I get a spade, what is the probability of drawing a spade on the 2nd?
    Fred: Hmmm. Well there's 51 cards left, 12 of which are spades so 12/51?
    Mathematician: Yes, that's right. What if I tell you that on the 1st draw I get a diamond?
    Fred: Ummm. There's 51 cards left, 13 of which are spades so 13/51?
    Mathematician: Correct. Now, here's the important question. I draw a 1st card but I don't tell you what it is. It might be a spade. It might not. What is the probability of drawing a spade on the 2nd draw?
    Fred: Oooh, that's tricky. Some people might say 0.2499. Some might claim that the probability has increased. I don't know!!
    Mathematician: Well let me help you. I draw the 1st card and I put it on the other side of the room. You are not sure of the probability of the next card being a spade.
    Fred: Go on...
    Mathematician: What would happen to this probability if I put the 1st card, say, on the floor?
    Fred: Well, nothing!
    Mathematician: What if I put it in my pocket? Or out of the window? Or in the bin?
    Fred: Absolutely nothing!
    Mathematician: OK, so what if I put it back in the deck?
    Fred: Ahah! I see what you're saying. It must still be 1/4!
    Mathematician: That's right. We know that the location of the 1st card in 3D space doesn't affect the probability of the 2nd card being a spade.
    There are 10 types of people in the world - those that understand binary, and those that don't.

  17. #17
    wossname
    Guest
    David Hooper said:
    Mathematician: OK, so what if I put it back in the deck?
    Fred: Ahah! I see what you're saying. It must still be 1/4!
    Mathematician: That's right. We know that the location of the 1st card in 3D space doesn't affect the probability of the 2nd card being a spade.


    If you put it back in the deck it has a chance of being picked again! I don't think we are allowing that are we?

    Anyway, assuming that the first card is not viable for a second selection, take a look at this short chunk of code I've just penned.

    Run it a few times and you will find that the prob of a spade being picked second is indeed on average 0.25.

    Its a difficult question to answer or even define satisfactorily, but I hope this code helps a bit

    Take a look anyway, just stick a button on a blank form and dump the code into the declarations section.

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. 'I haven't written this for speed or efficiency, although the ShuffleDeck algorithm is as fast as it gets :D
    4.  
    5. Dim i As Long
    6. Dim j As Long
    7. Dim k As Long
    8. Dim x As Long
    9. Dim msg As String
    10. Dim Cards(0 To 51) As Long '52 cards
    11. Dim Counter As Long
    12.  
    13. 'assign cards a number
    14. For i = 0 To 51
    15.     Cards(i) = i
    16. Next i
    17.  
    18. Randomize
    19.  
    20. 'gather stats
    21. For j = 1 To 10000
    22.     GoSub ShuffleDeck 'select the cards
    23.     'now all 52 cards are in random order, the one in offset 51 is the first card chosen.
    24.     'so if we choose a random card between card zero and the penultimate card
    25.     '(conveniently ignoring the first chosen card), then we can get an average probability
    26.     'of a spade turning up
    27.    
    28.     x = Cards(51 * Rnd) \ 13 'choose second card (from range 0 to 50) and decide what suit its from
    29.     If x = 0 Then Counter = Counter + 1 'if its a spade then tally it
    30. Next j
    31.  
    32. MsgBox "SPADES occur at a prob of: " & (Counter / 10000)
    33.  
    34. Exit Sub
    35.  
    36. '#########
    37. ShuffleDeck:
    38. For i = 51 To 0 Step -1
    39.     x = Rnd * i 'will round down to the nearest long value :) and neatly avoids returning i
    40.     k = Cards(i)
    41.     Cards(i) = Cards(x)
    42.     Cards(x) = k
    43. Next i
    44. Return
    45. '#########
    46.  
    47. End Sub

    What do you think?

  18. #18
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Wossname: Your code convinces me, assuming that you get approximately .25 in your MsgBox display (I expect that you will). However, it seems to me that you are verifying that a card in a randomly selected postion has a probability of .25 of being a Spade. Consider the following line of code.
    VB Code:
    1. x = Cards(51 * Rnd) \ 13 'choose second card (from range 0 to 50)
    Perhaps something like the following could be used.
    VB Code:
    1. x = Cards(1) / 13 'Choose second card.
    2. x = Cards(2) / 13 'Choose third card.
    3. x = Cards(9) / 13 'Choose 10th card.
    4. 'et cetera
    I would expect any of the above to result in approximately .25 in the MsgBox display.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  19. #19
    sql_lall
    Guest

    Cool Read this:

    1) You can never use a computer to find true randomness.
    2) You can not run the code enough times to veryify the result.
    3) Even if you could, how could you tell if it was 25% or 24.99%??

    So, you can't really use code for the answer.
    I repeat
    Now, all i'm saying is that if the probability must be 25%,
    because P(heart) + P(spade) + P(club) + P(diamond) = 1
    also, P(heart) = P(spade) = P(club) = P(diamond) -pretty obvious
    => P(heart) = P(spade) = P(club) = P(diamond) = 0.25 = 25%

    i.e. if you say it is anything but this, you are also saying that the probability of getting a certain suit is more/less than getting a different one.

    Try and find the flaw if possible. I haven't yet, but may have missed something.

  20. #20
    wossname
    Guest
    When we say "the first card is taken from the deck", we are not necessarily saying that we are the taking card from offset 0 are we!

    No, we are saying "So far I have taken a single card from the deck" - we are not interested in the position that card came from in the deck, because we dont know the positions anyway. Just as long as we remove a card from the deck.

    When we say "the second card is taken from the deck", we are not necessarily saying that we are the taking card from offset 1, by the same token.

    I think we have confusion with array offsets and the number of cards we have taken.

    My program first sets up an ordered deck, Spades 1-->13, Clubs 1-->13, Diamonds etc...

    The it enters the loop and shuffles the deck. So now we have no idea what order the cards are in so each offset contains a random card. Thus (1), and (32) and (46) etc are all mutually equivalent, so we may as well just take a random one.

    If we ignore (for convenience) the last card in the deck ((51)), you can assume that that card has been selected as the first card taken (and destroyed).
    This is exactly what this line does: x = Cards(51 * Rnd) \ 13.

    x now equals the value of a randomly selected card from the remaining part of the shuffled deck. It is the probability of x being a spade that we are interested in.

    And, contrary to my own expectations, it turns out that it averages out at a 25% chance of being spadey.

    This is a bugger of a question. Sometimes I am certain that I have got my head around it but then something throws me off a bit.

    It depends at what stage the question is asked! That is my running theory. If asked before the first card is selected, then you'd naturally say 0.25, but if asked after the first card is taken then you get confused (or at least I do! ).

    Nice problem though, I am 84.6% sure that the third card taken will be a truncated rectangle of cardboard with a unique numerical marking. But don't quote me on that.

  21. #21
    wossname
    Guest
    I'd like to make this clear: I do agree that the probability is 0.25 but I can't really say why I agree. I have a tenuous enough grasp of this problem at the best of times!

    My code brought me to this conclusion.

    In a fitting tribute to the late Mr D. Adams, I think we are in need of a proper, empiricle (thats my fave word at the moment!), definition of the question. It'll probably take another 7.5 million years to calculate though.

    "Can I pick up that piece of paper? Here I am, brain the size of a planet..."

    "Is there any chance of finding a cup of tea on this spaceship?"

  22. #22
    sql_lall
    Guest

    Talking It's 25%

    Origional Question:
    If you are picking two cards in sequence from a pack of 52 cards,
    what is the probability that the second card you picked is a spade?
    Note: This is saying that before the two cards are taken out, we have a complete deck (no jokers). It also doesn't say what suit the first card is.
    The Question is asking that, before you pick either of the cards, what is the probability that the second card you picked is a spade?
    NOT: after you pick the first card, what is the probability that the second card you picked is a spade?

    As Guv -and others - put it (correctly):
    P(spade in nth postion of 51-card deck) = (1/4)*(12/51) + (3/4)*(13/51)
    Note: 51 card deck because one card has already been drawn.

    If you think this is incorrect, I have used another reasoning:
    The probability must be 25%, because:
    (Where P(heart) = probability of the nth card being a heart)

    1) P(heart) + P(spade) + P(club) + P(diamond) = 1 = 100%
    2) P(heart) = P(spade) = P(club) = P(diamond) - ** see below
    => P(heart) = P(spade) = P(club) = P(diamond) = 0.25 = 25%
    ** P(heart) = P(spade) = P(club) = P(diamond) because:
    The deck is a complete deck, with the same number of cards in each suit. As there is no force (i.e. weight) making the appearance of a particular suit more likely than any other, then statement 2 must be true.

    I apologise for saying you can't make a computer program for finding the probability. You can, just not one that randomly deals cards. All you have to do is make one that deals 52 cards, labelled H, D, S, C (only use suits as numbers aren't important), 13 of each, into 52 places, and then get the computer to count how many of these combinations have a S in the 2nd place.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width