An overview of the SampleSTAT toolbox.
The goal of this document is to illustrate practical uses of the SampleSTAT toolbox.
This toolbox provides elemantary tests for evaluation of measuring data. It calculates the range of dispersion of the values and the mean regarding a given statistical confidence level.
These functions are good to extend the built-in functions mean(), stdev(), max(), min(), median().
The toolbox SampleSTAT provide the following functions/macros (details see example below).
Calculates the stray area (range of dispersion of the values)for a given vector and for a statistical confidence level (95%, 99%, 99.9%) and level of significance (0.5, 0.01, 0.001), resp.
Calculates the trust area (range of dispersion of the mean) for a given vector and for a statistical confidence level (95%, 99%, 99.9%) and level of significance (0.5, 0.01, 0.001), resp.
Determines the student factor for an amount of numbers and for a statistical confidence level (95%, 99%, 99.9%) and level of significance (0.5, 0.01, 0.001), resp.- service function for ST_strayarea and ST_trustarea
// Sample data v = [ .. 9.999; .. 9.998; .. 10.002; .. 10.000; .. 10.001; .. 10.000 .. ]; // Statistical confidence level p = "95%"; // Calculate statistical results n = length(v); // Number of values x = mean(v); // Arithmetic mean s = stdev (v); // Standard deviation (S.D.) sa = ST_strayarea(v, p); // Range of dispersion of the values (stray area) ta = ST_trustarea(v, p); // Range of dispersion of the mean (trust area) mi = min(v); // Minimal value ma = max(v); // Maximal value // Output clc; mprintf("\nSampleStatDemo - Demo script for toolbox_samplestat\n\n"); mprintf("Values:\n"); disp(v); // Display data mprintf("\n"); // blank line mprintf(.. "Number of Values : %i\n" + .. "Arithmetic Mean : %f\n" + .. "Standard Deviation (S.D.) : %f\n" + .. "Confidence Level : %s\n" + .. "Range of Dispersion (values): %f\n" + .. "Range of Dispersion (mean) : %f\n" + .. "Minimum : %f\n" + .. "Maximum : %f\n", .. n, x, s, p, sa, ta, mi, ma); mprintf("\n"); // blank line mprintf( .. "68 percent of the values will stray arount %.3f +- %.3f (S.D.). %s of the values\n" + .. "will be expected around %.3f +/- %.3f (Range of disp. of the values, stray area).\n" + .. "With a propability of %s the mean of %.3f will stray around %.3f +/- %.3f (Rage of \n" + .. "dispersion of the mean, trust area).\n", x, s, p, x, sa, p, x, x, ta); | ![]() | ![]() |
SampleStatDemo - Demo script for toolbox_samplestat Values: 9.999 9.998 10.002 10. 10.001 10. Number of Values : 6 Arithmetic Mean : 10.000000 Standard Deviation (S.D.) : 0.001414 Confidence Level : 95% Range of Dispersion (values): 0.003635 Range of Dispersion (mean) : 0.001484 Minimum : 9.998000 Maximum : 10.002000 68 percent of the values will stray arount 10.000 +/- 0.001 (S.D.). 95% of the values will be expected around 10.000 +/- 0.004 (Range of disp. of the values, stray area). With a propability of 95% the mean of 10.000 will stray around 10.000 +/- 0.001 (Rage of dispersion of the mean, trust area).
R. Kaiser, G. Gottschalk; "Elementare Tests zur Beurteilung von Meßdaten", BI Hochschultaschenbücher, Bd. 774, Mannheim 1972.
Hani A. Ibrahim - hani.ibrahim@gmx.de