Skip to content

Instantly share code, notes, and snippets.

@alfredplpl
Last active January 3, 2016 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredplpl/8421257 to your computer and use it in GitHub Desktop.
Save alfredplpl/8421257 to your computer and use it in GitHub Desktop.
#過去の解答を読み込む
examH25<-read.csv("C:/center_kokugo - H25.csv",header=T)
examH24<-read.csv("C:/center_kokugo - H24.csv",header=T)
#過去問をくっつけます
exam<-rbind(examH25,examH24)
#選択肢が5個のものだけの解答を抽出します
exam5<-exam$Correct[exam$Choices==5]
#各選択肢の出現回数を求めます
choiceTable<-table(exam5)
choiceTable
#各選択肢に対して同じ回数出現しているかを統計的に調べます。
#(カイ二乗検定による適合度検定)
chisq.test(choiceTable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment