For all the time we spend thinking about the ideal diet — not to mention consuming it — we know relatively little about the best way to eat. It’s pretty clear that losing weight requires burning more calories than we consume. We know that leaving some nutrients — vitamin C, for example — out of our diet can lead to serious problems. And the evidence increasingly suggests that something other than a standard diet may be better for you. For example, a study last year showed that following a Mediterranean-style diet, which includes lots of fish, some wine, olive oil and vegetables, led to a large reduction in heart disease.

But when it comes to whether specific foods are healthful, we know a lot less. The evidence behind so-called super foods — such as blueberries, broccoli and pomegranates — is pretty flimsy. After all, the kinds of people who eat a lot of blueberries are healthy in other ways, too, so it’s pretty hard to put it all on the berries.

Nuts are one such food that’s gotten a lot of attention. A casual perusal of food-related health articles in the last year would lead you to believe that if you just ate a ton of nuts, you’d live forever. These findings are appealing: Nuts are tasty, and most of us would probably be happy to eat a handful of them every day, especially if they lower mortality risk.

But, as usual, it’s worth asking if these effects are real. Studies of eating nuts are possibly subject to the same issues we have with studies of eating blueberries: The kinds of people who eat nuts are different from everyone else.

Let’s start with what we know from randomized trials, which assign some people to eat nuts — a handful or so every day — and others to eat whatever they’d like. In these trials, the concern that nut-eaters may be different is lessened because the consumption of nuts is randomly assigned, rather than a choice that may be correlated with other behaviors, like exercising.

Based on trials like these, nuts certainly appear to have some health benefits. Consumption of nuts seems to lower levels of bad cholesterol and triglycerides, and increase good cholesterol. And in one small study, nuts seem to improve sperm quality (a positive note for those of you who were scared by my last article).

Things like cholesterol and triglycerides are intermediate outcomes when it comes to health. We worry about them not because they are problematic per se, but because high levels of cholesterol and triglycerides correlate with stroke, heart attacks and mortality in general. We have a lot less randomized evidence on the impact of nuts on these final outcomes, and the evidence that does exist is more mixed.

That study of the Mediterranean diet, for example, provides some evidence. It compared three groups: people on a standard diet (the control group), people on a Mediterranean diet with added olive oil and people on a Mediterranean diet with added nuts. The Mediterranean-diet-with-nuts group had fewer strokes than the standard-diet group but didn’t look any different from the Mediterranean-plus-olive-oil group. In other words, it looked like the overall diet was delivering benefits and the nuts weren’t adding much.

There are no randomized trials looking at the outcome we care most about: mortality. So learning anything about nuts’ effect on longer living requires looking at non-randomized data, that is, data where the differences in nut consumption are driven by different choices people make, rather than by random assignment. And when we do that, nuts start to look pretty magical.

Among the most striking results comes from a paper in The New England Journal of Medicine last year, which argues that greater nut consumption decreases risk of mortality. (Just to be clear: No matter how many nuts you eat, you’ll eventually die; these papers evaluate the timing of mortality.) The effects are big: In following up with the studied population over 30 years, researchers found that people who ate nuts at least seven times a week lived longer. Specifically, they were 20 percent less likely to die compared to those who didn’t eat any nuts.

There are some very nice things about this paper. The sample sizes are big — 76,000 women and 42,000 men — and the populations are very similar. The women are all nurses and the men are all health professionals. As a result, some of the concerns you might have — say, that nut-eaters are more educated than others — are lessened by the fact that everyone has similar training and jobs.

Also great is that this paper takes the issues of causality very seriously. The authors are aware of the concern that those who eat more nuts may also have healthier diets in other ways. As a result, they spend a lot of time in the paper discussing other patterns in the data that help bolster their causal argument that nuts are what’s driving the health benefits, not just the participants’ overall healthy diet or active lifestyle.

One pattern they focus on is the “dose-response” relationship, that is, the more nuts you eat, the larger the effect on mortality. They show that people who eat nuts every day have lower death rates than those who eat them just once a week. It is common to argue — as the authors do — that this supports a causal relationship between nut-eating and longer life. And it is certainly true that if nuts were causing a reduction in mortality, you would expect to see such a relationship.

But I don’t think this is especially helpful at fixing the causality concerns. The main problem is that people who eat nuts have a better diet in other ways. And this is clear from the data: Nut-eaters are thinner, exercise more, eat more fruits and vegetables and are less likely to smoke than those who don’t eat nuts.

In order to prove the causal relationship — that nuts, and nuts alone, are helping people live longer — you have to show that there are no differences in these other variables among nut-eaters.

What really appears to be happening is that people who eat nuts also have better overall diets and health behaviors. You can see this in the charts below, with data taken from the paper. The more nuts people eat, the less likely they are to smoke, the thinner they are, the more exercise they get and the more fruits and veggies they eat. In effect, there is a “dose-response” relationship in the confounding variables, so the fact that we see such a relationship between nuts and mortality doesn’t tell us much.

The clearest way to prove that nuts lower mortality risk is to try to control for the other components of diet. The authors do adjust for these diet measures, but the problem, as they note, is that these measures aren’t very precise. For example, the people in the study self-reported how many vegetables they ate per day, but not what kind of vegetables. The authors also employ a neat argument (based on this paper) about how important the unobserved components of diet would have to be in order to explain away their results (this is methodologically related to some of my own work).

In the end, the argument in this paper isn’t perfect, but it’s hard to completely dismiss it. The fact that randomized data shows that nuts lower cholesterol and the paper here shows a reduction in heart disease does line up in a nice, tidy story. But it’s important to note that in both the Mediterranean-diet study and the randomized data on cholesterol and triglycerides, the effects seem to be bigger for people who are thinner and generally have a healthier diet. What this suggests is that adding nuts to your diet may be most effective if you’re already a pretty healthy eater. No one study closes the book on the topic, but the evidence does appear to suggest that eating nuts has some value. They won’t help you live forever, but subbing a handful for your afternoon cookie may be worthwhile.