Over the past few years, Stanford Graduate School of Business professor Paul Oyer has explored the growing gig economy from many perspectives. He’s analyzed hourly and annual income differences between freelancers and full-time employees. He’s researched (and consulted for) Upwork, the world’s largest freelance website. He’s nosed around Uber’s database. And last year, to better understand how the ride-sharing platform works, he became one of the company’s certified drivers.

We recently sat down with Oyer. Our main goal was to learn more about the many cultural shifts being caused by the exploding gig economy, but we also wondered what a tenured professor of economics learned by driving people around for money.

Why exactly did you decide to become an Uber driver?

I’m a labor economist and I often study specific groups in the labor market. For instance, I once wrote a paper about the careers of economists. In that case, I fully understood the institutional context. Then I started researching and doing some consulting for Upwork. I considered looking for work using Upwork’s platform, just to get a sense of how it operates — the institutional context — but I don’t really have any skills to sell as a freelancer.

There’s not a lot of demand for labor economists on Upwork.

Exactly. But with Uber, the barriers to entry to becoming a driver, and thus a worker in the gig economy, are so low that if you want to study it from an academic perspective, you can just go try it out. It’s easy to get embedded in the market as you analyze it. By the way, this is all work I’m doing with [Stanford GSB assistant professor] Rebecca Diamond, as well as with people at Uber, who have given us access to a lot of their data. Rebecca and I got interested in this because we wanted to learn more about the value of flexibility in the gig economy. The gig economy has many advantages and disadvantages, but the big advantage is flexibility. You work when you want to work. In particular, we wanted to run experiments that will give us a sense of how women value that flexibility relative to men.

What have you found?

We’re still in the early stages, but one thing we found is that Uber’s male drivers earn about 7% more than their female drivers. Now, as a labor economist, I’m always interested in differences between male and female pay, especially when discrimination is involved. But with Uber, the algorithm that assigns drivers to riders is gender-blind. Men and women are treated the same.

Our operating hypothesis was that differences in the value of flexibility would be key here. We figured that any difference in pay by gender would be explained by the fact that Uber’s male drivers are more likely to go out late at night or when the surge rate is up [drivers earn more per ride when demand surges], whereas female drivers are more likely to drive on weekdays, when their kids are in school. More men are chasing the money and more women are sort of fitting it into their schedule.

Did that explain why male Uber drivers make more than female drivers?

That flexibility difference turned out to be a small part of the picture. Two other factors were more important. First, male Uber drivers drive more hours per week and are more likely to stay on the platform. That pays off financially because it turns out there’s a pretty sizable learning curve. A typical male Uber driver is more experienced and, as a result, he makes more money. The other factor is a gender difference that holds in the population at large—men drive faster than women. Driving an Uber faster increases pay.

As an economist, what did you learn driving for Uber?

I started driving because I wanted to understand what other kinds of experiments we could run. It’s been very useful. For example, that learning-by-doing advantage is partially due to drivers getting better at accepting or canceling rides strategically. In my early days as a driver, I really didn’t know what I was doing. I wasn’t strategic. But it’s something you can pick up over time.

I also learned that while the gig economy is nice in the sense that you can be very flexible, it also puts a lot of pressure on you. You’re constantly thinking, “Do I want to go out and drive? If I don’t go out and drive, I’m not going to make any money.” The same is true of almost any gig job—you’re a mini entrepreneur. Nobody’s paying you if you aren’t actually working. You’ve got to get out and do it.

You’ve mentioned that instability is one of the primary disadvantages of freelancing, but you make a distinction between instability and risk. Can you explain that?

As a gig economy worker, you have to develop the ability to handle fluctuations, which means managing your workload in a way that you don’t have to if somebody else is your boss. It also means managing your cash flow in a way that you don’t have to if your paycheck looks the same every two weeks. So, there’s some instability in all of that but not a ton of risk.

Today, if you’re a software programmer on Upwork, you can stay very busy. The economy’s doing really well. Almost any programmer who wants a full-time job can have one. As we’re speaking, the Nasdaq is hovering around 7,000. But if the Nasdaq crashes back down to 3,000 sometime soon and businesses start closing, a lot of programmers will be looking for work. That means that almost everybody on Upwork will lose some work. By comparison, if a company closes or has layoffs, some people will lose their jobs entirely, which is a much bigger disruption. People who might lose their full-time jobs in a down economy are at even greater risk than gig workers who might lose some, but not all, of their income.

