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

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|The Fundamentals of Hypothesis Testing

Hypothesis testing is the process of establishing which out of a number of competing hypotheses is most plausible (i.e., has the greatest probability of being true) given the data or judgments available. Examples of the kind of hypotheses we might be interested in when assessing risk include

• Is a soccer team coach competent or merely lucky?
Is drug “Precision” better than drug “Oomph” in causing weight loss?
• Is investment in U.S. government bonds riskier than investment in gold?
• Is one scientific weather model better able to predict floods than another?
• Are calorific intake and lack of exercise a joint cause of obesity or is it calorific intake alone?
In this section we introduce many of the key principles and issues about hypothesis testing using the following very simple example:
It is suspected that a coin being used in a gambling game is “biased towards Heads’. You have the opportunity to test the hypothesis by observing the coin being tossed 100 times and counting the number of heads you observe. Suppose you observe, say, 61 Heads. What do you conclude?
The main objective of this section is to compare and contrast the classical and Bayesian approaches.

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Using $p$-Values and the Classical Approach

As wc discussed in Chapter 6 , in classical hypothcsis tcsting, wc havc to determine whether the observed data (the 61 heads out of 100 in this case) provides us with sufficient evidence to reject the so-called “null hypothesis” $H_0$ that the coin is unbiased.

Being a good experimenter you will have set a threshold-called a $p$-value-in advance. A typical $p$-value is $0.05$, or $5 \%$ when written as a percentage. The $p$-value is the probability of obtaining a result at least as extreme as the one that was actually observed (in this case 61 heads out of 100 ), assuming that the null hypothesis is true.

There is a simple “correct” way to calculate the $p$-value but, for reasons we will explain later, the $p$-value is often calculated differently in the “classical statistical method” (and that way of calculating it is often wrongly referred to as the definition of $p$-values). The correct way to calculate the probability of obtaining a given number of heads on 100 tosses assuming the null hypothesis is true is as follows:

First note that the null hypothesis (the coin is fair) is simply the assumption that the probability of tossing a head is equal to $0.5$. The probability of tossing any given number of heads in 100 tosses-assuming the probability of tossing a head is $0.5$-is simply computed from the binomial distribution. For example, the probability of tossing exactly 61 heads is (to 3 decimal places):
$$\left(\begin{array}{c} 100 \ 61 \end{array}\right) 0.5^{61} \times 0.5^{39}=0.007$$

But what we really want to know is the probability of tossing at least 61 heads and for this we need the full binomial distribution shown in Figure 12.1. The probability of observing at least 61 heads is the sum of the probability values $61,62,63$, etc. This is actually $1.8 \%$.

It turns out that 59 heads is the necessary “tipping point” for the $p$-value of $5 \%$. That is because the probability of observing at least 58 heads is just over $5 \%$ while the probability of observing at least 59 heads is $4.5 \%$. Since 61 heads is more than 58 we can reject the null hypothesis at the $5 \%$ level. We cannot reject the null hypothesis at the $1 \%$ level (because, as stated above, the probability of observing at least 61 heads is actually $1.8 \%$ ). The tipping point needed for the $1 \%$-value is 62 heads.

## 统计代写|贝叶斯分析代写贝叶斯分析代考|使用$p$ -值和经典方法

$$\left(\begin{array}{c} 100 \ 61 \end{array}\right) 0.5^{61} \times 0.5^{39}=0.007$$

myassignments-help数学代考价格说明

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

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

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

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

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