Hacker Newsnew | comments | ask | jobs | submitlogin
"More Sex is Safer Sex" Paradox (Python) (activestate.com)
75 points by nephics 3 days ago | 51 comments




16 points by pjscott 3 days ago | link

This is all based on unfounded assumptions about who has sex with whom. If you make a graph in which vertices are people and two people have an edge between them if they've had sex, then the structure you actually get is surprising. Here's a real sex graph; bear in mind that this is from a high school, so the things I say in the rest of the post may not apply outside high schools and colleges:

http://www.soc.duke.edu/~jmoody77/chains_pressfigure1.jpg

You've got a lot of two-person monogamous pairings, a smaller number of triads, scattered chains, and then this BIG, HAIRY THING that's vaguely ring-shaped. It doesn't have promiscuous hubs; you can stop the spread of STDs by trying to get as many people as possible to use condoms and get STD screening, thus breaking the chains. It's almost a spanning tree.

This structure can be generated from two simple rules:

1. People tend to date other people with a similar amount of past sexual experience.

2. People avoid dating the exes of other people who are close to them in the relationship graph, since this makes them look bad to their friends, exes, and so on. This accounts for the lack of short cycles.

This was theoretically confirmed by some researchers who wrote computer simulations to try to come up with similar-looking relationship graphs, and succeeded brilliantly:

http://www.soc.duke.edu/~jmoody77/chains.pdf

reply

11 points by Confusion 2 days ago | link

  Here's a real sex graph;
It's not a sex graph: it also contains all relationships of people that were romantically involved without having sex.

reply

1 point by pjscott 2 days ago | link

Ah, thank you: relationship graph. Still, the sex graph would probably have similar structure, unless things in high school are a lot more wild than I thought.

reply

3 points by iskander 2 days ago | link

That whole school is hetero?

reply

1 point by philwelch 2 days ago | link

Depending on the homophobia present at the school and the struggle a lot of young people have with their sexuality, that's not entirely surprising. (If you look closely you can find one or two same sex pairings, though one of them is two girls in a triangle with a guy; make of that what you will.)

reply

1 point by s-phi-nl 2 days ago | link

