比較排名
有許多機構會根據研究、教學、學生滿意度等因素為大學進行排名。常見的三個來源是 Times Higher Education World(THEW)University Ranking、Academic Ranking(ARW)of World Universities,以及 Center for World(CW)University Rankings。不過,同一所大學在不同機構之間常會拿到不同名次。要如何用量化方式衡量這些排名之間的一致或不一致程度?一個作法是使用像 Kendall's tau 這類的非母數名次相關係數。
已提供一個包含這三套排名的 DataFrame,名稱為 rankings_df。並且已經為你載入 pandas(作為 pd)、NumPy(作為 np),以及 SciPy 的 stats 套件。
本練習屬於課程
Python 推論基礎
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Compute Kendall's tau between the THEW and ARW rankings
tau_thew_arw, p_value_thew_arw = ____
# Compute Kendall's tau between the THEW and CW rankings
tau_thew_cw, p_value_thew_cw = ____
# Compute Kendall's tau between the ARW and CW rankings
tau_arw_cw, p_value_arw_cw = ____