More than 51,500 stockbrokers failed a basic exam needed to sell securities at least once, according to data that Wall Street regulators don't disclose to investors, and those who repeatedly failed have on average worse disciplinary records.

The more times a broker failed, the higher the average total of black marks was, such as criminal charges and firings, a Wall Street Journal analysis of the data found. Those who failed the test more than twice, for example, were 77% more likely to report a felony or financial-related...