# Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

## Challenge #141: Examination Data Simulation

Highlighted
8 - Asteroid

Hi! Here my solution 🙂

Spoiler
Highlighted
6 - Meteoroid
Spoiler

Sadly our IT has not installed us the Predictive Tools at the moment but i wanted to see if i can do the same in Python. I have to say my solution is done without spending too much work so it could be done much better. Hopefully when we get the Tools i can compare both ways.

Highlighted
Moira
Spoiler
Definitely have never used this tool before!

Highlighted
Alteryx Certified Partner

Great way to learn new ways of using tools !

Spoiler

Highlighted
Alteryx Partner

Solution.

Highlighted
Alteryx Certified Partner

28

Spoiler
Highlighted
Alteryx Partner
Spoiler

I really like the simulation sampling tool! Very useful tool
Highlighted
Alteryx Certified Partner

I missed the hints in the description so I could have handled this better, but still...

Spoiler
I used some R code to generate the data:
Spoiler

#set threshold for 1 person that can reasonably be expected to be >.9 or <.5
z <- qnorm(0.9995)

#generate normally distributed data where 99.9% of samples are between .5 and .9
Score <- rnorm(1000, mean=0.7, sd=(0.2/z))

#reset values below 0.5 to 0.5 and above 0.9 to 0.9
Score <- ifelse(Score < 0.5, 0.5, Score)
Score <- ifelse(Score > 0.9, 0.9, Score)

#ensure the dataset is 1 column with 1000 rows (from 1 vector to 1 dataframe)
Score <- data.frame(Score)

#write to Alteryx
write.Alteryx(Score, 1)

And I paired it with the existing table and visualised the end result:
Spoiler
This was the workflow:
Spoiler
Highlighted
Alteryx

I was wondering what those simulation tools did...

Highlighted
12 - Quasar

My solution:

Spoiler

The Simulation Sampling tool is going right in my back pocket. I'll be using this in the future. Thanks!