0

Kendall Coefficient

Unsolved
Prob. and Stats

Difficulty: 2 | Problem written by Junaid Ahmed
Kendall's Coefficient is used to calculate the agreement between different variables or data points, for example for measuring agreement between raters. If the value of this coefficient is 0 then we can say that there is no agreement. If the value is 1 then the data points have the same value.

The mathematical equation of the Kendall coefficient is:

\(KD = \frac{S}{(n^{3}-n)\frac{k^{2}}{12}} \)

\(S= \sum [d - (\frac{d}{N})]^{2}\)

d is the data points

N is the number of items

k is the number of clusters

n is the number of ranked items

Write a Python function to find the Kendall coefficient for 3 data points corresponding to rating values for a single variable.

 

Sample Input:
<class 'int'>
d1: 3
<class 'int'>
d2: 5
<class 'int'>
d3: 7
<class 'int'>
N: 10
<class 'int'>
n: 10
<class 'int'>
K: 4

Expected Output:
<class 'float'>
0.1380681818181818

This is a premium problem, to view more details of this problem please sign up for MLPro Premium. MLPro premium offers access to actual machine learning and data science interview questions and coding challenges commonly asked at tech companies all over the world

MLPro Premium also allows you to access all our high quality MCQs which are not available on the free tier.

Not able to solve a problem? MLPro premium brings you access to solutions for all problems available on MLPro

Get access to Premium only exclusive educational content available to only Premium users.

Have an issue, the MLPro support team is available 24X7 to Premium users.

This is a premium feature.
To access this and other such features, click on upgrade below.

Log in to post a comment

Comments
Ready.

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)