PARIS — Across Europe and East Asia, hundreds of millions of train passengers a year are routinely whisked, at speeds that often exceed 200 miles an hour, over extensive rail networks that, for many, present a more reliable and affordable long-distance alternative than even air travel.

So the fatal derailment of an Amtrak train last week in Philadelphia that was traveling at half that speed surprised many outside North America, where railway accident rates have declined steadily to levels that now rival those of the world’s safest airlines.

In the aftermath of the wreck, and apart from House Speaker John A. Boehner’s dismissal of a question about railway funding as “stupid,” analysts say that if there is one lesson from abroad for preventing accidents like last week’s, it is this: You get what you pay for.

By a global standard, the United States has not been paying much. For the size of its economy, it lags far behind many of the world’s most developed countries in spending on rail networks.