 |
|
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 16:48:49 +0000
|
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.
********************************************************************
|
| [mathcad] Re: rgeom mistake? |
|
Author: Chris Whitford
Posted: Wed, 11 Jan 2006 17:25:32 +0000
|
According to http://en.wikipedia.org/wiki/Geometric_distribution there are
2 alternative definitions: the number of trials until the first success, or
the number of trials before the first success.
Chris
At 16:25 11/01/2006 +0100, you wrote:
>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.
+ Chris Whitford
+ Research Fellow, University of Leicester, Space Research Centre,
+ Physics and Astronomy Department, University Road, LEICESTER LE1 7RH, UK
+ Tel: +44 (0)116 252 3496, Fax: +44 (0)116 252 2464
+ email: "chw" http://www.star.le.ac.uk/
|
| [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.
********************************************************************
|
| [mathcad] Re: rgeom mistake? |
|
Author: Andy Spragg
Posted: Wed, 11 Jan 2006 17:55:01 +0000
|
To add further confusion, there is the do-you-count-from-1 or
do-you-count-from-0 issue. It might be interesting to change the array
base in the options and seeing if this changes the results you get ...
Andy
Chris Whitford "chw"
11/01/2006 17:25
Please respond to
"mathcad"
To
Mathcad Discussion List "mathcad"
cc
Subject
[mathcad] Re: rgeom mistake?
According to http://en.wikipedia.org/wiki/Geometric_distribution there are
2 alternative definitions: the number of trials until the first success,
or the number of trials before the first success.
Chris
At 16:25 11/01/2006 +0100, you wrote:
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.
+ Chris Whitford
+ Research Fellow, University of Leicester, Space Research Centre,
+ Physics and Astronomy Department, University Road, LEICESTER LE1 7RH, UK
+ Tel: +44 (0)116 252 3496, Fax: +44 (0)116 252 2464
+ email: "chw" http://www.star.le.ac.uk/
****************************************************************
Any opinions expressed in this email are those of the individual and not necessarily of RHM plc and/or any of its subsidiaries.
This email and any files transmitted with it are private, may be confidential and are for the intended recipient only. If you are not the intended recipient, be advised that you have received them in error. Please notify the sender of the error, delete all copies of them from your system and destroy any printed copies.
If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this email and any files transmitted with it.
Please rely on your own anti-virus system. No responsibility is taken by RHM plc and/or any of its subsidiaries for any damage arising out of any bug or virus infection.
****************************************************************
|
Previous by date: [mathcad] RE: Mathcad 13 and C_Dilla, Jan Theodore Galkowski
Next by date: [mathcad] RE: Mathcad 13 and C_Dilla, Oakley, Philip SELEX UK
Previous thread: [mathcad] RE: Mathcad 13 and C_Dilla, Oakley, Philip SELEX UK
Next thread: [mathcad] RE: Mathcad 13 and C_Dilla, Oakley, Philip SELEX UK
|
|
|