|
Seuss
Error: divide byzero


Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 20 days
|
Statistics problem
#5814983 - 07/03/06 06:53 AM (17 years, 6 months ago) |
|
|
I spent the weekend writing some statistics based code and can't get the theory out of my head. So here goes, a quick stat problem for those that enjoy this sort of thing. (I already know the answer...)
You have a bag with five fair coins and one double headed coin, for six coins total. You randomly take one coin from the bag and flip the coin four times recording the toss each time. If you get four heads in a row, what is the probability that you have the double sided coin?
-------------------- Just another spore in the wind.
|
Mezcal
Registered: 08/11/05
Posts: 1,980
|
Re: Statistics problem [Re: Seuss]
#5815008 - 07/03/06 07:08 AM (17 years, 6 months ago) |
|
|
(1/6)/(((5/6)*.5^4)+(1/6)))=.762
|
Seuss
Error: divide byzero


Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 20 days
|
Re: Statistics problem [Re: Mezcal]
#5815012 - 07/03/06 07:10 AM (17 years, 6 months ago) |
|
|
Very close. (nice solution, btw)
-------------------- Just another spore in the wind.
|
Mezcal
Registered: 08/11/05
Posts: 1,980
|
Re: Statistics problem [Re: Seuss]
#5815014 - 07/03/06 07:11 AM (17 years, 6 months ago) |
|
|
I had an error originally, thought it was a total of 5 coins. The edit should reflect the real answer.
|
Seuss
Error: divide byzero


Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 20 days
|
Re: Statistics problem [Re: Mezcal]
#5815019 - 07/03/06 07:17 AM (17 years, 6 months ago) |
|
|
Correct. One smart cookie!
-------------------- Just another spore in the wind.
|
Ythan
ᕕ( ᐛ )ᕗ


Registered: 08/08/97
Posts: 18,774
Loc: NY/MA/VT Borderlands
Last seen: 5 hours, 27 minutes
|
Re: Statistics problem [Re: Seuss]
#5815025 - 07/03/06 07:21 AM (17 years, 6 months ago) |
|
|
Yeah seriously! I took one look at that problem, said "guh?" and promptly went back to watching Jerry Springer hehe.
|
Seuss
Error: divide byzero


Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 20 days
|
Re: Statistics problem [Re: Ythan]
#5815038 - 07/03/06 07:37 AM (17 years, 6 months ago) |
|
|
Code:
Date: 03/22/99 at 17:02:53 From: Doctor Anthony Subject: Re: Bayes' Theorem
A suitably simple example to make Bayes' theorem clear is the following:
You have 6 coins of the same denomination in a bag. 5 of them are standard coins, but the 6th is double-headed.
You take one coin at random from the bag and toss it 4 times. It comes up heads every time. What is the probability that you have the double-headed coin?
A diagram to illustrate the sample space will make the calculation clearer.
Double-headed coin Standard coin Prob = 1/6 Prob = 5/6 ----------------------------------------------- 1/6 x 1 5/6 x (1/2)^4 4 heads turn up. = 1/6 = 5/96
Now the sample space is fixed by the fact that we know that 4 heads turned up when the coin was tossed 4 times.
The probability that we are in the first box shown above is therefore 1/6 divided by the sum of the two boxes.
1/6 1/6 16 Prob(double-headed coin) = ----------- = ---------- = ---- 1/6 + 5/96 7/32 21
So the probability that the double-headed coin was chosen = 16/21 = 0.7619
-------------------- Just another spore in the wind.
|
Mezcal
Registered: 08/11/05
Posts: 1,980
|
Re: Statistics problem [Re: Seuss]
#5815043 - 07/03/06 07:40 AM (17 years, 6 months ago) |
|
|
Everyone should study Bayes' Thm....
Though I have to admit I just finished a B.S. in math, so I think I was supposed to know this
|
ChuangTzu
starvingphysicist



