A program that calculates the statistical significance of a series of independent random experiments.
For example. You throw a dice, you look at the number, now someone in a different room shouts a number to you trying to guess what you rolled. With a fair dice each time you perform that experiment there is a 1/6 probability of getting it right by luck. You perform this experiment 10 times. How probable is that someone could guess 5 or more of the rolls by luck?
The program can also answer the question "how many rolls of a dice in 10 has someone to guess correctly in order to consider the guess statistically significant? (<=0.01 probability to be guessed by luck).
TOTAL is the total number of experiments. 10 rolls of the dice for example.
P(SUCCESS) is the probability of one experiment to succeed. 1/6 in the case of the dice.
SUCCESSFUL is how many times the guesser was correct. If you set this to 5 in this example it will give you the probability of someone guessing 5 or more rolls out of 10 correctly. If you set this to 0, the program will try to find how many guesses someone should make so that the probability of someone else been equally good or better in guessing correctly is ≤1%
It's fun how you can use this. Someone telling you he can guess the zodiac sign of people? Bring 5 people he doesn't know. Fire up your calc. Type in TOTAL=5, P(SUCCESS)=1/12 SUCCESSFUL=0. EXE and you will get "99% AT 3". Ask him to guess everyone's signs and if he doesn't even get 3 of them correct, he has proven nothing.
Obviously the more the TOTAL number of experiments, the easier it is to see a small deviation from the expected 1/12 chance of guessing someone's sign.
For example you need 3 in 5 to reach 99%. But if you bring 50 people in (TOTAL=50) then you only need to guess 10 of them correctly.
Also note that in the zodiac sign example, the chance of a single guess is probably more than 1/12 since the sign distribution is not uniform.
(NOTE: The C symbol in the code bellow is the FUNCTION 1 8)
"TOTAL"?T "P(SUCCESS)"?P "SUCCESSFUL"?S If S=0:Then 0→W Do P^(S)×(1-P)^(T-S)×TCS+W→W S+1→S S=T+1⇒Break LpWhile W≤0.99 If S=T+1:Then "UNPROVABLE" Else "99% AT:" S IfEnd Else "P(RANDOM)":1-Σ(P^(X)×(1-P)^(T-X)×TCX,X,0,S-1) IfEnd
Edited by Tritonio, 12 November 2014 - 01:58 PM.