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 #467: Estimate Pi in Designer Desktop

AYXAcademy
Alteryx
Alteryx

Weekly Challenge LMS Banner.png

 

Hi Community Members,

 

A solution to last week’s challenge can be found here

 

This challenge was submitted by Ashley Talai (@aatalai). Thank you, Ashley, for this week’s challenge, as we celebrate Pi Day!

 

Every year in the United States, March 14, or 3/14, is Pi (π) Day! Pi is a mathematical constant represented by the Greek letter pi (π) that is the ratio of a circle’s circumference to its diameter, approximately equal to 3.14159.

Among many methods available to estimate pi, one is called the Monte Carlo simulation. This method helps solve problems by simulating randomness. The Monte Carlo simulation for pi is a probabilistic method used to estimate its value using random sampling. The technique leverages the relationship between a square and an inscribed quarter circle, calculating pi based on the proportion of randomly generated points that fall inside a circle.

The datasets for this challenge contain randomly generated coordinates for X and Y within a square. The scope is limited to 100 rows for each dataset. X and Y are uniformly distributed between 0 and 1.

 

Your task for this challenge is to estimate pi and the percentage of variance from actual pi. To do so, you need to:

  • Combine the X and Y coordinates.
  • Determine whether a point is inside or outside the circle.
  • Calculate the total number of simulations.
  • Calculate the total number of simulations inside the circle.
  • Finally, calculate the estimation of pi and the percentage of variance from actual pi.

HINT: If you find yourself stuck, check out our hints in the workflow file as to how to estimate pi.

 

If you would like more information regarding the Monte Carlo simulation, check out this article: Estimating Pi with Monte Carlo in Excel.

 

Need a refresher? Review the following lessons in Academy to gear up:

 

Good luck!

The Academy Team

Download Start File

 

Download Solution File

 

Source:

 https://en.wikipedia.org/wiki/Pi#:~:text=The%20number%20%CF%80%20(%2Fpa%C9%AA,diameter%2C%20approxim....

 

AYXAcademy
Alteryx
Alteryx

Calling all community members! Submit your idea for weekly challenges and participate for a chance to win prizes! Read the blog to learn more:

 

https://community.alteryx.com/t5/Alter-Nation/Calling-All-Community-Members-Submit-Your-Ideas-for-Ou...

 

niklas_greilinger
10 - Fireball

My solution.

Spoiler
467.png
lwolfie
11 - Bolide

Took some reading, but I got it.

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

That was an interesting one! I love me a bit of Pi 😂. I needed to read the article to help out with calculating the pi estimate. Very interesting. I also ran a larger experiment. Check my solution out if you're curious. 

Spoiler
Workflow
Screenshot 2025-03-10 144125.png

Cheeky bit of extra by running more simulations and having the distribution span from -1 to 1
Screenshot 2025-03-10 145625.png

 

All the best,
BS

LinkedIN

Bulien
mmontgomery
11 - Bolide
11 - Bolide

c467

Spoiler
c467.png
Sebastian_Chaieb2
11 - Bolide
11 - Bolide

I have slightly different score (probably due to PI precision) 

 

Spoiler
467.png

Bennu
8 - Asteroid

Fun puzzle!  I would NEVER have solved it without the Estimating Pi with Monte Carlo in Excel | by Andrew Couch | The Startup | Medium.

I had no idea about estimation pi methods and Monte Carlo, although the name seems appropriate since it is "often used for gambling to estimate probabilities".

I'm guessing the times 4 is due to the 4 distinct areas of the square that fall outside the circle.

(Spooky action at a distance again! I have been thinking of circle related puzzle the past few days and out of the blue this puzzle comes up!)

Spoiler
WC_467.jpg

 

JBevan89
8 - Asteroid
Spoiler
JB Screenshot C467.png

In hindsight I perhaps should have used the spatial tools which I have been learning.  There were are couple of lines where the circle equalled 1.00, so we could debate all day whether the answer should be different - they will be debating Pi calculations for hundreds of years🙄

Kenda
16 - Nebula
16 - Nebula
Spoiler
image.png