 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] RE: rgeom mistake?
| [mathcad] RE: rgeom mistake? |
|
Author: Oakley, Philip SELEX UK
Posted: Wed, 11 Jan 2006 17:15:26 +0000
|
>From V11 manual.You can access numerical recipes (Press et al) on the web. Sorry about the confusion over the zero - thought you meant it returned zero where a real>0 was expected. Also just because the particular experiment can have zero trials doesn't mean a distribution can't include a coefficient 'zero' [one could win by default..]
Philip
rgeom Random Numbers
Syntax rgeom(m, p)
Description Returns a vector of m random numbers having the geometric distribution.
Arguments
m integer, m > 0
p real number, 0 <p <1
Algorithm Inverse cumulative density method (Press et al., 1992)
See also rnd
From: Oakley, Philip (SELEX) (UK)
Sent: 11 January 2006 16:49
To: Mathcad Discussion List
Subject: [mathcad] RE: rgeom mistake?
Have you checked your zero tolerance? try multiplying the result by 10^300 (or suitable large number) to see if it just 'very small'
Philip
From: Marc Artzrouni "mailto:marc.artzrouni"
Sent: 11 January 2006 15:26
To: Mathcad Discussion List
Subject: [mathcad] rgeom mistake?
*** WARNING ***
This mail has originated outside your organization,
either from an external partner or the Global Internet.
Keep this in mind if you answer this message.
Hi:
When using rgeom to simulate the geometric random variable G I have values of 0 - which isn't possible for the "trial number
on which the first success occurs". The Help file (and my 2001i manual) have p(1-p)^k for the probability
of G=k. An exponent k explains why G can indeed by 0 - however every probability textbook I check
tells me the exponent is k-1, not k, with a smallest possible value of G equal to 1 and not 0.
Can anyone confirm that this is a mistake, and let me know whether it's been fixed in
more recent versions ?
Many thanks
Marc Artzrouni
Marc Artzrouni
Département de Mathématiques (IPRA)
Université de Pau - BP 1155
64013 Pau Cedex
FRANCE
Home page/page perso:
http://www.univ-pau.fr/~artzroun/
**********************************
tel: + 33 - (0)5 59 40 75 50
fax: + 33 - (0)5 59 40 75 55
e-mail: "marc.artzrouni"
**********************************
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
|
[View Complete Thread]
Previous by date: [mathcad] DSP method, Mark Smith
Next by date: [mathcad] Re: DSP method, David Burton
Previous thread: [mathcad] RE: rgeom mistake?, Oakley, Philip SELEX UK
Next thread: [mathcad] Re: DSP method, David Burton
|
|
|