# 统计代写|概率与统计作业代写Probability and Statistics代考|MATH107

## 统计代写|概率与统计作业代写Probability and Statistics代考|Comparing Sampling Plans Using R

In practice we may use the computer to help us evaluate, in particular when we want to use more complex sampling plans, to study other population parameters, or when we want to investigate other estimators. For instance, we may want to select a sample of high-school children again, similar to the data we have in our dataset high-school.csv, to investigate if television watching behavior has changed since the year 2000. We could take the same sampling approach as before, but we could also study alternative sampling procedures that may be more complex and could not be studied previously, since a historical dataset was not available then. Improving the sampling plan, i.e., reducing MSE, can help us lower the number of samples and costs. Based on the historical data we may investigate if stratification on grades helps us reduce the standard error, or maybe we can reduce the number of schools with an increase in the number of students within schools. These types of evaluations may be mathematically difficult, in particular if several other stratifications and cluster samples are already involved, but it may not be so difficult to study these plans with the computer (now that some data are available). In other cases we may even generate our own data or extent the historical data to help evaluate sampling plans and estimators.

Here we will provide a generic approach with $\mathrm{R}$ to be able to investigate sampling plans and estimators. The $\mathrm{R}$ codes are relatively straightforward, but they can be extended and made more complex to address specific situations. The goal is to understand the structure, and not the possible sophistication of sampling and programming. Recall that this type of computer approach requires historical data or some knowledge of the population to be able to mimic data from the population. The general structure is the following:

1. generate population data,
2. execute a sampling plan and generate sample data,
3. compute a statistic using the sample data, and
4. execute these steps a large number of times and compute bias, MSE and SE using the results.

Under the assumption that we have appropriately created the population data, this procedure will give us (approximately) the values for bias, MSE, and SE when we repeat the procedure many times. To illustrate this it may be easiest to think about a simple random sample. Each time we draw a sample from the population with the computer we draw in principle from the set $S_1, S_2, \ldots \ldots, S_K$ with their probabilities $\pi_1, \pi_2, \pi_3, \ldots, \pi_K$. Thus if we repeat this procedure many times, we will see all sample sets $S_1, S_2, \ldots . ., S_K$ appear in the proper proportions $\pi_1, \pi_2, \pi_3, \ldots, \pi_K$.

## 统计代写|概率与统计作业代写Probability and Statistics代考|Estimation of the Population Mean

For estimators of the population mean $\mu=\sum_{i=1}^N x_i / N$ in the form of weighted averages, the bias, MSE, and SE can be formulated mathematically when the sampling plan is simple random sampling, systematic sampling, stratified sampling, and cluster sampling. When we obtain the values $x_1, x_2, \ldots, x_n$ from sample $S_k$, we may “average” them in different ways. We may feel that some observations are more important or reliable than other observations and we may want to use this in averaging. This can be done using a weighted average, where the weights would help quantify how much more one observation is valued over other observations. A weighted average for the data observed from sample $S_k$ is now defined as $\bar{x}{w, k}=\sum{i \in S_k} w_{i k} x_i$, with $\sum_{i \in S_k} w_{i k}=1$. Note that the weights need to add up to one and that the weights may in principle depend on the sample set $S_k$, although we will restrict ourselves to weights that are independent of $S_k$, i.e., $w_{i k}=w_i$. If we choose weight $w_1=2 / n$ and weight $w_2=1 /(2 n)$, the first observation is four times as important as the second observation. If every observation has the same weight, we obtain the arithmetic average $\bar{x}k=\sum{i \in S_k} x_i / n$. In practice, weights can depend on other variables like sex and age, in particular in stratified sampling. In this section we will describe the bias, MSE, and SE for weighted averages under the four sampling plans. The SE and MSE depend on population variances, which we will define in the following subsections. Since we have the calculation rule $\mathrm{MSE}=$ bias $^2+\mathrm{SE}^2$ we will mainly focus on bias and MSE. A summary of the theory is provided in Table $2.2$ (Cochran 2007).

Recall that for simple random sampling we are drawing a sample of size $n$ from a population of size $N$ where the number of possible samples $K$ is given by $N ! /[n !(N-n) !]$ and each sample $S_k$ is selected with probability $1 / K$ (see Sect. 2.4.1). In this sampling plan, it can be demonstrated that the arithmetic average is the only unbiased estimator for the population mean in the class of weighted averages (see Cochran 2007). Thus we will focus on the arithmetic average $\bar{x}_k$ for simple random sampling.

# 概率与统计代考

## 统计代写|概率与统计作业代写概率与统计代考|比较抽样方案使用R

.使用R

1. 生成种群数据，
2. 执行抽样计划并生成样本数据，
3. 使用样本数据计算统计量，
4. 大量执行这些步骤并使用结果计算偏差、MSE和SE

假设我们已经适当地创建了总体数据，当我们多次重复该过程时，该过程将(近似地)为我们提供偏差、MSE和SE的值。为了说明这一点，最简单的方法是考虑一个简单的随机样本。每次我们用计算机从总体中抽取样本时，原则上我们从集合$S_1, S_2, \ldots \ldots, S_K$中抽取概率$\pi_1, \pi_2, \pi_3, \ldots, \pi_K$。因此，如果我们多次重复这个过程，我们将看到所有的样本集$S_1, S_2, \ldots . ., S_K$以适当的比例$\pi_1, \pi_2, \pi_3, \ldots, \pi_K$ .

## 统计代写|概率与统计作业代写Probability and Statistics代考|Estimation of the Population Mean

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: