As far as I understand, you have factors ("bad, "good" etc) and continuous "invitations". If you want to compare two groups you could use a t-test (e.g. Wilcoxon). If you want to compare all of the groups, you could use a simple linear regression of form:
$$ invitations = \beta_0 satisfaction_1 + \beta_1 satisfaction_2 + ... + u.$$
R example:
library("e1071")
iris = iris
table(iris$Species)
#iris = iris[!(iris$Species=="versicolor"),]
library(dplyr)
iris %>%
group_by(Species) %>%
summarise_at(vars(Sepal.Length), funs(mean(., na.rm=TRUE)))
Result (means):
# A tibble: 3 x 2
Species Sepal.Length
<fct> <dbl>
1 setosa 5.01
2 versicolor 5.94
3 virginica 6.59
Compare two groups:
# Two-samples Wilcoxon test
wilcox.test(iris$Sepal.Length[iris$Species=="setosa"], iris$Sepal.Length[iris$Species=="virginica"])
# The p-value is less than the significance level alpha = 0.05. We can conclude that Sepal Length is significantly different
Result:
Wilcoxon rank sum test with continuity correction
data: iris$Sepal.Length[iris$Species == "setosa"] and iris$Sepal.Length[iris$Species == "virginica"]
W = 38.5, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
Regression:
# Simple linear regression
summary(lm(Sepal.Length~Species, data=iris))
# p-values are smaller than 0.05 which means each factor's contribution is statistically different from the intercept
Result:
Call:
lm(formula = Sepal.Length ~ Species, data = iris)
Residuals:
Min 1Q Median 3Q Max
-1.6880 -0.3285 -0.0060 0.3120 1.3120
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.0060 0.0728 68.762 < 2e-16 ***
Speciesversicolor 0.9300 0.1030 9.033 8.77e-16 ***
Speciesvirginica 1.5820 0.1030 15.366 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.5148 on 147 degrees of freedom
Multiple R-squared: 0.6187, Adjusted R-squared: 0.6135
F-statistic: 119.3 on 2 and 147 DF, p-value: < 2.2e-16
The interesting bit here is Pr(>|t|)
. If the number in this column is smaller 0.05, you can say that the factor is significantly different from the intercept (which is the base category, in this case "setosa").
In this application, the column Estimate
directly gives you the mean of "setosa" for the intercept. The effect for "versicolor" is 0.9300, where 5.0060+0.9300=5.936, which is the mean for "versicolor" and so on.