MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Expected value of the Geometric distribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118480] Re: Expected value of the Geometric distribution
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Fri, 29 Apr 2011 07:33:05 -0400 (EDT)
  • References: <ipbg1f$ahf$1@smc.vnet.net>

Hi Tonja,

The problem is that this is a *discrete* probability distribution.So,
instead of integrating you need to sum the terms:

In[15]:= Sum[(1 - p)^k*p*k, {k, 1, \[Infinity]}]

Out[15]= (1 - p)/p

As of Mathematica 8 Mathematica knows a lot of distribution stuff, so you coul
also say:

In[14]:= Expectation[x, x \[Distributed] GeometricDistribution[p]]

Out[14]= (1 - p)/p

Cheers -- Sjoerd


StackOverflow for fast answers to Mathematica questions
http://stackoverflow.com/questions/tagged/mathematica


 On Apr 28, 12:37 pm, "Tonja Krueger" <tonja.krue... at web.de> wrote:
> Hi all,
> I want to calculate expected value of diverse distributions like the Geometric distribution (for example).
> As I understand this, the expected value is the integral of the density function *x.
> But when I try to calculate this:
> Integrate[(1-p)^k*p*k,k]
> I get this as the answer:
> ((1 - p)^k p (-1 + k Log[1 - p]))/Log[1 - p]^2
> Instead of: (1-p)/p.
> I would be so grateful if someone could explain to me what I'm doing wrong.
> Tonja
> ___________________________________________________________
> Empfehlen Sie WEB.DE DSL Ihren Freunden und Bekannten und wir  
> belohnen Sie mit bis zu 50,- Euro!https://freundschaftswerbung.web.de



  • Prev by Date: for cicle inside an If condition
  • Next by Date: Re: Expected value of the Geometric distribution
  • Previous by thread: Re: Expected value of the Geometric distribution
  • Next by thread: Re: Expected value of the Geometric distribution