2016年11月5日 星期六

R語言:t檢定檢驗樣本平均數

RStudio執行結果:
> #檢驗樣本平均數
> x <- c="" span="">> x
 [1]  1  2  3  4  5  6  7  8  9 10
> t.test(x)

 One Sample t-test

data:  x
t = 5.7446, df = 9, p-value = 0.0002782
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
 3.334149 7.665851
sample estimates:
mean of x 
      5.5 


>


T檢定:t.test => 檢定平均數是否相等
F檢定:var.test
=> 檢定平均數是否相等

ref:
https://sites.google.com/site/rlearningsite/inference/ttest 

http://ccckmit.wikidot.com/st:test1
http://ccckmit.github.io/stbook/htm/test1.html

沒有留言:

張貼留言