Is there an equivalent command of
WeightedData (new in version 9) in Mathematica 8 or I have to define it by myself? I haven't found anything in the site or googleing it... If there is not such command do you have some suggestions for defining it?
It might be useful to consider TagSet here, to provide a new rule to Mean when it encounters your new data object:
You can style your object so it looks the same as the M9 object:
Now a function that builds your data object, there should be more error checking than currently implemented and MapThread was the first thing I thought of:
Make some data and test it:
To make other functions play nice just use TagSet again