# Which of those methods is the best for transforming my data into a normal distribution (if any)?

I have problems getting my data to be normally distributed. I hope someone more experienced can help.

I have the following data:

Type Grade        Conc      Type   Grade        Conc
A     0  424.294872         B       0 1082.300570
A     4 2035.972222         B       0    0.000000
A     0  423.842964         B       0   43.750000
A     0    0.000000         B       5  532.500000
A     0    0.000000         B       0 2133.152913
A     2  593.103448         B       3  694.747475
A     0 2164.427663         B       0    0.000000
A     4  709.972527         B       0    4.347826
A     0   69.696970         C       0  321.271930
A     0  521.052632         C       2 2132.975078
A     0  394.137931         C       0  562.832080
A     0 2108.531746         C       0    0.000000
A     1  459.126560         C       0    0.000000
A     0   42.857143         C       2  340.939824
A     5    4.347826         C       4 2386.016949
B     4  574.067599         C       5 1104.029605
B     0 3760.888889         C       1   11.041667
B     2  660.801839         C       2   29.069767
B     0    0.000000         C       3  835.454545
B     0    0.000000         C       4 2690.442890
B     1  640.073145         C       5  685.518018
B     0 3204.793028         C       1    7.575758


I want to determine if y is significantly dependent on x (I want the p-value and R^2) and if the type has an influence on it.

However, I asked several professors and a colleague of mine which would be the best way to do this. Each of them gave me a completely different answer, leading to very different results. Now I'm not sure which to use.

First one suggested simply sqrt:

fit <- lm(Grade~sqrt(Conc)*Type, data = data)
par(mfrow=c(2,2),mar=c(5,4,1.5,0.2))
plot (fit)
anova(fit)


Next one told me I could divide 1 by "Conc" like this:

fit <- lm(Grade~(I(1/Conc+0.0001))*Type, data = data)
par(mfrow=c(2,2),mar=c(5,4,1.5,0.2))
plot (fit)
anova(fit)


This one I've never seen done before, and I'm not sure if it really transforms the data to normal distribution.

Another insists that the only right way is using glm:

fit <- glm(Grade~Conc*Type, family = poisson, data = data)
anova(fit, test="Chisq")
summary (fit, test="Chisq")


However, a colleague is sure that Poisson would be wrong and instead quasiPoisson should be used (with anova(fit, test="F") )

As my knowledge of statistics is very limited, I have no idea which one is right. All of them give completely different results. So I'm just utterly confused

