Off-topic Talk Where overpaid, underworked S2000 owners waste the worst part of their days before the drive home. This forum is for general chit chat and discussions not covered by the other off-topic forums.

Need some math/CS help--------->

Thread Tools
 
Old Mar 5, 2002 | 12:09 PM
  #1  
mrkim019's Avatar
Thread Starter
Registered User
20 Year Member
 
Joined: Dec 2000
Posts: 4,136
Likes: 0
From: Saratoga
Default Need some math/CS help--------->

I forgot the forumla for standard deviation...

I'm writing a program to dynamically allocate some memory for an array...

Then I gotta use that to find standard deviation...

All is easy until the stupid forumla....

Can anyone give me a very simply breakdown of the formula so i can use it in my program?

Thanks in advance.

Cheers,

Bryan
Reply
Old Mar 5, 2002 | 12:20 PM
  #2  
magician's Avatar
Registered User
 
Joined: Jul 2001
Posts: 6,592
Likes: 0
From: Yorba Linda, CA
Default

Call your data points x1, x2, . . . , xn.

Let S = (x1^2 + x2^2 + . . . + xn^2) / n.

Let M = (x1 + x2 + . . . + xn) / n. (M is the mean.)

Variance: V = S - M^2.

Std. Dev. = sqrt(V).

Example:

Data: 1, 2, 3, 4, 5

S = (1 + 4 + 9 + 16 + 25) / 5 = 55 / 5 = 11.

M = (1 + 2 + 3 + 4 + 5) / 5 = 3.

V = 11 - 9 = 2

SD = 1.414...

Reply
Old Mar 5, 2002 | 12:25 PM
  #3  
mrkim019's Avatar
Thread Starter
Registered User
20 Year Member
 
Joined: Dec 2000
Posts: 4,136
Likes: 0
From: Saratoga
Default

Thanks magician...

You sure are full of magic...

(sorry for the cheesy line)

Cheers,

Bryan
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
emrillive
Off-topic Talk
6
Apr 18, 2007 12:19 PM
SilverKnight
Off-topic Talk
7
Jul 17, 2005 09:39 PM
shift_9k
Off-topic Talk
0
Sep 10, 2004 08:17 PM
mt rsx
Off-topic Talk
7
May 11, 2004 08:43 PM




All times are GMT -8. The time now is 02:58 PM.