Most highway organizations use the 85th percentile rule to set speed limits.
"The 85th percentile speed is the speed that 85 percent of drivers travel at or below and is one of the best indicators of a reasonable and safe speed."
That does seem like a gross oversimplification. 15% of the cars driving through a neighbourhood at 40Miph/65kmph or faster doesn't make that speed a safe speed for that neighbourhood.