Package descriptive, working with frequency lists



Hi all,

thank you very much for your great responses.

The paedagogical background of my question is, that my students will
have to pass a central test in march next year. Usually in Germany
almost all teachers use TI calculators, some other brands are used as
well. But it is also allowed to use computers with a computer algebra
system, and as I think this makes much more sense for the future of my
students, I tried this as the first teacher on my school.

For the beginning of the statistics test, there usually is a table where
the students will have to compute mean, standard deviation and so on and
draw a histogram. This is meant as an easy start, and I don?t want this
to be more complicated for my students than for those who use a
scientific calculator. They may use the help file provided with maxima,
but not more, so it is not an option to use a complicated sequence of
commands.

If it wasn?t for this central examination, I?d use other software. For
visualizing distributions and so on I used GeoGebra, which is quite cool
for this, cause you can change parameters in realtime.

So I will write the routines I need, send them to Mario, he will help me
a bit, and this will hopefully be a good solution. I?m an experienced
c++ programmer, but I haven?t done any maxima-programming before. That
is why my first tries were a bit clumsy, I think.

Best regards,

Andreas


Am 11.12.2012 11:36, schrieb Andreas Goebel:
> 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
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima