Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2003

Re: Expected value of the Geometric distribution

From Peter Breitfeld <phbrf@t-online.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Expected value of the Geometric distribution
Date 2011-04-29 11:36 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ipe7r0$r5d$1@smc.vnet.net> (permalink)
References <ipbg1f$ahf$1@smc.vnet.net>

Show all headers | View raw


"Tonja Krueger" 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
>

The Geometric Distribution is discrete, so you must use Sum instead of
Integrate:

Sum[(1-p)^k p k, {k,1,Infinity}]

Out= (1-p)/p

This is also the result of
Mean[GeometricDistribution[p]]
as well as of
ExpectedValue[#&,GeometricDistribution[p]]
-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Expected value of the Geometric distribution "Tonja Krueger" <tonja.krueger@web.de> - 2011-04-28 10:37 +0000
  Re: Expected value of the Geometric distribution Gary Wardall <gwardall@gmail.com> - 2011-04-29 11:30 +0000
  Re: Expected value of the Geometric distribution Stefan <wutchamacallit27@gmail.com> - 2011-04-29 11:32 +0000
  Re: Expected value of the Geometric distribution "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-04-29 11:32 +0000
  Re: Expected value of the Geometric distribution Peter Breitfeld <phbrf@t-online.de> - 2011-04-29 11:36 +0000

csiph-web