# Introduction to probability using cookies!

The first step to understanding probability is the fact that in its most basic form, it provides the percent chance that something will happen. The formula for this can be written like this:

Let’s break down the big scary formula into its basic components. Using the cookie example provided in the above video, we have 12 (*n*) total cookies, and are looking for the probability of picking one of the 4 (*x*) chocolate cookies.

- P(
*x*) is the probability of getting a chocolate cookie, where P is the probability of getting a particular type of cookie, and*x*represents chocolate cookies. - The variable
*x*represents the total number of times the desired outcome (a chocolate cookie) could occur, in this case 4. - The variable
*n*is the total number of possible outcomes, which in this case is the total number of cookies (12).

**Now Lets do some math!**

For this example, the probability of getting a yummy chocolate cookie is 33.33%. Unfortunately, these results also mean that we have a 66.66% chance of not getting one!