1
$\begingroup$

I am currently writing my thesis, and one of my research questions involves testing a correlation between two variables from my questionnaire.

One of the variables is a number between 1.0 and 5.0, representing a person's personality score, and the other variable is the participants choice out of 3 options. To simplify things for the sake of this explanation, option 1 would be "evil", option 2 would be "moderate" and option 3 would be "good". I would like to find out if there is a correlation between a person's personality score and the choice they made (e.g. will people with a higher p score choose option 3 more?)

Unfortunately I was never good at statistics, so could anyone tell me how I can find the answer to this? Currently I'm messing around in SPSS, but I don't really know what I'm doing...

Kind regards

Edit: Would an ANOVA-test be a solution to this problem?

Edit2: This is a scatter plot of the data: scatter

$\endgroup$
2
  • 3
    $\begingroup$ As you have one ordinal variable (say z), and one categorical (say x), look into ordinal regression with z as response, or multinomial logistic regression with x as response (and z predictor, maybe splined ...). Maybe you can show us a plot? $\endgroup$ Commented Jul 17, 2020 at 1:39
  • $\begingroup$ The OP appears to actually have one ordinal and one interval variable (or, some might argue, two ordinal variables). Ignoring the inherent ordering in either of the variables strikes me as a terrible waste of information. $\endgroup$
    – Glen_b
    Commented Jul 17, 2020 at 11:53

1 Answer 1

2
$\begingroup$

Maybe you have data something like my fake data for 200 'subjects' graphed below, where x has 200 scores between 1 and 5, and y shows Option chosen. [Simulation and graph from R.]

stripchart(x ~ y, pch="|", ylim=c(.6,3.4))

enter image description here

If you're just interested in correlation, I'd suggest Spearman correlation between numerical scores x and ordinal categorical options y. Spearman correlation is based on ranks, and ordinal options can be ranked.

cor(x,y, method="s")
[1] 0.62997

A Kruskal-Wallis test shows highly significant differences in scores for the three options.

kruskal.test(x ~ y)

        Kruskal-Wallis rank sum test

data:  x by y
Kruskal-Wallis chi-squared = 79.208, df = 2, p-value < 2.2e-16

Ad hoc 2-sample Wilcoxon rank sum tests show significant differences in scores between Options 1 & 2 and between Options 2 & 3.

wilcox.test(x[y==1],x[y==2])$p.val
[1] 4.815738e-08
wilcox.test(x[y==2],x[y==3])$p.val
[1] 4.225357e-10

Depending on your objectives, you should also consider ordinal regressions as suggested by @kjetilbhalvorsen.


Note: In case you want to the individual values for x and y here is the code I used to simulate them:

set.seed(2020)
x1 = round(4*rbeta(50, 1,3)+1, 2)
x2 = round(4*rbeta(100,2,2)+1 ,2)
x3 = round(4*rbeta(50, 3,1)+1, 2)
x = c(x1,x2,x3)
y = rep(1:3, c(50,100,50))

Addendum, Changing data to integers: Based on discussion in Comments.

set.seed(2020)
x1 = round(4*rbeta(50, 1,3)+1)
x2 = round(4*rbeta(100,2,2)+1)
x3 = round(4*rbeta(50, 3,1)+1)
x = c(x1,x2,x3)
y = rep(1:3, c(50,100,50))
cor(x,y, method="s")
[1] 0.6035967
kruskal.test(x~y)

        Kruskal-Wallis rank sum test

data:  x by y
Kruskal-Wallis chi-squared = 73.012, df = 2,
  p-value < 2.2e-16

TAB = rbind(c(tabulate(x1),0),tabulate(x2),tabulate(x3))
TAB
     [,1] [,2] [,3] [,4] [,5]
[1,]   14   24    9    3    0
[2,]    8   26   39   23    4
[3,]    1    3    8   17   21

Chi-squared test rejects null hypothesis that HH and Choice (both treated as nominal, not ordinal, variables) are independent. Unlike Spearman correlation the chi-squared says nothing about the direction of the association.

chisq.test(TAB)

        Pearson's Chi-squared test

data:  TAB
X-squared = 98.331, df = 8, p-value < 2.2e-16

Table may be the best data display, but here is a marginally satisfactory version of a stripchart, using jitter (small random displacements) to minimize overplotting).

stripchart(x~y, method="jitter", pch="-")

enter image description here

After rounding HH scores to integers, everything works fine for my fake data. Choose the tests that you believe best match your data and objectives. (Inappropriate to try everything and just report what happens to show significance.)

$\endgroup$
5
  • $\begingroup$ Thank you for your reply. I'll try to explain the situation a bit better; I have two variables called HH-score (integer between 1.00 and 5.00) and choice (ordinal; Option 1, 2 and 3). HH-score is computed through a short personality test. - A higher HH-score means the participant can be deemed more "trustworthy". - Option 1 can be associated with "bad", Option 2 with "moderate" and Option 3 "good". I would like to know if there is a pattern in people's HH-score and their choice. $\endgroup$
    – Adnos
    Commented Jul 17, 2020 at 12:29
  • $\begingroup$ OK. Didn't understand that HH score is integer (Likert?). In my fake data just imagine all scores rounded to integers. Spearman correlation still works if both variables are ordinal. Also K-W test OK. Advice pretty much unchanged except that my stripchart might not be be the best choice of graphic display // Could use chi-sq test of independence on table of counts HH by Choice. But that wouldn't directly reveal direction of association. $\endgroup$
    – BruceET
    Commented Jul 17, 2020 at 17:55
  • $\begingroup$ See 'Addendum' to my Answer. Wishing you success on this. Please let me know if it's useful, or if you run into difficulties. Or if OK, just click check mark to 'Accept' answ. . $\endgroup$
    – BruceET
    Commented Jul 17, 2020 at 18:39
  • $\begingroup$ Thanks for your help, Bruce. I have one more question. Since I'm measuring if the choice that someone makes depends on their score, doesn't that make the score an independent variable and the choice a dependent one? In that case, would it still be okay to use a correlation test? $\endgroup$
    – Adnos
    Commented Jul 18, 2020 at 12:13
  • $\begingroup$ Would perhaps a multinomial logistic regression work best in this situation? $\endgroup$
    – Adnos
    Commented Jul 18, 2020 at 14:13

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.