假设检验(z-test)

题目:

We’re trying to test whether a new,low-fat diet actually helps obese people lose weight.100 randomly assigned obese people are assigned to group 1 and put on the low fat diet.Another 100 randomly assigned obese people are assigned to group 2 and put on a diet of approximately the same amount of food,but not as low in fat.After 4 months,the mean weight loss was 9.31 lbs. for group 1(s=4.67) and 7.40 lbs.(s=4.04) for group 2.

low-fat: x1¯=9.31 s1=4.67
control: x2¯=7.4 s2=4.04
x1¯x2¯=1.91

对于“sampling distribution of difference of means”
期望: μx1¯x2¯
方差: σ2x1¯x2¯
又有公式

σ2x1¯x2¯=σ2x1x2n

其中, σ2x1x2 为population的variance of difference

置信区间:
以95%的confidence interval为例:
因为是two-tails combine一共占5%,因此,需要在z-table中找到值为2.5%的,此时,z=1.96
此时,置信区间的意义就有了:
我们能说:
95% chance that μx1¯x2¯ is within 1.96 σ2x1¯x2¯ of 1.91.

接下来的事就是计算 σ2x1¯x2¯
上面提到的计算这个未知量的公式,此处并不能用,因为并没有一个sample是关于 x1x2 的,因此,无法用单个sample的 s2 来作为population的 σ2 估计,再使用公式推出sampling distribution的 σ2x¯

而由已知量入手,

σ2x1¯x2¯=σ2x1¯+σ2x2¯=σ2x1¯100+σ2x2¯100=s21100+s22100σx1¯x2¯=0.617

最后,可以说成:
95% confidence interval for μx1¯x2¯ 1.91 ± 1.21

假设检验:

先设定significance level=5%

null hypothesis: low-fat diet dose nothing.

H0:μ1μ2=0=>μx1¯x2¯=0
H1:μ1μ2>0=>μx1¯x2¯>0

首先,根据z-table找出5%的z值,为1.65

z=σx1¯x2¯

zσx1¯x2¯+0=1.01805<μx1¯x2¯=1.91

因此拒绝假设

(其实分母原始写法为:

s2n

)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值