Jogging for 15 minutes a day, or walking or gardening for somewhat longer, could help protect people against developing depression, according to an innovative new study published last month in JAMA Psychiatry. The study involved hundreds of thousands of people and used a type of statistical analysis to establish, for the first time, that physical activity may help prevent depression, a finding with considerable relevance for any of us interested in maintaining or bolstering our mental health.

Plenty of past studies have examined the connections between exercise, moods and psychological well-being, of course. And most have concluded that physically active people tend to be happier and less prone to anxiety and severe depression than people who seldom move much.

But those past studies showed only that exercise and depression are linked, not that exercise actually causes a drop in depression risk. Most were longitudinal or cross-sectional, looking at people’s exercise habits over a certain period or at a single point of time and then determining whether there might be statistical relationships between the two. In other words, active people might be less likely to become depressed than inactive people. But it’s also possible that people who aren’t prone to depression may be more likely to exercise. Those types of studies may be tantalizing, but they can’t prove anything about cause and effect.

To show causation, scientists rely on randomized experiments, during which they assign people to, for instance, exercise or not and then monitor the outcomes. Researchers have been using randomized trials to look at whether exercise can treat depression after people already have developed the condition, and the results have been encouraging.