I need to plot moments of a distribution as a function of bin size to show whether or not the tails of this data set are Gaussian. My data is in [pastebin.com/nzCs5BwE.][1]

Here is how I've plotted my histograms (it is the distribution of the means of my data) and found the moments, first fitting a function to the data :

data1 = Import["https://pastebin.com/raw/nzCs5BwE", "Table"];
data2 = Transpose[data1];
data3 = Table[Abs[data2[[All, i]]], {i, 1, 74}]
means = Table[Mean[data3[[All, i]]], {i, 1, 73}];
stdevs = Table[StandardDeviation[data3[[All, i]]], {i, 1, 73}];
meanofmeans = Mean[means]
stdevofmeans = StandardDeviation[means]

pe = Histogram[means, {25, 40, 2}, "PDF"];
ne = Plot[
   PDF[NormalDistribution[meanofmeans, stdevofmeans], x], {x, 0, 60}, 
   PlotRange -> All];
Show[pe, ne]

finddistmeans = FindDistribution[means]
fitdistributionmeans = 
  Plot[{PDF[finddistmeans, x]}, {x, 0, 70}, PlotRange -> All];
Show[pe, fitdistributionmeans]
Moment[finddistmeans, 3]
Moment[finddistmeans, 4]

I really don't know how to go about plotting all of the moments as a function of bin sizes? anything is helpful, thanks in advance!

  • 1
    $\begingroup$ Would you add a discussion as to why finding this relationship with a single dataset is of interest? And why do you need to find a parametric distribution or a mixture of parametric distributions? $\endgroup$
    – JimB
    Sep 19, 2017 at 4:42
  • $\begingroup$ It was simply a question asked in an assignment, we are analyzing different data sets by looking at applications of a normal distribution, and in this case specifically moments. I understand this is not a normal fit, it doesn't matter what the distribution is, just that I want to see how the moments change as a function of bin size. $\endgroup$ Sep 19, 2017 at 14:35
  • $\begingroup$ Thanks. Then I think you should add the Homework tag to the question. $\endgroup$
    – JimB
    Sep 19, 2017 at 14:58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.