<p>The <a href="https://en.wikipedia.org/wiki/Standard_score" rel="nofollow noreferrer">standard score</a> can be estimated by using the sample mean and sample standard deviation as estimates of the population values. Just as you wrote it in the question.</p>
<p>The z-score is given by</p>
<p><span class="math-container">$ z = \frac{x - \bar{x}}{s}$</span></p>
<p>where:</p>
<p><span class="math-container">$x$</span> is the sample observation<br />
<span class="math-container">$\bar{x}$</span> is the mean of the sample,<br />
<span class="math-container">$s$</span> is the standard deviation of the sample.</p>
<p>Negative values mean that particular observation is <span class="math-container">$z$</span> standard deviations below the mean value, and negative <span class="math-container">$z$</span>-scores are very much expected. The process of standardization is a simple linear transformation and thus does not remove or change any degree of skewness in the original data. I guess your data is skew from the begging to values below the mean.</p>
<p>Yes you can compute the exact <span class="math-container">$p$</span>-values from the <span class="math-container">$z$</span>-scores and then apply a negative log transform. You can use a <span class="math-container">$z$</span> pre-computed table for this. Check <a href="https://www.youtube.com/watch?v=zTABmVSAtT0" rel="nofollow noreferrer">this video</a> for an example.</p>

CC BY-SA 4.0
2023-01-18T13:56:06.807Z
Thanks for this @JRodrigoF this guy (YouTube link) for teaching critical probability is a teaching maestro.
M__
CC BY-SA 4.0
2023-01-18T12:18:20.373Z
2023-01-18T12:18:20.373Z
JRodrigoF
<p>@JRodrigoF is the correct answer. I'll attempt to explain why the z-score is being used, because it is not immediately obvious.</p>
<p><span class="math-container">$F_{ST}$</span> is not trivial for anyone to understand <em>per se</em>. It is extremely useful for assessing migration - but what is the actual index that Ron Fisher devised?</p>
<p>Simulations suggest that <span class="math-container">$F_{ST}$</span> = 0.2 is threshold above which which strong population structure is considered. Thus <span class="math-container">$F_{ST}$</span> = 0 panmixia and <span class="math-container">$F_{ST}$</span> = 1 is zero migration. How to interpret everything in-between is difficult, except for the 0.2 threshold if the theoretical assumptions in the threshold calculation apply to real-world data. Thus the Z-score is an interesting concept.</p>
<p>In other words, the 0.2 threshold simulation suggests <span class="math-container">$F_{ST}$</span> is a non-linear index, which is very interesting in understanding it. Non-linear indices are a bit hairy because we all think they are linear, so 0.1 to 0.3 is one increment of migration, 0.3 to 0.5 another increment of migration. This is not true according to the simulation studies.</p>
<p>Z-scores get around this difficult by simply standardising the combined <span class="math-container">$F_{ST}$</span> and thats why they are using it.</p>
<p>It becomes particularly interesting if <span class="math-container">$F_{ST}$</span> is calculated per allele because then &quot;fitness traits&quot; can then be tracked. The allele doesn't necessarily need to be the actual fitness trait because of molecular &quot;hitchhiking&quot; (old John Maynard Smith terminology). Thus <span class="math-container">$F_{ST}$</span> Z-score within a population within a genome is the beginning of a datamining process. So example, the domestication of dogs why it becomes such a big deal, particularly if the comparison is a dog breed that is closest to the wolf genome. The actually traits selected for in dogs can now be identified. It would also operate between genomes, to identify outliers in dog dispersal, but the behavioural (behavioral) modifications that make dogs dogs is very interesting.</p>
<hr />
<p>The question is are super small probabilities generated to make log meaningful? I'm not sure in this instance probabilities well beyond very highly, highly significant are generated. If they are then a log transformation is useful.</p>
<p>For background the log-scale is used for transforming very small probabilities rather than use <em>e</em> nomenclature. It makes them more understandable for comparative purposes and allows you to do cool things like add and subtract them instead of multiplying and dividing. The smaller the probability value the higher the transformed value ... so in this case the higher the value the more interesting the result.</p>
<p>However, if the field simply does not use log transformation then it's not cool, because no-one will be able to comparatively interpret the transformed values. In phylogenetics it's done all the time, because the probabilities are really small, but anyone can immediately understand the values - because everyone uses this system. A key part of stats is clarity, not necessarily for those outside the field, but certainly for those within the field.</p>

