Get startedGet started for free

What are the chances?

1. What are the chances?

People often talk about chance, like what are the chances of closing a sale, of rain tomorrow, or of winning a game? Accurately estimating the chance of an event outcome can be hugely beneficial in many areas of life! But how exactly do we measure chance?

2. Measuring chance

We can use probability. We calculate the probability of some event by taking the number of ways the event can happen and dividing it by the total number of possible outcomes. For example, if we flip a coin, it can land on either heads or tails. To get the probability of the coin landing on heads, we divide the one way to get heads by the two possible outcomes, heads and tails. This gives us one-half or a fifty percent chance of getting heads. Probability is always between zero and 100 percent. If the probability of something is zero, it's impossible, and if the probability is 100%, it will certainly happen.

3. Assigning salespeople

Let's look at a more practical scenario. There's a meeting coming up with a potential client, and we want to send someone from the sales team to attend. We'll put each person's name in a box and select one randomly to decide who goes to the meeting. This is known as sampling, as we take a sample from the names in the box.

4. Assigning salespeople

Brian's name gets selected. The probability of choosing Brian is one in four, or 25%.

5. Morning meeting

What if we have two meetings at different times? Then we can randomly select any of our four team members for each meeting. This means the name picked for the first meeting does not affect the chances of selecting that person again for the second meeting. For example, if Brian's name is selected for a meeting in the morning,

6. Afternoon meeting

the probability that Brian is picked for a meeting in the afternoon remains 25%. This is called sampling with replacement, as the sample is placed back into the selection and can be chosen again.

7. Independent probability

This is an example of independent probability, where the probability of an event does not change based on the outcome of a previous event.

8. Online retail sales

We will explore one more example using an online retail sales dataset. Here is a preview of the first five rows to familiarize ourselves: Each row contains an order. Product Type is the category of the product sold in that order, with values such as Basket or Jewelry. Each order is for a single product type. Net Quantity is the number of products sold in the order. Gross Sales is the number of dollars generated for the order, and Discounts is the dollar value deducted from the sale. Returns is the number of dollars given back to the customer due to returned items, and Net Sales is the total amount of dollars generated by the order after factoring in discounts and returns.

9. Probability of an order for a jewelry product

So, what if we want to find the probability that the next order will be for a jewelry product? We can group all orders by product type and count the number of orders for each product. Here are the five most popular product types based on the number of orders for each type. There are lots of orders for small quantities of other products that are not displayed, but the total number of orders, 1767, is included at the bottom of the table.

10. Probability of an order for a jewelry product

To find the probability of the next order being for a jewelry product we divide the number of orders for jewelry products by the total number of orders. There were 1767 orders, of which 210 were for jewelry products, so we divide 210 by 1767. The probability of the next order being for a jewelry product is just under 12%.

11. Probabilities for all product types

We can repeat this process for all product types to see the chance of the next order being for a given product type. Here are the probabilities of receiving an order for any of the five most popular product types!

12. Let's practice!

What are the chances we will enjoy the next couple of exercises?