Q#78: Choosing two ice creams

AI Ice Cream

Suppose you enter an ice cream store. They sell two types of ice cream: soft serve and frozen yogurt. Additionally, there are 10 flavors of soft serve and 13 flavors of frozen yogurt. You’re really hungry, so you decide you can order and eat two ice creams before they melt, but are facing some decision fatigue given the amount of choices. How many ways are there to choose exactly two ice creams from the store? Figuring this out should help quantify that decision fatigue.

TRY IT YOURSELF

ANSWER

Oh no, its our old friend (or Enemy) Probability Theory. Unfortunately, as a Data Scientist, statistics are both your best friend and your worst enemy. In this question, we are as a simple question on probability theory, specifically combinations.

The formula for calculating combinations is given by:

nCr = n! / (r! * (n — r)!)

Where n represents the total number of items available, r represents the number of items we want to choose, and the exclamation mark denotes factorial.

Let’s break it down. For the soft serve, we have 10 flavors to choose from, and we want to select two. Plugging these values into the formula, we get:

10C2 = 10! / (2! * (10–2)!)

Simplifying further:

10C2 = 10! / (2! * 8!)

Now, the factorial of a number is the product of all positive integers less than or equal to that number. Applying this concept:

10C2 = (10 * 9 * 8!) / (2! * 8!)

The 8! on the numerator and denominator cancels out:

10C2 = (10 * 9) / (2 * 1)

10C2 = 45

So, there are 45 ways to choose two flavors of soft serve.

We are not yet done though, we also have to calculate the combinations for the frozen yogurt. We have 13 flavors available and want to select two:

13C2 = 13! / (2! * (13–2)!)

Which following the process above, simplifies to:

13C2 = (13 * 12) / (2 * 1) = 78

Therefore, there are 78 ways to choose two flavors of frozen yogurt.

To find the total number of ways to choose exactly two ice creams, we sum up the combinations of soft serve and frozen yogurt:

Total = 45 + 78 = 123

--

--