Click here to Skip to main content
15,881,709 members
Articles / Programming Languages / Visual Basic
Article

Statistic Class

Rate me:
Please Sign up or sign in to vote.
3.06/5 (8 votes)
9 Feb 2007CPOL1 min read 36K   681   17   2
This class has some Statistical function such as mean , variance,...

Introduction

This is a class written in vb.net. It has 8 Functions

  • Max
  • Min
  • Median
  • Mean
  • Variance
  • Covariance
  • VarCovarMatrix
  • Correlation

How to use it ...

Step 1-Add this class to your project. (Add Existing Items )
Step 2-Create an instance :

dim Ins_name as new statistic

call the functions you need from Ins_name.

Min and Max :

You can calculate the Min (max) of byte,integer or double arrays of one,two or three dimention.

each functions has 9 Overload.

Mean :

you can calculate the mea of byte,integer or double array. BUT have you ever think if you could be able to calculate the mean of several or more arrays at the same time.

I means that you do not need to call the class several times to calculate the mean of them. you can create an jagged array and use it as input so you will find the result as an array!
Example : you want to calculate the mean of to arrays ( array1, array2)

dim jagged_array(1)() as double

jagged_array(0)()=array1

jagged_array(1)()=array2

dim mean_array() as double=statistic.mean(jagged_array)

dim mean1 as double = mean_array(0)

dim mean2 as double = mean_array(1)

You can do the same for variance.

Please...

as you see my English is not very well so please tell me if you had any problem using this class.

Enjoy it. (YA ALI)


License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer
Iran (Islamic Republic of) Iran (Islamic Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralSpeed Pin
SteveAbbott10-Feb-07 6:20
SteveAbbott10-Feb-07 6:20 
AnswerRe: Speed Pin
Hossein Narimani Rad11-Feb-07 8:35
Hossein Narimani Rad11-Feb-07 8:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.