A p-value is the probability you would get the results you got or more extreme results if the null hypothesis is true. For our current example, if self-esteem boosting measure had NO EFFECT (the null hypothesis), then the scores that were obtained in the treatment and control groups should have arisen by a chance assignment of the pooled scores.
Recall that the data are:
The difference in mean scores in the observed data is 3.85.
We can intuitively explore whether this difference is likely due to chance by
MTB > Stack 'Treatment' 'Control' c3; SUBC> Subscripts c4; SUBC> UseNames. MTB > Sample 14 C4 c5. MTB > Unstack (C3); SUBC> Subscripts C5; SUBC> After; SUBC> VarNames. MTB > let c8(1) = mean(c6) - mean(c7)In order not to use up unecessary space, it is useful to know the following modification so that you unstack into the same columns each time:
MTB > Sample 14 C4 c5. MTB > Unstack c3 c6 c7; SUBC> Subscripts C5; SUBC> VarNames. MTB > let c8(2) = mean(c6) - mean(c7)Now we have the basis for writing a Macro (saved as Randomize.MAC):
GMACRO Randomize Do k1 = 1:100 Sample 14 C4 c5. Unstack c3 c6 c7; Subscripts C5; VarNames. let c8(k1) = mean(c6) - mean(c7) ENDDO ENDMACRO
Advice: Until you debug your macros, keep your DO loops small. You must save your minitab project and your minitab macro in the same folder.
Your run the macro by issuing the command:
MTB > %RandomizeLet's do it with 1000 (if it works with 100). Then we sort the difference we get by randomizing the data, count the number greater than or equal to 3.85, and figure out the proportion of times randomizing the results would give us a difference greater than the one we got with the actual data. This is one way of obtaining an intuitive p-value.