Pages: [1]
|
 |
|
Author
|
Topic: For the math geeks (Read 3513 times)
|
Samwise
Moderator
Posts: 19324
sentient yeast infection
|
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
|
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. 
|
|
|
|
Yegolev
Moderator
Posts: 24440
2/10 WOULD NOT INGEST
|
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
|
1-(0.75^S)?
|
I love the smell of facepalm in the morning
|
|
|
Samwise
Moderator
Posts: 19324
sentient yeast infection
|
1-(0.75^S)?
Are you making fun of me?
|
|
|
|
Cyrrex
Terracotta Army
Posts: 10603
|
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
|
42
|
|
|
|
Mosesandstick
Terracotta Army
Posts: 2476
|
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
|
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
|
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
|
|
|
« 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
|
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. 
|
Hahahaha! I'm really good at this!
|
|
|
Righ
Terracotta Army
Posts: 6542
Teaching the world Google-fu one broken dream at a time.
|
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
|
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
|
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
|
Screw you guys, I'm going home.
|
|
|
|
Signe
Terracotta Army
Posts: 18942
Muse.
|
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 boo bls, 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 boo bl 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'.
|
|
|
|
|
Samwise
Moderator
Posts: 19324
sentient yeast infection
|
maths
Sweet, thanks! I knew someone around here would be helpful. I'm pleased that my guess was only off by 1. 
|
|
|
|
apocrypha
Terracotta Army
Posts: 6711
Planes? Shit, I'm terrified to get in my car now!
|
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
|
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]
|
|
|
 |