Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!

Justin Fox
Ranch Hand
Posts: 802
ok, i have a program that wants me to put integers entered into an array,
thats very easy.

but then it wants me to give the mean, and stadard deviant of that array also, then again not so hard.

but....the formulas a pretty....insane.

like Ex/N thats for the mean....i thought the weird E was for "sum of"...
but if this is true, then that is the same as average.

and the SD is even crazier...if someone could put it into lamens for me it would be great...thx!

marc weber
Sheriff
Posts: 11343
Originally posted by Monk Fox:
...like Ex/N thats for the mean....i thought the weird E was for "sum of"...but if this is true, then that is the same as average.

That's correct. The weird E is an uppercase Sigma, for "sum of." The mean is, in fact, the arithmetic average.

Ranch Hand
Posts: 95
Originally posted by Monk Fox:
ok, i have a program that wants me to put integers entered into an array,
thats very easy.

but then it wants me to give the mean, and stadard deviant of that array also, then again not so hard.

but....the formulas a pretty....insane.

like Ex/N thats for the mean....i thought the weird E was for "sum of"...
but if this is true, then that is the same as average.

and the SD is even crazier...if someone could put it into lamens for me it would be great...thx!

Some Values: 1, 3, 13, 1, 2

Mean - what most people call "average" The sum of the values divided by the number of values. With these values, Mean = 4

Median - Put all the values in order, biggest to smallest. The median is the one in the middle
With these values, Median = 2

Mode - The most common value (If you have a stuffy nose, "The /mode/ common value" Here Mode = 1

Standard Deviation - Attempts to give an indication of how far away from the mean most of the values are. Here is another set of numbers with Mean = 4 : {4, 4, 4, 4} Clearly they do not deviate very much from the mean. The way the SD is calculated is to add up the squares of all of the deviations (amount by which a particular datum varies from the mean), divide by the number of values, then take the square root. The variances are squared so that when they are added up, bigger variances really stand out and so that they are all positive. Essentially, the SD finds some "average" of the amount by which the values deviate from their collective "mean." I don't think the explanation athttp://www.med.umkc.edu/tlwbiostats/variability.html is the best I have ever seen, but it's better than mine, plus it spells out the formula in layman's terms.

The wikipedia article http://en.wikipedia.org/wiki/Standard_deviation is also good reading. In particular, read the paragraph headed "Interpretation and Application."
HTH
[ January 26, 2006: Message edited by: Adam Price ]

Justin Fox
Ranch Hand
Posts: 802
omg sweet arse....ya'll are the best ya hear....

marc weber
Sheriff
Posts: 11343
Suppose you have 3 numbers: 1, 3, and 8. The mean (m) is (1+3+8)/3 = 4.

Then for standard deviation...

26/n = 26/3 which is about 8.7. And the square root of 8.7 is about 2.95. That's the standard deviation.

Ranch Hand
Posts: 95
Originally posted by marc weber:
Suppose you have 3 numbers: 1, 3, and 8. The mean (m) is (1+3+8)/3 = 4.

26/n = 26/3 which is about 8.7. And the square root of 8.7 is about 2.95. That's the standard deviation.

Nice, Mark....
Let's try it with my set: 1, 3, 13, 1, 2
Then for standard deviation...

104/n = 104/5 which is 20.8. And the square root of 20.8 is about 4.56. That's the standard deviation. From this we see that although the average number of fish per tank is the same in my aquarium and in Mark's, the standard deviation is greater in mine. If you put exactly enough food for four fish (the average number) in every tank, more would die in my tanks from either starvation or exploding bellies than would die in Mark's tanks.

Ranch Hand
Posts: 135

Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
I inherited a spreadsheet where someone computed the average absolute value of the delta from one row to the next. For five rows you'd have four deltas. This looks similar to SD without doing the squaring bit to emphasize the furthest out. Since you guys did so well on the standard deviation question, I wondered if you know the name for this thing he did?

Edit: I found this was used in a report he called "Six Sigma-like". A little different because it's ... wrong.
[ January 27, 2006: Message edited by: Stan James ]

Jeff Albertson
Ranch Hand
Posts: 1780
Sounds like Taxicab geometry: en.wikipedia.org/wiki/Norm_(mathematics)

Paul Clapham
Sheriff
Posts: 21107
32
Originally posted by Stan James:
This looks similar to SD without doing the squaring bit to emphasize the furthest out. Since you guys did so well on the standard deviation question, I wondered if you know the name for this thing he did?[ January 27, 2006: Message edited by: Stan James ]
Variance.

Ranch Hand
Posts: 95
Variance - That was my first thought, also, but it isn't quite right - Variance would include the squaring, just not the square root.

Taxicab math - hmm - I am not seeing the relationship?

Do I understand correctly that you're talking about something like this?

This seems to me like (depending on what the field of application is) either the geometric growth factor, the "rate of change" or the slope of the graph. In my example,

Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
Yeah, that's the algorithm. You didn't have a negative delta in your example to show he used abs(delta) but that's still it. I think he was trying to do six sigma and got sorta close. I ran this side by side with stdev() in Excel just to see how much more sentitive stdev() is to wider variations. Quite a lot.