0
$\begingroup$

I have one sample of values, each of them is a z-score from mutually independent z-scored distributions. I aimed at testing that the mean value of the sample is larger than zero. Originally I wanted to test it using one-sample permutation test, however, the z-scored distributions turn out to be skewed, so the sign flipping seems to be invalid. The distributions are skewed in a way, where most of the datapoints are negative but close to zero, while some of the data are positive with higher absolute value. Which test is appropriate in this situation?

$\endgroup$
13
  • $\begingroup$ Thanks for comment, I just want to clarify that I am not performing a test on z-scored distribution, but rather on a sample, where each of the values is a z-score, but from different distributions. $\endgroup$ – NeuroPanda Mar 24 at 23:40
  • $\begingroup$ But you still haven't said what you mean by z-scored. And what do you mean by 'different distributions'? Not sure how to make sense of a test on a dataset that is not a sample from a particular definable distribution, population, or process. $\endgroup$ – BruceET Mar 24 at 23:48
  • $\begingroup$ The z-scores were obtained by the formula you are mentioning (substracting mean and dividing by std). The different distributions correspond to different measurments, where within within each measurment some conditions were shuffled to obtain random distribution and observed value is z-scored in respect to that distribution, This has been done for multiple experiments/measurments which rendered z-score values constituing the tested sample. $\endgroup$ – NeuroPanda Mar 24 at 23:58
  • $\begingroup$ You give me limited choices how to try to help. Options are (a) I just pick a skewed sample with some negative values and try to illustrate a permutation test for $0$ mean. (b) You give me some data: along a row, commas separating values. (c) You give me an idea how to simulate data that might be enough like yours to be helpful. What is sample size? $\endgroup$ – BruceET Mar 25 at 0:05
  • $\begingroup$ Thank you, would be grateful even for (a). I am meanwhile thinking of how to describe nature of my data in simple and meaningful way. The sample size to perform the test on is 26 values. $\endgroup$ – NeuroPanda Mar 25 at 0:15
0
$\begingroup$

Data. Here is a right skewed sample that has some negative values, but a sample average $A$ somewhat above $0.$

set.seed(1234)
n = 200;  x = rexp(n, .1) - 8
a.obs = mean(x); a.obs
[1] 2.045604
stripchart(x, pch="|")
abline(v = mean(x), col="greens")

enter image description here

Permutation test. Now we use the sample mean as metric, permute signs of the $n = 200$ observations, and find the average a.perm of the sign-permuted data. With $10\,000$ such values we can get a good idea of the permutation distribution sample averages.

The null hypothesis that the mean is $0$ for the distribution from which x was randomly sampled is rejected. The P-value of the test is about $0.0035 < .05 = 5\%.$

set.seed(326)
a.prm = replicate(10^4, 
                   mean(sample(c(-1,1),n,rep=T)*x))
mean(abs(a.prm)>=abs(a.obs))
[1] 0.0035   # P-value of permutation test

hist(a.prm, prob=T, br=30, col="skyblue2", main="Permutation Dist'n")
 abline(v = c(a.obs,-a.obs), lwd=2, col="red", lty="dotted")

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.