CS 3190: Foundations of Data Analysis Homework 1
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
CS 3190: Foundations of Data Analysis
Homework 1: Probability and Bayes’Rule
1. [20 points] Using the probability table below for the random variables X and Y , derive the following values
(a) Pr(X 0)
(b) Pr(X = 0 u Y = 0)
(c) Pr(Y = 1 | X = 1)
(d) Are X and Y independent? and explain why.
|
X = 0 |
X = 1 |
Y = 0 |
1/10 |
2/10 |
|
2. [25 points] An “adventurous” track athlete has the following running routine every morning: He takes a bus to a random stop, then hitches a ride, and then runs all the way home. The bus, described by a random variable B , has four stops where the stops are at a distance of 5, 8, 11, and 12 miles from his house – the first three stops have probability 1/6 of occurring. The 12 mile stop has probability 1/2 of occurring. Then the random hitchhiking takes him further from his house a uniformily distributed number of miles on the distances _4 to 5; that is it is represented as a random variable H with pdf described
f (H = x) = ,0(1)/9
if x e [_4, 5]
if x [_4, 5]
Note that a negative distance means that the runner is taken closer to his house. For example, if H = _1, then the runner is taken 1 mile ℃lóser to his home.
What is the expected distance he jogs each morning?
3. [30 points] Consider a data set D with three data points {_1, 0, 1}. Assume the data has Laplacian noise defined with location M and scale 1, so from a model M a data point’s
probability distribution is described by fM (x) = exp(_ |M _ x|). We want to choose M from the space Ω = {_3, _1, 7}. Also assume we have a prior knowledge assumption on the model that Pr(M = _3) = 0.75, Pr(M = _1) = 0.1, and Pr(M = 7) = 0.15. Assuming all data points in D are independent, which model is most likely?
4. [25 points] The Laplace Distribution, indexed by location parameter µ and scale parameter σ has probability density function given by f (x) = exp(_ μ|) for x e R, µ e R and σ > 0. Plot the pdf and cdf of a Laplace random variable with µ = 3 and σ = 1 for values of x is range [_3, 9]. The function scipy .stats .laplace may be useful.
2022-09-14
Probability and Bayes’ Rule