Welcome, Guest. Please login or register.
July 23, 2025, 01:29:45 PM

Login with username, password and session length

Search:     Advanced search
we're back, baby
*
Home Help Search Login Register
f13.net  |  f13.net General Forums  |  General Discussion  |  Serious Business  |  Topic: For the math geeks 0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: For the math geeks  (Read 3510 times)
Samwise
Moderator
Posts: 19324

sentient yeast infection


WWW
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?)
Samwise
Moderator
Posts: 19324

sentient yeast infection


WWW
Reply #1 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.   swamp poop
Yegolev
Moderator
Posts: 24440

2/10 WOULD NOT INGEST


WWW
Reply #2 on: April 30, 2009, 10:54:32 AM

Statistics isn't real math.

Why am I homeless?  Why do all you motherfuckers need homes is the real question.
They called it The Prayer, its answer was law
Mommy come back 'cause the water's all gone
K9
Terracotta Army
Posts: 7441


Reply #3 on: April 30, 2009, 10:59:04 AM

1-(0.75^S)?

I love the smell of facepalm in the morning
Samwise
Moderator
Posts: 19324

sentient yeast infection


WWW
Reply #4 on: April 30, 2009, 11:06:17 AM

1-(0.75^S)?

Are you making fun of me?
Cyrrex
Terracotta Army
Posts: 10603


Reply #5 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.

"...maybe if you cleaned the piss out of the sunny d bottles under your desks and returned em, you could upgrade you vid cards, fucken lusers.." - Grunk
Draegan
Terracotta Army
Posts: 10043


Reply #6 on: April 30, 2009, 11:49:14 AM

42
Mosesandstick
Terracotta Army
Posts: 2476


Reply #7 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?
Yegolev
Moderator
Posts: 24440

2/10 WOULD NOT INGEST


WWW
Reply #8 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".

Why am I homeless?  Why do all you motherfuckers need homes is the real question.
They called it The Prayer, its answer was law
Mommy come back 'cause the water's all gone
Mosesandstick
Terracotta Army
Posts: 2476


Reply #9 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
« Last Edit: April 30, 2009, 12:17:25 PM by Mosesandstick »
Murgos
Terracotta Army
Posts: 7474


Reply #10 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
« Last Edit: April 30, 2009, 12:12:31 PM by Murgos »

"You have all recieved youre last warning. I am in the process of currently tracking all of youre ips and pinging your home adressess. you should not have commencemed a war with me" - Aaron Rayburn
Lantyssa
Terracotta Army
Posts: 20848


Reply #11 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. swamp poop

Hahahaha!  I'm really good at this!
Righ
Terracotta Army
Posts: 6542

Teaching the world Google-fu one broken dream at a time.


Reply #12 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?)

The camera adds a thousand barrels. - Steven Colbert
Mosesandstick
Terracotta Army
Posts: 2476


Reply #13 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.
« Last Edit: April 30, 2009, 12:31:26 PM by Mosesandstick »
Yegolev
Moderator
Posts: 24440

2/10 WOULD NOT INGEST


WWW
Reply #14 on: April 30, 2009, 12:29:19 PM

Boooo-ring.

Why am I homeless?  Why do all you motherfuckers need homes is the real question.
They called it The Prayer, its answer was law
Mommy come back 'cause the water's all gone
Mosesandstick
Terracotta Army
Posts: 2476


Reply #15 on: April 30, 2009, 12:32:11 PM

Screw you guys, I'm going home.
Signe
Terracotta Army
Posts: 18942

Muse.


Reply #16 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 .



My Sig Image: hath rid itself of this mortal coil.
Sky
Terracotta Army
Posts: 32117

I love my TV an' hug my TV an' call it 'George'.


Reply #17 on: April 30, 2009, 01:04:32 PM

Samwise
Moderator
Posts: 19324

sentient yeast infection


WWW
Reply #18 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.  Grin
apocrypha
Terracotta Army
Posts: 6711

Planes? Shit, I'm terrified to get in my car now!


Reply #19 on: April 30, 2009, 10:45:29 PM

boobls
Surely that's a search engine waiting to happen.

Edit: haha. <-- NSFW
« Last Edit: April 30, 2009, 10:51:22 PM by schild »

"Bourgeois society stands at the crossroads, either transition to socialism or regression into barbarism" - Rosa Luxemburg, 1915.
schild
Administrator
Posts: 60350


WWW
Reply #20 on: April 30, 2009, 10:48:35 PM

boobls
Surely that's a search engine waiting to happen.

Edit: haha.
Booble has been around a LONG TIME.

Used to look like google. <-- Sort of NSFW?

« Last Edit: April 30, 2009, 10:51:32 PM by schild »
Pages: [1] Go Up Print 
f13.net  |  f13.net General Forums  |  General Discussion  |  Serious Business  |  Topic: For the math geeks  
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC