HW0: Probability Fundamentals


Last modified: 2023-03-01 22:52

Due date: Thu Jan 26 at 11:59pm ET

Status: RELEASED

How to turn in: Submit PDF to https://www.gradescope.com/courses/496674/assignments/2581659/

Jump to: Problem 1   Problem 2

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-23s-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

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 1: both sides are colored orange
  • sheet 2: both sides are colored blue
  • sheet 3: has one blue side and one orange side

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

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

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

1a

Formalize this problem by defining all relevant random variables. For each variable, clearly define the possible values.

1b

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

Write your answers as a 3x2 table (rows should match to sheets, columns should match to face-up colors).

1c

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 observed value \(e_1\)
  • \(E_2\): a discrete r.v. with observed value \(e_2\)

Imagine three possible sets of PMFs we could know completely:

  • (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)\)

2a

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

For each set of PMFs above (i) - (iii), 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.