Section 7.3 Geometric Distribution
Consider the situation where one can observe a sequence of independent trials where the likelihood of a success on each individual trial stays constant from trial to trial. Call this likelihood the probably of "success" and denote its value by p where 0 \lt p \lt 1 \text{.} If we let the variable X measure the number of trials needed in order to obtain the first success with R = \{1, 2, 3, ... \}\text{,} then the resulting distribution of probabilities is called a Geometric Distribution.
Since successive trials are independent, then the probability of the first success occurring on the mth trial presumes that the previous m-1 trials were all failures. Therefore the desired probability is given by
Proof
xxxxxxxxxx
# Geometric distribution over 0 .. n
# Probability of success on one independent trial = p must also be given
var('x')
# n = 50 by default. actually should be infinite
def _(p=input_box(0.1,label='p = '),n=[25,50,75,100,200]):
np1 = n+1
R = range(1,np1)
f(x) = (1-p)^(x-1)*p
F(x) = 1 - (1-p)^x
pretty_print(html('Density Function: $f(x) =%s$'%str(latex(f(x)))+' over the space $R = %s$'%str(R)))
points((k,f(x=k)) for k in R).show(title="Probability Function")
print
points((k,F(x=k)) for k in R).show(title="Distribution Function")
if (n == 25):
for k in R:
pretty_print(html('$f(%s'%k+') = %s'%latex(f(x=k))+' \\approx %s$'%f(x=k).n(digits=5)))
Theorem 7.3.2 Geometric Mean
For the geometric distribution,Proof
Theorem 7.3.3 Geometric Variance
For the geometric distributionProof
Theorem 7.3.4 Geometric Distribution Function
Proof
Consider the accumulated probabilities over a range of values...
Theorem 7.3.5 Statistics for Geometric Distribution
Mean, Variance, Skewness, Kurtosis computed by Sage.xxxxxxxxxx
var('x,n,p')
assume(x,'integer')
f(x) = p*(1-p)^(x-1)
mu = sum(x*f,x,0,oo).full_simplify()
M2 = sum(x^2*f,x,0,oo).full_simplify()
M3 = sum(x^3*f,x,0,oo).full_simplify()
M4 = sum(x^4*f,x,0,oo).full_simplify()
pretty_print('Mean = ',mu)
v = (M2-mu^2).factor().full_simplify()
pretty_print('Variance = ',v)
stand = sqrt(v)
sk = (((M3 - 3*M2*mu + 2*mu^3))/stand^3).full_simplify()
pretty_print('Skewness = ',sk)
kurt = (M4 - 4*M3*mu + 6*M2*mu^2 -3*mu^4).factor()/stand^4
pretty_print('Kurtosis = ',(kurt-3).factor(),'+3')
Theorem 7.3.6 The Geometric Distribution yields a memoryless model.
If X has a geometric distribution and a and b are nonnegative integers, then
Proof
Using the definition of conditional probability,