Application Center - Maplesoft

# The Concept of Significance

You can switch back to the summary page by clicking here.

 > # The Concept of Significance

 >

 > restart;

 >

 > # We can calculate the probability of finding x heads in a n random coin toss (p=0.5) as follows:

 > P(n,x)=n!/(x!*(n-x)!)*(p^x*(1-p)^(n-x));

 (1)

 > # we P(n,x) is the corresponding element in the Pascal triangle.

 >

 >

 > Example-1

 > # We can calculate the probability of finding 10 heads in a 20 coin toss as

 > n:=20: x:=10: v:=20-x+1:

 > n!/(x!*(n-x)!)*(0.5^x*(1-0.5)^(n-x));

 (2)

 > # We can calculate the probability of finding 10 heads or more in a 20 coin toss as

 > n:=20: x:=10:

 > convert([seq(n!/(x!*(n-x)!)*(0.5^x*(1-0.5)^(n-x)),x=x..n)], '`+`' );

 (3)

 > # If that probability is lower than 0.05 then we can claim with 95% certainty                                  # that the coin most likely is not random. In this case the coin is random

 >

 >

 > # Example-2

 > # We can calculate the probability of finding 14 heads in a 20 coin toss as

 > n:=20: x:=14: v:=20-x+1:

 > n!/(x!*(n-x)!)*(0.5^x*(1-0.5)^(n-x));

 (4)

 > # We can calculate the probability of finding 14 heads or more in a 20 coin toss as

 > n:=20: x:=14:

 > convert([seq(n!/(x!*(n-x)!)*(0.5^x*(1-0.5)^(n-x)),x=x..n)], '`+`' );

 (5)

 > # If that probability is lower than 0.05 then we can claim with 95% certainty                                  # that the coin most likely is not random. In this case the coin is random.

 >

 >

 > # Example-3

 > # We can calculate the probability of finding 15 heads in a 20 coin toss as

 > n:=20: x:=15: v:=20-x+1:

 > n!/(x!*(n-x)!)*(0.5^x*(1-0.5)^(n-x));

 (6)

 > # We can calculate the probability of finding 15 heads or more in a 20 coin toss as

 > n:=20: x:=15:

 > convert([seq(n!/(x!*(n-x)!)*(0.5^x*(1-0.5)^(n-x)),x=x..n)], '`+`' );

 (7)

 > # If that probability is lower than 0.05 then we can claim with 95% certainty                                  # that the coin most likely is not random. In this case the coin is not random.

 >

 >

 >

 > # Gambling Fallacy

 > # If we conclude that the process is random then the outcome in each period is completly random.

 > # This means that we cannot quantify the probability of geting a head in the next period because the          # outcome an all periods are completly random. However if we can prove that the outcome has not been generated by a random process then we can quantify the probability of sucess without falling in to the gambling fallacy.

Legal Notice: The copyright for this application is owned by the authors. Neither Maplesoft nor the authors are responsible for any errors contained within and are not liable for any damages resulting from the use of this material.  This application is intended for non-commercial, non-profit use only. Contact the authors for permission if you wish to use this application in for-profit activities.