I have a class with a set of descriptive statistic functions (mean, median, kurtosis, etc...).
Now I need to include weight (array) into my equations. My first thought was to just create a weighted version of the functions where the additional weight array is passed.
However, I was wondering if there is a way to alter the data (array) so that the same functions can be used.
Note: This is my first Statistics project so I am learning as I go. Sorry if this is a stupid question.
Question:
Is there a way to weight the data before calculating the descriptive statistics - so that the existing functions can be used.
If this is possible then I could add an additional function to weight the data before it is passed into the descriptive functions.