User talk:137.215.33.195

Please stop making test edits to Wikipedia. It is considered vandalism, which, under Wikipedia policy, can lead to being blocked from editing. If you would like to experiment again, please use the sandbox. OhNo itsJamie Talk 13:03, 27 August 2019 (UTC)

alpha = 50 beta = 2

n = 5 Z = n/(beta+n) Z
 * 1) Question 1:

n = 10 Z = n/(beta+n) Z

n = 15 Z = n/(beta+n) Z

X = c(102,98,94,99,91) n = 5 Z = n/(beta+n)
 * 1) Question 2:

Z*mean(X) + (1-Z)*alpha/beta


 * 1) Question 3:
 * No, the prior predicts an average number
 * 1) of claims around 25.
 * 2) The observed average is substantially larger.

n = 1000
 * 1) Question 4:

lambda = rgamma(n,alpha,beta) X     = rpois(n,lambda) mean(X) var(X)
 * 1) First way:

Y = rep(0,n) for (j in 1:n){ lambda = rgamma(1,alpha,beta) Y[j]  = rpois(1,lambda) } mean(Y) var(Y)
 * 1) Second way: