Input
Comments
>
NX <-C (Rnorm (10))
Randomly generates 10 normal distributions of data
>
Nx
View NX
[1] -0.83241783-0.29609562-0.06736888-0.02366562 0.23652392 0.97570959
[7]-0.85301145 1.51769488-0.84866517 0.20691119
View the results
>
Shapiro.test (NX)
Shapiro-wilk method for normal state test
Shapiro-wilk normality Test
Data:nx
W = 0.9084, P-value = 0.2699
Test results because W is close to 1
The P value is greater than 0.05, so the data is a normal distribution and the results of the origin statistic are the same (below)
The normal detection of the Case II-R language Band (Kolmogorov-smirnov method)
Input
Comments
>
NX <-C (Rnorm (10))
Randomly generates 10 normal distributions of data
>
Nx
View NX
[1] -0.83241783-0.29609562-0.06736888-0.02366562 0.23652392 0.97570959
[7]-0.85301145 1.51769488-0.84866517 0.20691119
View the results
>
Ks.test (NX, "pnorm", mean = Mean (NX), SD = sqrt (var (nx))
Shapiro-wilk method for normal state test
Kolmogorov-smirnov test requires three input variables, and the data itself, mean and standard deviation
One-sample Kolmogorov-smirnov Test
Data:nx
D = 0.1828, P-value = 0.8344
Alternative hypothesis:two-sided
Test results, because
P value is greater than 0.05, so the data is normal distribution, and the results of origin statistics are the same