Recipe/Theory/Distribution
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:
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:
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
A solution could be to get rid of these strange values. Using the standards approach of removing everything below and above a value based on 1.5 times the interquartile distance, we can redo the above graphs.
The Cullen and Frey graph then transforms to:
The distribution is now very close to what we expect for a Gaussian distribution (the star). Looking at the density plot:
The density plot seems to suggest that there are two Gaussian distributions, which might explain the offset in the Cullen and Frey plot.
The QQ-plot now behaves much better:
Note that the sample quantiles seem very similar at -1. I suspect that these are theoretical values taken from Ciqual or similar. Could this be an explanation for the second peak? The Ciqual value is 52.5