### 统计代写|贝叶斯分析代写Bayesian Analysis代考|Finite and infinite population inference

statistics-lab™ 为您的留学生涯保驾护航 在代写贝叶斯分析Bayesian Analysis方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写贝叶斯分析Bayesian Analysis代写方面经验极为丰富，各种代写贝叶斯分析Bayesian Analysis相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Finite and infinite population inference

In the last example (Exercise 1.8), with the model:
$$(y \mid \theta) \sim \operatorname{Binomial}(n, \theta)$$
$$\theta \sim \operatorname{Beta}(\alpha, \beta),$$
the quantity of interest $\theta$ is the probability of success on a single Bernoulli trial.

This quantity may be thought of as the average of a hypothetically infinite number of Bernoulli trials. For that reason we may refer to derivation of the posterior distribution,
$$(\theta \mid y) \sim \operatorname{Beta}(\alpha+y, \beta+n-y),$$
as infinite population inference.
In contrast, for the ‘buses’ example further above (Exercise 1.6), which involves the model:
\begin{aligned} &f(y \mid \theta)=1 / \theta, y=1, \ldots, \theta \ &f(\theta)=1 / 5, \theta=1, \ldots, 5 \end{aligned}
the quantity of interest $\theta$ represents the number of buses in a population of buses, which of course is finite.
Therefore derivation of the posterior,
$$f(\theta \mid y)=\left{\begin{array}{l} 20 / 47, \theta=3 \ 15 / 47, \theta=4 \ 12 / 47, \theta=5 \end{array}\right.$$
may be termed finite population inference.
Another example of finite population inference is the ‘balls in a box’ example (Exercise 1.7), where the model is:
\begin{aligned} &(y \mid \theta) \sim \operatorname{Hyp}(N, \theta, n) \ &\theta \sim D U(1, \ldots, N) \end{aligned}
and where the quantity of interest $\theta$ is the number of red balls initially in the selected box $(1,2, \ldots, 8$ or 9$)$.

And another example of infinite population inference is the ‘loaded dice’ example (Exercises $1.4$ and $1.5$ ), where the model is:
\begin{aligned} &f(y \mid \theta)=\left(\begin{array}{c} 2 \ y \end{array}\right) \theta^{y}(1-\theta)^{2-y}, y=0,1,2 \ &f(\theta)=10 \theta / 6, \theta=0.1,0.2,0.3 \end{aligned} and where the quantity of interest $\theta$ is the probability of 6 coming up on a single roll of the chosen die (i.e. the average number of $6 s$ that come up on a hypothetically infinite number of rolls of that particular die).

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Continuous data

So far, all the Bayesian models considered have featured data which is modelled using a discrete distribution. (Some of these models have a discrete parameter and some have a continuous parameter.) The following is an example with data that follows a continuous probability distribution. (This example also has a continuous parameter.)
Exercise 1.9 The exponential-exponential model
Suppose $\theta$ has the standard exponential distribution, and the conditional distribution of $y$ given $\theta$ is exponential with mean $1 / \theta$. Find the posterior density of $\theta$ given $y$.
Solution to Exercise $1.9$
The Bayesian model here is: $f(y \mid \theta)=\theta e^{-\theta y}, y>0$
$$f(\theta)=e^{-\theta}, \theta>0 .$$
So $f(\theta \mid y) \propto f(\theta) f(y \mid \theta) \propto e^{-\theta} \times \theta e^{-\theta y}=\theta^{2-1} e^{-\theta(y+1)}, y>0$.
This is the kernel of a gamma distribution with parameters 2 and $y+1$, as per the definitions in Appendix B.2. Thus we may write
$$(\theta \mid y) \sim \operatorname{Gamma}(2, y+1),$$
from which it follows that the posterior density of $\theta$ is
$$f(\theta \mid y)=\frac{(y+1)^{2} \theta^{2-1} e^{-\theta(y+1)}}{\Gamma(2)}, \theta>0 .$$

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Conjugacy

When the prior and posterior distributions are members of the same class of distributions, we say that they form a conjugate pair, or that the prior is conjugate. For example, consider the binomial-beta model:
$$\begin{array}{rll} & (y \mid \theta) \sim \operatorname{Binomial}(n, \theta) & \ & \theta \sim \operatorname{Beta}(\alpha, \beta) & \text { (prior) } \ \Rightarrow & (\theta \mid y) \sim \operatorname{Beta}(\alpha+y, \beta+n-y) & \text { (posterior). } \end{array}$$
Since both prior and posterior are beta, the prior is conjugate.
Likewise, consider the exponential-exponential model:
$$\begin{array}{rll} & f(y \mid \theta)=\theta e^{-\theta y}, y>0 & \ & \left.f(\theta)=e^{-\theta}, \theta>0 \quad \text { (i.e. } \theta \sim \operatorname{Gamma}(1,1)\right) & \text { (prior) } \ \Rightarrow & (\theta \mid y) \sim \operatorname{Gamma}(2, y+1) \quad \text { (posterior). } \end{array}$$

Since both prior and posterior are gamma, the prior is conjugate.
On the other hand, consider the model in the buses example:
$(y \mid \theta) \sim D U(1, \ldots, \theta)$
$\theta \sim D U(1, \ldots, 5)$
$\Rightarrow f(\theta \mid y=3)=\left{\begin{array}{l}20 / 47, \theta=3 \ 15 / 47, \theta=4 \ 12 / 47, \theta=5\end{array}\right.$
The prior is discrete uniform but the posterior is not. So in this case the prior is not conjugate.

Specifying a Bayesian model using a conjugate prior is generally desirable because it can simplify the calculations required.

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Finite and infinite population inference

(是∣θ)∼二项式⁡(n,θ)

θ∼贝塔⁡(一个,b),

(θ∣是)∼贝塔⁡(一个+是,b+n−是),

F(是∣θ)=1/θ,是=1,…,θ F(θ)=1/5,θ=1,…,5

$$f(\theta \mid y)=\left{ 20/47,θ=3 15/47,θ=4 12/47,θ=5\正确的。 米一个是b和吨和r米和dF一世n一世吨和p○p在l一个吨一世○n一世nF和r和nC和.一个n○吨H和r和X一个米pl和○FF一世n一世吨和p○p在l一个吨一世○n一世nF和r和nC和一世s吨H和‘b一个lls一世n一个b○X′和X一个米pl和(和X和rC一世s和1.7),在H和r和吨H和米○d和l一世s: (是∣θ)∼炒作⁡(ñ,θ,n) θ∼D在(1,…,ñ)$$

F(是∣θ)=(2 是)θ是(1−θ)2−是,是=0,1,2 F(θ)=10θ/6,θ=0.1,0.2,0.3以及感兴趣的数量θ是 6 出现在所选骰子的单个掷骰上的概率（即平均数量6s假设该特定骰子的掷骰数是无限的）。

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Continuous data

F(θ)=和−θ,θ>0.

(θ∣是)∼伽玛⁡(2,是+1),

F(θ∣是)=(是+1)2θ2−1和−θ(是+1)Γ(2),θ>0.

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Conjugacy

(是∣θ)∼二项式⁡(n,θ) θ∼贝塔⁡(一个,b) （事先的）  ⇒(θ∣是)∼贝塔⁡(一个+是,b+n−是) （后）。

F(是∣θ)=θ和−θ是,是>0 F(θ)=和−θ,θ>0 （IE θ∼伽玛⁡(1,1)) （事先的）  ⇒(θ∣是)∼伽玛⁡(2,是+1) （后）。

(是∣θ)∼D在(1,…,θ)
θ∼D在(1,…,5)
$\Rightarrow f(\theta \mid y=3)=\left{ 20/47,θ=3 15/47,θ=4 12/47,θ=5\right.$

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。