R {{category R}} !!!頻度の検定 {{outline}} ---- !Reference 嶋田・阿部 (2017) Rで学ぶ統計学入門 https://m.media-amazon.com/images/I/61SwFdVnAGL._AC_UY218_.jpg !!χ二乗検定 !独立性の検定 イギリス英語とアメリカ英語で、 therefore の生起位置に違いがあるか。 ,位置, 文頭, 文中 ,英, 15, 96 ,米, 38, 53 {{pre therefore.data <- matrix(c(15,38,96,53), nrow=2, ncol=2) [,1] [,2] [1,] 15 96 [2,] 38 53 chisq.test(therefore.data) Pearson's Chi-squared test with Yates' continuity correction data: therefore.data X-squared = 19.179, df = 1, p-value = 1.19e-05 }} !適合度の検定 *理論的に想定される「期待頻度」にあっているか(適合しているか)の検定 *総語数が違うコーパスデータ内での頻度の違い **例:100万語のコーパスデータ内の36回と、50万語のコーパスデータ内の20回で頻度に差があるか *比率をもとに期待確率を設定する **比率は 100万 vs. 50万 なので、2:1 **全体が 1 になるように比率のスケールを調整するオプション rescale=T !!G検定 !!Fisher's exact probability test(正確確率法) !オッヅ比