<?xml version="1.0" encoding="UTF-8"?>

<record version="9" id="3456">
 <title>geometric distribution</title>
 <name>GeometricDistribution2</name>
 <created>2002-09-15 00:03:38</created>
 <modified>2007-06-22 17:24:15</modified>
 <type>Definition</type>
 <creator id="13753" name="Mathprof"/>
 <author id="13753" name="Mathprof"/>
 <author id="3" name="drini"/>
 <classification>
	<category scheme="msc" code="60E05"/>
 </classification>
 <synonyms>
	<synonym concept="geometric distribution" alias="geometric random variable"/>
 </synonyms>
 <related>
	<object name="RandomVariable"/>
	<object name="DensityFunction"/>
	<object name="DistributionFunction"/>
	<object name="Mean"/>
	<object name="Variance"/>
	<object name="BernoulliDistribution"/>
	<object name="ArithmeticMean"/>
 </related>
 <preamble>\usepackage{graphicx}
%\usepackage{xypic} 
\usepackage{bbm}
\newcommand{\Z}{\mathbbmss{Z}}
\newcommand{\C}{\mathbbmss{C}}
\newcommand{\R}{\mathbbmss{R}}
\newcommand{\Q}{\mathbbmss{Q}}
\newcommand{\mathbb}[1]{\mathbbmss{#1}}
\newcommand{\figura}[1]{\begin{center}\includegraphics{#1}\end{center}}
\newcommand{\figuraex}[2]{\begin{center}\includegraphics[#2]{#1}\end{center}}</preamble>
 <content>Suppose that a random experiment has two possible outcomes, success with probability $p$ and failure with probability $q=1-p$. The experiment is repeated until a success happens. The number of trials before the success is a random variable $X$ with density function 
$$f(x)=q^{(x-1)}p.$$

The distribution function determined by $f(x)$ is called a \emph{geometric distribution} with parameter $p$ and it is given by
$$F(x) = \sum_{k\leq x}q^{(k-1)}p.$$

\figura{geomet}

The picture shows the graph for $f(x)$ with $p=1/4$. Notice the quick decreasing. An interpretation is that a long run of failures is very unlikely.

We can use the moment generating function method in order to get the mean and variance. This function is 
$$G(t)=\sum_{k=1}^\infty e^{tk}q^{(k-1)}p=p\sum_{k=0}^\infty (e^tq)^k.$$
The last expression can be simplified as
$$G(t)=\frac{p}{1-e^tq}.$$

The first and second derivatives are
$$G'(t)=\frac{e^tpq}{(1-e^tq)^2}$$ 
so the mean is
$$\mu=E[X]=G'(0)=\frac{q}{p}.$$

In order to find the variance, we get the second derivative and thus
$$E[X^2]=G''(0)=\frac{2q^2}{p^2}+\frac{q}{p}$$
and therefore the variance is
$$\sigma^2=E[X^2]-E[X]^2 = G''(0) - G'(0)^2 = \frac{q}{p^2}.$$</content>
</record>