Or the study chose to study only heterosexual relationships. (Though the sibling comments seems to imply they didn't)

reply

18 points by baguasquirrel 3 days ago | link

It seems he chose the simulation parameters without any regard to what the real life numbers are. Anyone who has studied complex systems will tell you this is a big deal. In things like weather simulations, a small change in initial conditions makes for huge differences later on. In something relatively simple like this, it could mean that you are falling on one side of a differential equation or the other.

I mean seriously. Half the folks who often have sex will have AIDS?

reply

20 points by ZachPruckowski 3 days ago | link

Well, it's open-source, so there's no reason this has to be the end of the discussion. Copy his code and change a few parameters around.

reply

5 points by baguasquirrel 2 days ago | link

The model itself is broken. It is doubtful the population is bimodal, divided between people who are nymphomaniacs, and people who will be satisfied once they find "the one". I just don't believe that people don't have affairs, or that prostitution doesn't exist.

It is more plausible that the number sexual partners follows a Pareto distribution. It is likewise plausible that the economist sought to flatten the Pareto curve, even if this may result in the area under the curve increasing somewhat. Would it work? Maybe not. But this counterexample just reflects badly upon us. Programmers are the new physicists of this era.

http://www.xkcd.com/793/

reply

5 points by philwelch 2 days ago | link

My model didn't follow a bimodal distribution; it followed a uniform distribution. I got the same results. A Pareto distribution would be interesting to try.

reply

3 points by baguasquirrel 2 days ago | link

Your model has two different kinds of players, not one. There are players with a target activity rate of 0.1 and a players with a target activity rate of 0.01. Randomizing the activity rate over that will not produce a uniform distribution of activity.

If you really want to take the economist up to task, you should find his paper, code his model and parameters exactly, see if you reproduce his hypothesis over a number of trial runs (for all we know, he may not have run a sim at all, given the NYTimes' shoddy reporting).

reply

2 points by philwelch 2 days ago | link

No, the OP's model has two different kinds of players. I'm not the OP; the OP wrote a simulation in Python following the bimodal distribution you described; I wrote a completely different simulation in Ruby following a uniform distribution several months ago when I first read the story in question: http://news.ycombinator.com/item?id=1749324

My model does have a number of flaws (a uniform distribution is still not very good; there's no gender distinction; the transmission rate per encounter is artificially high; people only stay with their partners for a random-yet-uniform amount of time) but I'm not sure to what extent these matter.

reply

4 points by sliverstorm 3 days ago | link

Perhaps the parent could find a lower bound on the percentage of people with AIDS whereupon more sex does equal safer sex. That would certainly answer the parent's question.

reply

8 points by lotharbot 3 days ago | link

There's a lot of formalism surrounding the study of how much parameters matter; the field is called "dynamical systems" and often covers topics like bifurcation theory and chaos theory.

In this particular system, the parameters matter, but not very much for the particular question the author was asking. The system is well-behaved; it doesn't bifurcate or go chaotic. Tweaking the parameters will change whether the final level of infections is 10% or 90%, but the overall conclusion that "sexual conservatives taking more partners increases total infections" remains valid.

reply

2 points by barrkel 3 days ago | link

The conclusion isn't valid, IMO, because the assumptions are way off, again IMO. I think the "high-activity players" are at least two orders of magnitude more active than he models them, for example (in a conservative society which frowns deeply on premarital sex). Fewer of them, but more connected; and their numbers will go down, drastically, with more liberal attitudes.

reply

1 point by Goladus 2 days ago | link

The conclusions are flawed, but it's not the parameters that need tweaking so much as the dynamics of who is likely to have sex with each other.

reply

3 points by hartror 3 days ago | link

Modelling systems is hard, this is an interesting attempt but yes the lack of ANY sources for his assumptions and initial conditions means you cannot even begin to draw conclusions from this model. Hell the models I was exposed to at Uni didn't even provide an absolute answer, just a probability.

reply

3 points by xenophanes 3 days ago | link

Yeah, agreed.

Further, one can think of intuitive reasons that the conservatives having more sex might help. e.g. it lowers the chance of an STD going from a high risk person to a high risk person (which would cause it to be spread way more after). I have no idea who that makes right, I'm just saying intuitively one can think of simple reasons it might go either way and so the details definitely do matter.

reply

2 points by kscaldef 3 days ago | link

17% of the US adult population has Herpes. Something like 25% has HPV (the numbers on this are all over the place, but this seems like the most common result of studies).

reply

2 points by Mz 3 days ago | link

http://www.webmd.com/news/20060822/genital-herpes-virus-rate...

This agrees with your first figure:

About one in six Americans (17%) had the genital herpes virus -- called HSV-2 -- during 1999-2004. But that is down from the 21% rate seen in 1988-1994.

But then closes with this, which seems very real world relevant to this thought experiment/theory/whatever you want to call it:

As its name suggests, HSV-2 isn't the only herpes virus out there. HSV-1, the virus that causes cold sores, is much more common. As of 1999-2004, 57.7% of Americans carry the virus -- down slightly from the 62% HSV-1 infection rate seen in 1988-1994.

There's some bad news here: HSV-1 is causing more genital herpes than ever before. About 2% of people with HSV-1 infection -- but not HSV-2 -- have genital herpes.

"Our findings are consistent with previous reports that genital herpes caused by HSV-1 may be increasing in the United States, as in other developed countries," Xu and colleagues note.

The researchers warn that the herpes virus that causes cold sores may one day become a more important cause of genital herpes. One factor: The increase in teen oral sex that's helping stop HSV-2 spread may be increasing genital infections with HSV-1.

reply

2 points by enko 2 days ago | link

Frankly I just wish everyone had frigging herpes so we could all stop worrying about it. And, of course, jack up the r&d necessary to remove it from our lives once and for all.

reply

4 points by mattmaroon 3 days ago | link

Well, there certainly are statistical problems you can't solve without math or simulations, but this isn't one of them. Landsburg is obviously wrong. You only have to think about the extremes (ie. nobody having sex at all, and everyone having sex with everyone) to see that.

He also misunderstands the dating pool. It isn't as if promiscous people have a calendar and go to the bar determined to hook up with someone every 100 days, then when they're done think "that was nice, I'll do that again in 3 months." They go to the bar frequently and hook up every time they get the opportunity. Hookups with less promiscous partners don't sate their appetite or reduce at all the number of hookups they'll make later.

reply

7 points by sliverstorm 3 days ago | link

Of course, none of this changes one ironclad rule:

No sex is the safest kind of sex.

Not sarcastic and not that I am celibate- but if you personally really wish to avoid STD's, there is a very clear solution.

Also, I'm not quite humanitarian enough to raise my personal risk exposure for the sake of lowering society's risk exposure.

reply

4 points by Avshalom 2 days ago | link

Well sure but no sex still isn't a guarantee of no STDs. A fact that is in part responsible for moving AIDS from "god's punishment for being gay" to "serious fucking problem."

reply

1 point by sliverstorm 2 days ago | link

This is true, but I believe sex is still the #1 transmission vector. And if it's not, #1 is dirty needles. So by avoiding #1 and #2 (most people don't shoot heroin) you cut out the biggest risk factors.

reply

2 points by zaphar 2 days ago | link

Or you you could do the next best thing and only have sex with one person who also only has sex with you otherwise known as monogamy. You get the sex and the safety. Best of both worlds. The rest of the world may act harmfully but that doesn't mean you have to.

If your comparing the two options of

   * Low risk wiser people increasing their risk and acting less wise so that high risk less wise people can have their cake and eat it to
   * Or High risk less wise people lowering their risk and acting more wise.
I think option 2 sounds like a better if more difficult goal to shoot for.

reply

1 point by tomjen3 2 days ago | link

Another Iron clad rule:

People will have sex.

So it really doesn't matter if it isn't totally safe.

reply

1 point by prodigal_erik 2 days ago | link

Syphilis used to be a sentence of death preceded by insanity. People still had sex.

reply

0 points by enko 2 days ago | link

  I hold it true, whate'er befall;
  I feel it, when I sorrow most;
  'Tis better to have loved and lost
  Than never to have loved at all.

reply

6 points by barrkel 3 days ago | link

The key bit that this author is missing is prostitutes as the "high-activity players". If it's easier for people to get with "low-activity players", it naturally reduces the activity of the "high-activity players".

Also, the "high-activity players" modeled as 1 per 10 days seems pretty low, to me. In an extremely conservative society using prostitutes as a sexual outlet for unmarried young men, I would expect rates in excess of 10 per day, not 1 per 10 days.

reply

4 points by xenophanes 3 days ago | link

Is STD risk with prostitutes very high? They have more sex but they also have more STD tests, more sheet-washings, more knowledge about safe sex.

reply

10 points by barrkel 3 days ago | link

That's very dependent on the country, situation, wealth, etc. What are the rates among prostitutes in Saudi Arabia, for example? A quick internet scan indicates in that they are from Indonesia, Nigeria etc., and 20 or younger. With prostitution being illegal, how easily can they get STD tests? If they are being trafficked / lured in at a young age, what's their likely education level and autonomy for insisting on safe sex?

reply

6 points by sprout 3 days ago | link

Better than that would be for our society to get over the stigma around STDs and STD testing. As unromantic as it is, it should be uncontroversial to ask someone for a copy of a recent STD test. Even having cards would be nice, on a purely opt-in basis.

People will whine and moan about the privacy concerns, but when it comes right down to it people with untreated or untreatable STIs should not be having sex (and if they are their partners should be made aware.)

reply

14 points by maxawaytoolong 3 days ago | link

Asking your date for a copy of her most recent STD test is definitely a sure-fire way to avoid contracting any STDs...

reply

8 points by Mz 3 days ago | link

You could always do the gentlemanly thing and offer to show her yours first...

reply

0 points by tomjen3 2 days ago | link

Actually I would wine because I now have to go to the doctor just cause some idiots can't remember to use a condom (condoms doesn't break very often, or else prostitutes wouldn't insists on using them).

reply

1 point by natrius 2 days ago | link

Condoms don't prevent the spread of all STIs, nor are they 100% reliable for the ones they do protect against.

reply

1 point by Clarity1992 3 days ago | link

>> people with untreated or untreatable STIs should not be having sex

Why "not be having sex" and not "not be having unprotected sex"?

reply

7 points by sprout 3 days ago | link

Because condoms have a measurable failure rate.

Really, there's nothing wrong with them having sex - just so their partners are aware of the risk.

reply

4 points by Mz 2 days ago | link

FWIW: I decided to become celibate after the third moron in a row failed to comprehend the statement that "A condom is a necessity even if pregnancy is not a concern". I don't have an STD. I have a compromised immune system and was extremely ill, with one or more antibiotic resistant infections. Doctors never identified the infection(s) in question. I concluded that no amount of explaining was going to convey to anyone my belief that they were at risk of exposure to infection (doctors chalk it all up to my genes, so other people go with that mental model and assume that although I can get sick from them, they are somehow magically at zero risk from me) and it would be best to just not go there until I was healthier. (I also concluded they were acting with callous disregard for my welfare, a very big red flag in my book, but that's not really relevant to my point.)

So while I agree with some of your points, I really don't think a card or test will address the issue. For one thing, if someone asked me to produce my card (or latest test results), to me that would just scream "This is just a hook-up. You are nothing but a sex object to me." At which point, if I did the traditional dating thing, I imagine I would get up and leave the table. For another, different people have different levels of understanding of what the risks are. So I would question what it means for their partners to be "aware of the risk". Do you just give them notice of your state of health or do you have a larger obligation than that to ensure they REALLY get it? Just giving men notice of my state of health struck me as wholly insufficient. They blithely climbed into bed with me anyway (and without a condom), apparently oblivious to the potential implications of sleeping with someone who was deathly ill with something doctors did not know how to effectively treat (or even really identify).

reply

10 points by nandemo 2 days ago | link

Actually, it's worse than that. Herpes and HPV can be transmitted via skin not covered by the condom, so even if the condom doesn't break it doesn't necessarily prevent transmission. It only reduces the probability of transmission.

Also, there are no HPV screening tests for men.

reply

1 point by philwelch 3 days ago | link

It's nice to see confirmation of this. I got similar results on the simulation I wrote: http://github.com/philwelch/SexSim See my comment here: http://news.ycombinator.com/item?id=1407984

I'll check back when I'm less busy to compare how our simulations are set up. Mine was very quick and dirty and naive, based on uniform random distributions no less, so I'm fully open to the possibility we're both wrong.

reply

1 point by wccrawford 3 days ago | link

As he showed, it's not a 'paradox'.

Actually, it never was, since that's not what paradox means in the first place.

But he did show it wasn't true at all.

But even if he hadn't, it would -never- have been safer for the 'sexual conservatives'. More sex always means more risk for them, no matter the time frame.

reply

5 points by fjh 3 days ago | link

The word paradox is commonly used for things that are surprising or counter-intuitive (e.g. the birthday paradox and simpson's paradox). If you consider this meaning, it makes senses to call it a paradox.

reply

1 point by cheald 3 days ago | link

I suspect the proper word here would have been "phenomenon". Except it isn't.

reply

1 point by stuaxo 2 days ago | link

He does start with the assumption that 1/2 the promiscuous players are infected already - which seems like quite an assumption.

reply

1 point by robfitz 3 days ago | link

This code refutes a claim the author didn't make.

He was saying that it is in your personal best interest to convince people more sexually conservative than you to start having more sex, which reduces your individual risk. I don't remember him making any claims about the overall benefit (or lack thereof) to the population except for the admittedly misleading title of the book and example.

I have no idea whether the claim he did make is true or not, but this particular program doesn't get us any closer to finding out.

reply

3 points by Mz 3 days ago | link

He was saying that it is in your personal best interest to convince people more sexually conservative than you to start having more sex, which reduces your individual risk.

This really doesn't sound logical to me unless the goal is to specifically talk some conservative individual into being your long-term sex partner, thus securing a source of sex with a low risk of a) bringing an infection into the equation to start with and b) exposing you at a later date due to promiscuous behavior after they start sleeping with you. Of course, that assumes you also "behave" once you have such a situation or all bets are off. (I think most cultures already place a pretty high value, at least theoretically, on such an arrangement via valuing monogamy and marriage.)

reply

2 points by Clarity1992 3 days ago | link

There's a story about G H Hardy coming across a geneticist's work and proving that recessive genes persist at an equal concentration, against the original author's claims. This article reminds me a lot of that, where an expert in another field says "let me just check that for myself, errrr!".

I believe the Hardy story is told in C P Snow's foreword to A Mathematician's Apology, and the result is now well known: http://en.wikipedia.org/wiki/Hardy–Weinberg_principle

reply

1 point by stevenlandsburg 21 hours ago | link

The coder has failed to grasp the assumptions, the logic, or the conclusions of the argument he thinks he's addressing. Details here: http://www.thebigquestions.com/2010/10/04/the-python-misinte....

reply

-4 points by inquisitor20 3 days ago | link

aint statistics grand!!! unfortunately real life never learned statistics :( stupid reality....

reply




Lists | RSS | Search | Bookmarklet | Guidelines | FAQ | News News | Feature Requests | Y Combinator | Apply | Library

Analytics by Mixpanel