# "z-score" for sparse data (taxon distribution)

**URL:** https://forum.qiime2.org/t/z-score-for-sparse-data-taxon-distribution/20612
**Category:** General Discussion
**Tags:** normalization
**Created:** [September 1, 2021, 2:34pm UTC](https://forum.qiime2.org/t/z-score-for-sparse-data-taxon-distribution/20612 "2021-09-01T14:34:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![thedam](https://forum.qiime2.org/user_avatar/forum.qiime2.org/thedam/32/5854_2.png) [@thedam](https://forum.qiime2.org/u/thedam)
#### Post date: [September 1, 2021, 2:34pm UTC](https://forum.qiime2.org/t/z-score-for-sparse-data-taxon-distribution/20612/1 "2021-09-01T14:34:40Z")

</div>

Hey, is there any "z-score" for sparse data like our count tables? I'd like somehow to compare how far a sample is from a group of samples;

For example:  
I have my ASV table, and let's say I take a taxon on genus level:  
`Actinobacteria;Actinobacteria;Bifidobacteriales;Bifidobacteriaceae;Bifidobacterium`.  
In my data, many samples have relative frequency equals to 0 of this taxon, but some of them have values like 0.002, 0.004 etc  
 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/f/fb8a2a9c609af68b36018e3a1c98ac08bdaf38e0.png)  
Now I'd like to somehow measure how many _kind of_ "standard deviations" my sample is far from the rest. I guess using a normal distribution is pointless...

Is there any good way to make such comparison?

---

<div class="post-metadata">

### Author: ![crusher083](https://forum.qiime2.org/user_avatar/forum.qiime2.org/crusher083/32/9597_2.png) [@crusher083](https://forum.qiime2.org/u/crusher083)
#### Post date: [September 1, 2021, 2:45pm UTC](https://forum.qiime2.org/t/z-score-for-sparse-data-taxon-distribution/20612/2 "2021-09-01T14:45:03Z")

</div>

Hi, Damian!

It is a wide topic because except for normalization it touches upon outlier detection, and they are both non-trivial for microbiome data. There would be more than one way to accomplish this, depending on what you're looking for.  
I'd start by reading publications on the normalization of microbiome data:  
[Methods for normalizing microbiome data: An ecological perspective](https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/2041-210X.13115)  
[Normalization and microbial differential abundance strategies depend upon data characteristics](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5335496/)

Cheers
