Here is a script to take 100 subsets and calculate the mean:
dt = Open( "$SAMPLE_DATA/Aircraft Incidents.jmp" );
:Latitude << Format("Best");
dt << Select Where( Is Missing( :Latitude ) ) << Delete Rows;
runs = 100;
//runs= 100000;
results = new table("results", add rows (runs), new column ("mean"));
rows = index (1, nrows(dt));
for each({i},index(1,runs),
myRows = Random Shuffle( rows)[1::20];
data = dt[myRows, "Latitude"];
results[i,"mean"]=Mean(data);
);
my Mean = Col Mean(:mean);
Show(myMean);
... and the mean of the means.
And with this script, you can use the Distribution platform to fit the 100 mean values with "all" available distributions:
dist = results << Distribution(Continuous Distribution(Column( :mean )); );
dist << Fit All
