TransWikia.com

Kendall rank correlation coefficient's p-value

Data Science Asked on March 21, 2021

I’m trying to compute a p-value for a two tailed test following Wikipedia formula which indicates that:

one computes Z, and finds the cumulative probability for a standard
normal distribution at -|Z|. For a 2-tailed test, multiply that number
by two to obtain the p-value

I’m using this Rust’s library which computes Tau value and then you can get the significance from this source code.

The problem is that this calculator (with default values) gives a 2-sided p-value = 0.0389842391014099. Which is far from the p-value I’m getting. The steps I’m following are these:

  1. Compute Tau
  2. Compute the statistical significance: Z with significance = kendall::significance(tau, x.len())
  3. Gets the CDF from Gaussian Distribution with sigma = 1 using this GSL library’s function: cdf = gaussian_P(-significance.abs(), 1.0)
  4. Multiply that value by 2

I’m getting a very different value: 0.011946505026920469. I don’t understand what I’m missing. Perhaps it’s a misunderstanding of Gaussian distribution and it’s sigma param. Any kind of help would be really appreciated

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP