Data Science Asked by LordoftheRingYVR on January 31, 2021
I am new to Data Science and I have a python data frame with Number of days, CountofJobs, and AmountEarned what statistical method should I use to find a correlation between Days and AmountEarned.
NumberofDays CountofJobs AmountEarned
20 3 50000
22 18 10000
35 10 80000
Whether to use pearson's correlation coefficient or Spearman's correlation coefficient depends on what you want to measure ? Pearson's correlation coefficient measures the strength of a linear relationship between two variables. The variables should be on an interval or ratio scale. Ordinal variables cannot be used in pearson's test. The variables should satisfy certain assumption before the pearson's product moment correlation is applied. They are:
In case, the variables do not satisfy these assumptions they can either be transformed to meet them or we can use the spearman's rank correlation coefficient to measure correlation. The Spearman's method is primarily used when the data can be ranked, therefore correlation between ordinal, interval and ratio variables can be measured using this method. Also, this method measures the strength of a monotonic relationship between two variables.
Answered by Ankita Talwar on January 31, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP