Applied Nonparametric Statistics-lec2

Posted pxy7896

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Applied Nonparametric Statistics-lec2相关的知识,希望对你有一定的参考价值。

Ref:

https://onlinecourses.science.psu.edu/stat464/print/book/export/html/3


The Binomial Distribution in R:

# return PMF. prob is the probability of success . x can be a list
dbinom(x, size, prob)

# CDF
pbinom(x, size, prob)

# returns a value for a particular percentile
qbinom

The Normal Distribution in R:

# pdf
dnorm(x, mean, sd)
# cdf
pnorm
# percentile
qnorm  

要执行t-test或者查看置信区间,可以这样做:即设置数据、α的值。

> x=c(15, 18,  6,  20, 10, 11,  9,  6, 14, 14, 11,  8, 10,  1,  7,  1, 18, 17, 10, 9)

> t.test(x, conf.level=0.95)

    One Sample t-test

data:  x 
t = 9.0705, df = 19, p-value = 2.473e-08
alternative hypothesis: true mean is not equal to 0 
95 percent confidence interval:
  8.26943 13.23057 
sample estimates:
mean of x 
    10.75

如果是做假设检验,则需要设置μ0和备选假设。  

> t.test(x, alternative="less", mu=10)

查看结果:

p值远大于0.05,所以,不能拒绝原假设。

 

以上是关于Applied Nonparametric Statistics-lec2的主要内容,如果未能解决你的问题,请参考以下文章

Applied Nonparametric Statistics-lec2

Applied Nonparametric Statistics-lec6

Applied Nonparametric Statistics-lec3

Applied Nonparametric Statistics-lec4

Applied Nonparametric Statistics-lec9

STA 442 Methods of Applied Statistics