f13.net

f13.net General Forums => Serious Business => Topic started by: Samwise on April 30, 2009, 10:28:56 AM



Title: For the math geeks
Post by: Samwise on April 30, 2009, 10:28:56 AM
I've been doodling on a bit of paper for the past fifteen minutes trying to work this out and getting nowhere.  Then I had the thought that there are probably people on F13 who know probability much better than I do.

Suppose I have two sets of numbered bools, each of size S.  The first set has some number of its bools (A) set to true at random; the second set has B bools set to true, also at random.  Given S, A, and B, what are the odds that there's at least one point where the same bool is set to true in both sets?  (And ideally, what's the most probable number of such intersections?)


Title: Re: For the math geeks
Post by: Samwise on April 30, 2009, 10:53:12 AM
AB/S (for probable number of intersections)?

Just looking at a few sample points..

A or B = 0  ->  AB/S = 0

A = 1, B = S -> AB/S = 1

A = 1, B = S/2 ->  AB/S = 0.5

A = B = S ->  AB/S = S

I'm feeling pretty good about this one, but this seems like a really unscientific way to go about solving the problem.   :uhrr:


Title: Re: For the math geeks
Post by: Yegolev on April 30, 2009, 10:54:32 AM
Statistics isn't real math.


Title: Re: For the math geeks
Post by: K9 on April 30, 2009, 10:59:04 AM
1-(0.75^S)?


Title: Re: For the math geeks
Post by: Samwise on April 30, 2009, 11:06:17 AM
1-(0.75^S)?

Are you making fun of me?


Title: Re: For the math geeks
Post by: Cyrrex on April 30, 2009, 11:22:09 AM
Maybe you need to spend less time doodling crazy math problems and more time staring at your avatar.  Like I'm doing.


Title: Re: For the math geeks
Post by: Draegan on April 30, 2009, 11:49:14 AM
42


Title: Re: For the math geeks
Post by: Mosesandstick on April 30, 2009, 11:56:54 AM
I'm kind of confused by the question (don't understand bools). Basically you have two sets like such?:

     A      |     B
---------------------
1.  T      |     F
2.  F      |     F
3.  F      |     

And you're trying to find out whether the points in each 'position' (that I've denoted 1, 2, 3) are the same?


Title: Re: For the math geeks
Post by: Yegolev on April 30, 2009, 12:03:04 PM
I think that was what he was getting at, which makes me think that there's a 2-in-3 that 1A = 1B, which means there's a 2-in-3 that nA = nB, and after that you just use that formula I forgot about to add up non-related probabilities.

Not that I'm a statistician, or even have a high regard for the "discipline".


Title: Re: For the math geeks
Post by: Mosesandstick on April 30, 2009, 12:09:02 PM
Whoo! Let's start from the beginning.

If we have one data point. Then we have 4 possiblities.
TT, FF, TF, FT.

So per point we have a 25% chance of there being a 'match'. That's if the probability of a bool in A being true is 50%, and the probability of a bool in B being true is 50%.

For your case, a bool in set 1 will have a probability of A/S of being true and in set 2 will have a probability of B/S of being true.

Now if we want to make sure we don't have any events, then we need to get mismatches on every single point. The probability of this ((1-A/S)*(1-B/S))^N.

If we want to have at least ONE match, then we can have one match, two matches, three matches .... all the way up to them all matching. This is equal to the total probablity (1) minus the probability of there being no matches.

Therefore the probability of there being at least one match = 1 - ((1-A/S)*(1-B/S))^N.

Edit: Updated


Title: Re: For the math geeks
Post by: Murgos on April 30, 2009, 12:09:26 PM
For each N in S the chance that AsubN and BsubN are equal for the solution set of {T; F}? Either 'Yes' they match or 'No' they don't with a 2 in 4 chance of matching.

Tis a Bernoulli trial.  With a Binomial Distribution. 

http://en.wikipedia.org/wiki/Bernoulli_trial
http://en.wikipedia.org/wiki/Binomial_distribution


