Major League Baseball players get hit by more pitches when it gets hot, and the rest of us struggle mightily as well. (Patrick Semansky/AP)

We’ve all heard of heat stroke, that moment when your hot summer afternoon sweat crosses a line and you find yourself down for the count, seeing spots and fighting a headache.

But beyond heat stroke, we can also get, if you’ll allow me to coin a phrase, “heat foolish.”

A host of research suggests that as it gets hotter, people tend to make worse decisions: Not only do we get more ornery and cranky — we can also make unwise long-term decisions whose effects we’ll feel well after the temperature has dropped.

Even highly trained professionals are susceptible to heat foolishness. Take Major League Baseball players: During hotter games, the sport becomes more dangerous for batters, as cranky pitchers are more likely to throw pitches at them at speeds nearing 100 miles per hour.

Two studies of major league beanballs prove this. In one analysis of 826 professional baseball games, a team of researchers concluded pitchers were more likely to intentionally throw pitches at batters (and therefore more likely to hit them) on hotter days. The researchers found that nearly twice as many batters are hit per game when temperatures are 90 degrees or higher than when they’re below 70 and ruled out wilder pitches because of sweaty hands as the cause.

Another larger study of 57,293 games suggests this pattern is about heat-motivated retaliation. On days when the temperature was 90 or above, if three or more of a pitcher’s teammates had been hit by an opponent’s pitches earlier in the game, that pitcher was about 15 percent more likely per pitch to hit a batter than when it was 59 or below. However, if zero of a pitcher’s teammates had been hit, the change in temperature didn’t really matter. In other words, the heat makes pitchers way more likely to engage in beanball payback — even though intentionally hitting a batter can cost players tens of thousands in fines or suspensions.

It’s not just baseball players who are heat foolish. The heat makes us all more easily enraged.

For instance, you’ve probably heard that spikes in temperature are linked with increases in violent crime — and it’s true. Studies of cities from Des Moines to Dallas have shown correlations between daily heat and daily violent crime in the summer months, particularly during evening hours. A study of Dallas data from the mid-1990s found that aggravated assaults roughly doubled when the average evening temperature rose from 75 to 95.

Road rage is also more prevalent when it’s hot. In one study, a research assistant sat in a car at a stop light in front of other drivers and failed to move when the light turned green. Motorists were quicker to honk their horns at this annoyance on hotter days, particularly when driving cars without air conditioning. Off the road, too, people report being generally grumpier on surveys when they are sitting in a hot room rather than a cool, comfortable one.

But while most of us are probably at least somewhat aware that we’re crankier in the heat, hot weather also affects us in subtler ways. It turns out we’re programmed to “project” whatever we’re experiencing onto the future and make decisions as if the current state of the world were representative, even when it’s not. You probably know the adage that you should never go grocery shopping on an empty stomach, lest you come home with far too much food. (That adage is true, by the way.) It turns out that we make a similar mistake with weather: Just as hungry shoppers subconsciously assume they’ll be similarly hungry when it comes times to turn all those purchases into a meal, we also, when making purchases on hot days, imagine we’ll be similarly hot when using what we buy.

Economists call this general tendency “projection bias.” In one study of the phenomenon, a team of economists analyzed hundreds of thousands of catalogue orders placed by customers for seasonal clothing such as gloves and parkas. The researchers discovered customers ordered more winter clothing than they needed when the temperature was particularly low, which they would later return when their order arrived and the temperature had reverted to “normal.” Indeed, a decline in the order-date temperature of 30 degrees was associated with a 4 percent increase in the return rate for cold weather clothing.

While this study focused on unseasonably cold weather, the same patterns would be expected in the summer. On an extra hot day, I’m betting online retailers see a spike in sales for sun hats, portable fans, cooling towels and mist spray bottles, and that these goods are also returned (unused) at a higher-than-usual rate than when those orders arrive on a normal summer day.

Unseasonably hot days not only change our shopping behavior, but they can also shift more consequential outcomes like our beliefs about science. On days identified as unusually warm, people are more likely to believe in climate change and therefore more willing to donate to groups fighting global warming.

Given just how much heat prods us to make poor decisions — and given that this weekend promises to be obnoxiously hot across much of the United States — you may be wondering how to avoid catching a bad case of heat foolishness.

There’s no foolproof method, other than perhaps switching sides of the equator in search of cooler temperatures. But for those of us whose private jets are in the shop, the biggest thing you can do to help yourself may be recognizing the potential problem.

Remembering that the heat warps your judgment could help you avoid some of its bigger pitfalls. When you’re shopping, be extra cautious about ordering things that you only really need on the hottest of hot days right when the temperature spikes. And if you’ve got a tough conversation to have with colleagues, friends or family, maybe wait until a cooler day — or at least until everyone involved has had some time in front of the air conditioner.

As for MLB batters, my best advice: Duck — and stay away from Jonathan Papelbon.

Katherine Milkman is a behavioral economist at the University of Pennsylvania who studies decision-making and how to improve it.