Registered: 09/04/02
Posts: 3,060
Last seen: 10 years, 3 months
|
Re: Statistics problem [Re: Mezcal]
#5815142 - 07/03/06 08:57 AM (17 years, 6 months ago) |
|
|
Here's another, slightly more tricky, one:
You're on some kind of game show and are asked to choose between one of three doors. Behind one door is something of value—say, bars of rhodium. Behind the other two doors are less valuable items—say, bars of lead. You choose one of the doors (door A for example). The host, who knows what is behind each of the doors, opens another door (door C maybe) and reveals a pile of lead. He then asks you if you want to change your mind and choose the other unopened door (door B).
Now, assuming the host knows what is behind each of the doors, that he will always open another door to reveal lead, that he will always ask you to switch regardless of whether you pick the lead or the rhodium on the first try, and that you want to maximize your chances of getting the rhodium, is it to your advantage to switch doors?
|
Seuss
Error: divide byzero


Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 20 days
|
Re: Statistics problem [Re: ChuangTzu]
#5815192 - 07/03/06 09:21 AM (17 years, 6 months ago) |
|
|
hehe... see the post I made in PA&L with this question... I made it this morning before I started this thread. I won't spoil it and give away the answer, though I was surprised when I first worked it out. (It isn't 50/50, the way it seems.)
http://www.shroomery.org/forums/showflat.php/Cat/0/Number/5814762/an/0/page/0
-------------------- Just another spore in the wind.
|
Mezcal
Registered: 08/11/05
Posts: 1,980
|
Re: Statistics problem [Re: ChuangTzu]
#5815258 - 07/03/06 09:46 AM (17 years, 6 months ago) |
|
|
> is it to your advantage to switch doors?
I'm pretty sure this is a formulation of the more famous "Monty Hall" problem.
|
Seuss
Error: divide byzero


Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 20 days
|
Re: Statistics problem [Re: Mezcal]
#5815327 - 07/03/06 10:01 AM (17 years, 6 months ago) |
|
|
> I'm pretty sure this is a formulation of the more famous "Monty Hall" problem.
It is.
-------------------- Just another spore in the wind.
|
daba
Stranger


Registered: 12/30/02
Posts: 3,881
Last seen: 11 years, 16 days
|
Re: Statistics problem [Re: Seuss]
#5826409 - 07/06/06 02:38 AM (17 years, 6 months ago) |
|
|
Isn't this just a basic application of conditional probability?
Conditional probability: P(A|B) = P(AB)/P(B)
Let D = the event that you get the double-headed coin Let H = the event that you get 4 heads in a row Let F = the event that you get a fair coin
Notation: P(A|B) = Probability of event A happening given event B happened P(AB) = Probability of both A and B happening
Then P(D|H) = P(DH)/P(H) = P(DH)/[P(H|F)*P(F) + P(H|D)*P(D)]
Then we note that: P(DH) = (1/6)*1 P(H|F) = (1/2)^4 P(F) = 5/6 P(H|D) = 1 P(D) = 1/6
Plug that into the last equation, and you get approximately 0.7621.
For the record, this really isn't statistics, Seuss, it's actually just probability, which there is a pretty big distinction, in my opinion.
|
daba
Stranger


Registered: 12/30/02
Posts: 3,881
Last seen: 11 years, 16 days
|
Re: Statistics problem [Re: daba]
#5826430 - 07/06/06 02:46 AM (17 years, 6 months ago) |
|
|
Oh might I also add, how I got P(H) = P(H|F)*P(F) + P(H|D)*P(D). I guess this is a basic application of Bayes' Rule although its really just intuition.
Anyways, the idea behind it is like this. You have an event, A, and you want to know what that probability really is. Then you need to take the sum of the products of all possible outcomes in your outcome space.
So let's have a quick example. Say tomorrow it will rain with some probability if its cloudy, and some other probability if it is not cloudy. Then:
Probability that it rains tomorrow = Probability that it rains given that it is cloudy * Probability that it is cloudy + Probability that it rains given that it is not cloudy * Probability that it is not cloudy.
In general, we need to make sure that we cover all possible outcomes. Naturally, one might think, but what if there are millions of possible outcomes (like for example, what if there are different chances of it raining if its sunny outside, or hazy, or foggy, etc)? Well then that's where Bayes' Rule comes in handy, when you consider the event like in the previous example and just take the probability that it is cloudy and then just tack on the probability that it is NOT cloudy (basically you are taking the complement).
Anyways so back to the problem. So basically, you want to know the probability of getting 4 Heads. Then by the previous example, you should know how it was done! Take the sum of (Getting 4 heads given this event)*(probability of this event) + (Getting 4 heads given the complement of this event)*(probability of the complement of this event).
OK I think it's rather late. Mathworld is a great reference.
|
|