what are the Odds of Winning Powerball Grand Prize with R

In this R Tutorial we will perform Powerball data analyses based upon the odds of winning Powerball. Powerball is as cheap as $2 per ticket. That’s half the price of a cup de coffee. You would get the greatest reward if your $2 ticket hits the Jackpot.

What are the odds of winning this game?

* Grand Prize -> Match 5 white ball and Powerball -> 1 of 292,201,338.00

* $1,000,000 -> Match Five White Balls -> 1 In 11,688,053.52

* $50,000 -> Match the 4 white balls and Powerball -> One in 913,129.18

* $100 -> Match 4 white ball -> 1 of 36,525.17

* $100 -> Match 3 White Balls and the Powerball. 1 in 14,494.11

* $7 -> Match Three White Balls -> 1 In 579.76

* $7 -> Match two white balls and the Powerball. 1 in 701.33

* $4 -> Match 1 whiteball, Powerball -> One in 91.98

* $4 -> Play the Powerball 1 in 38.32

The odds of winning Grand Prize are 1:192,201.338. However it would be double the cost to purchase all versions of the tickets as each ticket is $2.

What is the Powerball and how does it work?

Powerball is made up of 69 balls. 5 Powerball winners will be chosen. To win the Grand Prize, there will be 26 red balls called Powerball. These 6 balls must match the drawing. Powerball drawings take place on Wednesdays and Saturdays at 10:59 p.m. EST. We draw five white balls (with 69 balls) and one redball (with 26 red balls).

Powerball Match and Prize Variables

Below are the variables (from top prize to none prize) and the outputs for each.

R else if() assertions

To create a function that checks if a prize is being won, you will need a functional else() statement. It will allow you to check multiple conditions. You can use the variables to create a function that prints out which prize winner or loser you have.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

HOW TO FIND UNIQUE VALUES AND THEIR PERCENTAGE DISTRIBUTIONS USING VALUE_COUNTS() IN PYTHON

How to scrape instagram comments in 5 minutes using Selenium

The five-number summary: a bird’s eye view of your data.

Why Snowflake Data Cloud over Lakehouse architecture

Traffic Data Analysis with Apache Spark Based on Autonomous Transport Vehicle Data

6 Data Science Certificates To Level Up Your Career

Feature Engineering - Part 1

Using Outliers to Find Bad Data

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sinagaindah

Sinagaindah

More from Medium

Understanding Machine Learning and its Basic WorkFlow-1

In Theory… The Power of Influence is Mighty

What is Tradocaps?