Calculating Standard Deviation?

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I know in some other languages there is a simple standard deviation function
(sdev(1,2,3,4,5,etc...)). But I'm unable to find a suitable alternative for
vb.net

I'm assuming it's there somewhere. Can someone tell me the how to call
standard deviation? I have a datatable and I need to determine the std for
a series of rows.

Thanks for the help!
 
Scott said:
I know in some other languages there is a simple standard deviation function
(sdev(1,2,3,4,5,etc...)). But I'm unable to find a suitable alternative for
vb.net

I'm assuming it's there somewhere. Can someone tell me the how to call
standard deviation? I have a datatable and I need to determine the std for
a series of rows.

The data is in a database - so you can use SQL to get that information.
http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html
 
Not quite. It's a datatable, not a database table.

I ended up just writing a function to do it. Annoying to have to do, but
not difficult.
 
You will either have to write your own function, which isn't hard, or you
can add a reference to Microsoft Excel and use the following type of code to
display both the average and standard deviation of a collection of numbers.

I would write my own function.

Dim xL As New Excel.Application
Dim S As String = "Average(1, 2, 3, 4, 5, 6, 7, 8)"
MsgBox(xL.Evaluate(S).ToString)
S = "STDEV(1,2,3,4,5,6,7,8)"
MsgBox(xL.Evaluate(S).ToString)
 
Back
Top