Something like a runs test for multinomial data?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Something like a runs test for multinomial data?

Marta Garcia-Granero
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Bruce Weaver
Administrator
Hi Marta.  First, thank you for starting a new thread!  Second, I think some of the regulars in the sci.stat.* newsgroups might be able to help with this.  (I'm thinking of people like Ray Koopman, who seems to know just about everything about nonparametric tests, and a lot of other things to boot.)  If you like, I could re-post your question to sci.stat.math.

Cheers,
Bruce


Marta García-Granero-2 wrote
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Art Kendall
In reply to this post by Marta Garcia-Granero
I do not have a reference, and these suggestions are shooting from the hip.

Some kind to time series for nominal data?

Some kind of Markov chain where each face is a "state".  Over the long run the transition probabilities would be equal.

Art Kendall
Social Research Consultants


On 10/4/2011 10:50 AM, Marta García-Granero wrote:
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

David Marso
Administrator
In reply to this post by Marta Garcia-Granero
Shooting from the hip wearing kevlar and teflon ;-)
If you took the lag and crossed it with the sequence, wouldn't a Chi Square test give you this?

*Don't have 10 sided dice and wouldn't bother if I did  ;-).
INPUT PROGRAM.
+  LOOP #roll=1 TO 700.
+    COMPUTE outcome=TRUNC(UNIFORM(1)*10+1).
+    END CASE.
+  END LOOP.
END FILE.
END INPUT PROGRAM.

COMPUTE Loutcome=LAG(OUTCOME).
CROSSTABS /TABLES outcome BY Loutcome / STATISTICS Chi.



Marta García-Granero-2 wrote
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Marta Garcia-Granero
In reply to this post by Bruce Weaver
El 04/10/2011 17:16, Bruce Weaver escribió:
> Hi Marta.  First, thank you for starting a new thread!  Second, I think some
> of the regulars in the sci.stat.* newsgroups might be able to help with
> this.  (I'm thinking of people like Ray Koopman, who seems to know just
> about everything about nonparametric tests, and a lot of other things to
> boot.)  If you like, I could re-post your question to sci.stat.math.

Sure, do that, please. Also, I'm going to try David suggestion
concerning lagged values.

I leave for my class now. I'm going to ask the student to send me a copy
of the dataset to start trying all the ideas.

Thanks (Bruce&David)
Marta GG

>
> Cheers,
> Bruce
>
>
>
> Marta García-Granero-2 wrote:
>> Hi everybody:
>>
>> This is strictly not a SPSS question, but statistical.
>>
>> One of my students has rolled 700 times (he must have a lot of time) a
>> role-playing game dice with 10 faces. We have already solved (through a
>> goodness of fit test) whether the dice is balanced or not, but now he
>> asked me how to test if the sequence is random.
>>
>> I know that runs test needs either a continuous variable (that is
>> dichotomized), or a binary one. I did a bit of Googling (plus looking at
>> every statistics  book from my digital collection), and the only ideas I
>> have found are:
>>
>> - Permutation tests (difficult since the sample size is really high,
>> although I could take the first 100 to analyze)
>> - Create a set of binary variables with the presence/absence of each
>> category and run 10 different runs tests.
>>
>> We are also trying to find a way to find out whether one given result
>> (dice face) at position N is followed by certain values, but not by
>> others -->  sequence patterns.
>>
>> Any ideas?
>>
>> Best regards,
>> Marta GG
>>
>> Bruce, I DID start a new thread for this message ;)
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> LISTSERV@.UGA (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
> -----
> --
> Bruce Weaver
> [hidden email]
> http://sites.google.com/a/lakeheadu.ca/bweaver/
>
> "When all else fails, RTFM."
>
> NOTE: My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Something-like-a-runs-test-for-multinomial-data-tp4868930p4869013.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Art Kendall
In reply to this post by David Marso
to extend what David said use a few more lags.

COMPUTE Loutcome1=LAG(OUTCOME,1).
COMPUTE Loutcome2=LAG(OUTCOME,2).
COMPUTE Loutcome3=LAG(OUTCOME,3).
COMPUTE Loutcome4=LAG(OUTCOME,4).
...
CROSSTABS /TABLES outcome BY Loutcome1 to Loutcome4 / STATISTICS Chi.

Art Kendall
Social Research Consultants

On 10/4/2011 11:19 AM, David Marso wrote:

> Shooting from the hip wearing kevlar and teflon ;-)
> If you took the lag and crossed it with the sequence, wouldn't a Chi Square
> test give you this?
>
> *Don't have 10 sided dice and wouldn't bother if I did  ;-).
> INPUT PROGRAM.
> +  LOOP #roll=1 TO 700.
> +    COMPUTE outcome=TRUNC(UNIFORM(1)*10+1).
> +    END CASE.
> +  END LOOP.
> END FILE.
> END INPUT PROGRAM.
>
> COMPUTE Loutcome=LAG(OUTCOME).
> CROSSTABS /TABLES outcome BY Loutcome / STATISTICS Chi.
>
>
>
>
> Marta García-Granero-2 wrote:
>> Hi everybody:
>>
>> This is strictly not a SPSS question, but statistical.
>>
>> One of my students has rolled 700 times (he must have a lot of time) a
>> role-playing game dice with 10 faces. We have already solved (through a
>> goodness of fit test) whether the dice is balanced or not, but now he
>> asked me how to test if the sequence is random.
>>
>> I know that runs test needs either a continuous variable (that is
>> dichotomized), or a binary one. I did a bit of Googling (plus looking at
>> every statistics  book from my digital collection), and the only ideas I
>> have found are:
>>
>> - Permutation tests (difficult since the sample size is really high,
>> although I could take the first 100 to analyze)
>> - Create a set of binary variables with the presence/absence of each
>> category and run 10 different runs tests.
>>
>> We are also trying to find a way to find out whether one given result
>> (dice face) at position N is followed by certain values, but not by
>> others -->  sequence patterns.
>>
>> Any ideas?
>>
>> Best regards,
>> Marta GG
>>
>> Bruce, I DID start a new thread for this message ;)
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> LISTSERV@.UGA (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Something-like-a-runs-test-for-multinomial-data-tp4868930p4869031.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

David Marso
Administrator
Dice with magnificent memory???  You have been booted from our D&D chapter for illegal dice ;-)
Art Kendall wrote
to extend what David said use a few more lags.

COMPUTE Loutcome1=LAG(OUTCOME,1).
COMPUTE Loutcome2=LAG(OUTCOME,2).
COMPUTE Loutcome3=LAG(OUTCOME,3).
COMPUTE Loutcome4=LAG(OUTCOME,4).
...
CROSSTABS /TABLES outcome BY Loutcome1 to Loutcome4 / STATISTICS Chi.

Art Kendall
Social Research Consultants

On 10/4/2011 11:19 AM, David Marso wrote:
> Shooting from the hip wearing kevlar and teflon ;-)
> If you took the lag and crossed it with the sequence, wouldn't a Chi Square
> test give you this?
>
> *Don't have 10 sided dice and wouldn't bother if I did  ;-).
> INPUT PROGRAM.
> +  LOOP #roll=1 TO 700.
> +    COMPUTE outcome=TRUNC(UNIFORM(1)*10+1).
> +    END CASE.
> +  END LOOP.
> END FILE.
> END INPUT PROGRAM.
>
> COMPUTE Loutcome=LAG(OUTCOME).
> CROSSTABS /TABLES outcome BY Loutcome / STATISTICS Chi.
>
>
>
>
> Marta García-Granero-2 wrote:
>> Hi everybody:
>>
>> This is strictly not a SPSS question, but statistical.
>>
>> One of my students has rolled 700 times (he must have a lot of time) a
>> role-playing game dice with 10 faces. We have already solved (through a
>> goodness of fit test) whether the dice is balanced or not, but now he
>> asked me how to test if the sequence is random.
>>
>> I know that runs test needs either a continuous variable (that is
>> dichotomized), or a binary one. I did a bit of Googling (plus looking at
>> every statistics  book from my digital collection), and the only ideas I
>> have found are:
>>
>> - Permutation tests (difficult since the sample size is really high,
>> although I could take the first 100 to analyze)
>> - Create a set of binary variables with the presence/absence of each
>> category and run 10 different runs tests.
>>
>> We are also trying to find a way to find out whether one given result
>> (dice face) at position N is followed by certain values, but not by
>> others -->  sequence patterns.
>>
>> Any ideas?
>>
>> Best regards,
>> Marta GG
>>
>> Bruce, I DID start a new thread for this message ;)
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> LISTSERV@.UGA (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Something-like-a-runs-test-for-multinomial-data-tp4868930p4869031.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Bruce Weaver
Administrator
In reply to this post by David Marso
I've just read a bit of the introductory blurb to the runs test in Siegel & Castellan (1988).  They give the example of tossing a coin 20 times and obtaining n=10 heads and m=10 tails.  Two possible outcomes are:

H H H H H H H H H H T T T T T T T T T T  -- number or runs = 2
H T H T H T H T H T H T H T H T H T H T  -- number of runs = 20

They suggest that the first has too few runs, and the latter too many runs to seem fair.  So the signs of fairness for coin flipping are: 1) approximately equal numbers of heads & tails, and 2) an intermediate number of runs.

