I am visualising rather scarce data about size distribution of certain objects (here - oil basin areas on continents, to be specific). There is no raw data, but some already processed quantities, for example, mean and deviation, or typical sizes and numbers of basins and so on. The goal is to reconstruct some fake "smooth" distribution with plausible inference about the function behaviour. Natural tool are kernel smoothing capacities and their implementation, e.g., in violin plots. In Mathematica it is implemented in DistributionChart[]
. Two extreme examples of fake data, which can be generated from such prerequisites: one is done by sampling a normal distribution, another is just a set of typical sizes ("small" and "big" basins), repeated N times:
fakedat =
List[RandomVariate[
NormalDistribution[RandomInteger[{300, 500}], 200], 15],
Join[Table[600, 10], Table[100, 6]]]
DistributionChart[fakedat]
The result is:
But here the values assume negative numbers, both when random sampling a normal distribution (first case), and when processing the positive data during kernel smoothing (second case). How it is possible to imply this natural limitation of non-negative values in the smoothing algorithm? In general case, other such limitations can be considered, for example, in the second data set there can be a threshold value (around 300), delimiting "small" and "big" objects, and it can be desirable to smooth the second set of data taking account this limitation as well.
Bounded
option ofSmoothKernelDistribution
: mathematica.stackexchange.com/questions/145855/…. $\endgroup$ – JimB Sep 22 '17 at 15:15