Hacker Statistics

We will use hacker statistics to calculate the chances of winning a bet. Use random number generators, loops, and Matplotlib to gain a competitive edge!Imagine you are walking the Empire State Building to Data Camp Head Quarters and you are playing a game with a friend. In the Empire State Building bet, your next move depends on the number of eyes you throw with the dice. We can perfectly code this with an if-elif-else construct! Falling down means you have to start again from step 0.

Betting: you will reach step 60

  1. If dice is 1 or 2, you go one step down.
  2. if dice is 3, 4 or 5, you go one step up.
  3. If you throw a 6, you throw the dice again and will walk up the resulting number of steps.
  4. You have 0.1% chance of faling down the stairs.
  5. Can't go below step 0.
  6. The number of eyes is the number of steps you go up.

What is the chance that you will win this bet?

Con toss

Roll the dice

Random Walk

How low can you go?

Visualize the walk

Simulate multiple walks

Visualize all walks

Implement clumsiness

You're a bit clumsy and you have a 0.1% chance of falling down.

Plot the distribution

Calculate the odds