matlab-W233

W233 Privacy Engineering Discussion 2
Fall 2021 Probability Theory
In this discussion we will work with a customized die (we will call it “cube”) that you built yourself. This
cube is a regular symmetric cube with 6 faces (like fair dice). On 2 different sides of your cube, you have
the letter A written. Two (other) sides of the cube are blank. On the other 2 sides, you have the values 0 and
1 written.
Problem 1 (The Basics)
In this problem, your experiment is rolling this cube once.
(a) Write out the sample space explicitly.
(b) Write out the event that your cube roll results in 0.
(c) Write out the event that your cube roll results in a blank side.
(d) Write out the event that your cube roll results in either 1 or a blank side.
(e) If you’re interested in defining a probability space that models all possible events, what would be your
event space Write it explicitly.
How many events are in your event space
(f) Describe the event {0,A} in words.
(g) What is the probability of the event {0,A}
W233, Fall 2021 (Daniel Aranki), Discussion 2 1
Problem 2 (Random Variables)
You now enter a wager with your friend, Eva, that is based on a single roll of the cube. The terms of the
wager are as follows:
If the cube roll results in A, you pay Eva $12.
If the cube roll results in 0, Eva pays you $6.
If the cube roll results in 1, Eva pays you $24.
If the cube roll results in an empty face, no money gets exchanged.
(a) In order to analyze the wager, you define a discrete random variable X that models your return from
the wager. What are the possible values for the random variable X
(b) Write out the probability mass function of the random variable X .
(c) What is your expected return from this wager
(d) What is the standard deviation of the random variable X
(e) What is the entropy of the random variable X (use log base 2)
Problem 3 (Conditional Probability)
Eva is not happy with her odds from the wager. She suggests to change the terms of the wager to the
following:
If the cube roll results in A, Eva pays you $6.
If the cube roll results in 1, you pay Eva $6.
If the cube roll results in an empty face or 0, you flip a fair coin:
– If the result is heads, you pay Eva $6.
– If the result is tails, no money is exchanged.
Let X be a random variable modeling the return of the new wager. Let Y be a random variable modeling the
outcome of the cube roll (we will use Y = B when the result of the roll is blank).
(a) Calculate the following probabilities:
W233, Fall 2021 (Daniel Aranki), Discussion 2 2
P(X = 6|Y = 0)
P(X = 6|Y = 1)
P(X = 6|Y = A)
P(X = 6|Y = B)
(b) Use the law of total probability to calculate P(X = 6).
(c) If you know you paid Eva $6, what is the probability that the cube roll result was 0
W233, Fall 2021 (Daniel Aranki), Discussion 2 3