# Visually, how strong would you rate the association between this nominal predictor variable and continuous response variable?

I've yet to find an easy-to-understand and easy-to-implement way to statistically model the strength of association between nominal data and continuous data. So I'm trying to get a rough idea visually with box plots ordered by mean or median.

For example:

There is a lot of overlap, but to a novice like myself, there seems to be an upward trend. However, it's hard for me to rate the strength of the trend.

On the other hand, I've got this plot where where the separation between the boxes is mostly quite distinct, and I'm unafraid to say, "Yes! that's pretty strong association!":

I know the data here is ordinal, but it's just for contrast to the other chart.

Thanks!

I don't know what data you are specifically working with, but I'd like to make a few points that maybe help you work with your data.

If the data is purely data within groups that have no relation between each other, then finding a trend is meaningless, and the best you can do is test whether the means of any two groups are statistically significant, or tests between groups. Why is that? Think of it this way: if you give me a bunch of groups and observations within groups, then I can always just calculate the means by group and then order the groups by increasing mean, and plot them by this ordered group, and clearly I'm going to see a trend... because I plotted them such. Similarly, I can just choose to order these groups in any way. What's stopping me from taking the last 3 neighborhoods and moving them to the middle of the x axis? In fact, what is your x-axis? What does it mean to 'increase' neighborhood? Without any other information, these concepts are meaningless.

Essentially, without providing some structure to the groups, you cannot really say something about the trend, because any trend can be thought of some function $$f(x)$$, but you havn't defined $$x$$.

I'd recommend exploring why you're seeing this increase. How are these groups related? If you can find a way to measure that, then you have all the usual tools: correlation, regression, etc. For example, looking at your first plot, I could randomly just choose neighborhoods to plot in order, and get any trend I want (reversing them would suggest a decreasing trend, and random choice would suggest no trend). Now instead imagine you had a measure of the income per neighborhood. Then I suspect that you could observe something like what you have in your plot, where larger income on the x axis corresponds to higher sale prices (no idea if that makes sense in your context, but maybe helps?). In the second plot, you've exactly done this, because you picked out overall quality. Then you can easily fit a regression, or just a simple correlation between overall quality and sales price, and get a measure of 'relationship'.

More generally, you can define a neighborhood by characteristics that matter for your question. So maybe a neighborhood is a vector of (income, quality,number of stores, education,...). Then you can maybe fit a linear regression of sales price on these characteristics, and for coefficients that are significant, you can essentially say something to the effect of "neighborhoods that have higher income, higher quality, more stores, and less education" are typically going to feature higher sales prices.

• Hi doubled, thank you for the good write-up. I have some follow up questions and comments. Namely, while the idea of "Neighborhood" has no native idea of "order", I thought that if there was significant separation of their means, that perhaps there exists an underlying order that isn't intuitive. Perhaps an order of "desireability, income, quality", as you mentioned. My goal was to see if such an unseen order exists, and then perhaps encode the variables accordingly. Are you saying that is a bad idea? Commented May 4, 2020 at 23:29
• Second, I don't have any relevant data on income, education, etc for a given neighborhood. I'd love to get hold of something like that, but this data comes from a Kaggle competition. However, I've been reading about things like ANOVA and t-testing... deeper statistical concepts than I currently understand. Am I poking in the right direction by learning that stuff to help fill this 'nominal association' gap in my skillset? Commented May 4, 2020 at 23:33
• @rocksNwaves, you can certainly do things like t-tests and ANOVA (think of t-test as comparing whether two populations are different from each other, and ANOVA as comparing three or more populations), and these fall under the part of my response where I wrote "...best you can do is test whether the means of any two groups are statistically significant, or tests between groups" That's totally fine, and you can certainly say things to the effect of this group has the largest mean, and it's significant (maybe?), or similar statements. ANOVA and similar concepts is definitely the way forward... Commented May 5, 2020 at 0:15
• unless you have more data to describe whatever you are studying. The concept of " I thought that if there was significant separation of their means, that perhaps there exists an underlying order that isn't intuitive" is totally fine, and you can of course do ANOVA to test that hypothesis that the means are different. Then, if you have other variables, maybe look into Principal Component Analysis (PCA), or just run a regression with the variables to see what matters in determining the outcome of interest. Hope this helps, and best of luck! Commented May 5, 2020 at 0:17
• Thank you, it does help very much. Cheers! Commented May 5, 2020 at 0:20