Exercises

Use these exercises to check the chapter ideas. Work by hand first.

MATH-C07-C-001Exercise: Event probability

A fair die is rolled.

What is the probability of rolling an odd number?

Compute it first, then check your number.

MATH-C07-C-002Exercise: Complement

If P(A) = 0.65, what is P(not A)?

Compute it first, then check your number.

MATH-C07-C-003Exercise: Distribution validity

Can [0.2, 0.3, 0.6] be a valid distribution over three exclusive outcomes?

Answer it first, then check.

MATH-C07-C-004Exercise: Expectation

Suppose X = 2 with probability 0.25 and X = 6 with probability 0.75.

What is E[X]?

Compute it first, then check your number.

MATH-C07-C-005Exercise: Standard deviation

If Var(X) = 16, what is the standard deviation?

Compute it first, then check your number.

MATH-C07-C-006Exercise: Independence

A fair coin is flipped twice.

What is the probability of heads on both flips?

Compute it first, then check your number.

MATH-C07-C-007Exercise: Conditional probability

Suppose P(A and B) = 0.18 and P(B) = 0.6.

What is P(A | B)?

Compute it first, then check your number.

MATH-C07-C-008Exercise: Bayes update

Suppose P(A) = 0.1, P(B | A) = 0.9, and P(B) = 0.3.

What is P(A | B)?

Compute it first, then check your number.

MATH-C07-C-009Exercise: Distribution choice

Which distribution models one yes/no outcome?

Answer it first, then check.

MATH-C07-C-010Exercise: Covariance overclaim

Does positive covariance by itself prove causation?

Answer it first, then check.

MATH-C07-C-011Exercise: Unequal label probabilities

A classifier assigns:

cat: 0.6
dog: 0.3
car: 0.1

What is the probability of the event {dog, car}?

Compute it first, then check your number.

Hint

The labels have unequal probabilities.

Solution

The event probability is:

P({dog,car})=0.3+0.1=0.4P(\{dog, car\}) = 0.3 + 0.1 = 0.4

The labels have unequal probabilities, so we add their probability mass instead of counting two labels out of three.

MATH-C07-C-012Exercise: Overlap correction

Suppose P(A) = 0.5, P(B) = 0.4, and P(A and B) = 0.1.

What is P(A or B)?

Compute it first, then check your number.

Hint

The overlap would be counted twice by P(A) + P(B).

Solution
P(AB)=0.5+0.40.1=0.8P(A \cup B) = 0.5 + 0.4 - 0.1 = 0.8

The overlap is subtracted once because it was included in both P(A) and P(B).

MATH-C07-C-013Exercise: Mini-batch loss

Enter 1 if a mini-batch average loss is usually an estimate of expected loss, not the exact expected loss over all possible examples.

Compute it first, then check your number.

Hint

Ask whether one mini-batch contains the whole population of possible examples.

Solution

Enter 1. A mini-batch average is computed from sampled examples. It estimates the expected loss under the data distribution.

MATH-C07-C-014Exercise: Bayes normalization

In Bayes' rule, enter 1 if the denominator P(B) turns the joint score P(B | A)P(A) into the posterior P(A | B).

Compute it first, then check your number.

Hint

Conditional probability divides by the probability of the condition.

Solution

Enter 1. The numerator is the joint probability of A and evidence B. Dividing by P(B) gives the probability of A after restricting attention to cases where B happened.

Next

Use the hints only after you have tried the exercises. Use the solutions after you can explain where you got stuck.