Title
negative_binomial_distribution should reject p == 1
Status
c++17
Section
[rand.dist.bern.negbin]
Submitter
Stephan T. Lavavej

Created on 2014-06-14.00:00:00 last changed 89 months ago

Messages

Date: 2014-11-24.13:56:51
xmlns:ns0="http://www.w3.org/1998/Math/MathML">

Proposed resolution:

This wording is relative to N4140.

  1. Add a note after paragraph 1 before the synopsis in [rand.dist.bern.negbin]:

    A negative_binomial_distribution random number distribution produces random integers i0 distributed according to the discrete probability function

    P(i|k,p) = k + i - 1 i · p k · (1-p) i .

    [Note: This implies that P(i|k,p) is undefined when p == 1. — end note]

    Drafting note: P(i|k,p) should be in math font, and p == 1 should be in code font.

Date: 2014-11-08.00:00:00

[ 2014-11-08 Urbana ]

Moved to Ready with the node.

There remains concern that the constructors are permitting values that may (or may not) be strictly outside the domain of the function, but that is a concern that affects the design of the random number facility as a whole, and should be addressed by a paper reviewing and addressing the whole clause, not picked up in the issues list one distribution at a time. It is still not clear that such a paper would be uncontroversial.

Date: 2014-11-05.19:49:42

[ 2014-11 Urbana ]

SG6 suggests better wording.

Date: 2014-11-05.19:49:42

[rand.dist.bern.negbin] p2 requires "0 < p <= 1". Consider what happens when p == 1. The discrete probability function specified by p1 involves "* p^k * (1 - p)^i". For p == 1, this is "* 1^k * 0^i", so every integer i >= 0 is produced with zero probability. (Let's avoid thinking about 0^0.)

Wikipedia states that p must be within (0, 1), exclusive on both sides.

Previous resolution [SUPERSEDED]:
  1. Change [rand.dist.bern.negbin] p2 as indicated: [Drafting note: This should be read as: Replace the symbol "" by "<" — end drafting note]

    explicit negative_binomial_distribution(IntType k = 1, double p = 0.5);
    

    -2- Requires: 0 < p < 1 and 0 < k.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2015-05-22 18:31:21adminsetstatus: ready -> wp
2014-11-24 13:56:51adminsetmessages: + msg7204
2014-11-24 13:56:51adminsetstatus: open -> ready
2014-11-05 19:49:42adminsetmessages: + msg7168
2014-11-05 19:49:42adminsetstatus: new -> open
2014-06-14 21:17:50adminsetmessages: + msg7043
2014-06-14 00:00:00admincreate