Title: Re: For the math geeks
Post by: Lantyssa on April 30, 2009, 12:18:18 PM
Maybe you need to spend less time doodling crazy math problems and more time staring at your avatar.  Like I'm doing.
Now I can only see River hunting a Bunny when I look at either of your avatars. :uhrr:


Title: Re: For the math geeks
Post by: Righ on April 30, 2009, 12:25:12 PM
Maybe you need to spend less time doodling crazy math problems and more time staring at your avatar.  Like I'm doing.

At which point his question reads as follows:

Suppose I have two bikinis of numbered boobs, each of size 44.  The first bikini has some number of its boobs (D) set to true at random; the second bikini has DD boobs set to true, also at random.  Given 44, D, and DD, what are the odds that there's at least one point where the same boob is set to true in both bikinis?  (And ideally, what's the most probable number of such intercourses?)


Title: Re: For the math geeks
Post by: Mosesandstick on April 30, 2009, 12:28:28 PM
Pretty sure what I've got is correct. I'll see if I can simplify. I'll translate my post into stats language.

You have S events, which is the size of your set S. Each 'event' is a true or false over whether N(A)=N(B)=T. The probability of any data point in set A being true = A/S. The probability of any data point in set B being true = B/S. Therefore the probability of a data set where A and B are both true = A/S*B/S= AB/S^2.

To work out the probability that there is at least one bool where both A and B are true it is easier to work out the probability when A and B are not both equal to true. This gives us our Bernoulli distribution. The question is are both A and B true? The probability that they are is AB/S^2, the probability they aren't is 1-AB/S^2.

Then the probability that all of our S data points are not both true is (1-AB/S^2)^N. The probability that there is at least one bool which is both true is then 1-(1-AB/S^2)^N.

Scratch my previous post.

The most probable number of true events can be calculated from the mode. I can't remember why (hehe) but as the wiki page says its [n+1]p.

Since the probability of our event (p) = AB/S^2, our mode will be (s+1)AB/s^2, rounded to the nearest integer.


Title: Re: For the math geeks
Post by: Yegolev on April 30, 2009, 12:29:19 PM
Boooo-ring.


Title: Re: For the math geeks
Post by: Mosesandstick on April 30, 2009, 12:32:11 PM
Screw you guys, I'm going home.


Title: Re: For the math geeks
Post by: Signe on April 30, 2009, 12:54:02 PM
Imagine I am an elite Dutch mathy man with a strange and snooty British accent and was not distracted by thinking about boobs instead of bools:

You've articulated the problem unclearly, but let's assume that what you meant to say is that we have a single collection of N boobls, and two instances of that collection, in the first of which a randomly selected A out of the N are set to true, and in the second a randomly selected B of the N are.

The probability that at least one boobl is true in both instances is then 1 - C(N-A, B) / C(N, B) when A+B <= N (and obviously 1 if not). When you understand why, it'll be obvious what the expected number of such intersections is.

And then (http://www.mommiescamelot.com/forum/images/smilies/boob2.gif) .




Title: Re: For the math geeks
Post by: Sky on April 30, 2009, 01:04:32 PM
(http://www.mommiescamelot.com/forum/images/smilies/boob2.gif)


Title: Re: For the math geeks
Post by: Samwise on April 30, 2009, 01:57:26 PM
maths

Sweet, thanks!  I knew someone around here would be helpful.  I'm pleased that my guess was only off by 1.  ;D


Title: Re: For the math geeks
Post by: apocrypha on April 30, 2009, 10:45:29 PM
boobls
Surely that's a search engine waiting to happen.

Edit: haha (http://www.booble.com/). <-- NSFW


Title: Re: For the math geeks
Post by: schild on April 30, 2009, 10:48:35 PM
boobls
Surely that's a search engine waiting to happen.

Edit: haha (http://www.booble.com/).
Booble has been around a LONG TIME.

Used to look like google (http://web.archive.org/web/20040202081446/http://www.booble.com/index.html). <-- Sort of NSFW?