Also, it’s interesting to note that people who choose to work in the gig economy make less on a per-year basis, but only because they’re working fewer hours. My best estimates are that they make 6% less per year, but about 15% more per hour. If you’re working in the gig economy by choice, you can charge a premium per hour.

You’ve also done some research into the way that the gig economy redistributes wealth. How does that work?

I think we can say pretty clearly that platforms like Upwork and other freelancing sites that operate across boundaries are making a small contribution toward lowering overall global inequality. People who are talented and happen to live in the Ukraine or the Philippines or India can do work for American companies that would otherwise cost those companies a lot more if they hired Americans to do it. Not many jobs can be outsourced that way, but some can. For those jobs, we’re taking money from a relatively rich place and moving it to a less rich place. And when that money gets spent in, say, the Philippines, it’s not just good for the gig worker, but also for the other Filipinos.

The same is true here in the U.S., although to a lesser degree. The average buyer, or employer, on Upwork is from a zip code where the income is 36% higher than the national average, while the average seller, or freelancer, is from a zip code where the income is only 14% higher than the national average. You’re taking people who live in middle-class areas and you’re allowing them to do work for people who live in upper-class areas.

It seems like one of the potential cultural downsides to the growing gig economy is that it reduces the social safety net.

It’s hard to isolate that from the overall bifurcation of society into the haves and the have-nots. Inequality in the U.S. is dramatic and problematic right now. Over the last 50 years, the average income of men without a college education has literally dropped, adjusting for inflation. It isn’t that it’s gone up slowly—it’s actually less than it was 50 years ago. On the other hand, for the average person with a professional degree, income has doubled or more in that same time.

That’s a big problem, and I don’t think the gig economy itself is making that worse. Being a low-skilled worker today is really difficult, whether you’re working in a traditional job or working gigs. In fact, an argument could be made that the gig economy is kind of an alternative safety net itself, because when you lose your job, you can keep your head above water by getting work on Upwork or TaskRabbit or Wonolo or Shiftgig.

What about the fact that so many people depend on their employers for health insurance and retirement benefits?

As the gig economy grows, there will have to be some public policy reactions to it. We’re going to have to make it easier for people to get those benefits on their own, especially when it comes to health insurance. That means adopting public policies that encourage the portability of benefits—as we’ve already done pretty successfully with retirement plans. But overall, in the United States, the safety net is pretty weak, and the growth of the gig economy is not going to make it any better. Figuring out how to handle healthcare for gig workers is a huge concern but it’s actually small in the scheme of the overall healthcare policy challenges we face in the U.S. right now.

For a lot of people, there’s a kinship aspect to going to work at a company every day. They see their co-workers as a second family. But that goes away when you freelance, which can be kind of lonely.

Yeah. That’s a great point. A person’s work is about more than just a paycheck. There’s a cultural and social benefit to it. People make close friends and even meet significant others at work. The gig economy is not a good fit for a lot of people for that very reason. Many people place a high value on the flexibility of the gig economy but many others place a huge value on the structure of a traditional job.

A lot has been written about how much businesses can save by using freelancers. When shouldn’t an employer dip into the gig economy?

Being a successful business is all about differentiation, while the gig economy is all about commoditizing the labor pool. You don’t want to mix those two things up. If your business is successful, it’s because you have a competitive advantage—you’re doing something that’s hard for other companies to replicate. You should not be hiring workers through the gig economy for any job that’s key to creating or maintaining your competitive advantage.

Getting back to your stint as an Uber driver—did you learn anything surprising?

For one thing, you see a side of yourself you might not have known was there. I committed at the beginning that I was going to donate all of my earnings to charity, because I was already being paid by Stanford and was doing the Uber driving as part of my research. Even so, there would be days where I’d do all this driving and I’d look at the app and I’d be like, “That’s all I made?!”

Is that because of the way the platform is gamified?

I don’t know that I would say it’s overly gamified — Uber gives driver lots of information so they can make appropriate choices. But it did bring out my naturally competitive side. I’m inordinately proud of my high rating from passengers — although that might have been because I was driving an Audi. There were some other nice surprises along the way, such as the fact that the vast majority of passengers turn out to be nice and interesting. I never had a bad experience with a passenger.

Did you tell any of them what you were really doing?

Never. No.

Did you ever have to fib?

I never lied. But it’s possible that I didn’t always provide a full answer to every question.

This article originally appeared on Insights by Stanford Business.