首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
COMP3670编程辅导、辅导Java,c++程序
项目预算:
开发周期:
发布时间:
要求地区:
The Austalian National University Semester 2, 2020
Research School of Computer Science Assignment 4 Theory Questions
Liang Zheng
COMP3670: Introduction to Machine Learning
Errata: All corrections are in red.
Note: For the purposes of this assignment, if X is a random variable we let pX denote the probability
density function (pdf) of X, FX to denote it’s cumulative distribution function, and P to denote
probabilities. These can all be related as follows:
P (X ≤ x) = FX(x) =∫ x∞pX(z)dz
P (a ≤ X ≤ b) = FX(b)? FX(a) =∫ bapX(z)dz
Often, we will simply write pX as p, where it’s clear what random variable the distribution refers to.
You should show your derivations, but you may use a computer algebra system (CAS) to assist
with integration or differentiation. We are not assessing your ability to integrate/differentiate here.1.
Question 1 Continuous Bayesian Inference 5+5+2+4+4+6+6+5=37 credits
Let X be a random variable representing the outcome of a biased coin with possible outcomes X =
{0, 1}, x ∈ X . The bias of the coin is itself controlled by a random variable Θ, with outcomes2 θ ∈ θ,
where
θ = {θ ∈ R : 0 ≤ θ ≤ 1}
The two random variables are related by the following conditional probability distribution function of
X given Θ.
p(X = 1 | Θ = θ) = θ
p(X = 0 | Θ = θ) = 1? θ
We can use p(X = 1 | θ) as a shorthand for p(X = 1 | Θ = θ).
We wish to learn what θ is, based on experiments by flipping the coin.
We flip the coin a number of times.3 After each coin flip, we update the probability distribution for θ
to reflect our new belief of the distribution on θ, based on evidence.
Suppose we flip the coin n times, and obtain the sequence of coin flips 4 x1:n.
a) Compute the new PDF for θ after having observed n consecutive ones (that is, x1:n is a sequence
where ?i.xi = 1), for an arbitrary prior pdf p(θ). Simplify your answer as much as possible.
b) Compute the new PDF for θ after having observed n consecutive zeros, (that is, x1:n is a sequence
where ?i.xi = 0) for an arbitrary prior pdf p(θ). Simplify your answer as much as possible.
c) Compute p(θ|x1:n = 1n) for the uniform prior p(θ) = 1.
d) Compute the expected value μn of θ after observing n consecutive ones, with a uniform prior
p(θ) = 1. Provide intuition explaining the behaviour of μn as n→∞.
1For example, asserting that
∫ 10x2(x3 + 2x)dx = 2/3 with no working out is adequate, as you could just plug the
integral into Wolfram Alpha using the command Integrate[x^2(x^3 + 2x),{x,0,1}]
2For example, a value of θ = 1 represents a coin with 1 on both sides. A value of θ = 0 represnts a coin with 0 on
both sides, and θ = 1/2 represents a fair, unbaised coin.
3The coin flips are independent and identically distributed (i.i.d).
4We write x1:n as shorthand for the sequence x1x2 . . . xn.
1
e) Compute the variance σ2n of the distribution of θ after observing n consecutive ones, with a uniform
prior p(θ) = 1. Provide intuition explaining the behaviour of σ2n as n→∞.
f) Compute the maximum a posteriori estimation θMAPn of the distribution on θ after observing
n consecutive ones, with a uniform prior p(θ) = 1. Provide intuition explaining how θMAPn varies
with n.
g) Given we have observed n consecutive coin flips of ones in a row, what do you think would be a
better choice for the best guess of the true value of θ? μn or θMAP ? Justify your answer. (Assume
p(θ) = 1.)
h) Plot the probability distributions p(θ|x1:n = 1) over the interval 0 ≤ θ ≤ 1 for n ∈ {0, 1, 2, 3, 4} to
compare them. Assume p(θ) = 1.
Question 2 Bayesian Inference on Imperfect Information (4+5+8+4+4=25 credits)
We have a Bayesian agent running on a computer, trying to learn information about what the pa-
rameter θ could be in the coin flip problem, based on observations through a noisy camera. The noisy
camera takes a photo of each coin flip and reports back if the result was a 0 or a 1. Unfortunately, the
camera is not perfect, and sometimes reports the wrong value.5 The probability that the camera makes
mistakes is controlled by two parameters α and β, that control the likelihood of correctly reporting a
zero, and a one, respectively. Letting X denote the true outcome of the coin, and X denoting what
the camera reported back, we can draw the relationship between X and X? as shown.
We would now like to investigate what posterior distributions are obtained, as a function of the
parameters α and β.
a) (5 credits) Briefly comment about how the camera behaves for α = β = 1, for α = β = 1/2, and
for α = β = 0. For each of these cases, how would you expect this would change how the agent
updates it’s prior to a posterior on θ, given an observation of X?? (No equations required.) You
shouldn’t need any assumptions about p(θ) for this question.
b) (10 credits) Compute p(X? = x|θ) for all x ∈ {0, 1}.
5The errors made by the camera are i.i.d, in that past camera outputs do not affect future camera outputs.
2
c) (15 credits) The coin is flipped, and the camera reports seeing a one. (i.e. that X? = 1.)
Given an arbitrary prior p(θ), compute the posterior p(θ|X? = 1). What does p(θ|X? = 1) simplify
to when α = β = 1? When α = β = 1/2? When α = β = 0? Explain your observations.
d) Compute p(θ|X? = 1) for the uniform prior p(θ) = 1. Simplify it under the assumption that β := α.
e) (10 credits) Let β = α. Plot p(θ|X? = 1) as a function of θ, for all α ∈ {0, 14 , 24 , 34 , 1} on the same
graph to compare them. Comment on how the shape of the distribution changes with α. Explain
your observations. (Assume p(θ) = 1.)
Question 3 Relating Random Variables (10+7+5+16=38 credits)
A casino offers a new game. Let X ~ fX be a random variable on (0, 1] with pdf pX . Let Y be a
random variable on [1,∞) such that Y = 1/X. A random number c is sampled from Y , and the player
guesses a number m ∈ [1,∞). If the player’s guess m was lower than c, then the player wins m ? 1
dollars from the casino (which means higher guesses pay out more money). But if the player guessed
too high, (m ≥ c), they go bust, and have to pay the casino 1 dollar.
a) Show that the probability density function pY for Y is given by
pY (y) =1y2pX(1y)b) Hence, or otherwise, compute the expected profit for the player under this game. Your answer will
be in terms of m and pX , and should be as simplified as possible.
c) Suppose the casino chooses a uniform distribution over (0, 1] for X, that is,
pX(x) =
{
1 0 < x ≤ 1
0 otherwise
What strategy should the player use to maximise their expected profit?
d) Find a pdf pX : (0, 1] → R such that for any B > 0, there exists a corresponding player guess m
such that the expected profit for the player is at least B. (That is, prove that the expected profit
for pX , as a function of m, is unbounded.)
Make sure that your choice for pX is a valid pdf, i.e. it should satisfy∫ 1
0
pX(x)dx = 1 and pX(x) ≥ 0
You should also briefly mention how you came up with your choice for pX .
Hint: We want X to be extremely biased towards small values, so that Y is likely to be large, and
the player can choose higher values of m without going bust.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
urba6006代写、java/c++编程语...
2024-12-26
代做program、代写python编程语...
2024-12-26
代写dts207tc、sql编程语言代做
2024-12-25
cs209a代做、java程序设计代写
2024-12-25
cs305程序代做、代写python程序...
2024-12-25
代写csc1001、代做python设计程...
2024-12-24
代写practice test preparatio...
2024-12-24
代写bre2031 – environmental...
2024-12-24
代写ece5550: applied kalman ...
2024-12-24
代做conmgnt 7049 – measurem...
2024-12-24
代写ece3700j introduction to...
2024-12-24
代做adad9311 designing the e...
2024-12-24
代做comp5618 - applied cyber...
2024-12-24
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!