Description
In addition, compute the Bayes factor of Model 0 versus Model 1 in (a)-(c).
[Remark: Use paper and pencil to solve this problem, write down the detailed calculation process.]
Problem 2. Write your OWN code to simulate 100 samples from (a) Exponential distribution: Exp(λ) with λ = 2.8.
(b) Normal distribution using BOTH Box-Muller transformation AND central limit theorem: N(µ,σ2) with (a) (µ,σ2) = (0,1) and (b) (µ,σ2) = (3.5,2).
(c) Log-normal distribution LN(µ,σ2) with (a) (µ,σ2) = (0,1) and (b) (µ,σ2) = (−4,2).
(d) Binomial Distribution: Binomial(n,p) with n = 10, p = 0.24.
In each case, plot the density of sample sets to illustrate (validate) your simulated samples.
For part (b), read the attached slides to learn the two methods.
[Remark: Use a computer to simulate those data; explain your code and results carefully]
Problem 3. Write a computing code and use the rejection sampling method to simulate a set of 150 samples from the following distribution with density
where ϕ(x) is the density function of standard normal distribution N(0,1) and . Draw the density of those 150 samples.
[Remark: Use a computer to simulate those data; explain your code and results carefully]
1



![MSDS 954-567 - Problem 1. (a) Generate 200 replicas of uniform [−π,π] and 200 normal with mean 0 and standard deviation 1/8. Set data x from this uniform, error ϵ from this normal distribution. The response y is by model: Solved](https://samlamcoders.com/wp-content/uploads/2024/02/CodingLab.jpg)
Reviews
There are no reviews yet.