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

**URL:** <https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358>\
**Category:** Factual Questions\
**Created:** [July 26, 2009, 10:26pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358 "2009-07-26T22:26:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blalron](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Blalron](https://boards.straightdope.com/u/Blalron)\
**Post date:** [July 26, 2009, 10:26pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/1 "2009-07-26T22:26:13Z")

</div>

This is from a comic strip.

> **[Fermirotica](https://xkcd.com/563/)**
>
> I love how Google handles dimensional analysis. Stats are ballpark and vary wildly by time of day and whether your mom is in town.

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?

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [July 26, 2009, 10:45pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/2 "2009-07-26T22:45:53Z")

</div>

Well 2_pi_r^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.

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [July 26, 2009, 10:52pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/3 "2009-07-26T22:52:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dr.Love](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dr.Love](https://boards.straightdope.com/u/Dr.Love)\
**Post date:** [July 26, 2009, 11:27pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/4 "2009-07-26T23:27:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zombywoof](https://avatars.discourse-cdn.com/v4/letter/z/9e8a1a/32.png) [@zombywoof](https://boards.straightdope.com/u/zombywoof)\
**Post date:** [July 26, 2009, 11:47pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/5 "2009-07-26T23:47:26Z")

</div>

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…)

---

<div class="post-metadata">

**Author:** ![Kimmy\_Gibbler](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@Kimmy\_Gibbler](https://boards.straightdope.com/u/Kimmy_Gibbler)\
**Post date:** [July 27, 2009, 12:00am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/6 "2009-07-27T00:00:14Z")

</div>

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)  
_n_ln(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.

---

<div class="post-metadata">

**Author:** ![chacoguy](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@chacoguy](https://boards.straightdope.com/u/chacoguy)\
**Post date:** [July 27, 2009, 12:17am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/7 "2009-07-27T00:17:50Z")

</div>

God, that’s hot. 😉

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [July 27, 2009, 12:24am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/8 "2009-07-27T00:24:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tim\_T-Bonham.net](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Tim\_T-Bonham.net](https://boards.straightdope.com/u/Tim_T-Bonham.net)\
**Post date:** [July 27, 2009, 12:32am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/9 "2009-07-27T00:32:13Z")

</div>

> [@Dr.Love](#):
>
> The 2 in the formula comes from the fact that two people are engaged in every sex act

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

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 27, 2009, 12:40am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/10 "2009-07-27T00:40:45Z")

</div>

> [@](#):
>
> In particular, notice that the assumption the webcomic makes–that the minimum n needed for a better than half probability is (1/2)/(XfXd)–is incorrect.

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.

---

<div class="post-metadata">

**Author:** ![billfish678](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@billfish678](https://boards.straightdope.com/u/billfish678)\
**Post date:** [July 27, 2009, 12:55am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/11 "2009-07-27T00:55:10Z")

</div>

> [@t-bonham@scc.net](#):
>
> Not masturbation. And that is surely the most common (frequent) sex act.

there is a monopole joke in there somewhere…

---

<div class="post-metadata">

**Author:** ![Kimmy\_Gibbler](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@Kimmy\_Gibbler](https://boards.straightdope.com/u/Kimmy_Gibbler)\
**Post date:** [July 27, 2009, 1:33am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/12 "2009-07-27T01:33:35Z")

</div>

> [@Chronos](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Dr.Love](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dr.Love](https://boards.straightdope.com/u/Dr.Love)\
**Post date:** [July 27, 2009, 3:18am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/13 "2009-07-27T03:18:32Z")

</div>

> [@t-bonham@scc.net](#):
>
> Not masturbation. And that is surely the most common (frequent) sex act.

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

> [@Kimmy\_Gibbler](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 27, 2009, 5:35am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/14 "2009-07-27T05:35:31Z")

</div>

> [@](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Washoe](https://avatars.discourse-cdn.com/v4/letter/w/ecae2f/32.png) [@Washoe](https://boards.straightdope.com/u/Washoe)\
**Post date:** [July 27, 2009, 5:43am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/15 "2009-07-27T05:43:11Z")

</div>

> [@Shagnasty](#):
>
> That’s pretty impressive **Kimmy Gibbler**.

Especially coming from a lawyer…

_ducks and runs_

---

<div class="post-metadata">

**Author:** ![Tim\_T-Bonham.net](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Tim\_T-Bonham.net](https://boards.straightdope.com/u/Tim_T-Bonham.net)\
**Post date:** [July 27, 2009, 6:41am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/16 "2009-07-27T06:41:02Z")

</div>

> [@Dr.Love](#):
>
> Well, the comic says “is having sex,” which I think disqualfies masturbation.

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.

---

<div class="post-metadata">

**Author:** ![tr0psn4j](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tr0psn4j](https://boards.straightdope.com/u/tr0psn4j)\
**Post date:** [July 27, 2009, 6:46am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/17 "2009-07-27T06:46:20Z")

</div>

> [@t-bonham@scc.net](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [July 27, 2009, 6:58am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/18 "2009-07-27T06:58:29Z")

</div>

> [@t-bonham@scc.net](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![UDS](https://avatars.discourse-cdn.com/v4/letter/u/ecae2f/32.png) [@UDS](https://boards.straightdope.com/u/UDS)\
**Post date:** [July 27, 2009, 7:48am UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/19 "2009-07-27T07:48:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kimmy\_Gibbler](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@Kimmy\_Gibbler](https://boards.straightdope.com/u/Kimmy_Gibbler)\
**Post date:** [July 27, 2009, 1:50pm UTC](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358/20 "2009-07-27T13:50:02Z")

</div>

> [@Dr.Love](#):
>
> 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.

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.

> [@Chronos](#):
>
> 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.

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.

[Next page](https://boards.straightdope.com/t/on-average-someone-within-r-distance-of-you-is-having-sex-is-this-a-real-equation/504358.md?page=2)
