Introducing A Simple and Handy Statistical Program I Wrote Many Years Ago

Discussion in 'OT Technology' started by Math, Jun 4, 2005.

  1. Math

    Math Guest

    This post wants to introduce a simple statistical application that I have written many years ago.

    First, the url link to download this application is:

    http://uploads.offtopic.com/files/stat.zip

    Now you may say: "Math, are you trying to spread a virus or a trojan horse?!" Of course my answer is no and my application is clean. But of course you do not have to believe me, so it is totally up to you to download it or not.

    After unzipping, this application (stat.exe) is only 128K, and needs no installing, you can just double click to run, and you can simply delete it anytime.

    The original version of this application was written many years ago when I was working in China, and we needed to find many statistical results quickly without using hand-computations. And of course there was no fancy commercial software to use, so I simply spent an afternoon and wrote this very useful application. This version is an updated version with a better interface, I still use it often because it is simple and is not too fancy.

    Now, here is a very quick tutorial:

    When you open the stat.exe, you'll see it is in Chinese. (You may see "?????" if you do not have the Chinese encoding).

    You will see two text fields. The first one means: "Total Sample Size". The one below it means: "Total Number of Occurences". There are two radio boxes, one is "95%", the other is "99%". There are also two display fields, one is "P1=", the other is "P2=".

    Finally, there are two buttons. The bigger button, beside the radio boxes, is "Calculate". The small button beside the first text field is "Exit". This is as follows (you may see ???? instead of Chinese):

    [​IMG]


    Ok, let me give you a simple example where you can use this program.

    You want to find out how many people in your workplace are smokers. So you ask 100 people, and 60 of them say that they are smokers. So now, you can enter "100" in the first text field (Sample Size), and enter "60" in the second text field (Number of "Yes"'s to the question "Do you smoke".).

    Now, you select either "95%" (the left radio button) or "99%" (the right radio button) from those 2 radio buttons. Those percentages is your "confidence level". That means how "reliable" do you want your findings to be. So, let us just select 95%.

    Now, you'll have something like:


    [​IMG]


    Now, simply click on "Calculate" (The big button beside the radio buttons).

    Now, you see P1=50.200078%, P2=69.060025%:


    [​IMG]



    What does P1 and P2 mean? Well, it means that now you can claim "I am 95% sure that the percentage of smokers in my entire workplace is between 50.200078% and 69.060025%.". So if your workplace has 1000 people, you can say that "I'm 95% sure that there are at least 500 smokers and at most 690 smokers in my workplace, BASED on the answers I got from my survey of 100 workers."

    Of course you do not know exactly what the percentage is, but you will get a upper bound (P2) and lower bound(P1) with either 95% confidence level or 99% confidence level. Of course, if you chose the 99% with that same survey (size=100, ocurrences=60), your P1-P2 range will be bigger. It will be around 47% and 71%. This of course makes sense, because now you want to be 99% sure, and that means you want to be "safer" and thus include a larger range.

    Furthermore, if you ask more of your coworkers, and ask 200 instead of 100, you will be able to obtain a smaller range with the same confidence level, so bigger sample size is always better. You may try it again to confirm that.

    In your daily life, you want to find out answers to many "yes/no" questions by simply asking that question to a sample, and this application will tell you the real percentages of "yes's" (or No's). For example, you may want to find out the percentage of people with a disease in a town, the percentage of people who voted for a person in classroom, etc. These can be easily done with this application.

    You may ask "Math, how can I believe you are right?!". Well, I am not an expert in statistics, but the theories of my application can be found in any first-year statistics book. I simply wrote this application based on my memory of some statistics I learned in high school. Of course this application is based on the (0 - 1) distribution, and you may find the relevant formulas in any math reference book.

    Well, from now on, if some of you lack some "evidence" or "statistics" to support your arguments, you can design a simple survey and then analyze the results with this application. And you can come here and say "According to Math's stat.exe program, I can present you with this and this claims", etc etc. Or if you are a government offical or a scientist or an engineer or a social worker, you can enhance your statisitcal knowledge and awareness and help you make good decisions, based on real results, and perhaps some of you can start to get rid of some bad habits of humanity majors.

    Of course, as with all my posts, I do not seek copyright for this application, you may distribute it anywhere and you do not have to acknowledge me. You can claim you wrote this application, and I will not mind at all. I think if there's something useful or interesting, it should be shared and used by others.
     
    Last edited by a moderator: Jun 4, 2005
  2. Soren

    Soren OT Supporter

    Joined:
    Oct 9, 2002
    Messages:
    37,553
    Likes Received:
    5
    math, holy shit, can't you just divide 60 by 100 and get 60% and its just as good?
     
  3. Math

    Math Guest

    60% is a "single" percentage. If you ask 100 people and get 60 "yes", can you claim that the real percentage is 60? Of course you cannot, it is only sensical to claim a certain "range" in which you are sure (95% or 99% sure, or other confidence levels) that the real answer falls into.
     
  4. Soren

    Soren OT Supporter

    Joined:
    Oct 9, 2002
    Messages:
    37,553
    Likes Received:
    5
    can't you make a range up then? - 10, + 10, so 50% - 70% ?
     
  5. Math

    Math Guest

    Yes, if your confidence level is low, then your range can be big. For example, I can claim that I am 100% sure that the real percentage of smokers is between 0% to 100%. But of course that is not a very useful claim.

    In the other extreme, if you say the percentage of smokers is between 60.01% and 60.02%, how sure can you be?
     
  6. Soren

    Soren OT Supporter

    Joined:
    Oct 9, 2002
    Messages:
    37,553
    Likes Received:
    5
    i think probability/statistics is kind of useless, compared to exact parts of math. I mean, I guess your chance of meeting a smoker is 60.01% to 60.02%, but you might technically never meet a single smoker after talking to a thousand people.
     
  7. Math

    Math Guest

    Contrarily, I believe probability/statistics is the most useful thing for any person to have some knowledge of. If you talk to a thousand workers and none of them is a smoker, then if you try my application, you can claim that:

    I am 95% sure that the real percentage of smokers is between 0% and 0.38%. So if you have 1 million workers, there'll be at most 3800 smokers amongst them, with 95% reliability.
     
  8. SkyLeach

    SkyLeach Guest

    You do know that the first programs ever written for computers were spreadsheet programs? VisiCalc was the first: 1979

    http://inventors.about.com/library/weekly/aa010199.htm

    Then of course, nearly every scripting language ever invented was capable of grepping figures from a file and tabulating them and presenting them in columnar order.

    What year did you write your program?
     
  9. Math

    Math Guest

    I wrote this statistic application around 1992 or 1993, it was in Turbo C.
     
  10. SkyLeach

    SkyLeach Guest

    Why didn't you just use one of the many free spreadsheet programs out by that time?
     
  11. Math

    Math Guest

    There was not any one available in China back then, and also it cannot convert it to a .exe file.
     
  12. SkyLeach

    SkyLeach Guest

    I don't know china that well, so I guess that could be the case. I know I was doing spreadsheets and spreadsheet style report scripting as early as 1990. I don't run unknown executables on my machine but if you want to share your source then I'll poke at that.
     
  13. SkyLeach

    SkyLeach Guest

    me, or Math?
     
  14. Math

    Math Guest

    I have added some illustrations for following.
     
  15. nukegoat

    nukegoat New Member

    Joined:
    Sep 26, 2003
    Messages:
    23,163
    Likes Received:
    0
    Location:
    San Jose, CA
    Wow... confidence intervals! Math, this is something that can be found with a simple google search or any flip to the back of a statistics textbook. Please try to make topics a little more "On Topic" flavored... this is... i don't know what. But its not really a serious discussion/debate.
     
  16. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    well, this was a waste of my time. Statistics was the worst class I ever took. I have never seen such a waste of education resources in all my life, and I have never met teacher that are so full of crap. Statistics allow you to take something that is entirely not logical, and rationalize it however you feel... then hide behind a percentage that means nothing, because you flat out state that you may be wrong.

    ibjollyogreisbeingnegative

    ibjollyogretellingeveryonetoshutthefuckupandillstopbeingnegativewhenyouallstopbeingsostupid

    /thread
     
  17. WannaZO6

    WannaZO6 There are 10 types of people in the world, the one

    Joined:
    Feb 24, 2002
    Messages:
    1,005
    Likes Received:
    0
    Location:
    Richmond, VA

    if you don't have anything nice to say don't say anything at all :mamoru:

    cool program, i'll pass till i can get an english version though
     

Share This Page