When I make my family-favorite holiday sweet potato casserole, I sometimes make it with what are labeled as yams in the grocery store. Sweet potatoes and yams are similar enough to use either of them in the dish, but I never really knew the difference between them — so I decided to find out.

We generally think of sweet potatoes as the brownish-orange skinned vegetable with orange flesh inside — although sometimes they are marketed as yams. The similar looking purple-skinned, white-fleshed vegetables are usually called sweet potatoes, but we don't always think of them that way. In reality, they are both sweet potatoes, just different varieties of the vegetable.

According to All About Sweet Potatoes, there are more than 6,500 varieties of the spud. They can have orange, cream, white or even purple flesh inside and their skins can have the same hues.

Real yams are an entirely different vegetable, and most of the yams sold in markets and stores are a variety of sweet potato, not a true yam. Why? It all has to do with marketing.

When orange-fleshed sweet potatoes were introduced to the U.S. in the mid 1900s, producers and distributors needed to find a way to distinguish them from the white-fleshed varieties that Americans were already familiar with. So the orange-fleshed varieties were given the name yams, even though they aren't the same as true yams that originate in Africa. That's a different vegetable entirely and looks like this photo below.

african-yam A true yam, this African tuber is long, thin and starchy instead of sweet, and often has 'fingers' growing from it. (Photo: bonchan/Shutterstock)

The U.S. Department of Agriculture requires that anything labeled "yam" that is not a true yam should always accompanied by the words "sweet potato," but that doesn't always happen. I often see a bin labeled "sweet potatoes" next to a bin labeled "yams" in the grocery store and both bins contain different varieties of sweet potatoes.

It seems recently we've come to think of only the orange-fleshed variety as sweet potatoes because of their popularity in cooking. Sweet potato fries are almost always made with these, so they've become associated with sweet potatoes, adding to the confusion.

But as long as the sweet potato or yam you are buying is not an actual African yam, whatever you purchase — whether its flesh is orange, white or purple — can be used interchangeably in recipes. There may be a slight difference in the flavor or texture of the sweet potatoes, and if you're very familiar with the different varieties you may have a preference for one over the other. But, if you have no preference, each variety will work in a sweet potato casserole, for sweet potato fries, as a baked sweet potato or most other recipes that say "sweet potato" as an ingredient.

Robin Shreeves ( @rshreeves ) focuses on food from a family perspective from her home base in New Jersey.