Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1968
| From | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Expected value of the Geometric distribution |
| Date | 2011-04-29 11:29 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ipe7e9$qq3$1@smc.vnet.net> (permalink) |
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
>
There are two issues here.
(1) This is a discrete distribution. So you will want a sum rather than
an integral.
(2) To obtain an expectation one uses a definite rather than indefinite
"integral" (discrete sum in this case, but that is a type of integral in
mathematics).
Sum[(1-p)^k*p*k, {k,0,Infinity}] // InputForm
Out[128]//InputForm= (1 - p)/p
Daniel Lichtblau
Wolfram Research
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Expected value of the Geometric distribution Daniel Lichtblau <danl@wolfram.com> - 2011-04-29 11:29 +0000
csiph-web