Results 1 to 3 of 3

Thread: How to make statistics using a small database?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    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?

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    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
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    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.
    Last edited by dunfiddlin; Apr 19th, 2013 at 12:20 PM.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width