Add 肯德尔和谐系数

pull/2/head
benjas 4 years ago
parent 448e93c7d4
commit 4d3fdbe816

@ -223,7 +223,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 2,
"metadata": {},
"outputs": [
{
@ -441,6 +441,142 @@
"所以学生的学习潜在学习能力与自学能力有较强的正相关。"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 肯德尔和谐系数( Kendall)\n",
"当多个(两个以上)变量值以等级次序排列或以等级次序表示,描述这几个变量之间的一性程度的量,称为肯徳尔和谐系数。\n",
"<br>它常用来表示几个评定者对同组学生成绩用等级先后评定多次之间的一致性程度。\n",
"<br>\n",
"**同一评价者无相同等级评定时,计算公式:**\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}K^2(N^3-N)}\n",
"$$\n",
"<ul>\n",
" <li>N 被评的对象数;\n",
" <li>K 评分者人数或评分所依据的标准数;\n",
" <li>S 每个被评对象所评等级之和Ri与所有这些和的平均数的离差平方和\n",
"$$\n",
"S=\\sum^n_{i=1}(R_i-\\overline{R_i})^2\n",
"= \\sum^n_{i=1}R^2_i-\\frac{1}{n}(\\sum^n_{i=1}R_i)^2\n",
"$$\n",
" 当评分者意见完成一致时S取得最大值和谐系数是实际求得的S与其最大可能取值的比值故0≤W≤1."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**同一评价者有相同等级评定时,计算公式**\n",
"<br>\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}[K^2(N^3-N)-K\\sum^K_{i=1}T_i]}\n",
"$$\n",
"$$\n",
"T_i = \\sum^{mi}_{i=1}(n^3_{ij}-n_{ij})\n",
"$$\n",
"<ul>\n",
" <li>mi为第i个评价者的评定结果中有重复等级的个数。\n",
" <li>nij为第i个评价者的评定结果中第j个重复等级的相同等级数。\n",
" <li>对于评定结果无相同等级的评价者,T=0,因此只须对评定结果有相同等级的评价者计算Ti。"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**实例1:同一评价者无相同等级评定时**\n",
"某校开展学生小论文比赛请6位教师对入选的6篇论文评定得奖等级结果如下表所示试计算6位教师评定结果的 kanda和谐系数\n",
"\n",
"|论文编号 | 论文1 | 论文2 | 论文3 | 论文4 | 论文5 | 论文6 ||\n",
"| :----: | :----: | :----: | :----: | :----: | :----: | :----: |:----: |\n",
"| 老师1 | 3 | 1 | 2 | 5 | 4 | 6 | |\n",
"| 老师2 | 2 | 1 | 3 | 4 | 5 | 6 | |\n",
"| 老师3 | 3 | 2 | 1 | 5 | 4 | 6 | |\n",
"| 老师4 | 4 | 1 | 2 | 6 | 3 | 5 | |\n",
"| 老师5 | 3 | 1 | 2 | 6 | 4 | 5 | |\n",
"| 老师6 | 4 | 2 | 1 | 5 | 3 | 6 | |\n",
"| R |19 | 8 | 11 | 31 | 23 |34| ∑K = 126 |\n",
"| R^2 | 361 | 64| 121 |961|529|1156|R^2 = 3192|\n",
"\n",
"由于每个评分老师对6篇论文的评定都无相同的等级\n",
"$$\n",
"S=\\sum^6_{i=1}-\\frac{1}{6}(\\sum^6_{i=1}R_i)^2\n",
"= 3192- \\frac{1}{6} * 126^2 = 546\n",
"$$\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}K^2(N^3-N)} = \\frac{546}{\\frac{1}{12}6^2(6^3-6)}\n",
"=\\frac{546}{630}=0.87\n",
"$$\n",
"由W=0.87表明6位老师的评定结果有较大的一致性"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**实例1:同一评价者有相同等级评定时**\n",
"3名专家对6篇心理学论文的评分经等级转换下表所示,试计算专家评定结果的肯德尔和谐系数。\n",
"\n",
"|论文编号 | A | B | C | D | E | F ||\n",
"| :----: | :----: | :----: | :----: | :----: | :----: | :----: |:----: |\n",
"| 甲 | 1 | 4 | 2.5 | 5 | 6 | 2.5 | |\n",
"| 乙 | 2 | 3 | 1 | 5 | 6 | 4 | |\n",
"| 丙 | 1.5 | 3 | 1.5 | 4 | 5.5 | 5.5 | |\n",
"| R |4.5 | 10 | 5 | 14 | 17.5 |12| 63 |\n",
"| R^2 | 20.25 | 100| 25 |196|306.25|144|791.5|\n",
"\n",
"由于甲、丙对6篇论文有相同等级的评定\n",
"甲T = 23-2=6\n",
"丙T = (23 - 2)+(23 - 2) = 12\n",
"$$\n",
"S=\\sum^6_{i=1}-\\frac{1}{6}(\\sum^6_{i=1}R_i)^2\n",
"=791.5-\\frac{1}{6} * 63^2 = 130.00\n",
"$$\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}[K^2(N^3-N)-K\\sum^K_{i=1}T_i]}\n",
"=\\frac{130}{\\frac{1}{12}[3^2(6^3-6)-3*(6+12)]}\n",
"=\\frac{130}{153} = 0.849\n",
"$$\n",
"由W=0.849可看出专家评定结果有较大的一致性"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**肯德尔和谐系数的显著性检验**\n",
"评分者人数(k)在3-20之间被评者(N)在3-7之间时可查《肯德尔和谐系数(w)显著性临界值表》检验W是否达到显著性水平。若实际计算的S值大于k、N相同的表内临界值则W达到显著水平\n",
"\n",
"当K=6N=6查表得检验水平分别为α=0.01α=0.05的临界值各为S0.01=282.4,S0.05=221.4均小于实算的S=546故W达到显著水平认为6位教师对6篇论文的评定相当一致\n",
"\n",
"当被评者n>7时则可用如下的X2统计量对W是否达到显著水平作检验。"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tau 0.6\n",
"p_value 0.23333333333333334\n"
]
}
],
"source": [
"x1 = [10,9,8,7,6]\n",
"x2 = [10,8,9,6,7]\n",
"\n",
"tau, p_value = stats.kendalltau(x1,x2)\n",
"print('tau', tau)\n",
"print('p_value', p_value)"
]
},
{
"cell_type": "code",
"execution_count": null,

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

@ -223,7 +223,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 2,
"metadata": {},
"outputs": [
{
@ -441,6 +441,142 @@
"所以学生的学习潜在学习能力与自学能力有较强的正相关。"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 肯德尔和谐系数( Kendall)\n",
"当多个(两个以上)变量值以等级次序排列或以等级次序表示,描述这几个变量之间的一性程度的量,称为肯徳尔和谐系数。\n",
"<br>它常用来表示几个评定者对同组学生成绩用等级先后评定多次之间的一致性程度。\n",
"<br>\n",
"**同一评价者无相同等级评定时,计算公式:**\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}K^2(N^3-N)}\n",
"$$\n",
"<ul>\n",
" <li>N 被评的对象数;\n",
" <li>K 评分者人数或评分所依据的标准数;\n",
" <li>S 每个被评对象所评等级之和Ri与所有这些和的平均数的离差平方和\n",
"$$\n",
"S=\\sum^n_{i=1}(R_i-\\overline{R_i})^2\n",
"= \\sum^n_{i=1}R^2_i-\\frac{1}{n}(\\sum^n_{i=1}R_i)^2\n",
"$$\n",
" 当评分者意见完成一致时S取得最大值和谐系数是实际求得的S与其最大可能取值的比值故0≤W≤1."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**同一评价者有相同等级评定时,计算公式**\n",
"<br>\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}[K^2(N^3-N)-K\\sum^K_{i=1}T_i]}\n",
"$$\n",
"$$\n",
"T_i = \\sum^{mi}_{i=1}(n^3_{ij}-n_{ij})\n",
"$$\n",
"<ul>\n",
" <li>mi为第i个评价者的评定结果中有重复等级的个数。\n",
" <li>nij为第i个评价者的评定结果中第j个重复等级的相同等级数。\n",
" <li>对于评定结果无相同等级的评价者,T=0,因此只须对评定结果有相同等级的评价者计算Ti。"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**实例1:同一评价者无相同等级评定时**\n",
"某校开展学生小论文比赛请6位教师对入选的6篇论文评定得奖等级结果如下表所示试计算6位教师评定结果的 kanda和谐系数\n",
"\n",
"|论文编号 | 论文1 | 论文2 | 论文3 | 论文4 | 论文5 | 论文6 ||\n",
"| :----: | :----: | :----: | :----: | :----: | :----: | :----: |:----: |\n",
"| 老师1 | 3 | 1 | 2 | 5 | 4 | 6 | |\n",
"| 老师2 | 2 | 1 | 3 | 4 | 5 | 6 | |\n",
"| 老师3 | 3 | 2 | 1 | 5 | 4 | 6 | |\n",
"| 老师4 | 4 | 1 | 2 | 6 | 3 | 5 | |\n",
"| 老师5 | 3 | 1 | 2 | 6 | 4 | 5 | |\n",
"| 老师6 | 4 | 2 | 1 | 5 | 3 | 6 | |\n",
"| R |19 | 8 | 11 | 31 | 23 |34| ∑K = 126 |\n",
"| R^2 | 361 | 64| 121 |961|529|1156|R^2 = 3192|\n",
"\n",
"由于每个评分老师对6篇论文的评定都无相同的等级\n",
"$$\n",
"S=\\sum^6_{i=1}-\\frac{1}{6}(\\sum^6_{i=1}R_i)^2\n",
"= 3192- \\frac{1}{6} * 126^2 = 546\n",
"$$\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}K^2(N^3-N)} = \\frac{546}{\\frac{1}{12}6^2(6^3-6)}\n",
"=\\frac{546}{630}=0.87\n",
"$$\n",
"由W=0.87表明6位老师的评定结果有较大的一致性"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**实例1:同一评价者有相同等级评定时**\n",
"3名专家对6篇心理学论文的评分经等级转换下表所示,试计算专家评定结果的肯德尔和谐系数。\n",
"\n",
"|论文编号 | A | B | C | D | E | F ||\n",
"| :----: | :----: | :----: | :----: | :----: | :----: | :----: |:----: |\n",
"| 甲 | 1 | 4 | 2.5 | 5 | 6 | 2.5 | |\n",
"| 乙 | 2 | 3 | 1 | 5 | 6 | 4 | |\n",
"| 丙 | 1.5 | 3 | 1.5 | 4 | 5.5 | 5.5 | |\n",
"| R |4.5 | 10 | 5 | 14 | 17.5 |12| 63 |\n",
"| R^2 | 20.25 | 100| 25 |196|306.25|144|791.5|\n",
"\n",
"由于甲、丙对6篇论文有相同等级的评定\n",
"甲T = 23-2=6\n",
"丙T = (23 - 2)+(23 - 2) = 12\n",
"$$\n",
"S=\\sum^6_{i=1}-\\frac{1}{6}(\\sum^6_{i=1}R_i)^2\n",
"=791.5-\\frac{1}{6} * 63^2 = 130.00\n",
"$$\n",
"$$\n",
"W = \\frac{S}{\\frac{1}{12}[K^2(N^3-N)-K\\sum^K_{i=1}T_i]}\n",
"=\\frac{130}{\\frac{1}{12}[3^2(6^3-6)-3*(6+12)]}\n",
"=\\frac{130}{153} = 0.849\n",
"$$\n",
"由W=0.849可看出专家评定结果有较大的一致性"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**肯德尔和谐系数的显著性检验**\n",
"评分者人数(k)在3-20之间被评者(N)在3-7之间时可查《肯德尔和谐系数(w)显著性临界值表》检验W是否达到显著性水平。若实际计算的S值大于k、N相同的表内临界值则W达到显著水平\n",
"\n",
"当K=6N=6查表得检验水平分别为α=0.01α=0.05的临界值各为S0.01=282.4,S0.05=221.4均小于实算的S=546故W达到显著水平认为6位教师对6篇论文的评定相当一致\n",
"\n",
"当被评者n>7时则可用如下的X2统计量对W是否达到显著水平作检验。"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tau 0.6\n",
"p_value 0.23333333333333334\n"
]
}
],
"source": [
"x1 = [10,9,8,7,6]\n",
"x2 = [10,8,9,6,7]\n",
"\n",
"tau, p_value = stats.kendalltau(x1,x2)\n",
"print('tau', tau)\n",
"print('p_value', p_value)"
]
},
{
"cell_type": "code",
"execution_count": null,

Loading…
Cancel
Save