2
$\begingroup$

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:

smoothed fake distribution

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.

$\endgroup$
  • $\begingroup$ Can you make an educated guess at what class of distribution these oil basin areas might follow (might their distribution be analogous to that of some other, known, geological feature?). This might get better answers to this on CrossValidated. But if you can post some of the processed quantities you mentioned, people will be able to play around with them a bit and give you a more substantial Mathematica answer. $\endgroup$ – aardvark2012 Sep 21 '17 at 11:16
  • $\begingroup$ closely related / possible duplicate Q/A: DistributionChart range extends beyond the data itself $\endgroup$ – kglr Sep 21 '17 at 11:24
  • $\begingroup$ A guess is that the distribution could have exponential nature exp(-x), or, perhaps, Gamma-like. In any case, negative values are prohibited. This allows to further specify the question. Default behaviour of smoothing kernel algorithms make symmetric Gaussian smoothing (hence the name "violin plot"). How to implement the same or similar smoothing approach to create a highly skewed nonsymmetric distribution? Lets say, gamma x^n exp(-x)? $\endgroup$ – astrsk Sep 21 '17 at 12:49
  • 1
    $\begingroup$ Apart from the display problem discussed in kglr's link, do I get it wrong, or why don't you---assuming a given mean and variance---just generate the data with a reasonable non-zero distribution. You mentioned Gamma yourself. $\endgroup$ – mikuszefski Sep 22 '17 at 7:51
  • 2
    $\begingroup$ You might need to customize a figure using the Bounded option of SmoothKernelDistribution: mathematica.stackexchange.com/questions/145855/…. $\endgroup$ – JimB Sep 22 '17 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.