I also thought about using non-parametric test for my analysis, in order to avoid having to transform the data. However, none of my professors could help me with that and they insisted that transforming is the better way to do it (which I don't agree with, but since I never used non-parametric tests I have no idea how).

Edit: Thank you @Nick Cox for your very elaborate answer! I realize now how little my understanding of statistics actually is. Especially your question "What is it that you think should be normally distributed and why?" threw me off. I thought that the concentration (conc) needed to be normally distributed. As for why, simply because I was taught so in our (very basic) statistics course. However, thinking about it I don't even know if that makes sense in this case... Also I see how the missing information is an issue: I'm very sorry I didn't realize that from the start. I will look over my data again, think about it more carefully this time and I will try to edit my question to be less general.

• OLS regression does not assume that $y$ is distributed normally. Regression does not assume that $x$ is distributed normally. It assumes that $\varepsilon$ is distributed normally. – Alexis Apr 16 at 16:32
• Note that while you have here 1/Conc+0.0001 I don't believe you mean that. I have interpreted the intention as 1/(Conc + 0.0001). – Nick Cox Apr 16 at 17:15

There is a variety of statistical ideas being bandied around here, but no science! Surely there is some science that can inform expectations and guide analyses?

What I can discern here is as follows. (You refer to $$y$$ and $$x$$ but only the R code makes a guess possible at what they are for you.)

Grade (of what?) runs from 0 to 5 and your model statements imply that it is the outcome or response of interest you want to predict or explain. There is no information on whether it is counted or an ordered (graded) scale. Is there any precise measurement behind the values? Is 5 an upper limit in principle or is it just an observed maximum?

None of the models implied by the code is obviously applicable to a discrete response that is bounded (if it is). There is, in my view, no helpful sense in which grade can be thought as normally distributed, even when transformed, as its six spikes in a distribution will remain six spikes with any one-to-one transformation.

Concentration (of what?) clearly is highly skewed, as is common across many sciences that measure concentrations. The occurrence of several exact zeros requires more comment. Sometimes reports of zero are to be taken literally, while often there is just a detection limit that prohibits or inhibits report of a precise low concentration. The appearance of 0.0001 as a fudge/nudge/kludge constant is evidently a device to avoid dividing by zero when taking reciprocals. The problem with that is the lack of any evident rationale other than that dividing by zero cannot be contemplated. It is very rare that concentrations can be thought of as normally distributed, although many other distributions might be more plausible. Trial of (say) a lognormal is once again complicated by the exact zeros.

Type is just A, B, C and can't be discussed without more detail.

Despite this fairly lengthy commentary, my stance is that none of the procedures suggested to you, or any other, can be honestly recommended without further information. Presumably all the people you consulted -- despite disagreeing with each other -- were privy to the scientific (chemical, physical, biological, geological, whatever) context we aren't given here.

To try to see what is going on, I plotted quantiles (ordered values) versus an estimate of cumulative probability -- precisely, (rank $$-$$ 0.5) / subsample size -- separately by grade, with some indication of type, although that is not prominent in the design. The use of cube root scale is no more than pragmatic, although some fairly strong transformation is needed, and cube root has the small advantage that zeros map to zeros without fudging.

The plot doesn't respect the convention that response is plotted vertically -- but it allows more scrutiny of whether and how grade and concentration are related than does a table.

Although it is not news to you, presumably, the simple but also fundamental fact that this is a very small dataset, and so the subsets are even smaller, does make it especially hard to see whether there are any predictable patterns.

How to transform to nearer normal distributions seems a red herring here. What is it that you think should be normally distributed and why? It is, however, a little helpful if each distribution is less skewed than the original data.

PS Thanks for giving the data. Any readers wanting to try analyses might find this listing a little easier to import into their favourite software. The variables are type, grade and concentration in that order.

"A" 0  424.294872
"A" 4 2035.972222
"A" 0  423.842964
"A" 0           0
"A" 0           0
"A" 2  593.103448
"A" 0 2164.427663
"A" 4  709.972527
"A" 0    69.69697
"A" 0  521.052632
"A" 0  394.137931
"A" 0 2108.531746
"A" 1   459.12656
"A" 0   42.857143
"A" 5    4.347826
"B" 4  574.067599
"B" 0 3760.888889
"B" 2  660.801839
"B" 0           0
"B" 0           0
"B" 1  640.073145
"B" 0 3204.793028
"B" 0  1082.30057
"B" 0           0
"B" 0       43.75
"B" 5       532.5
"B" 0 2133.152913
"B" 3  694.747475
"B" 0           0
"B" 0    4.347826
"C" 0   321.27193
"C" 2 2132.975078
"C" 0   562.83208
"C" 0           0
"C" 0           0
"C" 2  340.939824
"C" 4 2386.016949
"C" 5 1104.029605
"C" 1   11.041667
"C" 2   29.069767
"C" 3  835.454545
"C" 4  2690.44289
"C" 5  685.518018
"C" 1    7.575758


EDIT: I plotted in terms of 1/ (concentration + 0.0001), which sends 0 to 10000 and squeezes the non-zero concentrations, which range from 4.347826 to 3760.889, into the interval .2299947147 to .0002658946. Far from dealing with the exact zeros, it has converted them all to massive outliers. Someone's intuition was that adding a small constant to zeros was a conservative nudge, but that nudge was not thought through in terms of what it implies on reciprocal scale. Often I see the related fallacy that log(value $$+$$ very tiny number) is a way to cope with zero values, but the problem is the same.

Another approach is to shrug our shoulders and omit the exact zeros as bad news that we don't know how to handle (8 out of 44 observations). That done, log scale is more than natural, but it is hard for me to see any relationships whatsoever.