Recipe/Theory/Distribution

From Open Food Facts wiki
Revision as of 15:25, 19 February 2025 by Aleene (talk | contribs) (Created page with "In order to get an idea how a recipe changes depending on the ingredients, it is necessary to have an idea on the distribution of the nutritional values. Once we have an idea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In order to get an idea how a recipe changes depending on the ingredients, it is necessary to have an idea on the distribution of the nutritional values. Once we have an idea of the distribution, we can estimate the deviations for each nutrient of an ingredient.

From a theoretical point of view we expect that each nutrient follows a beta distribution. The reason for this, is that the values are bounded on [0,1]. For values that are far enough away from 0 and 1, we probably will have a gaussian distribution. (there are already some wiki-pages on this. which?).

This page will do some more analysis on the distributions. For this the clean-up category of Almonds will be used.

First look

Using a Cullen and Frey graph we can find the most appropriate distribution that fits the data. For the fat percentage of almonds, this gives this graph:

Almonds fats Cullen and Frey

One can see that there is no distribution that fits the data (red dot) well. (do not understand the bootstrap dots). The actual distribution is much more distorted.

Another way to look at this is a Q-Q plot:

Almonds fats quantile-quantile plot

In this plot we expect the values to be around the line. There is clearly a large tail at the bottom end that distorts the distribution. There are clearly issues with these products and should be flagged as thus.

Second look