Factorial question

fahdguthmy

New member
Joined
Jan 3, 2020
Messages
14
Hi there.
I am attempting to perform a Monte Carlo simulation in excel to estimate the p-value using a Kruskal-Wallis test. I am currently reading the book "IBM SPSS Exact Tests" by Mehta and Patel. More specifically I am stuck on page 124 - Monte Carlo P-Values, Step number 1 which says "Generate a new one-way layout of scores by permuting the original layout, 'w', in one of of the N!/(n1!n2!...nK!) equally likely ways." What does this mean exactly? Does it mean I simply generate a random layout with no specific probability distribution or pattern as long as at least one pair in the layout is interchanged? This part has been killing me for the last month and I just can't figure it out. Every other step seems to be alright except this one step. I attached the book which is available online for free.
Please, please save me from this agony.
 

Attachments

  • Mehta.CR_Patel.NR_IBM SPSS Exact Tests.pdf
    1.9 MB · Views: 3
Hello.
I had posted a previous question but got no response. I'm going to rephrase my question as simply as possible so that it makes more sense:
What does this mean exactly:
N!/(n1!n2!n3!)
If N is the total sample size which is 500.
n1 is 140
n2 is 110
n3 is 250

The problem I am trying to solve involves permutation so I'm trying to understand what the above likelihood means exactly. please help.
 
\(\displaystyle n! = n \cdot (n-1) \cdot (n-2) \cdot ... \cdot 2\)

so your expression means

\(\displaystyle \dfrac{500 \cdot 499 \cdot 498 ...\cdot 2}{[140\cdot 139 ... \cdot 2][110 \cdot 109 ... \cdot 2][250\cdot 249 ... \cdot 2]}\)
 
Thanks Romsek.

Is the result considered permutation?

This represents the following.

You have 500 objects that fall into 3 classes.
Objects within a class are indistinguishable.
Class 1 has 140 objects
Class 2 has 110
Class 3 has 250

The expression represents the number of distinguishable ways that these objects can be arranged, so yes, it is a permutation.
 
Last edited:
Thanks again Romsek. the original question I had posted that covers the context of the problem is here:

[I am attempting to perform a Monte Carlo simulation in excel to estimate the p-value using a Kruskal-Wallis test. I am currently reading the book "IBM SPSS Exact Tests" by Mehta and Patel. More specifically I am stuck on page 124 - Monte Carlo P-Values, Step number 1 which says "Generate a new one-way layout of scores by permuting the original layout, 'w', in one of of the N!/(n1!n2!...nK!) equally likely ways." What does this mean exactly? Does it mean I simply generate a random layout with no specific probability distribution or pattern as long as at least one pair in the layout is interchanged? I attached the book which is available online for free.]

I guess my confusion stems from what the T/t statistic represents because they're is used in the Monte Carlo simulation after permutation. I under t represents the statistic of the original permutation and T are all the new test statistics from the N!(n1!n2!n3!) new permutations. Do they represent a CDF?
 

Attachments

  • Mehta.CR_Patel.NR_IBM SPSS Exact Tests.pdf
    1.9 MB · Views: 0
Yeah it absolutely does, many thanks.

Would you happen to know what the test statistic represents?
 
Yeah it absolutely does, many thanks.Would you happen to know what the test statistic represents?

Please do a google search using key-words " Kruskal-Wallis test"

Please come back and tell us if you have further questions.
 
I know how to derive the test statistic. But I dont understand what it represents/means in the case of Kruskal-Wallis. Does that make more sense?
 
I know how to derive the test statistic. But I dont understand what it represents/means in the case of Kruskal-Wallis. Does that make more sense?
There are several video tutorials are available that discuss this topic. Did you go through those?
 
yes. but they just say the result is the test statistic but not what it really represents. Do you have a good lead that explains this for kruskal wallis clearly?
 
Hello.
I had posted a previous question but got no response. I'm going to rephrase my question as simply as possible so that it makes more sense:
What does this mean exactly:

If N is the total sample size which is 500.
n1 is 140
n2 is 110
n3 is 250

The problem I am trying to solve involves permutation so I'm trying to understand what the above likelihood means exactly. please help.
I would say that \(\displaystyle \frac{N!}{(n_1!)\cdot(n_2!)\cdot(n_3!)}\) where \(\displaystyle n_1+n-2+n_3\le N\) is the number to arrange \(\displaystyle N\) objects in a line where \(\displaystyle n_j\) of them are identical.
Here is the over used example: Consider there word \(\displaystyle MISSISSIPPI\) Eleven letters with four I's, four S's & 2 P's texboooks ask how many ways are there to rearrange that word. One approach is to subscript the repeating letters \(\displaystyle MI_1S_1S_2I_2S_3S_4I_3P_1P_2I_4\) now we have eleven distinct letters that can be arranged in \(\displaystyle 11!\) ways. Pick any one of those arrangements. The subscripted I's can themselves be rearranged in \(\displaystyle 4!\) So that if we drop the subscripts from the Is we loose 4! of the arrangements. Same for the S', & P's
Hence the original string can be arranged in \(\displaystyle \frac{11!}{(4!)^2(2!)}\) ways.
 
Last edited:
Top