Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
How many people in a room?
How many people do you need to gather in a room for there to be an evens chance that two of them have the same birthday? Would you believe that it's as few as 23? This is something I've heard said over the years but I wasn't sure if I believed it. Well - here you go:

Day 18, chance is 35.5%
Day 19, chance is 38.9%
Day 20, chance is 42.2%
Day 21, chance is 45.6%
Day 22, chance is 48.9%
Day 23, chance is 52.1%
Day 24, chance is 55.4%
Day 25, chance is 58.5%

Sure ... I used Perl ;-)

#!/usr/bin/perl
$chance = 0;
for ($k=1; $k<25; $k++) {
$chance += ($k/(366 - $k)) * (1 - $chance);
printf "Day %2d, chance is %5.1f%%\n",$k+1,$chance*100;
}


Yes - I DID do a test / sanity check. Ran it up to 365 people and ended up at 100%
(written 2004-08-12 21:45:18)

 
Associated topics are indexed under
P207 - Perl - File Handling

Back to
A bolt of lightning on Multicasting
Previous and next
or
Horse's mouth home
Forward to
Mobile Office revamp

Some other Articles
Python training
90 to 10 or 80 to 20 rule
London - Most expensive city??
Mobile Office revamp
How many people in a room?
A bolt of lightning on Multicasting
What do you look for in your IT trainer?
Study room - the Oxford train
How much does fuel cost for an airline flight?
Writing on a Sunday
1635 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho