Question: calculating mean and distribution data from a file.

My data file is a list, where each line is

[elm1,elm2,elm3,elm4].

 

I would like to read through and calculate the mean of all of the elm1's.

I would like to get a distribution of the elm1 data.  For example, in 800 lines of data, if elm1 takes on values 5,6 and 7, I want to know that there are 300 5's 400 6's and 100 7's.

stats[mean](data) needs the numbers inputted.  I even thought I could pull off the elm1's into a separate list, but stats[mean] won't take a list.

Any help is appreciated.

Please Wait...