Package descriptive, working with frequency lists



Hi,

this is my first post here, so hello from me. I?m a math teacher at a
grammar school in germany.

My students have to work with frequency lists, like this:

Size 178 179 180 181 182
count 2 4 5 5 3

While the package "descriptive" provides functions for computing mean,
standard deviation and so on for lists, it does not do so for frequency
lists. So my students would have to enter the list like this:
178 178 179 179 179 179 ....

which is not really an option.

To solve this, I have tried a bit with the descriptive package and have
introduced a function frequ_mean like this:

/* UNIVARIATE DESCRIPTIVE STATISTICS */

/* Arithmetic mean for frequency list */
frequ_mean(x) := block([i,mean, total],
mean:0, total:0,
for i:1 thru length(x) do( block(
mean:mean+x[i][1]*x[i][2],
total:total+x[i][2]
) ),
mean/total
)$
/* Arithmetic mean */
....

A test run:
/* [wxMaxima: input start ] */
l:[[178,2],[179,4],[180,5],[181,5],[182,3]];
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
load(descriptive);
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
frequ_mean(l);
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
float(%);
/* [wxMaxima: input end ] */

gives a correct result.


So my questions are:
- does this make sense?
- should there be some checks to avoid errors, for instance if the list
has the wrong form?
- who maintains the descriptive package? Whould he / she like to
implement functions for frequency lists himself, or should I do that and
submit them (and if so, how?)?
- I would also need to draw histograms for data like that, but have no
idea at the moment how to achieve this

Best regards,

Andreas