# Can I take the p-value from a probability table for a modified z-score, just like a z-score?

I have a question regarding the modified Z-score, can I use this score in a Z-probability table, i.e. the p-value from a modified z-score?

where:

z-score = (xi - μ)/σ
(the z-score probability can be obtained from links)

modified z-score = 0.6745(xi - median(x))/median(|xi-median(x)|) i can use modified z-score to get its probability from the same table

• Please explain what a "modified z-score" is and what probability model you are using.
– whuber
Commented Sep 24, 2022 at 20:43
• thanks @whuber, I'll try to be clear. It is considered that z-score = (xi - μ)/σ. Then from the z-score we can obtain the probability according to the probability table link, i.e., p-value from the z-score by looking at the table. Now a modified z-score = 0.6745(xi - median(x)) / median(|xi-median(x)|), where median(x): is the mean of the data set, so can I do this? Get p-value using modified z-score by looking at the same probability table. Commented Sep 24, 2022 at 21:14
• p-values are associated to statistical tests, which require null hypothesis and test statistic to be defined. You don't define any such thing, so what you call p-value doesn't seem to be a p-value. Commented Sep 24, 2022 at 22:13
• "The probability" you mention is supposed to be a probability of what? Commented Sep 24, 2022 at 22:16

It is worth noting that, with modern computers, we never (ever) have to use z-scores for sample statistics instead of t-scores even for large sample sizes, for which these two scores are quite close. The z-score is used only when one knows the true standard deviation (or variance) of the random variable (not of the sample), which happens either if one is God or when one generates the random sample on a computer. If the random variable is normally distributed, empirically (in a Monte Carlo simulation) you may approximate (and compare it with what you might get in the z-score or t-score table) that p-value with the following function in R.

modified_t_score_p_value <- function(modified_t_score, sample_size, simulation_size) {
coef <- qnorm(0.75)
sample <- matrix(rnorm(sample_size * simulation_size), nrow=simulation_size)
medians <- apply(sample, 1, median)
diff <- sample - medians
sample <- coef * diff / median(abs(diff))
print(paste0('p-value of modified sample z-score: ', mean(modified_t_score > sample)))
print(paste0('p-value of real t-score: ', pt(modified_t_score, sample_size-1)))
print(paste0('p-value of real z-score: ', pnorm(modified_t_score)))
}
modified_t_score_p_value(-2.0, 10, 100000)


Output

[1] "p-value of modified sample z-score: 0.039845"
[1] "p-value of real t-score: 0.0382764118853505"
[1] "p-value of real z-score: 0.0227501319481792"