# Calculate z-score in bootstrap

In my literature book I found that the z-score can be calculated by the following function:

z = (data point - mean) / standard deviation

Now I'm reading on bootstrap and I found that they calculated the z-score using the outcome of the boostrap analysis by the following R code:

$tm$ is a vector holding the difference in response times between two groups.

$diff.mean = function(x,i)$ $mean(x[i])$

$boot(tm,diff.mean,R=20000)$ $$z = tm.boott0/sd(tm.boott)$$ Can someone explain why the mean is not used in this formula? Is it because the mean is 0? If so, why is the mean 0?

• If you don’t provide more context, it will be difficult to answer... what is bootstrapped? – Elvis Mar 14 '15 at 15:38
• I run the bootstrap equivalent to a paired t-test by using a vector which holds the difference of two vectors. I'm bootstrapping to find a difference between two groups in terms of the mean. – Daemonstool Mar 14 '15 at 15:53
• Doesn’t the paired $t$-test bit explain why $0$ is taken as the expected value? In fact your bootstrap is used only to estimate a standard deviation. – Elvis Mar 14 '15 at 16:07
• So the mean is 0 as the expected difference between the two groups are 0? – Daemonstool Mar 14 '15 at 16:12
• yes it looks like it's because it's testing against 0 (it's like they're doing [score-0]/SE, where SE is the standard error) – Patrick Coulombe Mar 14 '15 at 16:26