index.html 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Birthday Paradox</title>
  6. <meta charset="utf-8">
  7. <link rel="stylesheet" href="/birthdayparadox/style">
  8. </head>
  9. <body>
  10. <h1>The Birthday Paradox</h1>
  11. <p class="text"><a href="https://en.m.wikipedia.org/wiki/Birthday_problem" target="_blank">The birthday paradox</a> is the idea that if there are 23 people in a room, there is about a 50% chance that two people in the room have the same birthday. While counterintuitive it is very true. This page shows this by creating random "birthdays" and then showing the matches, if any. Play around with the number of people to see different odds.</p>
  12. <p class="text">Watch an explanation <a href="https://www.youtube.com/watch?v=ofTb57aZHZs" target="_blank">here</a>.</p>
  13. <div class="interactive">
  14. <label>Number of people:
  15. <input id="partiers" type="number" step="1">
  16. </label>
  17. <button id="tryAgain" class="button">Try Again</button>
  18. </div>
  19. <h3></h3>
  20. <div id="datesDiv"></div>
  21. <script src="/birthdayparadox/code"></script>
  22. </body>
  23. </html>