When China's stock market falls sharply, there's a good chance U.S. stocks — and some big blue chip names like Goldman Sachs and Caterpillar — go down with it.

The Shanghai Composite Index plunged 2.9 percent Tuesday, sending negative ripples through world markets. China stocks are now down 12 percent in October and 26 percent over the last 12 months.

But U.S. investors feel insulated from China's losses. Why wouldn't they, with the S&P up 4.5 percent this year while Shanghai is down 25 percent?

But a study by CNBC using analytics tool Kensho found that U.S. stocks are more often weaker when the declines in Chinese stocks are large. Over the past 10 years, when Shanghai stocks fell 10 percent or more in a 30-day period, the U.S. stock market was up only about 30 percent of the time, and the U.S. indexes all averaged significant declines.

For instance, the S&P 500 on average fell 4.8 percent when China was down 10 percent or more, and the Nasdaq was even worse with a loss of 5.3 percent.

Source: Kensho

When it comes to individual stocks, Goldman Sachs stock lost 10.6 percent on average over the 30-day periods, and was higher only 18 percent of the time. Caterpillar revenues are closely tied to China, and it was down 7.9 percent on average in those periods with gains only 20 percent of the time. DuPont lost 9.3 percent on average, and was higher just 17 percent of the time.

Caterpillar helped lead the Dow lower on Thursday, falling more than 3 percent.

Source: Kensho

Among the sectors, stocks of companies that produce commodities and materials were down 84 percent of the time when China shares fell hard. The SPDR Materials Select Sector lost 7.8 percent on average. The XLF, the Financial Select Sector SPDR Fund lost on average 6.4 percent and was up 31 percent of the time. Energy stocks, represented by the Energy Select Sector SPDR Fund lost an average 7 percent and were lower 20 percent of the time.

Source: Kensho

As Shanghai stocks went down, so did basic commodities, like copper, off 8.3 percent, and oil, off 8.5 percent on average in the 30-day periods. Crude oil was down nearly 70 percent of the time when Chinese shares toppled, and copper was down 78 percent of the time. Safe havens, however, averaged gains and gold rose by 0.6 percent while the dollar index was up 1.5 percent. Both were higher more than half the time.

Source: Kensho

WATCH: These are stock market safe havens during a sell-off