描述性統計量相關
#平均值
=average()
#最大值
=max()
#最小值
=min()
#中位值
=median()
假設檢驗相關
#F檢驗(目的是檢驗兩組數A, B的方差是否有顯著性差異)
=f.test(A, B)
#T檢驗(目的是檢驗兩組數A, B的平均值是否有顯著性差異)
=t.test(A, B, tails, type)
tails可選1或者2,1代表單尾,2代表雙尾,大部分情況選雙尾。選擇标準如下:
The selection of a one or two-tailed t-test must be made before the experiment is performed. It is not “cricket” to find a that tOBS = -1.92, and then say “I really meant to do a one-tailed t-test.” Because reviewers of articles submitted for publication are sometimes suspicious when a one-tailed t-test is done, the recommendation is that if there is any doubt, a two-tailed test should be done.(1,有很強的證據表明一方比另一方大或者小;2,隻對一側的資料感興趣。否則都應該用雙尾檢驗)
type 可選1或2或3
1:配對樣本的t檢驗
2:雙樣本等方差t檢驗
3:雙樣本異方差t檢驗
Note: 如果type選2或3,要先對A, B進行F檢驗,判斷方差是否相等。