diff --git a/toolbox/utilities_stat/FNChygepdf.m b/toolbox/utilities_stat/FNChygepdf.m index 54ea80f80..58c3f69cc 100644 --- a/toolbox/utilities_stat/FNChygepdf.m +++ b/toolbox/utilities_stat/FNChygepdf.m @@ -38,9 +38,10 @@ % balls are independent and there is no dependence between draws. One may % as well take all $n$ balls at the same time. Each ball has no "knowledge" % of what happens to the other balls. -% More formally, if the total number $n$ of balls taken is known then the -% conditional distribution of the number of taken red balls for given $n$ is -% Fisher's noncentral hypergeometric distribution. +% More formally, if the total number $n$ of balls taken is not known before +% the experiment (i.e n is determined just after the experiment), then the +% conditional distribution of the number of taken red balls for given $n$ +% is Fisher's noncentral hypergeometric distribution. % % These two distributions have important applications in evolutionary % biology and population genetics. If animals of a particular species are @@ -160,12 +161,12 @@ %% Comparison between Wallenius and Fisher. % we have 20 balls in the urn M = 20; - %initially, in the urn we have 250 red and 250 white balls + %initially, in the urn we have 10 red and 10 white balls K = M/2; % we extract 3 balls without replacement n = 3; - %red balls have a probability ten times greater to be extracted thab white balls - odds = 5; + %red balls have a probability ten times greater to be extracted than white balls + odds = 10; % We compute the probability of getting 0, 1, 2 or 3 red balls in drawing % 3 balls without replacement. x = (0:n)'; @@ -191,12 +192,12 @@ % % we have 20 balls in the urn M = 20; - % initially, in the urn we have 250 red and 250 white balls + % initially, in the urn we have 10 red and 10 white balls K = M/2; % we extract 3 balls without replacement n = 3; - % red balls have a probability ten times greater to be extracted thab white balls - odds = 5; + % red balls have a probability ten times greater to be extracted than white balls + odds = 10; % We compute the probability of getting 0, 1, 2 or 3 red balls in drawing % 3 balls without replacement. x = (0:n)'; @@ -219,12 +220,12 @@ % % we have 20 balls in the urn M = 20; - % initially, in the urn we have 250 red and 250 white balls + % initially, in the urn we have 10 red and 10 white balls K = M/2; % we extract 3 balls without replacement n = 3; - % red balls have a probability ten times greater to be extracted thab white balls - odds = 5; + % red balls have a probability ten times greater to be extracted than white balls + odds = 10; % We compute the probability of getting 0, 1, 2 or 3 red balls in drawing % 3 balls without replacement. x = (0:n)'; @@ -247,12 +248,12 @@ % % we have 20 balls in the urn M = 20; - % initially, in the urn we have 250 red and 250 white balls + % initially, in the urn we have 10 red and 10 white balls K = M/2; % we extract 3 balls without replacement n = 3; - % red balls have a probability ten times greater to be extracted thab white balls - odds = 5; + % red balls have a probability ten times greater to be extracted than white balls + odds = 10; % We compute the probability of getting 0, 1, 2 or 3 red balls in drawing % 3 balls without replacement. x = (0:n)'; diff --git a/toolbox/utilities_stat/WNChygepdf.m b/toolbox/utilities_stat/WNChygepdf.m index 1876bcd5e..e887e26fe 100644 --- a/toolbox/utilities_stat/WNChygepdf.m +++ b/toolbox/utilities_stat/WNChygepdf.m @@ -159,7 +159,7 @@ %} %{ - %% Fisher Noncentral Hypergeometric Distributions Property 1. + %% Wallenius Noncentral Hypergeometric Distributions Property 1. % Taken from Equation (12) of "Sampling Methods for Wallenius' and % Fishers' Noncentral Hypergeometric Distributions" % @@ -168,12 +168,12 @@ % % we have 20 balls in the urn M = 20; - % initially, in the urn we have 250 red and 250 white balls + % initially, in the urn we have 10 red and 10 white balls K = M/2; % we extract 3 balls without replacement n = 3; - % red balls have a probability ten times greater to be extracted thab white balls - odds = 5; + % red balls have a probability ten times greater to be extracted than white balls + odds = 10; % We compute the probability of getting 0, 1, 2 or 3 red balls in drawing % 3 balls without replacement. x = (0:n)'; diff --git a/toolbox/utilities_stat/mFNChygepdf.m b/toolbox/utilities_stat/mFNChygepdf.m index 2b4141e19..2d9afcd95 100644 --- a/toolbox/utilities_stat/mFNChygepdf.m +++ b/toolbox/utilities_stat/mFNChygepdf.m @@ -39,9 +39,10 @@ % balls are independent and there is no dependence between draws. One may % as well take all $n$ balls at the same time. Each ball has no "knowledge" % of what happens to the other balls. -% More formally, if the total number $n$ of balls taken is known then the -% conditional distribution of the number of taken red balls for given $n$ is -% Fisher's noncentral hypergeometric distribution. +% More formally, if the total number $n$ of balls taken is not known before +% the experiment (i.e n is determined just after the experiment), then the +% conditional distribution of the number of taken red balls for given $n$ +% is Fisher's noncentral hypergeometric distribution. % % These two distributions have important applications in evolutionary % biology and population genetics. If animals of a particular species are diff --git a/toolbox/utilities_stat/mFNChygernd.m b/toolbox/utilities_stat/mFNChygernd.m index bc3ae82cb..66e9a1c54 100644 --- a/toolbox/utilities_stat/mFNChygernd.m +++ b/toolbox/utilities_stat/mFNChygernd.m @@ -39,9 +39,10 @@ % balls are independent and there is no dependence between draws. One may % as well take all $n$ balls at the same time. Each ball has no "knowledge" % of what happens to the other balls. -% More formally, if the total number $n$ of balls taken is known then the -% conditional distribution of the number of taken red balls for given $n$ is -% Fisher's noncentral hypergeometric distribution. +% More formally, if the total number $n$ of balls taken is not known before +% the experiment (i.e n is determined just after the experiment), then the +% conditional distribution of the number of taken red balls for given $n$ +% is Fisher's noncentral hypergeometric distribution. % % These two distributions have important applications in evolutionary % biology and population genetics. If animals of a particular species are diff --git a/toolbox/utilities_stat/mWNChygepdf.m b/toolbox/utilities_stat/mWNChygepdf.m index 743924dde..15c8cb17f 100644 --- a/toolbox/utilities_stat/mWNChygepdf.m +++ b/toolbox/utilities_stat/mWNChygepdf.m @@ -39,9 +39,10 @@ % balls are independent and there is no dependence between draws. One may % as well take all $n$ balls at the same time. Each ball has no "knowledge" % of what happens to the other balls. -% More formally, if the total number $n$ of balls taken is known then the -% conditional distribution of the number of taken red balls for given $n$ is -% Fisher's noncentral hypergeometric distribution. +% More formally, if the total number $n$ of balls taken is not known before +% the experiment (i.e n is determined just after the experiment), then the +% conditional distribution of the number of taken red balls for given $n$ +% is Fisher's noncentral hypergeometric distribution. % % These two distributions have important applications in evolutionary % biology and population genetics. If animals of a particular species are diff --git a/toolbox/utilities_stat/mWNChygernd.m b/toolbox/utilities_stat/mWNChygernd.m index dbddf5754..1bea03923 100644 --- a/toolbox/utilities_stat/mWNChygernd.m +++ b/toolbox/utilities_stat/mWNChygernd.m @@ -39,9 +39,10 @@ % balls are independent and there is no dependence between draws. One may % as well take all $n$ balls at the same time. Each ball has no "knowledge" % of what happens to the other balls. -% More formally, if the total number $n$ of balls taken is known then the -% conditional distribution of the number of taken red balls for given $n$ is -% Fisher's noncentral hypergeometric distribution. +% More formally, if the total number $n$ of balls taken is not known before +% the experiment (i.e n is determined just after the experiment), then the +% conditional distribution of the number of taken red balls for given $n$ +% is Fisher's noncentral hypergeometric distribution. % % These two distributions have important applications in evolutionary % biology and population genetics. If animals of a particular species are