How does the risk of a cyclist colliding with a vehicle vary with the speed difference? In a recent answer I asserted


  Statistics show that the probability of a collision rises rapidly after the speed difference between two road users exceeds 20 kph (12 mph). So choose paths without vehicle traffic, or roads with lower speed traffic.


User ebrohman requested a source for this. Since I remembered this "fact" from years back (er ... not only was it last millenium, it was from before the internet) I had to scrabble about to try to find an online source.

I found weak support for my thesis


  ... this US pdf Synthesis of Safety Research Related to Speed and Speed Management; it doesn't explicitly support the 20 kph claim. This Dutch pdf The relation between speed and crashes says at a collision speed of 20 km/h nearly all pedestrians survive a crash with a passenger car; again not the same as my claim ...


Intuitively, my claim makes sense. The greater the speed difference between a vehicle and me, the more likely a random driver is to make an error and collide with me.

But can we factually quantify how the risk varies with the speed difference?
As some have pointed out in the comments, the question is somewhat misleading, i.e. speed difference is always going to be greater in a head on collision, all things being equal, versus if the collision had been a rear ended collision or a t-bone, but, as @Daniel notes:


  "This is (mostly) unrelated to the probability of the collision in the
  first place"


According to The League of American Bicyclists:


  In 40 percent of the cases (628 total), the victim was struck from behind. The second-most common category was T-bone crashes, which accounted for 10 percent of fatal crashes. Head-on collisions (8 percent) and right-hook crashes, where the driver makes a right turn into a traveling straight (6 percent), were relatively less common.




Getting rear-ended is obviously the most common type of accident.  These numbers do not say the percentage of fatalities from rear-end collisions (they mention it for T-Bones).  However, if one holds to certain basic assumptions regarding the topic at hand:


Most cyclist will try to avoid a collision at all costs 
A collision is prerequisite for fatality
Speed difference is always greater head-on than same direction, rider speed and vehicle speed held equal


The conclusion one can draw from this is that all things being equal, following these stats (and other sources below) one should always ride head on, because statistically, one has the least chance of collision, even if the closing speed is the greatest, which itself, would then seem not to have any correlation with risk of collision, or possibly an inverse relationship if assumption 3 is held.

Head on collisions may have a higher incidence of fatality than others, I don't know.  If someone finds data on that please share.

In summary, riding at a lower relative speed (to other vehicles) alongside traffic is more dangerous but probably less fatal, whereas riding at a higher relative speed against traffic is statistically less dangerous but may prove to be more fatal in the event of an accident.  

Other relevant sources: http://www.trafficsafetycoalition.com/bike_studies