Geometric distribution
y = geometric(p,k,c)
output
probability of success.
k is an integer greater than equal to 1.
It will allow the user to generate a random integer from the geometric distribution, the number of independent trials with probability p until the first success.. In this case the function is independent of k and hence any value of k can be set.
It will allow the user to compute the probability p(k) of obtaining k from a geometric distribution with parameter p.
It will allow the user to compute geometric cdf P(k)
It will allow the user to compute geometric cdf Q(k)
This function generates geometric random variates, probability p(k) of obtaining k from a geometric distribution and cdf P(k), Q(k)
// probability p(k) of obtaining k=1 from a geometric distribution with p=0.5. p=0.5 k=1 c=2 y = geometric(p,k,c) disp(y) | ![]() | ![]() |