# d20: effect of “face-up” value

I was wondering whether you have a suggestion on how to program a specific R-program for (a lot of) d20 testing.

I have the null hypothesis that the face-up value of any dice (I'm mostly interested in d20, but the mechanic is the same) does not have any effect, positive or negative bias, on the coming roll.

The way I would like to make the experiment:

• I create a table with 10 small boxes on it with walls that all can be removed at the same time. I will make a mechanic tipping of the table to simulate a human throw.

• I will write down every result for each dice, input it a spreadsheet and later scan() it into R.

Here is my problem now:

I want R to tell me which face-up value gave the highest value afterwards. This means I need to program functions with twenty variables and then somehow, probably by using lm(), make it possible for me to analyze whether the p-value is lower/higher than 0.05.

Of course, I could force the face-up value to be the same every time, but I would rather test all face-up values at the same time if possible.

-
I lost you at the mention of lm(). Up to that point the question appears to concern identifying the die or dice attaining the maximum value within a collection of 20. After that, the references to lm() and p-values indicate you want to perform some kind of regression, which is a completely different question requiring a context you haven't described. Regression of what against what? What do you really want to "test" about your simulation? – whuber Sep 30 '11 at 16:56
I was thinking in the context of normal distribution. So yes, basically what I want to know is; which side of the dice attains the highest value on the next roll. – Jon Pedersen Sep 30 '11 at 17:07
OK, but isn't this just a pure R programming problem? If so, you'll get much more attention back on SO rather than here. But I'm not really sure because it's still unclear what you're really trying to accomplish. As far as I can tell, the outcome of your simulation is completely predictable. If there's any possibility of serial correlation in values, it will be due to how you initialize the dice into the boxes. If you make the initial positions random, there won't be any serial correlation among the maxima at all. – whuber Sep 30 '11 at 17:12