Ask Claude about this

Foundations: Calculating Probabilities

What is Probability?

At its core, probability measures the likelihood of an event occurring. For situations with a finite number of equally likely outcomes (like rolling fair dice or flipping fair coins), the classical definition of probability is often the most straightforward:

P(Event) = (Number of Favorable Outcomes) / (Total Number of Possible Outcomes)

To apply this, we need to carefully identify all possible outcomes (the sample space) and then count how many of those outcomes match the event we're interested in.

Sample Spaces and Events

The sample space (S) is the set of all possible outcomes of a random experiment. An event (E) is any subset of the sample space. For problems involving multiple independent actions (like rolling two dice), the total number of outcomes in the sample space is often found by multiplying the number of outcomes for each action.

Two Dice - Probability Sum is 7

EASY

You roll two standard fair six-sided dice. What is the probability that the sum of the numbers shown on the two dice equals 7?

Challenge Yourself: Using the same two dice, what is the probability that the sum is 4? What about a sum greater than 10?

 

Nerchuko Academy · Free DS Interview Prep