Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #140: Prove the Birthday Paradox!

JoeM
Alteryx Alumni (Retired)

This week we will run an anecdotal workflow to prove the Birthday Paradox! The Birthday paradox simply refers to the phenomenon that if you assembled 23 people into one room, the chances of two people having the same birthday are 50-50. We could 'math' this out, but why not just assembles 100s of thousands of people in the seconds to prove it?

 

In this challenge, your goal is to build a table that increment group sizes from 2 people all the way to 50 people. In each of those group sizes, run 1000 random trials and see what percent of groups had at least one set of people match. Why 1000? Theoretically, the more trials you run, the more likely you are to get a refined percent (e.g. flipping a coin four times may not a perfect 50-50 chance where it would be much closer after 1000 flips).

 

Due to the nature of this challenge, you will need to generate your own data! I have provided a sample output of mine, but since we are randomly assigning birthdays, you may find small differences in our answers. At what group size did it exceed 75% chance? 90% chance?

 

Looking to try the new interactive chart tool too?Looking to try the new interactive chart tool too?

bdaniels
8 - Asteroid

Screen Shot 2018-11-05 at 10.34.14 AM.png

 

 

Workflow:

Spoiler
workflowworkflow
macromacro
patrick_digan
17 - Castor
17 - Castor
Spoiler
I most certainly over complicated it, but nothing simpler was coming to mind.
Capture.PNG 
cgoodman3
14 - Magnetar
14 - Magnetar

Started off with an iterative macro but just ended up with a brute force method.

Spoiler
challenge140.JPG

challenge140 scatter.JPG

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
kat
12 - Quasar

Challenge #140 graph.PNG

 

Spoiler
I went down the macro route here. Also first time using the interactive chart - great tool!
incorporating the macro, aggregating the data and creating the vizincorporating the macro, aggregating the data and creating the vizbatch macro, one per trialbatch macro, one per trial
jasperlch
12 - Quasar

Solution attached.

GarthG
7 - Meteor

Happy birthday to someone on here!

 

Scatterplot.PNG

CHarrison
8 - Asteroid
Spoiler
Workflow.png     Macro.png

 Studied this one as part of my degree :D

JoBen
11 - Bolide

Cheers! That was a lot of fun!

Spoiler
I ended up having to nest a iterative macro within a batch macro to make this happen. Here is a screen shot of my iterative macro followed by my batch macro.
Iterative MacroIterative MacroBatch MacroBatch Macro
sprodger
8 - Asteroid