I was working on a project that required me to perform some hypothesis testing. Specifically, the project is seeing whether or not Twitter sentiment has more influence on the Bitcoin prices in the Korean markets than it does in the US markets. My conclusion shows that there is almost no correlation between Twitter sentiment and Bitcoin prices, and this is the same for both American and Korean prices.

More specifically, the results that I found look like the following:

enter image description here

Without going into too much detail, TB and NLTK both represent two different Python NLP tools that I used on Twitter sentiments, "Lag" represents cases where I applied different methods of time lag to the data, and "Corr" is for the three different methods of calculating correlation that I used. Coinbase and Korbit are both cryptocurrency exchanges in each country.

Basically what I did is run the function contained within Python's Scipy library using the correlation metrics for both Coinbase and Korbit columns. I get a t-statistic and p-value of 0.0457 and 0.9637, respectively.

My conclusion is drawn that since the p-value is higher than a significance level of 0.5, we fail to reject the null hypothesis that "There is no difference between the two markets."

What's confusing me is that most of the resources that I read or study regarding p-values seems to speak under the assumption that the two groups are normally distributed, which mine are not. Is the approach that I have taken correct? If so, are t-tests also valid for such unstructured data?

Thank you.


Just wanted to add in some more detail regarding my project as I realized the information I provided is insufficient for a proper answer.

To be completely frank, the reason why I chose the three correlation calculation methods (i.e. Pearson, Kendall, and Spearman) is not under any particular reason. I wanted to simply find the correlation between Twitter sentiment and prices, and the only correlation calculation method I was familiar with was Pearson correlation. After seeing that the correlation was very low for both the US and Korean settings, my mentor (who's a graduate student) advised that I try other methods of calculating the correlation and suggested the Kendall and Spearman methods.

The reason why I conducted hypothesis testing is also under similar settings. My mentor advised that when I want to present that the findings of low correlation for both American and Korean prices, it isn't sufficient to simply say "The correlations are low and therefore -" but I should test my hypothesis and conclude whether there is statistical significance or not. I wasn't previously familiar with hypothesis testing, but I did roughly read up on it and found that I may be able to use the t-test's p-value in order to accept or reject the null hypothesis that states "Korean and US markets do not differ regarding correlation with Twitter sentiment data." It also seemed to make sense because the p-value is higher than a confidence level of 0.5, which apparently signifies that the null hypothesis is accepted.

  • 1
    $\begingroup$ To get a P-value you need a null distribution, which need not be normal or even based on normal populations. $\endgroup$
    – BruceET
    Commented Jun 22, 2019 at 7:02
  • 1
    $\begingroup$ You did not give a clue as to why hypothesis testing is relevant in this context, as opposed to point and interval estimation of a Spearman correlation coefficient. $\endgroup$ Commented Jun 22, 2019 at 11:16
  • $\begingroup$ Thanks for the heads-up, I'll edit in some more details about my project. $\endgroup$
    – Sean
    Commented Jun 22, 2019 at 11:40

1 Answer 1


The Pearson correlation test requires bivariate normality, but it's impossible to tell from the information you've provided if your data meets this assumption. If you find that your data is not bivariate normal, often times, you may be able to transform your data to make it bivariate normal and you could then perform a Pearson correlation test on the transformed data.

The Spearman rank correlation test maybe be performed if your data is not bivariate normal and cannot be transformed to be bivariate normal. This is because the Spearman rank correlation test is a non-parametric test, based on ranks. Under the null hypothesis of this test, and when you your sample is large, this test follows a t-distribution with $n-2$ degrees of freedom.

The Kendall rank correlation test is also a non-parametric test that uses a similar, but slightly different approach than the Spearman rank correlation test, so it does not demand any distributional assumptions. As a result, tests based on this would be appropriate for your data.

See Kendall, M.G. and J.D. Gibbons. Rank Correlation Methods. 5th ed. London: Oxford Univeristy Press, 1990 for more detailed information about these tests and their assumptions.

  • $\begingroup$ Hello, thanks for the answer. I'm a bit confused due to my lack of background knowledge, what do you mean when you say "tests based on this (Kendall)?" Right now what I did is simply use the two columns (Coinbase & Korbit) to run a Pyhon t-test. Is it incorrect if I use correlation values calculated via different methods? Thanks again. $\endgroup$
    – Sean
    Commented Jun 22, 2019 at 11:59
  • $\begingroup$ Kendall's test does not require distributional assumptions, so as long as the t-test in Python is producing that, you're probably going to be just fine. You should avoid using any statistical tests that require a specific distribution, unless you are confident your data meets those assumptions. Since I have no way of knowing what your data looks like you are best using either Spearman or Kendall's rank test. $\endgroup$ Commented Jun 23, 2019 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.