Solved – How to test the data against an specific normal distribution

MATLABnonparametricnormal distributionr

I need to test my data to see if it follows a normal distribution with specific mean and std like N~(mu, std) I know that this can be done by Kolmogorov-Smirnov test which has a function in both MATLAB and R but the default for these function is standard normal and I do not know how should I specify my mu and std in the function. If you can help me in any of these two softwares I will be thankful.

Best Answer

ks.test in R allows one to adjust the mean and sd of the distribution to be tested against. e.g.

x <- rnorm(1000, 4, 10)
ks.test(x, "pnorm", mean = 4, sd = 10)