Pardon our dust - Alteryx Academy is under construction. Lessons and courses completed on Community from now until January 20th will not be recorded.
Start Free Trial

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!

neilgallen
Quasar

Started down a macro route and then just abandoned it for the brute force method. One I'll come back to when I have more time to work the iterative macro out.

 

Révélation
matching birthday.PNG

birthday scatterplot.PNG

ThoreKonrad
Atome

75% @ 33

90% @ 41

ggruccio
ACE Emeritus
ACE Emeritus

Thought it would run faster based on tests, but it worked!

Birthrate.JPG

Révélation
My solution involved a combination of batch and iterative macros.140_a.JPG140_b.JPG140_c.JPG

 

OliverW
Alteryx Alumni (Retired)

Here is my solution for this weeks challenge.

 

Révélation
Went the way that one can configure how many trials they want to run, so basically I created a Batch Macro to be able to run multiple iterations of the actual process and then put this Batch macro into a regular macro where the user can directly influence the number of trials.

Final Workflow:
grafik.png

Regular Macro to influence number of Trials:
grafik.png

Batch Macro to run the actual process multiple times:
grafik.png

Hary
Météore

Hmm...I know it's not perfect.

 

キャプチャ.PNG

Révélation
MainWorkflow.PNGMacro.PNG
olivia_paquot
Astéroïde

Done !

jparcinski
Météoroïde

 

 

The program is way too slow, but I completed it using nested iterative macros. Also in bigger groups the probability rises a little bit faster and the last few observations have probability equals to 1.

 

 

 

Plot.PNG

JoeS
Alteryx Alumni (Retired)

I went down the route of allowing the data to explode a little rather than the macro route.

 

To be above 75% chance I was getting either group size 32 or 33.

Above 90% was 41 and above.

Plot.png

 

Révélation
Workflow.png
jackieheer
Astéroïde
 
OliverW
Alteryx Alumni (Retired)

Why do you think its slow? So my solution just ran 10000 Simulations in 1:11 (as I configured mine in the way that I just have to enter how many simulations I want to run), haveing an i7 with 16gb ram, so I did not feel that was slow. The recommended 1000 it runs in 8 seconds.

 

By the way, I gotta say, the more simulations you run, the nicer the curve looks like, so 10000 already gives me a very nice shaped curve with almost no breakouts in between.

 

Révélation
See here the curve after I just ran 50000 simulations in 8 minutes
grafik.png

 

 

 

 

 

 

Cheers

Oliver