For the die with 10 faces, then, the two signs of "fairness" would be:  1) each outcome appearing approximately 10% of the time; and 2) the number of runs being neither too low nor too high.  The difficulty is in quantifying too low or too high.  

But in hopes that it might move things forward, I would append this to David's syntax:

* Number the runs.
do if $casenum EQ 1.
- compute run = 1.
else.
- compute run = lag(run) + (outcome NE lag(outcome)).
end if.
formats run (f5.0).

* Compute the length of each run.
AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=run
  /Length_of_run=N.

match files file = * / by run / first = firstrec.
exe.

* [1] Check for roughly equal proportions of the 10 outcomes.

frequencies outcome .
NPAR TESTS
  /CHISQUARE=outcome
  /EXPECTED=EQUAL
  /MISSING ANALYSIS.

* [2] Get the number and length of runs.
temporary.
select if firstrec.
frequencies length_of_run.

HTH.

p.s. - There have been a few replies to my re-posting of Marta's question at sci.stat.math.  You can view them here:  https://groups.google.com/group/sci.stat.math/topics?hl=en (Subject:  Runs test for multinomial data).


David Marso wrote
Shooting from the hip wearing kevlar and teflon ;-)
If you took the lag and crossed it with the sequence, wouldn't a Chi Square test give you this?

*Don't have 10 sided dice and wouldn't bother if I did  ;-).
INPUT PROGRAM.
+  LOOP #roll=1 TO 700.
+    COMPUTE outcome=TRUNC(UNIFORM(1)*10+1).
+    END CASE.
+  END LOOP.
END FILE.
END INPUT PROGRAM.

COMPUTE Loutcome=LAG(OUTCOME).
CROSSTABS /TABLES outcome BY Loutcome / STATISTICS Chi.



Marta García-Granero-2 wrote
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Bruce Weaver
Administrator
In reply to this post by Marta Garcia-Granero
Marta, I just noticed that Conover's well-known book "Practical Nonparametric Statisitics" (3rd Ed.) does not include any runs tests.  In the introduction, he describes them briefly, but then says:

"However, runs tests have very little power, and can be replaced in every case by another nonparametric test with much greater power.  Therefore tests based on the number of runs are not practical, and for that reason are not included in this book." (p. 3)

As far as I can tell, he doesn't specify which other nonparametric tests can be used instead.  

Cheers,
Bruce

Marta García-Granero-2 wrote
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

David Marso
Administrator
In reply to this post by Bruce Weaver
The signal-info/NOISE-SPAM : helpful/TROLL ratios on that group are abysmal!!!!
Bruce Weaver wrote
p.s. - There have been a few replies to my re-posting of Marta's question at sci.stat.math.  You can view them here:  https://groups.google.com/group/sci.stat.math/topics?hl=en (Subject:  Runs test for multinomial data).


David Marso wrote
Shooting from the hip wearing kevlar and teflon ;-)
If you took the lag and crossed it with the sequence, wouldn't a Chi Square test give you this?

*Don't have 10 sided dice and wouldn't bother if I did  ;-).
INPUT PROGRAM.
+  LOOP #roll=1 TO 700.
+    COMPUTE outcome=TRUNC(UNIFORM(1)*10+1).
+    END CASE.
+  END LOOP.
END FILE.
END INPUT PROGRAM.

