2
$\begingroup$

I'm quite new to biostatistics so I apologize if my question is too dumb. I'm studying data transformation in biostatistics to fit my data to the normal distribution. I started with the Poisson distribution (which is quite common in the biostatistics: daily admissions, prevalence of rare disease etc) It is recommended to use the square root to fit data to normal distribution. I used stata and this free dataset ( https://www.kaggle.com/datasets/martj42/international-football-results-from-1872-to-2017?resource=download ) with the results of a huge amount of football matches.

I have created a new variable for this dataset, made by the whole amount of goals scored by both teams in each match. You will find that as the independent variable distributed as following:

Total goals for each day distribution

We can see that the distribution quite approximate the Poisson's one, as confirmed by the values of mean and std deviation.

enter image description here

Then, I've created a new variable with the square root of this variable and the distribution is the following (blue line is how the normal distrib with the same mean and std deviation looks like):

sqrt distribution

As you can see It's quite far from a normal distribution of my data, as proven by normality tests, but also easily visible from the q-q plot:

enter image description here

So, my question is, why sqrt didn't work? What can I do to transform my dataset to fit the normal distribution?

$\endgroup$
8
  • 1
    $\begingroup$ Why do you want to transform it to normally distributed? $\endgroup$
    – Tim
    Commented Mar 23, 2022 at 8:27
  • 1
    $\begingroup$ I am studying how to transform data in order to obtain from a skewed dataset a shift into a simmetric distribution to avoid using non-parametric tests. So I tested a random dataset to learn. $\endgroup$
    – vixxovs
    Commented Mar 23, 2022 at 8:56
  • $\begingroup$ What does "Inverse Normal" on the x-axis refer to? I suspect this is not a correct Normal QQ plot. These root data are actually very close to Normally distributed, given that they are discrete and widely spaced at the low end. $\endgroup$
    – whuber
    Commented Mar 23, 2022 at 14:01
  • $\begingroup$ @whuber It's the default "qnorm" setting in STATA but the point of the graph is the same. I think you are right and the problem could be in discrete nature of the variable with the low end spacing. $\endgroup$
    – vixxovs
    Commented Mar 23, 2022 at 23:13
  • $\begingroup$ The graph looks wrong; but since it's unclear exactly what goltotsqrt might be, it's hard to tell for sure. $\endgroup$
    – whuber
    Commented Mar 24, 2022 at 14:26

2 Answers 2

1
$\begingroup$

You did not tell us why you want this, if for regression modeling, it might be a better idea to look into Poisson regression, search this site. But, is your data Poisson distributed? Let us have a look

fitdistrplus::descdist(total, discrete=TRUE, boot=50)  

enter image description here

And the points are clearly away from the line indication Poisson. Probably the reason is that it is overdispersed relative to Poisson:

mean(total)
[1] 2.936
> var(total) 
[1] 4.3665

An often used alternative is the negative binomial, but that doesn't look much better in the plot above ...

The square root transformation stabilizes the variance, but is n ot necessarily best for getting an approximate normal distribution:

fitdistrplus::descdist(sqrt(total), boot=200, obs.pch=8)  

enter image description here

Interestingly, the plot shows almost no variation in the bootstrap distribution of kurtosis/skewness, maybe close to normal?

A transformation good for obtaining approximate symmetry is $\cdot^{2/3}$, let us try:

fitdistrplus::descdist( (total)^(2/3), boot=200, obs.pch=8)   

enter image description here

Both this transformations give higher kurtosis than the normal, basically, the long tail in this data is to heavy to get a very good transformations to normality.

$\endgroup$
0
$\begingroup$

By applying square-root transformation, we try to make distribution normal-like. Poisson's distribution is right-skewed, and square-root transformation compresses higher values so that lower values become more spread out. Resultantly, when we apply square-root transform to Poisson distribution, it becomes a normal-like distribution.

enter image description here

But, the point to note down is that the newly created normal-like distribution should not be compared with normal distribution with mean & varaince of previous Poisson's distribution. Instead, find new mean & variance after applying transformation and then plot the corresponding normal distribution for comparing how far the results are from normal distribution.

Additionally, If you are still unsatisfied with the results of square-root transformation, you can try $2\sqrt{{X+}\frac{3}{8}}$ (Anscombe transformation) or $\sqrt{X}+\sqrt{X+1}$ (Freeman-Tukey Transformation).

$\endgroup$
1
  • $\begingroup$ Hi, Thanks for your answer, the explanation at the beginning is so clear and I really appreciated that. I've tried the other two transformations you suggested, and I've compared the new variables with the theoretical distribution with the NEW mean and variance, but I'm still far from normality: shapiro wilk and other tests confirm a non-normal distribution. Maybe, as pointed by @whuber, the problem is with the discrete nature of the variable. $\endgroup$
    – vixxovs
    Commented Mar 23, 2022 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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