QuadraticWeightedKappa - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Education : EssayTools : QuadraticWeightedKappa

EssayTools

 QuadraticWeightedKappa
 computes a measure of correlation between two sets of data

 Calling Sequence QuadraticWeightedKappa( scores1, scores2 ) QuadraticWeightedKappa( scores1, scores2, Min, Max )

Parameters

 scores1, scores2 - list or array of integer data Min, Max - (optional) integers

Description

 • The QuadraticWeightedKappa command accepts two lists or arrays of numeric data and computes the quadratic weighted kappa value.
 • The quadratic weight kappa value is useful in the context of essay scoring where you want to measure how well one set of grades correlates to another set of grades.  A value of 1 indicates perfect agreement between the two grade sets.  Typically two sets of grades generated by independent human raters scoring the same sets of essays will achieve a quadratic weight kappa value of .8 or better (for open-ended long-form essay responses).
 • A negative score indicates an inverse correlation.  The two data sets agree somewhat, but in an opposite trend.
 • The Min and Max values are computed from the score data if not given.  If the score data does not cover the full range of possible scores then the minimum and maximum possible values can be specified.
 • This function is part of the EssayTools package, so it can be used in the short form QuadraticWeightedKappa(..) only after executing the command with(EssayTools). However, it can always be accessed through the long form of the command by using EssayTools[QuadraticWeightedKappa](..).

Examples

 > $\mathrm{with}\left(\mathrm{EssayTools}\right):$
 > $\mathrm{QuadraticWeightedKappa}\left(\left[9,7,8,7,6,8,3,5,10\right],\left[8,8,6,6,7,6,1,4,8\right]\right)$
 ${0.758620689655172}$ (1)
 > $\mathrm{QuadraticWeightedKappa}\left(\left[9,7,8,7,6,8,3,5,10\right],\left[3,5,6,6,7,6,1,4,8\right]\right)$
 ${0.438095238095238}$ (2)
 > $\mathrm{QuadraticWeightedKappa}\left(\left[9,7,8,7,6,8,3,5,10\right],\left[1,2,3,4,5,6,7,8,9\right]\right)$
 ${-0.166666666666667}$ (3)
 > $\mathrm{QuadraticWeightedKappa}\left(\left[9,7,8,7,6,8,3,5,10\right],\left[9,7,8,7,6,8,3,5,10\right]\right)$
 ${1.}$ (4)
 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $N≔1000$
 ${N}{≔}{1000}$ (5)
 > $\mathrm{R1}≔\mathrm{LinearAlgebra}:-\mathrm{RandomVector}\left[\mathrm{row}\right]\left(N,\mathrm{generator}=\mathrm{rand}\left(0..10\right)\right)$
 ${\mathrm{R1}}{≔}\left[{6}{,}{9}{,}{5}{,}{1}{,}{10}{,}{3}{,}{5}{,}{4}{,}{10}{,}{0}{,}{7}{,}{4}{,}{9}{,}{10}{,}{1}{,}{1}{,}{3}{,}{7}{,}{10}{,}{2}{,}{8}{,}{9}{,}{1}{,}{10}{,}{7}{,}{9}{,}{8}{,}{10}{,}{0}{,}{5}{,}{6}{,}{6}{,}{2}{,}{2}{,}{4}{,}{2}{,}{7}{,}{9}{,}{2}{,}{0}{,}{0}{,}{2}{,}{4}{,}{4}{,}{9}{,}{9}{,}{9}{,}{10}{,}{1}{,}{7}{,}{3}{,}{1}{,}{8}{,}{4}{,}{8}{,}{6}{,}{3}{,}{2}{,}{9}{,}{8}{,}{9}{,}{10}{,}{3}{,}{8}{,}{6}{,}{7}{,}{8}{,}{0}{,}{9}{,}{1}{,}{10}{,}{3}{,}{6}{,}{7}{,}{0}{,}{5}{,}{3}{,}{0}{,}{6}{,}{1}{,}{8}{,}{4}{,}{8}{,}{8}{,}{3}{,}{2}{,}{3}{,}{5}{,}{3}{,}{3}{,}{9}{,}{7}{,}{1}{,}{6}{,}{1}{,}{10}{,}{4}{,}{10}{,}{2}{,}{4}{,}{\dots }{,}{\text{⋯ 900 row vector entries not shown}}\right]$ (6)
 > R2 := zip( proc(a,b) local v := trunc(a+b); if(v<0,0,if(v>N,N,v)) end,R1,Sample(Normal(0,2),N));
 ${\mathrm{R2}}{≔}\left[{9}{,}{10}{,}{7}{,}{1}{,}{11}{,}{2}{,}{5}{,}{0}{,}{11}{,}{2}{,}{6}{,}{5}{,}{9}{,}{7}{,}{1}{,}{0}{,}{3}{,}{6}{,}{11}{,}{3}{,}{6}{,}{10}{,}{1}{,}{10}{,}{9}{,}{8}{,}{7}{,}{11}{,}{0}{,}{6}{,}{6}{,}{6}{,}{3}{,}{1}{,}{4}{,}{1}{,}{6}{,}{9}{,}{0}{,}{2}{,}{0}{,}{1}{,}{4}{,}{4}{,}{8}{,}{10}{,}{6}{,}{12}{,}{1}{,}{5}{,}{5}{,}{1}{,}{8}{,}{1}{,}{7}{,}{4}{,}{0}{,}{0}{,}{9}{,}{8}{,}{9}{,}{8}{,}{2}{,}{7}{,}{5}{,}{5}{,}{8}{,}{2}{,}{7}{,}{2}{,}{6}{,}{5}{,}{7}{,}{5}{,}{0}{,}{8}{,}{3}{,}{0}{,}{7}{,}{0}{,}{5}{,}{1}{,}{5}{,}{9}{,}{1}{,}{1}{,}{1}{,}{7}{,}{5}{,}{1}{,}{6}{,}{10}{,}{1}{,}{4}{,}{2}{,}{13}{,}{5}{,}{10}{,}{0}{,}{6}{,}{\dots }{,}{\text{⋯ 900 row vector entries not shown}}\right]$ (7)
 > $\mathrm{QuadraticWeightedKappa}\left(\mathrm{R1},\mathrm{R2}\right)$
 ${0.837098824348283}$ (8)
 > $\mathrm{Correlation}\left(\mathrm{R1},\mathrm{R2}\right)$
 ${0.845135744799198}$ (9)

Compatibility

 • The EssayTools[QuadraticWeightedKappa] command was introduced in Maple 17.
 • For more information on Maple 17 changes, see Updates in Maple 17.

 See Also