Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: [OT] Stats problem

by Anonymous Monk
on Feb 26, 2015 at 12:10 UTC ( #1117940=note: print w/replies, xml ) Need Help??


in reply to Re^2: [OT] Stats problem
in thread [OT] Stats problem

If I'm remembering my probabilities correctly, the probability of event A happening and event B happening independently is P(A)*P(B), so the probability an event A occurring independently N times is P(A)^N.

Replies are listed 'Best First'.
Re^4: [OT] Stats problem
by salva (Abbot) on Feb 26, 2015 at 12:17 UTC
    This is going way off topic, but anyway.

    The events are not independent. If the first 51 cards are in their places, the probability of the card 52 being in its place is 1.

      If the first 51 cards are in their places, the probability of the card 52 being in its place is 1

      Yes, that's one scenario that will see the 52 card in its correct place - but, having shuffled a pack, the chance that the 52 card will be in its place is 1 in 52.
      To determine the probability of a specific card being in a specific position one does not need to concern oneself with what might be in the other positions.

      Consider a deck of 3 cards - say 2 of hearts, 3 of hearts and 4 of hearts. Let's designate that the correct position for the 2 of hearts is the top of the deck, the correct position for the 3 of hearts is the middle of the deck and the correct position for the 4 of hearts is the bottom of the deck.
      Clearly the chance of the 2 of hearts being in its correct place after shuffling is 1 in 3(same as for the other 2 cards). The fact that that the 2 of hearts *has* to be in its correct place if both the 3 & 4 of hearts are in their correct places doesn't warrant any special consideration ... that I can see, anyway.

      Cheers,
      Rob
        The fact that that the 2 of hearts *has* to be in its correct place if both the 3 & 4 of hearts are in their correct places doesn't warrant any special consideration ... that I can see, anyway.

        I was with you until that last sentence, which I don't get. There is a difference between sampling with replacement and sampling without replacement. I would argue that checking all of the cards in the deck, instead of just one, is sampling without replacement: Once the position of the first card has been checked, there are only 51 cards in 51 possible positions remaining, and so on.

      The events are not independent.

      In the case of cards, yes! I think this is correct: http://www.wolframalpha.com/input/?i=product+of+1%2F%2853-n%29+for+n%3D1+to+52

      But BrowserUk said:

      Its not quite right because each card can only end up in one position; whereas with memory corruption; a value may (and usually will) be repeated.
        you are right!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1117940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2020-05-31 17:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (175 votes). Check out past polls.

    Notices?