Probability

The probability questions and answers in this lesson will help you understand the types of probability questions you can expect in data science interviews.

We'll cover the following...

One hundred people line up to board an airplane. Each has a boarding pass with an assigned seat. However, the first person to board the plane lost their boarding pass and took a random seat. After that, each person takes the assigned seat if it is unoccupied and one of the unoccupied seats at random otherwise. What is the probability that the last person to board gets to sit in their assigned seat?

This problem will be easily solved if you focus on the seat assigned to the first person and the seat assigned to the last person. The first person might sit in the last person's seat or their own. That means we have only two seats available for the last person—their seat and the seat of the first person. Therefore, the probability that the last person will sit in their seat is the total number of seats assigned to them divided by the number of seats they can sit in is calculated as follows:

Hence, the probability that the last person will sit in their seat is the total number of seats assigned to them divided by the number of seats they can sit in is equal to 1/21/2.

Teams A and B are playing a game with seven matches. A has the probability p to win a match. What is the probability of A winning the game in the seventh match?

Team A will win the game during the seventh match if A wins any three of the first six matches and wins the last match. The probability that A wins any three of the first six matches can be calculated using the Binomial formula as a combination of three out of six matches multiplied by the probability of winning in three matches and the probability of not winning in three matches.

The probability that A wins the last match is p:

Therefore, the probability that A wins the game in the seventh match is a combination of three out of six matches multiplied by the probability of winning in four matches and not winning in three.

89% of incoming first-year nursing students are female at a nursing college, and 11% are male. Recent records indicate that 60% of the entering female students will graduate, while 80% of the male students will graduate. If an incoming first-year nursing student is selected at random, what is the probability that the student will graduate and this student is female?

We have to use the Bayes probability formula to calculate the required probability. The Bayes formula is:

It is given in the question that the probability that the student will graduate if she is a female is 0.600.60, and the probability that the student is female is 0.890.89 ...