A few years ago, when Groupon founder and CEO Andrew Mason was fired after taking the company public (something he seemed to want to be given credit for), I took a look at the data to see how many company founders stayed with their companies through their IPOs. The answer: most of them. It was actually a majority of founding CEOs that took their company across the finish line.

The second question has to be, though, is that what's actually best for the company, or are they better off going with an outside founder in the long run? According to data from Pitchbook, the answer is actually a little muddled, since founders and CEOs seem to be good at different things.

The company analyzed exits for companies led by founders against those led by professional CEOs, or those hired by the company to lead it.

The data shows that where founders come in handly is actually getting their companies to an exit. They take a lot less time than their counterparts, bringing their company to either an IPO or an acquisition in much less time than professional CEOs are able to.

Founders take 3.4 years to exit after the company receives its first round of institutional funding, as opposed to six years for a CEO, an increase of 75 percent. When it comes to time from founding to IPO, founders are able to do it in 5.5 years, while CEOs take 9.3 years, a 69 percent difference.

When it comes to raising money, that is where professional CEOs really shine. They are, far and way, able to raise more money on average than founding CEOs. The numbers are not even close: $22.7 million for professional CEOs at the median prior to exit, more than triple the $7 million that founding CEOs are able to raise on average.

The CEOs also get their companies median exit valuations that are over 30 percent higher than founders do, with $105 million compared to $80 million.

So hiring a professional CEO will get a company more money, and a higher valuation when they are either acquired or go public. Seems like that would be the way to go.

There is another stats that points in favor of founders, though. As a result of them not raising as much funding as a professional CEO, founders are able to get higher exit valuation to funding-raised ratios, 5.1x, compared to the 3.1x that CEOs get.

Ultimately is seems like founders raise much less money, but perhaps that is just because they don't have the time before their company stops being private.

Going public with a founder

One stat that Pitchbook did not outline was the difference in success rates for companies that chose to exit with a public offering with a founder, versus those that had a professional CEO.

The most famous example of a famous founder becoming CEO and then riding it to an IPO is Facebook's Mark Zuckerberg, who took his company public in May of 2012.

His company struggled its first year on the public market, but has since become a crown jewel of the market. It is currently trading at $111.58 a share, more than four times its $26 IPO price.

Other founders that have taken their companies public include Amazon's Jeff Bezos; Marc Benioff of SalesForce; Yahoo's Jerry Yang; Bill Gates of Microsoft; Michael Dell of Dell Computers; and Larry Ellison of Oracle, most of which are still thriving companies.

On the other hand, there's Groupon. Mason took the company public but was fired less than two years later. It has since gone through multiple CEOs, including co-founder Eric Lefkofsky who was replaced in 2015 by chief operating officer Rich Williams.

Groupon's stock is currently trading at $4.44, down 78 percent from its $20 IPO price.

Having an outside CEO come in and take a company public also is no barometer of success or failure.

Look at Apple, for example. The company went public in December of 1980 at $22.00 per share, while Mike Markkula was running things. Now it is trading at $112.14 a share, and is the most valuable company in history.

The converse of that is Twitter, which was taken public by Dick Costolo in 2013 at a $26 IPO price. Costolo has since been fired and replaced with co-founder Jack Dorsey, and the company is trading at $17.58, down a third from where it started.

All of this is to say that there's a lot more that goes into a company's success, or failure, than who brings it to the public market.