How can I calculate the p-value (statistical significance) if my hypothesis asks for specific mean values?

I suppose this can be somehow calculated using ANOVA, but I could only find examples where the hypothesis states that all means are the same.

I.e. I have four groups, and my hypothesis states that the means will be:



Suppose the following (simplified) example:

I collect data by asking people on the street to order fruits according to their preference. There are four fruits (groups) to order: apple, banana, coconut, pear

So if participant P1 likes apples A the most, followed by coconut C, then pear P and bananas B as least preferred, I note the following data (position in the ordered list):

P1: A=1, B=4, C=2, P=3

participant P2 likes Pears the most, then apples, then coconut and at least bananas:

P2: A=2, B=4, C=3, P=1

and so on. This yields a table:

    A    |    B    |    C    |    P
    1    |    4    |    2    |    3
    2    |    4    |    3    |    1
... and a lot more data

My hypothesis is, that apple will be the most liked fruit, followed by banana, then coconut and as least preferred pears. This can be stated, using means, as:

xA = 1
xB = 2
xC = 3
xP = 4

How can I now check if the hypothesis is confirmed and with which statistical significance (e.g. is p-value smaller than 0.05?)


1 Answer 1


Posted the same question here: http://www.talkstats.com/showthread.php/61492-Hypothesis-testing-with-predefined-constant-means?p=176916&viewfull=1#post176916

The proposed solution was:

If I understand you question correctly, you do not need to specify the means to get an answer , You could just run a Kruskal-Wallis test and the appropriate post-hoc test afterwards (e.g Dunn's test).

There are many more possibilities for the outcome then your specification of means would allow: e.g if the Kruskal-Wallis is not significant therenate no clear prefemceres in any direction, or you could get a clear preferenc for the first position but none for the others and so on.

This seems to do it!


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.