0
$\begingroup$

Given a sample of 6 workers, three were randomly selected for working environment A and three were selected for working environment B. The observed response (the number of widgets produced) was for workers under treatment A: 50, 120, 250 and for workers under treatment B: 250, 140, 150.

(a) Tell the null hypothesis where the average number of widgets produced under each treatment is equal versus a two-sided alternate hypothesis.
(b) Test the same hypothesis as in (a) but use a randomization test (using permutations).

So for (a), I have $H_o:\mu =0$ and $H_a:\mu\neq 0$ so I've let $d=A-B$, yielding -200, -20 and 100 respectively. Then $\bar{d}=-40$. I have $5$ d.f. and so my t-statistics is $t_5=(-40-0)/(\sigma/\sqrt{6})$. My estimate of $\sigma$ is $95.5$ using the regular formula, so we have $t_5=-1.026$. Then, p = P{|t_5|\geq 1.026}= 1.65 using R, which seems ridiculous.

My issue here is that this is not a matched-pairs design -- did I do something wrong with the setup?

For (b), I am not sure of the right way to randomize between the 6 samples.

  • 0
    What the hell was I thinking when I wrote my leq/geq comment? `leq` is less than or equal. D'oh! >_<2012-04-05

1 Answers 1

2

Regarding (a):
Firstly, it's a small problem in your R code. pt gives the area under the lower tail by default, and you were expecting the area in the upper tail.

2 * pt(1.026, df=5) ## 1.648  2* pt(1.026, df=5, lower.tail=FALSE) ## 0.352 

Secondly, your analysis uses the t-test for paired samples. However, because the observation units (workers) in group B are independent from the observation units in group A, you should be using the t-test for independent samples. The Wikipedia links go straight to the appropriate sections; they should contain all the info you need.

Regarding (b):
It's not called the randomization test because you'll be doing any randomizations; it's called the randomization test because the idea is thus:

$\mathrm H_0$: If group membership is independent of widget production, then we could just as easily expect the same numbers, but with different group memberships. The probability of the observations under this null hypothesis: If these were the 6 values available, and they were distributed over the groups by randomization without regard for group membership, what is the probability that the difference of the group means would be this much or more?

To get the probability of this-difference-or-greater ($\mathrm P(d < -40) + \mathrm P(40 < d)$), you'll need to get the distribution under the null of the differences. You obtain this null distribution by listing the difference for every permutation of the group memberships, or (once you get a lot of observations) by sampling from this list of permutations.

  • 0
    Nope, there are 20 ways to choose 3 from 6. Good luck!2012-04-05