How do you calculate a correlation, that similar to Spearman and Pearson forumlar when you are only comparing one variable (age) to answer given by yes and no. As ages goes up more likely to answer yes. Is this possible?
Thankyou
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this communityHow do you calculate a correlation, that similar to Spearman and Pearson forumlar when you are only comparing one variable (age) to answer given by yes and no. As ages goes up more likely to answer yes. Is this possible?
Thankyou
You could code yes-no as 1, 0 (or any other integers) and then use standard formulas and software.
Whether that's any use will depend on your data and your problem.
I'd calculate fraction yes for each age and then plot against age. Some kind of smoother may help if patterns are not obvious.
Two wild guesses are that
Spearman correlation will make more sense
some kind of logit model with yes and no as response will be deeper yet, statistically and scientifically. (That's especially true if you have other variables.)