---------- Forwarded message --------- From: Sahil Sharma <sahilsharmahimalaya at gmail.com> Date: Tue, Oct 17, 2023 at 12:10?PM Subject: r-stats: Geometric Distribution To: <do-use-Contact-address at r-project.org> Hey I want to raise one issue in *r-stats **geometric distribution * function. I have found the dgeom(x,p) which denotes probability density function of geometric distribution, is not reducing 1 from x. The original formula for Geometric Distribution PDF is *((1-p)^x-1)*P*. However, the current r function *dgeom(x, p)* is doing this: *((1-p)^x)*P, *it is not reducing 1 from x. I don't know whether this it is kept as it is intentionally, but I thought of just informing you, in case it's an error, so you can correct it. Thanks. [[alternative HTML version deleted]]
? Tue, 17 Oct 2023 12:12:05 +0530 Sahil Sharma <sahilsharmahimalaya at gmail.com> ?????:> The original formula for Geometric Distribution PDF is > *((1-p)^x-1)*P*. However, the current r function *dgeom(x, p)* is > doing this: *((1-p)^x)*P, *it is not reducing 1 from x.Your definition is valid for integer 'x' starting from 1. ('x'th trial is the first success.) The definition in help(dgeom):>> p(x) = p (1-p)^x >> for x = 0, 1, 2, ..., 0 < p <= 1....is valid for integer x starting from 0. ('x' failures until the first success.) They are equivalent, but they use the name 'x' for two subtly different things. Thank you for giving attention to this and best of luck in your future research! -- Best regards, Ivan
Please delete drjimlemon at gmail.com from your mailing lists. He passed away a mknth ago. Regards, Juel Wife On Tue, 17 Oct 2023, 22:58 Sahil Sharma <sahilsharmahimalaya at gmail.com wrote:> ---------- Forwarded message --------- > From: Sahil Sharma <sahilsharmahimalaya at gmail.com> > Date: Tue, Oct 17, 2023 at 12:10?PM > Subject: r-stats: Geometric Distribution > To: <do-use-Contact-address at r-project.org> > > > Hey I want to raise one issue in *r-stats **geometric distribution * > function. > > I have found the dgeom(x,p) which denotes probability density function of > geometric distribution, is not reducing 1 from x. > > The original formula for Geometric Distribution PDF is *((1-p)^x-1)*P*. > However, the current r function *dgeom(x, p)* is doing this: *((1-p)^x)*P, > *it > is not reducing 1 from x. > > I don't know whether this it is kept as it is intentionally, but I thought > of just informing you, in case it's an error, so you can correct it. > > Thanks. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]