# How to check if a data is in gaussian distribution in R or excel?

I know about the fitdist() function from the fitdistrplus package in R, however, I am not able to use it to predict a gaussian distribution. I can predict normal, logistic, weibull etc. How can I use it for gaussian? are there any other ways to predict this?

• If you can do "normal" you can do "Gaussian". They're the same thing. And where does fitdist come from? Its not in the base R packages. Always specify packages if mentioning an R function not in the base. – Spacedman Nov 8 '16 at 11:01
• This is what I am using to test the distribution type: fit.norm <- fitdist(a\$Hours, "norm") This tells me its not normal, so probably its not gaussian as well. How to figure out what distribution it is? – Chandresh Gupta Nov 8 '16 at 11:39
• I get: Error: object 'fitdist' not found. There is no such function. Edit your question and put the exact R code, from a clean session, into it. – Spacedman Nov 8 '16 at 14:56
• you would need to install the package "fitdistrplus" to use the function – Chandresh Gupta Nov 9 '16 at 7:39
• Anyway, this is all irrelevant to your question. Normal and Gaussian are the same thing. – Spacedman Nov 9 '16 at 14:19

You can try the following:

The minimum syntax you can use is:

fit.norm <- fitdist(x, "norm")

to fit the normal density function to the data x.

Use the parameters "gamma", "weibull", "lnorm" for fitting gamma, weibull and lognormal distributions respectively.

After doing that, you can use plot() function on your object fit.norm to visualize the fitted distribution ,q-q plot, p-p plot and empirical and theoretical CDF's.

Normal distribution and Gaussian distribution are one and the same.

The following is the output due to plot() function on the object generated by fitdist() function for 1000 standard normal variates.

• fitdist(runif(100),"pnorm") gives "Error in fitdist(runif(100), "pnorm") : The dpnorm function must be defined". You didn't even try this. The second argument of fitdist has to be "norm" here, not "pnorm" or "qnorm". – Spacedman Nov 10 '16 at 16:53
• While presenting, I made a mistake. You are right. – L.V.Rao Nov 10 '16 at 16:58
• @Spacedman I have corrected the typo. I observed that dnorm (without quotes) is same as "norm". – L.V.Rao Nov 10 '16 at 17:15
• @Spacedman Is there a function called dpnorm? – L.V.Rao Nov 10 '16 at 17:22
• No. It takes the string you give it, sticks "d" on the start, and looks for a function of that name to return a density. So if you can write the density, distribution, and quantile functions dfoo, pfoo, and qfoo for the fictonal foo distribution, then fitdist can act as a framework to fit parameters. – Spacedman Nov 10 '16 at 17:34

The Normal distribution is the same as the Gaussian distribution. Its just two names for the same thing. Whatever you do - fit parameters, compute goodness-of-fit, etc - if the documentation says its for a Normal distribution then you can say "Gaussian" instead. Completely and totally identical.

It depends on what you mean by predicting Gaussian/normal distribution.

If you want to check the fit, then you can estimate mean and standard deviation of your sample and plot two histograms: one for your sample and second after generating a sample Gaussian distribution with the mean and standard deviation. By comparing the two you can roughly "see" the fit.

• Have you missed the point about Gaussian and normal distributions being the same? – Spacedman Nov 9 '16 at 15:57
• No, I did not. I know its the same. Its a simple trick to compare a sample distribution with a known (normal aka Gaussian) one (if mean and std are known). – Subspacian Nov 10 '16 at 8:38