//Let us illstrate Chebyshev's second inequality: what is the value mean(x) + ks such that at 
//most 1/(1+k^2) = 4/13 * 100% of the points lie above mean(x) + ks.
 
interval1 = mean(values) + (1.5*st_deviation(values));
interval2 = max(values);
//k=3/2
disp(interval2, , "to" , interval1,"Atleast 4/13*100=30.7% of the data lies in the interval");


exec ../../CH2/EX2.3b/mymean.sce;
exec ../../CH2/EX2.3b/mystd.sce;

disp("Now the weighted version");
interval1 = mymean(values,frequency) + (1.5*mystd(values,frequency));
interval2 = max(values);
//k=3/2 
disp(interval2, , "to" , interval1,"Atleast 4/13*100=30.7% of the data lies in the interval");


