I'm heading to Las Vegas on Monday with about 5,000 of my fellow SAS users for the annual SAS Global Forum. I’m really excited – I’ve not been to Global Forum since 2012, and I am really excited to see my friends again. So I decided to do something Vegas-related and use the two tasks in SAS University Edition that are directly related. Both are under the Combinatorics and Probability group.
The two (well, technically three) tasks we’re looking at are the Combinations / Poker Hand Probability and the Dice Roll Simulation tasks. These tasks do not use external data because they create their own data. So let’s get started with setting up the tasks, and see what we can find!
First, we’ll take a look at the Poker Hand Probability task. The first step, as indicated by the notes in the task, are to run the Combinations task first.
You can modify the number of objects (which defaults to 52, with 5 objects in a set). The task outputs data to the Combo dataset. After the task is run, the Poker Hand task can be opened.
Nothing really to do here – all you need to do is run the task.
So based on a standard 52-card deck, with 5 cards dealt to me, I have just over a 50% chance of getting nothing; one pair is 42%, and from there the percentages rapidly slide down to the practically impossible.
The next task is the Dice Roll Simulation task; all you need to do is specify the number of dice (2 is the default) and the number of rolls (100,000,000 is also the default).
Looking at the output, all I have to say is yikes!
You have a less than 3% chance of rolling a 2 or a 12; your best bets are a 4 or a 10, which each having 8% of coming up.
Now it’s your turn!
Did you find something else interesting in this data? Share in the comments. I’m glad to answer any questions.
Need data for learning?
The SAS Communities Library has a growing supply of free data sources that you can use in your training to become a data scientist. The easiest way to find articles about data sources is to type "Data for learning" in the communities site search field like so:
We publish all articles about free data sources under the Analytics U label in the SAS Communities Library. Want email notifications when we add new content? Subscribe to the Analytics U label by clicking "Find A Community" in the right nav and selecting SAS Communities Library at the bottom of the list. In the Labels box in the right nav, click Analytics U:
Click Analytics U, then select "Subscribe" from the Options menu.