kevin
kevin

Reputation: 467

How to smooth a list of numbers in an index?

I've got about 1,000 numbers in a C# List, they represent an index, of how likely something is to occur. I'm trying to generate a chart showing the relationship between the items in the list. In certain cases, there are "outliers" in the data, which cause my charts to really look messed up. So consider the following list:

100
99
98
95
90
86
76
75
72
65
62
58
52
50
49
37
17
16
15
14
13
13
12
12
{ and then 800 more numbers between 1 and 12}

If I create a list to scale, I end up 10 items in 50+ and 950 items in < 50. While factually correct, it makes my chart look really screwy.

Is there any way I can have this make any more sense? IE can I somehow smooth the data so that outliers do not look so stark?

Thanks for any tips or pointers.

Upvotes: 0

Views: 602

Answers (1)

CookieOfFortune
CookieOfFortune

Reputation: 14004

Well, you could apply a windowing function (Hamming/Hanning), which would do a weighted average on your values and smooth them. I'm not sure what you're trying to represent however, perhaps you could just remove the outliers (values > average + 2 * stddev) ?.

Upvotes: 3

Related Questions