HW0: Probability Fundamentals


Last modified: 2024-02-22 14:42

Status: RELEASED.

How to turn in: Submit PDF to https://www.gradescope.com/courses/712231/assignments/3949307/

Jump to: Problem 1   Problem 2   Problem 3

Questions?: Post to the hw0 topic on the Piazza discussion forums.

Instructions for Preparing your PDF Report

What to turn in: PDF of typeset answers via LaTeX. No handwritten solutions will be accepted, so that grading can be speedy and you get prompt feedback.

Please use provided LaTeX Template: https://github.com/tufts-ml-courses/cs136-24s-assignments/blob/main/unit0_HW/hw0_template.tex

Your PDF should include (in order):

  • Cover page with your full name, estimate of hours spent, and Collaboration statement
  • Problem 1 answer
  • Problem 2 answer
  • Problem 3 answer

When you turn in the PDF to gradescope, mark each part via the in-browser Gradescope annotation tool)

How to write your solutions

Throughout this homework, we are practicing the skills necessary to derive, analyze, and apply formal mathematical statements involving probabiility.

Each step of a mathematical derivation that you turn in should be:

  • legible
  • justified by at least an accompanying short phrase (e.g. "using Bayes rule" or "by the identity 2.15 in the textbook")

Solutions that lack justifications or skip key steps without showing work will receive poor marks.

Problem 1: Bayes Rule

A desk drawer contains 3 sheets of paper, identical in all respects (size etc) except:

  • sheet BB: both sides are colored blue
  • sheet BO: has one blue side and one orange side
  • sheet OO: both sides are colored orange

The sheets are shaken up together in the drawer. One sheet is drawn uniformly at random and put down on the ground. Only one side (the "face up" side) is visible.

Probabilistic model

Let \(S\) be the random variable indicating which sheet is chosen. It is a discrete r.v. with 3 possible values:

  • BB : blue/blue sheet
  • BO : blue/orange sheet
  • OO : orange/orange sheet

Let \(U\) be the random variable indicating which color is observed on the face-up side. This discrete r.v. has 2 possible values:

  • b : for blue
  • o : for orange

1a

Compute the joint probability table for all possible configurations of your two random variables.

Write your answers as a 3x2 table (rows should indicate sheet values for \(S\), columns should indicate face-up colors for \(U\)). Please write each probability entry as a simplified fraction.

1b

You observe one random draw from this process: the chosen sheet's face-up side is blue.

Naturally, you are still uncertain about the color of the face-down side of the chosen sheet.

What is the probability that the face-down side of the chosen sheet is orange?

Problem 2: Conditionals and Marginals

Consider a joint model of 3 random variables:

  • \(H\) : a discrete r.v. with K possible values
  • \(E_1\): a discrete r.v. with A possible values
  • \(E_2\): a discrete r.v. with B possible values

Imagine three possible scenarios, differing in which sets of PMFs are known:

  • (i) \(p(H)\), \(p(E_1, E_2)\), \(p(E_1|H), p(E_2|H)\)
  • (ii) \(p(H)\), \(p(E_1, E_2)\), \(p(E_1, E_2|H)\)
  • (iii) \(p(H)\), \(p(E_1|H), p(E_2|H)\)

For each scenario above, imagine we know the listed PMFs completely. That is, we can query any of the listed functions with concrete values of relevant variables (\(H\), \(E_1\), or \(E_2\)) and obtain the associated probability mass.

2a

Consider any possible joint distribution over \(H, E_1, E_2\).

Suppose we only know the PMFs listed in each scenario (i) - (iii) above. Do we have enough information to calculate \(p(H | E_1, E_2)\)? Provide 1-2 sentences of justification.

2b

Now suppose \(E_1\) and \(E_2\) are conditionally independent given \(H\).

For each set of PMFs above (i) - (iii), does this additional assumption allow us to calculate \(p(H | E_1, E_2)\) ? Provide 1-2 sentences of justification. (If a case could already be handled affirmatively in 2a, just say "already done successfully in 2a").

Problem 3: Expectations

Consider rolling \(N\) dice. Each is a standard 6-sided die, with each side showing a distinct number in the set \(\{1, 2, 3, 4, 5, 6\}\). Each die can be modeled as independent and identically distributed with uniform chance for each of the sides.

You play a game where you get the following points for the outcome of each die:

  • 1000 if you see a 1
  • 500 if you see a 5
  • 0 otherwise

Your total score is the sum of the points from each individual die.

3a

What is the expected total score when using all \(N\) dice? Write your answer as a function of \(N\). Show your work.