From andy.lynch at phpc.cam.ac.uk  Wed May  4 15:07:06 2005
From: andy.lynch at phpc.cam.ac.uk (andy.lynch@phpc.cam.ac.uk)
Date: Wed May  4 15:07:16 2005
Subject: [Rd] Problem with pbirthday (PR#7837)
Message-ID: <20050504130706.42716A1DA@slim.kubism.ku.dk>

Full_Name: Andy Lynch
Version: 1.9.1
OS: Windows
Submission from: (NULL) (131.111.86.211)



As I understand it, pbirthday(n,c,k) gives the approximate probability that we
see a class with k coicident people in it when n people are sorted into c
classes. 

so the command 

> pbirthday(4,classes=3,coincident=4) 


should give the approximate probability that when four people fall into three
classes, all four end up in the same class. A probability that is clearly lower
than the presently returned value of 1. 

It seems to me that the line in the function 

if (n > classes) return(1) 

is only relevant to the default case of coincident = 2. (Naturally, if there are
more people than classes, then at least one class must contain 2 people).


[Rd] Problem with pbirthday (PR#7837)
andy.lynch@phpc.cam.ac.uk