Does http://www.jsoftware.com/jwiki/Essays/Birthday%20Problem answer any of your questions?
On Tue, Jan 17, 2012 at 9:40 PM, Linda Alvord <lindaalv...@verizon.net>wrote: > Capture the last row of c > > ]l=:{:c > 106 249 7 326 308 274 81 347 276 113 108 20... > > And use grade up to arrange the numbers in sequence > > (/:l){l > 0 1 3 3 4 4 5 5 6 6 7 7 7 7 8 8 8 13 13... > > This should be i.365 > > I have an idea on how to get what you want but I'll wait to see what you do > next. > I have to use a deal without a fixed seed for the deal. > > I happened to remember 24 and haven't gone looking for the number and > haven't the foggiest notion of how I proved it! > > Linda > > -----Original Message----- > From: Linda Alvord [mailto:lindaalv...@verizon.net] > Sent: Tuesday, January 17, 2012 11:25 PM > To: 'Programming forum' > Subject: RE: [Jprogramming] Challenge 4 Bountiful Birthdays > > I think we need sortleaf. > > Linda > > -----Original Message----- > From: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] On Behalf Of Brian Schott > Sent: Tuesday, January 17, 2012 10:14 PM > To: Programming forum > Subject: Re: [Jprogramming] Challenge 4 Bountiful Birthdays > > $c=.500 365?.@$365 > $D=. i.&0"1(=&#~.)\"1 c > mean D+1 NB. 25.086 > pretty 5 SL sortleaf 1+D > > $c=. 10 500 365?.@$365 > $D=. i.&0"1(=&#~.)\"1 c > mean, D+1. NB. 24.6856 > pretty"2] 5 SL"0 1 sortleaf"1] 1+D > > I am suspicious of these results because my memory is that the mean is > closer to 18.5 people. Then again, other measures of the center look closer > to 19, just looking at the stemplots. > > --- > (B=) > > On Jan 15, 2012, at 5:40 AM, "Linda Alvord" <lindaalv...@verizon.net> > wrote: > > > > > For this challenge, as usual, do not use @ but you may use whatever > style > > and strategy you like to accomplish the task. > > > > > > > > The problem is to simulate the classic birthday problem. > > > > > > > > A single trial works this way. People enter a room one by one and > declare > > their birth date. Suppose the 29th person is the first person to match a > > birthday of someone in the room. The result of the first trial is 29. > > > > > > > > Repeat for 500 trials. > > > > > > > > If you use Kip's frequency distribution of the results you have lots of > > information. > > > > > > > > fd=:[: /:~ ~. ,. [: +/"1 ~. =/ ] > > > > > > > > But the mean gives a more concise summary of the data. So, the final > part > > of the problem is to obtain a list of 10 means of 500 trials and the > > mean of the means. > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm