Skip to content

Instantly share code, notes, and snippets.

@alfredplpl
Created January 14, 2014 16:54
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/8421613 to your computer and use it in GitHub Desktop.
Save alfredplpl/8421613 to your computer and use it in GitHub Desktop.
> #各選択肢の出現回数を求めます
> choiceTable<-table(exam5)
> choiceTable
exam5
1 2 3 4 5
15 12 13 12 15
>
> #各選択肢に対して同じ回数出現しているかを統計的に調べます。
> #(カイ二乗検定による適合度検定)
> chisq.test(choiceTable)
Chi-squared test for given probabilities
data: choiceTable
X-squared = 0.6866, df = 4, p-value = 0.953
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment