How to make statistics using a small database?
I've written a program where I introduce random integer values (0 to 20). I've configured a "database" (ini file) where it's stored the settings of each of the 21 members.
For example...
Number 1: odd, low, left
Number 19: odd, high, right
and so on....
Each number has 3 different characteristics. The thing I want to do is to make statistics. For example: I want to ask to the program "What is the characteristic most repeated after an odd & high number?" And the program can calculate and return "After an odd and high number, the most repeated case is "left" ". I've also to say that I would also need to be able to configure the amount of characteristics I'm looking for, maybe it's just only 1 (odd), or maybe 2 or even more (odd & high). At the moment I'm using 3 settings in each number (odd/even; low/high; left/right), but maybe in the future I would use 5 or more.
How can I approach this in vb 2010?
Re: How to make statistics using a small database?
There are some simple statistical methods (sum, average, min, max) that are available for classes that implement the IEnumerable interface, but what you are referring will need to done manually for the most part. I would start by putting your data into a list(of T) and go from there. Insofar as how to write what you want to do, give it a go and if you run into problems, post what you have and your question, and you will get help.
kevin
Re: How to make statistics using a small database?
As all three characteristics are binary you could actually do the whole thing as binary math/bitwise comparison if you were so minded!
000 = odd low left = 0
....
111 = even high right = 7
So what most accompanies odd/right would simply be a matter of counting 1 (001) and 3 (011), for example.