"On average, someone within R distance of you is having sex" is this a real equation?

This is from a comic strip.

I confess, I’m kind of terrible at math… but taking one look at this equation managed to kindle whatever tiny sparks of mathematical love within me. I’m not exactly sure how to plug in the numbers here and it’s driving me crazy. My home town has a population density of 2,500 people per square mile. Anyone care to help?

Well 2pir^2 is the area of a circle with radius r so that’s how much “land” (assuming no lakes, etc.) is within distance r of you. Multiply this by the population density P_d and you have the number of people within distance r of you. Multiply this by the frequency and the duration gives you the number of people engaged in the act on average. Note however, if the frequency is times per year, the duration must be measured in years (not minutes) to make it work out right. 30 minutes is 0.5 hours which is 0.5/24 days which is 0.5/(24*365.25) years.

The example numbers aren’t right either. Married couples with a healthy sex life may have sex an average of 80 times a year for 30 minutes but I sure hope that all the children and lots of others like 100 year olds aren’t (if so, good for them though). The real numbers are way lower than that unless you happen to live in a Red Light District.

Yes, the formula basically works, but OldGuy is a bit off. The area of a circle is pi * r[sup]2[/sup]. The 2 in the formula comes from the fact that two people are engaged in every sex act, and these two people are going to be right next to each other. So, really, this formula gives you the average distance to the closest couple that is having sex.

And remember that once you’ve worked out the result an average is just that, actual results at any given time will likely vary quite a bit (i.e. a Saturday night vs. a Thursday midmorning, for example…)

The derivation of the formula is not correct.

If you want to know how large a group needs to be before you can say that there is a better than half chance that at least one group member is engaged in a given activity, assuming that engaging is the activity is independent of other members’ activity statuses, here’s how you would do it. In this example, to make the numbers easy, I am going to use sleeping as the activity and that people sleep eight hours a day and, importantly, the sleeping activity is independent of other group members and is uniformly distributed over the course of a day.

Thus, the probability that a specific person is asleep at any given moment is (8/24)=(1/3). Accordingly, the probability that he is not asleep is (2/3). The probability that everybody in a group of 2 is awake is (2/3)[sup]2[/sup], and in general, the probability that everybody in a group of n is awake is (2/3)[sup]n[/sup].

The probability that at least one person among n is asleep is just that probability that not all n people are awake. That is to say, the probability is 1-(2/3)[sup]n[/sup].We want to know how large n has to be so that
1-(2/3)[sup]n[/sup]>(1/2).

Answering this question tells us how large a group we need in order to say that it is more likely than not that at least one of them is asleep.

Reordering this equation gives us
(2/3)[sup]n[/sup]<(1/2).

We can find n using logarithms.

ln((2/3)[sup]n[/sup])<ln(1/2)
nln(2/3)<ln(1/2)

Because the logarithm of a number less than one is negative, we must flip the sign when dividing by it. Doing so yields the following:

n>ln(1/2)/ln(2/3)

In this case, n must be at minimum 1.709511291. Or, since we deal with integer values for human beings, 2.

In general, if p is the probability of being engaged in a given activity, then we can deduce from the above the following as the minimum “more-likely-than-not” group size n:

n=ln(2)/ln(1/(1-p))

In the case of sexual activity, p would equal the number of sexual episodes per time-unit multiplied by their average duration in that same time-unit. Using the variables from the webcomic:

p=X[sub]f[/sub]X[sub]d[/sub]

Once you know this, you can find n. Once you know n, you can use

n=P[sub]d[/sub]πr[sup]2[/sup]

to find the minimum radius needed for an estimated n people. Making this explicit:

r=sqrt(n/(P[sub]d[/sub]π)).

In particular, notice that the assumption the webcomic makes–that the minimum n needed for a better than half probability is (1/2)/(X[sub]f[/sub]X[sub]d[/sub])–is incorrect.

God, that’s hot. :wink:

That’s pretty impressive Kimmy Gibbler. I think you should send it to them and tell them that you are from the Straight Dope and, if they keep fucking up the facts, we will be sending in a lot more reinforcements.

Not masturbation. And that is surely the most common (frequent) sex act.

