If you’re the parent of a teenager, there’s probably been times when you’ve asked yourself, “What were they thinking?” Here’s a look at the scientific reasons why teens take risks and make bad decisions:

Let’s start by clearing up the notion that young adults underestimate risk. Researchers at Cornell University found that teens are perfectly capable of evaluating the downsides of a decision. The problem is they place more importance on the upside, especially when it comes to social rewards, like the approval of their peers. In fact, the reward centers of a teenager’s brain are more active when people their own age are present. So, your teen may understand that it’s dangerous to smoke, but because the reward of feeling included by a group outweighs the risks, they’ll try cigarettes anyway.

The second reason teenagers make questionable choices: They learn from making mistakes, not hearing about them. Of course, parents need to talk to their children about dangerous behaviors, but the part of the brain that controls our impulses, the prefrontal cortex, is formed through experience. In other words, we figure out how to make better choices by making not-so-hot choices, and then correcting them.

So, what’s this mean to you? Developmental psychologist Dr. Alison Gopnik says you can’t really change how teens perceive rewards. But you can encourage them to hang with friends that don’t engage in risky behaviors.

Also, studies suggest that a lack of hands-on experience actually slows down the development of a teen’s prefrontal cortex. So, encouraging your kids to work or volunteer will help them learn self-control and how to make good decisions.