Home | Community | Message Board


This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Shop: PhytoExtractum Kratom Powder for Sale, Maeng Da Thai Kratom Leaf Powder   Kraken Kratom Red Vein Kratom

Jump to first unread post Pages: 1
OfflineSeussA
Error: divide byzero

Folding@home Statistics
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.


Extras: Filter Print Post Top
InvisibleMezcal
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


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero

Folding@home Statistics
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.


Extras: Filter Print Post Top
InvisibleMezcal
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.


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero

Folding@home Statistics
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.


Extras: Filter Print Post Top
OfflineYthanA
ᕕ( ᐛ )ᕗ
Male User Gallery

Registered: 08/08/97
Posts: 18,774
Loc: NY/MA/VT Borderlands Flag
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.


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero

Folding@home Statistics
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.


Extras: Filter Print Post Top
InvisibleMezcal
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 :wink:


Extras: Filter Print Post Top
OfflineChuangTzu
starvingphysicist
Male User Gallery

Folding@home Statistics
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?


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero

Folding@home Statistics
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.


Extras: Filter Print Post Top
InvisibleMezcal
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.


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero

Folding@home Statistics
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.


Extras: Filter Print Post Top
Offlinedaba
Stranger
 User Gallery

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.


--------------------
Fold for The Shroomery!


Extras: Filter Print Post Top
Offlinedaba
Stranger
 User Gallery

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.


--------------------
Fold for The Shroomery!


Extras: Filter Print Post Top
Jump to top Pages: 1

Shop: PhytoExtractum Kratom Powder for Sale, Maeng Da Thai Kratom Leaf Powder   Kraken Kratom Red Vein Kratom


Similar ThreadsPosterViewsRepliesLast post
* Huston, we have a problem. AnnoA 1,252 11 04/20/03 11:20 AM
by Seuss
* Why do I keep having this problem? User Exists 1,949 12 08/22/03 11:08 AM
by User Exists
* So you think you know your math huh...
( 1 2 all )
Lana 5,262 29 04/30/03 06:20 PM
by ExtravagantDream
* problems connecting to kazaa entiformatie 1,175 4 09/13/03 03:09 PM
by TinMan
* password problem dog 683 2 05/15/03 01:36 PM
by dog
* Problems with removing programs Rabbitt 493 1 02/10/03 05:37 PM
by minusrestraint
* Read this! Massive SECURITY problem with Win XP! Fd3000 1,379 14 10/24/02 05:57 PM
by
* help with pc problems ChromeCrow 705 4 09/07/03 08:12 AM
by nofind_um

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
896 topic views. 0 members, 1 guests and 1 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2024 Mind Media. Some rights reserved.

Generated in 0.023 seconds spending 0.007 seconds on 14 queries.