The webcomic doesn’t make that assumption. It’s not presented as “the distance within which there is probably someone having sex”, it’s presented as “on average, someone within that distance is having sex”. The numbers are different because the average also takes into account the possibility of multiple couples having sex within the given radius.

there is a monopole joke in there somewhere…

I don’t think “the distance within which there is probably someone [at least one person] having sex” and “[the distance such that] on average, someone within that distance is having sex” identify different distances. You’ll notice that my calculation is designed to determine the probability that at least one, but perhaps more, people are engaged in sex. So your objection about multiple couples seems misbegotten to me. Perhaps you are thinking of the celebrated birthday problem? The standard setup, “How large a group do you need for a better-than-half chance of a shared birthday?”, gives an answer of 23. A similar setup, “How large a group do you need for a better-than-half chance of someone sharing your birthday?”, yields a quite different number of 253 (which can be calculated as in my post above using n>ln(1/2)/ln(364/365)). The reason that this latter number is not merely (1/2)(365) turns on the probability of group members sharing birthdays that are not mine, so the needed minimum size is greater than one-half times the number of possible outcomes. Perhaps you are thinking of this fact? At any rate, it does not change the my analysis above, and to the since the webcomic nevertheless takes a straight (1/2)(number of outcomes) approach, it is in error.

Well, the comic says “is having sex,” which I think disqualfies masturbation.

Isn’t this rather like the difference between an unbiased estimator and a maximum likelihood estimator? That is, E[πr[sup]2[/sup]] = P[sub]d[/sub]X[sub]f[/sub]X[sub]d[/sub]/2. The inclusion fo the log terms in your formulation will add some bias. Neither estimator is wrong, just looking at different things.

To clarify with concrete numbers: Let’s say that I have all of the relevant data, and I conclude that, in the one-mile circle centered on myself, there is at any given time a 60% chance that nobody is having sex, a 10% chance of exactly one couple having sex, a 10% chance of exactly two couples, a 10% chance of three couples, a 10% chance of four couples, and no chance of a larger number of couples. In this case, I can say that, on average, there is one couple within a mile of me having sex, even though there is a greater than 50% chance that nobody’s having sex at all.

Especially coming from a lawyer…

ducks and runs

You’re claiming masturbation isn’t sex?
Sister Grace Marie and every other nun that taught me in parochial school would say you are wrong. As would catholic theology, and most christian faiths.

Although, Clinton would probably agree with him.

Cool! I just bumped my count 10,000 fold although I am pretty sure that isn’t true for most Christian faiths but I am willing to convert to Catholicism if I get better bragging rights. I bet Sister Grace Marie was quite the little whore herself by that standard.

Actually, the principal theological ground for objecting to masturbation in the Catholic tradition is that it isn’t sex.

And I think that on this point Catholic theology accords with common sense. Very few people who masturbate consider that they are having sex. They may wish that they were having sex, but that just underlines the point.

Well, to the extent that we’re not really fitting data to distribution parameters, I don’t think this exercise is one of maximum likelihood estimation. Instead, the way I have conceptualized it at least, it is an exercise of ordinary probability theory. To make it even easier, the probability model I am using is independent, identically and uniformly distributed probability model over single persons (rather than couples). Indeed, my model seeks to find the minimum group size at which it is more likely than not that at least one person (not one couple) is having sex. This was done to take advantage of the fact that “at least one” allows me to use the formula 1-q[sup]n[/sup], where q=1-p and p is the probability of the outcome of interest. To determine the minimum group size for which it is more likely than not that at least two people are engaged in sex seems to require either (1) abandonment of the independence hypothesis, or (2) use of the inclusion-exclusion principle. Neither is an attractive proposition and I think the model works perfectly well for its purposes without the refinement.

This does yield an expected value of 1 couple within the given radius, however the variables used in the webcomic would not allow this manner of calculation. It seems apparent that by taking population density, frequency, and duration as givens, the estimation is supposed to proceed by determining the probability that a given person is engaged in sex in a given time, from that determining the group size needed to permit the inference of a better than half probability of at least one person engaged in sex, and then from that determining the radius needed to match that minimum group size using the regional population density. This is what I have done in my first post in this thread.