COMPUTE Loutcome=LAG(OUTCOME).
CROSSTABS /TABLES outcome BY Loutcome / STATISTICS Chi.



Marta García-Granero-2 wrote
Hi everybody:

This is strictly not a SPSS question, but statistical.

One of my students has rolled 700 times (he must have a lot of time) a
role-playing game dice with 10 faces. We have already solved (through a
goodness of fit test) whether the dice is balanced or not, but now he
asked me how to test if the sequence is random.

I know that runs test needs either a continuous variable (that is
dichotomized), or a binary one. I did a bit of Googling (plus looking at
every statistics  book from my digital collection), and the only ideas I
have found are:

- Permutation tests (difficult since the sample size is really high,
although I could take the first 100 to analyze)
- Create a set of binary variables with the presence/absence of each
category and run 10 different runs tests.

We are also trying to find a way to find out whether one given result
(dice face) at position N is followed by certain values, but not by
others --> sequence patterns.

Any ideas?

Best regards,
Marta GG

Bruce, I DID start a new thread for this message ;)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Something like a runs test for multinomial data?

Marta Garcia-Granero
In reply to this post by Bruce Weaver
El 04/10/2011 23:40, Bruce Weaver escribió:

> Marta, I just noticed that Conover's well-known book "Practical Nonparametric
> Statisitics" (3rd Ed.) does not include any runs tests.  In the
> introduction, he describes them briefly, but then says:
>
> "However, runs tests have very little power, and can be replaced in every
> case by another nonparametric test with much greater power.  Therefore tests
> based on the number of runs are not practical, and for that reason are not
> included in this book." (p. 3)
>
> As far as I can tell, he doesn't specify which other nonparametric tests can
> be used instead.

I believe he was referring to permutation tests.

An update for everybody contributing to this topic:

It seems that they tested 5 different dice, and one of them was really
faulty, with a very low probability for one of the faces. The other four
were "fair dice", with roughly 10% probability for each face.

They liked David's idea for lagged data a lot, and they were going to
try it today, and inform me tomorrow.

They want to test now if the results can be influenced by who is rolling
the dice, so the group of role-games players are going to reunite again,
and roll the same dice in turns (150 times each one). We will analyze
the data using a repeated goodness of fit test (heterogeneity tests).

I'm also looking in books for another idea Art gave me (using Markov
chains).

This "experiment" reminds me of another one (as useless as this one) my
husband and I run once, concerning whether Halls citrus candy
distribution of flavors (lemon, orange and lime) was 1:1:1 in the packs
or not. My husband hated lime candy and he argued that there were too
many of them, while orange flavored (his favorites) were scarcer. He
ended up writing down in a piece of paper the flavor of everyone we had
for a month. I analyzed the data and he was right!.

Best regards and many thanks,
Marta GG

>
> Cheers,
> Bruce
>
>
> Marta García-Granero-2 wrote:
>> Hi everybody:
>>
>> This is strictly not a SPSS question, but statistical.
>>
>> One of my students has rolled 700 times (he must have a lot of time) a
>> role-playing game dice with 10 faces. We have already solved (through a
>> goodness of fit test) whether the dice is balanced or not, but now he
>> asked me how to test if the sequence is random.
>>
>> I know that runs test needs either a continuous variable (that is
>> dichotomized), or a binary one. I did a bit of Googling (plus looking at
>> every statistics  book from my digital collection), and the only ideas I
>> have found are:
>>
>> - Permutation tests (difficult since the sample size is really high,
>> although I could take the first 100 to analyze)
>> - Create a set of binary variables with the presence/absence of each
>> category and run 10 different runs tests.
>>
>> We are also trying to find a way to find out whether one given result
>> (dice face) at position N is followed by certain values, but not by
>> others -->  sequence patterns.
>>
>> Any ideas?
>>
>> Best regards,
>> Marta GG
>>
>> Bruce, I DID start a new thread for this message ;)
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> LISTSERV@.UGA (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
> -----
> --
> Bruce Weaver
> [hidden email]
> http://sites.google.com/a/lakeheadu.ca/bweaver/
>
> "When all else fails, RTFM."
>
> NOTE: My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Something-like-a-runs-test-for-multinomial-data-tp4868930p4870545.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD