본문 바로가기

Coursera/Mathematics for ML and Data Science

Probability & Statistics for Machine Learning & Data Science (5)

728x90

Introduction to Probability and Probability Distributions

Quiz

Q1

You flip a fair coin two times. What is the probability of getting one head and one tail in any order?

  1. 1/4
  2. 1/2
  3. 3/4

Answer

더보기

2

There are 4 possible outcomes (HH, HT, TH, or TT) when flipping a coin two times and there are two ways of getting one head and one tail, so the probability is 2/4 = 1/2

Q2

You throw two dice and sum the result, what is the probability the sum is equal to 10?

  1. 1/6
  2. 1/12
  3. 1/36
  4. 1/18

Answer

더보기

2

There are 36 possible outcomes when throwing two dice, but only 3 possible outcomes result in a sum of 10: (4,6), (5,5), and (6,4). Thus, the probability is 3/36 = 1/12

Q3

You throw a six-sided dice 10 times, summing the result in each throw. What is the probability that the sum of results is greater than 10?

Hint: Use the complement rule!

  1. ${1\over6}$
  2. ${1\over6^{10}}$
  3. ${5\over 6}$
  4. ${6^{10}-1\over6^{10}}$

Answer

더보기

4

Let E represent the event of getting a sum greater than 10, therefore the complement (not E) would be getting a sum of 10 or less. If all ten rolled dice get an output of 1, then $P(\text{sum less than}\,10) == P(\text{not}\,E) = {1\over6^{10}}$. To find P(E) you can use the complement rule $P(E) = 1-P(E^c) = 1-{1\over6^{10}}={6^{10}-1\over6^{10}}$

Q4

In an experiment, there are 100 patients. After taking medicine, 50 people experienced a headache and 50 people experienced a fever. The doctors want to find the probability that a patient may experience a headache or fever.

Which of the following statements is true?

  1. Not enough information is given to calculate P(fever or headache)
  2. P(fever or headache) = P(fever) + P(headache) = 1
  3. P(fever or headache) = P(fever) * P(headache) = 0.25

Hint

더보기

Since the problem description never mentions that the events are disjoint, it may be the case where some persons have a headache AND fever. Therefore, the events a patient experiences a headache or a fever are joint events.

Answer

더보기

1

Since the problem description never mentions that the events are disjoint, it may be the case where some persons have a headache AND fever. Therefore, the events a patient experiences a headache or a fever are joint events. To calculate P(fever or headache), you need to know P(fever AND headache)

Q5

A software company conducted a test on their new platform by exposing their users to two versions of the same product.

Number of users that were given version A: 4000

Number of users that were given version B: 5000

Number of users that experienced a bug: 3000

Number of users with version B that experienced a bug: 1500

 

What is the probability that a user tested Version B, given they experienced a bug during testing?

Hint: $P(X \mid Y)=\frac{P(X \cap Y)}{P(Y)}$

  1. 20%
  2. 10%
  3. 40%
  4. 50%

Answer

더보기

4

Great Job! For simplicity, let’s assume that P(B) represents the probability of a user given Version B and E represents the event of getting a bug. That means that $P(B|E)={P(B\cap E)\over P(E)} = {1500\over3000}=0.50$ or 50%

All the information provided is based on the Probability & Statistics for Machine Learning & Data Science | Coursera from DeepLearning.AI

728x90