联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2020-05-11 11:25

Bayesian learning and Monte Carlo

Simulations

Homework 1

April 2020

A researcher collects data about electrical engineering students and he is

interested by estimating the proportion, p, of the number of students that study

less than 5 hours per day. Our experimental sample of size 1000 gives us 648

students that study less than 5 hours.

1 Exercise

a. What is the probability distribution of the data? Compute the likelihood

and plot it. Note: take everything in percentage. Add a line of the sample

proportion to the plot. (Hint: use x = seq(1, 100, 1), size = 100 as

parameters in the cumulative distribution).

b. Which continuous probability distribution should be used to describe the

prior of this proportion? Specify the function of R and the support.

2 Exercise

Another researcher claimed that only 40% of students study less than 5 hours,

and this with a variance of 0.2. We want to take this information as a prior for

our study. How can we do that? Represent this graphically.

3 Exercise

Find the posterior distribution of p. Then, plot it together with the prior on

the same graph. What do you notice?

4 Exercise

What are the 95% credible region using HPD and using quantiles? Plot them

together with the posterior on the same graph. (Hint: try a sequence from 3 to

6 by 0.1 for h).

1

5 Exercise

What would happen if we observe a sample of size 10 instead of 1000? And we

observe 6 statisticians that study less than 5 hours.

2


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp