According to a new study, successful tech companies are often “discovered” and unplanned.

Tech is awash with entrepreneurs who have achieved success only after modifying or abandoning their original vision. Facebook has evolved from the Harvard-specific site for social connections created by Mark Zuckerberg. Airbnb? Airbnb began as a platform for finding roommates. The ride-sharing application Lyft was initially designed as a carpooling tool for large corporations.

William P. Barnett is a Stanford Graduate School of Business professor of leadership, strategy, and organization.

This is one of the conclusions of a report Barnett and colleague Elizabeth G. Pontikes opens in a new window of the University of Chicago. The researchers decided to measure entrepreneurial success by analyzing the choices of software entrepreneurs in 4,566 companies in 456 market categories for 12 years.

The study focused on the software sector because many producers and investors always race to find the next big thing. They also studied how spectacular failures and big successes affect entrepreneurs’ willingness to jump in. The researchers also looked at how these budding companies fared in the end. Did they leave the market? Did they raise investor funding? They went public.

Barnett and Pontikes discovered that entrepreneurs willing to adapt their products and vision to find the correct market often do their best. The researchers also discovered that entrepreneurs who followed the herd and entered hot markets were less successful in the long term than those who defied the consensus and entered markets with a history of failures.

Barnett explains, “We know from the studies of human behavior that as social beings, we want to solve uncertainty.” We do this not by conducting objective research but by looking each other in the eye.

He says that this has obvious implications for business leaders. “They should ask their subordinates if they are quiet about non-consensus opinions. If yes, a leader must ask what this says about his leadership if people don’t dare suggest counterintuitive ideas.

Barnett says that the entrepreneurs behind many of tech’s greatest success stories pursued visions contrary to conventional wisdom. He says to listen for the buzz if you want to discover a unicorn. Then run in the other direction.

For example, Barnett says Apple continued to pursue handheld technology despite the failure of the Apple Newton. This balky handwriting-recognition device was released in 1993 to general mockery, including in cartoonist Garry Trudeau’s “Doonesbury” comic strip. Barnett says, “Newton’s failure quickly stigmatized the market for smart, portable devices, making similar innovation taboo for many years.”

Steve Jobs, Apple’s CEO, killed the Newton in 1998. However, he saw the potential of the concept. This led to the introduction of the iPhone in 2007 and the iPad in 2010.

When non-consensus-based ideas fail, it is often spectacularly. This can discourage others from taking risks. Barnett says, “The fear of being stupid is stronger than the desire to be a genius.” We tend to avoid non-consensus decisions because we know the world will view our mistakes as if a fool made them.

He says that while humans are poor at predicting the future, they excel at “retrospective rationalizing” to explain why an idea or product has succeeded or failed. Jobs, he says, was a master at this. He paraphrases Jobs’ 2008 Stanford commencement speech, in which Jobs said: “You can only connect the dots by looking backward.”

Barnett claims that Jobs’ actions at Apple almost always differed from what he had intended. “These geniuses — we think they were aware, but they weren’t.”

Barnett says that the most successful entrepreneurs, Jobs and Zuckerberg, did not understand how to create systems “that allowed for uncertainty, that found possibilities, and that could discover futures.” They then doubled down on their discoveries.”