Murphy's Law is a prototype of a literary genre in which profound truths are summarize in the form of brief pithy statements. Similar laws have been formulated for every sphere of human life.
The inventive minds of the nation's testiest technocrats, craziest computer cuckoos, and most mischievous mathemagicians gave birth to scores of Murphy stepchildren such as the Peter Principle, Klipstein's Corollary, Skinner's Constant, Zymurgy's Laws, and the Pollyanna Principle, followed by Boob's Law, the Laws of Applied Confusion, Frothingham's Fallacy, and Pardo's Postulates. Murphy apostles improvised variations on the master's theme. O'Toole's Commentary on Murphy's Law proclaimed that "Murphy was an optimist." Zymurgy's seventh exception to Murphy's Law advised that "When it rains, it pours." Boling's Postulate warned: "If you're feeling good, don't worry. You'll get over it."
In 1952, Yale Book of Quotations, first listed the adage as “Murphy’s Law,” in a quote by an unnamed physicist, from a book by Anne Roe: “There were a number of particularly delightful incidents. There is, for example, the physicist who introduced me to one of my favorite “laws”, which he described as “Murphy’s law or the fourth law of thermodynamics” (actually there were only three last I heard) which states: “If anything can go wrong, it will”.
British stage magician Nevil Maskelyne wrote in 1908, "It is an experience common to all men to find that, on any special occasion, such as the production of a magical effect for the first time in public, everything that can go wrong will go wrong."
Sayings like this stretch way back to 1877 when Alfred Holt wrote, "It is found that anything that can go wrong at sea generally does go wrong sooner or later."
The exact history of the saying may never be known, as there are several different stories explaining how it came about.
While I admit that the name of Murphy's laws is a pleasant one as is the story of how it came to light, but the original name for 'if anything can go wrong it will' was sod's law because it would happen to any poor sod who needed such a catastrophic event the least. It also removes the ability to say "I coined this phrase!" because sod's law has been around long before any living man and has existed in many forms for hundreds of years.
Edward Murphy was an engineer who was involved in the U.S. Army Air Force Aero Medical Laboratory’s project MX-981. Project MX-981 was designed to test the effects of deceleration forces of high magnitude on the human body. When a technician wired all of the strain gauges backwards, Capt. Murphy was heard muttering his famous phrase and the rest is history. Since they assumed mistakes were being made and things would go wrong, the attention to detail was heightened and the inevitable errors were caught. When asked during a press conference how it was that nobody had been severely injured during the tests, Dr. John Stapp credited Murphy’s Law, indicating that it was important to consider all the possible things that could go wrong before conducting a test, and then counteracting them.
By the use of an appropriate mathematical model we can show that the clustering of unpleasant events in our daily lives is, in fact, a result of simple probability theory and has very little to do with what we normally call "bad luck." That probability should be mentioned with respect to Murphy's Law is, indeed, appropriate, since some versions of Murphy's Law are, in fact, simply restatements of certain well-known facts from probability theory.
Incidentally, a lot of Brits think that Murphy's Law is an Irish joke.
Murphy is an Irish name of course, and the Irish have been the butt of jokes from Brits for a long time.
Anyway, a lot of Brits seem to think that what Murphy's Law refers to is that the Irish are to blame for things going wrong because they are careless or stupid or both, at least according to British mythology on the Irish.