R code:
theta=0:10*0.1
P=choose(100,62)*theta^(62)*(1-theta)^(100-62)
plot(theta,P,lwd=2,type="p",ylab=expression(P(Y==62,theta),xlab=expression(theta))
Output:
[1] 0.000000e+00 1.034671e-36 5.430828e-20 2.810801e-11
4.477688e-06
[6] 4.472880e-03 7.537790e-02 1.906659e-02 1.528642e-05
8.253201e-14
[11] 0.000000e+00

R code:
theta=0:10*0.1
P=choose(100,62)*theta^(62)*(1-theta)^(100-62)
p1=P/(11*sum(P))
p1
plot(theta,p1,lwd=2,type="p",ylab=expression(p(theta)*P(theta,Y==62)),xlab=expression(theta))
Output:
[1] 0.000000e+00 9.507147e-37 4.990155e-20 2.582725e-11
4.114355e-06
[6] 4.109938e-03 6.926152e-02 1.751947e-02 1.404604e-05
7.583513e-14
[11] 0.000000e+00

(d)
R code:
theta=0:10*0.1
P=choose(100,62)*theta^(62)*(1-theta)^(100-62)
p1=P/(sum(P))
p1
plot(theta,p1,lwd=2,type="p",ylab=expression(p(theta)*P(theta,Y==62)),xlab=expression(theta))
Output:
[1] 0.000000e+00 1.045786e-35 5.489171e-19 2.840997e-10
4.525791e-05
[6] 4.520932e-02 7.618767e-01 1.927142e-01 1.545064e-04
8.341864e-13
[11] 0.000000e+00

(e)
R code:
theta=0:10*0.1
P=theta^(62)*(1-theta)^(38)*choose(100,62)*theta^(62)*(1-theta)^(100-62)
p1=P/(sum(P))
p1
plot(theta,p1,lwd=2,type="p",ylab=expression(p(theta)*P(theta,Y==62)),xlab=expression(theta))
Output:
p1
[1] 0.000000e+00 1.765010e-70 4.862671e-37 1.302576e-19
3.305601e-09
[6] 3.298506e-03 9.367653e-01 5.993614e-02 3.852605e-08
1.123020e-24
[11] 0.000000e+00

1. Suppose we are going to sample n individuals and ask each sampled person whether they...
Suppose we are given two separate groups of data, y1 and y2, which are given by the following: y1: (y1,...yn)^T and y2: (yn+1,yn+2....yn+m)^T such that yi ~ N (µ, σ^2), i = 1,2,...,n and yi ~ N (µ*, σ^2*), i = n+1, n+2...,n+m. Assume all data are mutually independent and IID, and T = transpose. a) if σ^2 = σ^2* = (σ^2), where (σ^2) is known, find the posterior dist p(µ,µ*|y1,y2) and find bayes estimator for µ and µ* (assume...
Problem 3.1 Suppose that XI, X2,... Xn is a random sample of size n is to be taken from a Bermoulli distribution for which the value of the parameter θ is unknown, and the prior distribution of θ is a Beta(α,β) distribution. Represent the mean of this prior distribution as μο=α/(α+p). The posterior distribution of θ is Beta =e+ ΣΧ, β.-β+n-ΣΧ.) a) Show that the mean of the posterior distribution is a weighted average of the form where yn and...
Suppose observations X1, X2,.. are recorded. We assume these to be conditionally independent and exponen- tially distributed given a parameter θ: Xi ~' Exponential(θ), for all i 1, . . . , n. The exponential distribution is controlled by one rate parameter θ > 0, and its density is for r ER+ 1. Plot the graph of p(x:0) for θ 1 in the interval x E [0,4] 2. What is the visual representation of the likelihood of individual data points?...
Question 3 [25] , Yn denote a random sample of size n from a Let Y, Y2, population with an exponential distribution whose density is given by y > 0 if o, otherwise -E70 cumulative distribution function f(y) L ..,Y} denotes the smallest order statistics, show that Y1) = min{Y1, =nYa) 3.1 show that = nY1) is an unbiased estimator for 0. /12/ /13/ 3.2 find the mean square error for MSE(e). 2 f-llays Iat-k)-at 1-P Question 4[25] 4.1 Distinguish...
2. Estimate the probability 0 of teen recidivism based on a study in which there were n- 43 individuals released from incarceration and y 15 re-offenders within 36 months. (a) Using a Beta(2,8) prior for θ, plot p(9), p(y|0) and p( ly) as functions of θ. Find the posterior mean, mode, and standard deviation of. Find a 95% quantile-based confidence interval. (b) Repeat part (a), but using a Beta(8,2) prior for θ (c) Consider the following prior distribution: 1 г(10)...
: Let Yi, ½' . . . , Yn be an iid random sample from an exponential distribution with parameter where θ > 0. Here each Y, represents the lifetime of the ith battery, while θ represents the theoretical average lifetime. The pdf of each Y, is therefore given by fy (y) ei-1,2,...,n Consider the empirical average lifetime of the sample of n batteries given by Let a E R be a nonnegative real number. Consider the event A, defined...
Question 2 a. Show that, for the exponential model with gamma prior, the posterior Π(9121m) under n observations can be computed as the posterior given a single observation xn using the prior q(の는 1101r1:n-1). Give the formula for the parameters (an,ßn) of the posterior ll(θ|X1:n, α0,Ao) as a function of (an-1, Bn-1). b. Visualize the gradual change of shape of the posterior II(01:n, ao, Bo) with increasing n: . Generate n 256 exponentially distributed samples with parameter θ-1. . Use...
4
and 5
samples, the other in small samples. Which is which? Explain. (d) Suppose we know that the 5 values are from a symmetric distribution. Then the sample median is also unbiased and consistent for the population mean. The sample mean has lower variance. Would you prefer to use the sample 4. Suppose Yi, Y, are iid r ables with E(n)-μ, Var(K)-σ2 < oo. For large n, find the approximate 5. Suppose we observe Yi...Yn from a normal distribution...
Bayesian updating Suppose that we have the model y|μ ~ N(μ, τ-1) where τ > 0 is known and μ is an unknown parameter (vi) Suppose that ( of y with a -ab1. Suppose that you observe a realization Compute the posterior distribution value of 1. π(μ|1) and explain how it relates to π(μ). vii) Suppose now that you observe a second realization of y with a value of -1. Update the posterior π(p11) to incorporate this new information.
Bayesian...
Bayesian updating Suppose that we have the model y|μ ~ N(μ, τ-1) where τ > 0 is known and μ is an unknown parameter (vi) Suppose that ( of y with a -ab1. Suppose that you observe a realization Compute the posterior distribution value of 1. π(μ|1) and explain how it relates to π(μ). vii) Suppose now that you observe a second realization of y with a value of -1. Update the posterior π(p11) to incorporate this new information.
Bayesian...