0
$\begingroup$

I'm working on a project that generates a list of decimal numbers every hour. The amount of values in the list can range between 1 - 6000 depending on the some variables (time of day etc). Each of the values will range between -1.0 and 1.0. Anything below -0.1 is considering a negative result and anything greater than 0.1 a positive result as there is a -0.1 - 0.1 rate of error in the calculations (anything in that range being regarded as neutral). The more the negative or positive the number is indicating an overall more negative or positive for that specific calculation.

I need to produce a single number that is representative of the list for each hour. While technically the values can range -1.0 - 1.0 most will be around the -0.4 - 0.4 range.

Would it be best to use mean, median, weighted-mean, something else I haven't thought of, or a combination (e.g. outputting two things that when looked at together give a good representation), to get the best representation of the lists?

EDIT

The project is preforming sentiment analysis on messages. At at time interval messages as collected, processed, and then assigned a score as above. What I need is to generate a single number from each interval that is representative of the general sentiment. It doesn't matter too much if the number is wrong in some outside cases as it's only used as a guide, looked at in perspective with other data (number of total messages, ratio of positive/negative/neutral).

I initially did try simply calculating the average but that result in all the lists (there are 8 per interval) coming out around the same +/- 0.01 which when looking at the raw data was indicative of the actual collected results. I've also tried running median calculations on it and that seems to produce more representative figures but I don't know enough about statistics to know if that is true and a good formula to use, or if I should be using something else.

Basically the important part is that you can compare the current outputted value to other lists outputted values and previously outputted values for the same list to get a feel to the up or down trend.

$\endgroup$
2
  • 1
    $\begingroup$ It makes a difference what the single number would be used for, and what happens if it is in some sense wrong (e.g., due to a highly unusual sample), because the effects of inaccuracy on downstream processes are what determine, to a large extent, which formulae are good or bad. So if you could help us out with that, we'd (probably!) give you a better answer! $\endgroup$
    – jbowman
    Commented Jun 7, 2017 at 4:25
  • $\begingroup$ @jbowman I've edited the question with some more information. $\endgroup$
    – Flatlyn
    Commented Jun 7, 2017 at 5:19

1 Answer 1

2
$\begingroup$

Which one-number summary is "best" will depend very much on what you plan on doing with it, as jbowman notes.

You write that you would like to get an idea of a trend in data. Beyond the mean and the median, one thing that comes to mind would be the percentage of positive results (i.e., the proportion of results greater than your cutoff of 0.1) - either as a percentage of all results for this time bin, or only of all non-neutral ones. Alternatively, of course, the percentage of negative result.

Another thing that might be interesting is the interquartile range, to give you an idea about whether the variability or noise is increasing.

Note that all of these one number summaries will be more variable in themselves if they are based on small result lists, so you may want to also collect how many results they are based on.

$\endgroup$
1
  • $\begingroup$ Sorry it took me so long to accept. Ultimately I decided to go with a display that shows the median and number of positive, negative, and neutral divisions. $\endgroup$
    – Flatlyn
    Commented Jun 16, 2017 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.