<p>The distribution as I suspected seems very much like a normal distribution. However if someone knows to explain the reason (limit central theorem?) I will give select their answer.</p>
<pre><code>    # Do simulation    
    factor_calc = function(pvals){
      chi = qchisq(pvals,df=1,lower.tail=FALSE)
      return(median(chi)/qchisq(p=0.5,df=1))}
    pvals_studies = sapply(1:10000, function(i){runif(10000)})
    factor_distribution = apply(pvals_studies, 2, function(pvals){factor_calc(pvals)})

    # Plot resulting distribution
    hist(factor_distribution)
</code></pre>
<p><a href="https://i.sstatic.net/5PmPD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5PmPD.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-01-05T16:14:10.617Z
2023-01-05T16:14:10.617Z
Gero
<p>Considering that the p-value of a chi statistic(df=1) is uniform, the expected genomic inflation factor is λ=1. I show its calculation in R with the next chunk of code:</p>
<pre><code>chi = qchisq(df$pval,df=1,lower.tail=FALSE)
factor = median(chi)/qchisq(p=0.5,df=1)
</code></pre>
<p>My question comes here. Imagine that I compute λ on several (e.g. &gt;30 independent GWAS) studies. My null hypothesis is that all of them lack true-polygenic signals (i.e. uniform p-value distribution). What test can I do to reject H0? What is the distribution that I can assume for the inflation factors?</p>

CC BY-SA 4.0
2023-01-05T15:03:38.767Z
Why is *p* fixed at 0.5? Anyway it is unlikely to matter here: the answer could only be worked out from simulation studies in my opinion and a 0.05% threshold assigned against the resulting distribution.
M__
CC BY-SA 4.0
2023-01-05T16:06:02.723Z
You are right! I can simply do the simulation. On the other matter, I am not a statistician but I guess is related to the fact that 0.5 is the expected (p) value.
Gero
CC BY-SA 4.0
2023-01-05T17:06:44.877Z
Given the distribution is bell-shaped (looks normal) then *p*=0.5 makes sense, that can be justified. The key is getting the right simulation to test your statistic to model what your statistic is testing.  If that test works well, it doesn't really matter how you got there. Obviously simulations need replications and that sort of thing.
M__
<r><gwas>
Genomic inflation factor distribution (lambda)
# Genomic inflation factor distribution (lambda)

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

Considering that the p-value of a chi statistic(df=1) is uniform, the expected genomic inflation factor is λ=1. I show its calculation in R with the next chunk of code:
chi = qchisq(df$pval,df=1,lower.tail=FALSE)
factor = median(chi)/qchisq(p=0.5,df=1)

My question comes here. Imagine that I compute λ on several (e.g. >30 independent GWAS) studies. My null hypothesis is that all of them lack true-polygenic signals (i.e. uniform p-value distribution). What test can I do to reject H0? What is the distribution that I can assume for the inflation factors?

**Tags:** r, gwas
> **Comments:**
> **username_1**: Why is *p* fixed at 0.5? Anyway it is unlikely to matter here: the answer could only be worked out from simulation studies in my opinion and a 0.05% threshold assigned against the resulting distribution.  
> **username_0**: You are right! I can simply do the simulation. On the other matter, I am not a statistician but I guess is related to the fact that 0.5 is the expected (p) value.  
> **username_1**: Given the distribution is bell-shaped (looks normal) then *p*=0.5 makes sense, that can be justified. The key is getting the right simulation to test your statistic to model what your statistic is testing.  If that test works well, it doesn't really matter how you got there. Obviously simulations need replications and that sort of thing.  

---

## 1 answers

### Answer by username_0 on 2023-01-05. Score: 2 | Accepted answer

The distribution as I suspected seems very much like a normal distribution. However if someone knows to explain the reason (limit central theorem?) I will give select their answer.
    # Do simulation    
    factor_calc = function(pvals){
      chi = qchisq(pvals,df=1,lower.tail=FALSE)
      return(median(chi)/qchisq(p=0.5,df=1))}
    pvals_studies = sapply(1:10000, function(i){runif(10000)})
    factor_distribution = apply(pvals_studies, 2, function(pvals){factor_calc(pvals)})

    # Plot resulting distribution
    hist(factor_distribution)


---