CC BY-SA 4.0
2023-01-20T18:13:37.000Z
*very minor quibble it was Sewall Wright not Fisher who invented f-statistics
user438383
CC BY-SA 4.0
2023-01-20T18:34:04.173Z
@user438383 okay, but *F* is for Fisher (the statistic is named after him), so he must have done something with the development of the stat to get his name recognised like this.
M__
CC BY-SA 4.0
2023-01-23T09:41:05.187Z
Actually these are not Fisher's F statistics (in fact Fisher didn't develop the F-test, it was just named *after* him), but [Sewall Wright's family of F-statistics](https://www.nature.com/articles/166247a0), or **fixation indices**. Confusing, I know...
user438383
CC BY-SA 4.0
2023-01-23T10:10:00.743Z
@user438383, ok I dunno. The reality is Fisher invented so much of classical statistics prior Bayes and maximum likelihood, discovering something he didn't invent really surprises me.
M__
CC BY-SA 4.0
2023-01-18T14:07:04.417Z
2023-01-18T15:27:10.270Z
2023-01-18T15:27:10.270Z
M__
<p>I saw in the literature a lot genome wide scans showing <span class="math-container">$F_{ST}$</span> values in a 'z-transformed' format which seems to be bounded between 0 to infinity.</p>
<p>Examples are found easily searching for 'genome-wide scan <span class="math-container">$F_{ST}$</span>' and here is a paper where I could find such z-transformed <span class="math-container">$F_{ST}$</span>:</p>
<ol>
<li><a href="https://www.researchgate.net/publication/290186025_Identification_of_genomic_variants_putatively_targeted_by_selection_during_dog_domestication" rel="nofollow noreferrer">Identification of genomic variants putatively targeted by selection during dog domestication</a> (see figure 1)</li>
<li><a href="https://www.researchgate.net/publication/353800474_Genomic_divergence_during_feralization_reveals_both_conserved_and_distinct_mechanisms_of_parallel_weediness_evolution/figures?lo=1" rel="nofollow noreferrer">Genomic divergence during feralization reveals both conserved and distinct mechanisms of parallel weediness evolution</a> (see figure 3)</li>
</ol>
<p>How are the z-transformed <span class="math-container">$F_{ST}$</span> values calculated?</p>
<p>The only reference I could find so far is this: <a href="https://www.biostars.org/p/336980/" rel="nofollow noreferrer">Calculate <span class="math-container">$F_{ST}$</span>to draw Manhattan plot</a>. And this <a href="https://bmcgenomics.biomedcentral.com/articles/10.1186/s12864-020-06933-z#Sec9" rel="nofollow noreferrer">Population analysis of the Korean native duck using whole-genome sequencing data</a> where they just take the (<span class="math-container">$F_{ST}$</span> - mean <span class="math-container">$F_{ST}$</span>)/sd_<span class="math-container">$F_{ST}$</span>. But this is giving a lot of negative values, so should this be also surrounded by an absolute value?</p>
<p>Then is it possible to use the z-scores to get -log(p-values)?</p>

<r><gwas>
How to z-transform Fst and -log(p) values for genome wide selection scan?
# How to z-transform Fst and -log(p) values for genome wide selection scan?

(Asked by: username_0 on 2023-01-17)

I saw in the literature a lot genome wide scans showing $F\_{ST}$ values in a 'z-transformed' format which seems to be bounded between 0 to infinity.

Examples are found easily searching for 'genome-wide scan $F\_{ST}$' and here is a paper where I could find such z-transformed $F\_{ST}$:

1. [Identification of genomic variants putatively targeted by selection during dog domestication](https://www.researchgate.net/publication/290186025_Identification_of_genomic_variants_putatively_targeted_by_selection_during_dog_domestication) (see figure 1)
2. [Genomic divergence during feralization reveals both conserved and distinct mechanisms of parallel weediness evolution](https://www.researchgate.net/publication/353800474_Genomic_divergence_during_feralization_reveals_both_conserved_and_distinct_mechanisms_of_parallel_weediness_evolution/figures?lo=1) (see figure 3)

How are the z-transformed $F\_{ST}$ values calculated?

The only reference I could find so far is this: [Calculate $F\_{ST}$to draw Manhattan plot](https://www.biostars.org/p/336980/). And this [Population analysis of the Korean native duck using whole-genome sequencing data](https://bmcgenomics.biomedcentral.com/articles/10.1186/s12864-020-06933-z#Sec9) where they just take the ($F\_{ST}$ - mean $F\_{ST}$)/sd\_$F\_{ST}$. But this is giving a lot of negative values, so should this be also surrounded by an absolute value?

Then is it possible to use the z-scores to get -log(p-values)?

**Tags:** r, gwas

---

## 2 answers

### Answer by username_1 on 2023-01-18. Score: 3

The [standard score](https://en.wikipedia.org/wiki/Standard_score) can be estimated by using the sample mean and sample standard deviation as estimates of the population values. Just as you wrote it in the question.

The z-score is given by

$ z = \frac{x - \bar{x}}{s}$

where:

$x$ is the sample observation  
$\bar{x}$ is the mean of the sample,  
$s$ is the standard deviation of the sample.

Negative values mean that particular observation is $z$ standard deviations below the mean value, and negative $z$-scores are very much expected. The process of standardization is a simple linear transformation and thus does not remove or change any degree of skewness in the original data. I guess your data is skew from the begging to values below the mean.

Yes you can compute the exact $p$-values from the $z$-scores and then apply a negative log transform. You can use a $z$ pre-computed table for this. Check [this video](https://www.youtube.com/watch?v=zTABmVSAtT0) for an example.

> **Comments:**
> **username_2**: Thanks for this @JRodrigoF this guy (YouTube link) for teaching critical probability is a teaching maestro.  

---

### Answer by username_2 on 2023-01-18. Score: 1

@JRodrigoF is the correct answer. I'll attempt to explain why the z-score is being used, because it is not immediately obvious.

$F\_{ST}$ is not trivial for anyone to understand *per se*. It is extremely useful for assessing migration - but what is the actual index that Ron Fisher devised?

Simulations suggest that $F\_{ST}$ = 0.2 is threshold above which which strong population structure is considered. Thus $F\_{ST}$ = 0 panmixia and $F\_{ST}$ = 1 is zero migration. How to interpret everything in-between is difficult, except for the 0.2 threshold if the theoretical assumptions in the threshold calculation apply to real-world data. Thus the Z-score is an interesting concept.

In other words, the 0.2 threshold simulation suggests $F\_{ST}$ is a non-linear index, which is very interesting in understanding it. Non-linear indices are a bit hairy because we all think they are linear, so 0.1 to 0.3 is one increment of migration, 0.3 to 0.5 another increment of migration. This is not true according to the simulation studies.

Z-scores get around this difficult by simply standardising the combined $F\_{ST}$ and thats why they are using it.

It becomes particularly interesting if $F\_{ST}$ is calculated per allele because then "fitness traits" can then be tracked. The allele doesn't necessarily need to be the actual fitness trait because of molecular "hitchhiking" (old John Maynard Smith terminology). Thus $F\_{ST}$ Z-score within a population within a genome is the beginning of a datamining process. So example, the domestication of dogs why it becomes such a big deal, particularly if the comparison is a dog breed that is closest to the wolf genome. The actually traits selected for in dogs can now be identified. It would also operate between genomes, to identify outliers in dog dispersal, but the behavioural (behavioral) modifications that make dogs dogs is very interesting.

---

The question is are super small probabilities generated to make log meaningful? I'm not sure in this instance probabilities well beyond very highly, highly significant are generated. If they are then a log transformation is useful.

For background the log-scale is used for transforming very small probabilities rather than use *e* nomenclature. It makes them more understandable for comparative purposes and allows you to do cool things like add and subtract them instead of multiplying and dividing. The smaller the probability value the higher the transformed value ... so in this case the higher the value the more interesting the result.

However, if the field simply does not use log transformation then it's not cool, because no-one will be able to comparatively interpret the transformed values. In phylogenetics it's done all the time, because the probabilities are really small, but anyone can immediately understand the values - because everyone uses this system. A key part of stats is clarity, not necessarily for those outside the field, but certainly for those within the field.

> **Comments:**
> **username_3**: *very minor quibble it was Sewall Wright not Fisher who invented f-statistics  
> **username_2**: @user438383 okay, but *F* is for Fisher (the statistic is named after him), so he must have done something with the development of the stat to get his name recognised like this.  
> **username_3**: Actually these are not Fisher's F statistics (in fact Fisher didn't develop the F-test, it was just named *after* him), but [Sewall Wright's family of F-statistics](https://www.nature.com/articles/166247a0), or **fixation indices**. Confusing, I know...  
> **username_2**: @user438383, ok I dunno. The reality is Fisher invented so much of classical statistics prior Bayes and maximum likelihood, discovering something he didn't invent really surprises me.  

---

