DATA2002 - WEEK5

Normality assumption

For a large enough sample size, the normality assumption is not as important as you can usually rely on the central limit theorem.

Small sample size: check boxplots (looking for symmetry) and QQ plots (looking for a straight line). If we're checking for normality in a boxplot, then we're mostly looking for symmetry. If we're checking for normality in a QQ plot, then we're mostly looking for points that lie reasonably close to the line.

Sign test

 If we can safely assume that the differences are normally distributed, we can use a paired -test, to test if the population mean difference equals zero, H0 : \mu_d = 0.

If we do not feel comfortable making the normality assumption, we can still analyse the differences using the sign test.

 

binom.test(t0, n, p = 0.5, alternative = "greater", conf.level = 0.95)

Wilcoxon signed-rank test

 

 

 

 

直接R:

wilcox.test(y, x, alternative = "greater", paired = TRUE)
#直接给d代替y和x也可

Normal approximation (if there are ties)

 

Wilcoxon rank-sum test

A non-parametric test to compare means of two independent samples

Relaxes normality assumption (like sign and Wilcoxon sign-rank tests)

Also relaxes the assumption of symmetry

Suppose the samples X1,X2...Xn and Y1,Y2...Yn are taken from two distinct populations that follow the same kind of distribution but differ in location. That is, μx = μy + θ , where is the population mean of X, μy is the population mean of and is a location shift parameter.

Calculate p-value: no ties on the data

R:wilcox.test( trails~分类的column, data = ...,alternative = ...)

 Calculate p-value: there are ties on the data

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值